This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gas misbehavior in binutils-2.16.1 for sh4 target and --enable-shared


while debugging a gcc issue, i noticed that `file` was giving me varying 
results; turns out that it was due to configuring binutils-2.16.1 with 
--enable-shared.  binutils-2.15 works as expected, so i'm inclined to think it 
a bug :).  the other quirky thing is readelf shows different Flags in the ELF 
header ...

using vanilla binutils-2.16.1 and binutils-2.15 on an amd64 host, i ran:
./configure --target=sh4-linux --enable-shared
make
touch test.s
./gas/as-new test.s -o test.o
file test.o
./binutils/readelf -h test.o | grep Flags

binutils-2.16.1 with --enabled-shared:
test.o: ELF 32-bit LSB relocatable, Hitachi SH, version 1 (SYSV), not stripped
Flags: 0x19, unknown ISA

binutils-2.16.1 without --enabled-shared:
binutils-2.15 with --enabled-shared:
test.o: ELF 32-bit LSB relocatable, Hitachi SH, version 1 MathCoPro/FPU/MAU 
Required (SYSV), not stripped
Flags: 0x1, sh1

running through strace shows that the correct libbfd.so is being loaded, 
libbfd-2.16.1.so from ./bfd/.libs/x86_64/libbfd-2.16.1.so ... so what 
gives ? :)

for reference, i tested a few different versions ... 2.15.92.0.2 and 
2.16.91.0.3 also have this odd behavior ...
-mike


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]