bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Assembler unable to handle relative offsets in PIC code under cross-comp


From: Ayonam Ray
Subject: Assembler unable to handle relative offsets in PIC code under cross-compiling env.
Date: Mon, 30 Jan 2006 17:45:08 +0530 (IST)

Hi,

I'm trying to build a cross-compiling environment for AMD64 to run on x86
platforms using binutils-2.15.92.0.2.  I use the following command on my AMD64
machine to configure binutils:

CC="gcc -m32" ../configure --target=x86_64-redhat-linux \
        --prefix=$NIRMAAN_BUILD_ENV/usr \
        --program-suffix="-2.15" --enable-shared \
        --enable-targets=i386-redhat-linux

Then I did a "make install".  Both the steps went through fine with no errors.  
However, the installed assembler when run with the following options:

--traditional-format -V -Qy

on a particular assembly file (will ship it on request) gives the following 
errors:

GNU assembler version 2.15 (x86_64-redhat-linux) using BFD version 2.15
t.s: Assembler messages:
t.s:4671: Error: invalid sections for operation on `.L1430' and `L0'
t.s:4670: Error: invalid sections for operation on `.L1430' and `L0'
t.s:4669: Error: invalid sections for operation on `.L1424' and `L0'
<snipped>

This assembly code was obtained using GCC 2.3.2 using the "-fPIC -m64" option.  
The problem vanishes when I compile without the -fPIC option but keep the 
"-m64" option.  I.e., non-PIC code work while PIC code doesn't.

The problem also vanishes when I reconfigure the binutils package and
reinstall it with CC="gcc -m64".  Essentially the 64-bit executable works 
while the 32-bit executable doesn't.

Is there a solution to this problem already?

Thanks in advance and regards
Ayonam





reply via email to

[Prev in Thread] Current Thread [Next in Thread]