https://sourceware.org/bugzilla/show_bug.cgi?id=20427
--- Comment #8 from Rainer Orth <ro at CeBiTec dot Uni-Bielefeld.DE> --- Two more data points in addition to what Ali has discovered: * In addition to gas emitting those 64-bit relocs for 32-bit objects, I tried to build libtest32.so from Stefan's testcase with mainline gcc configured to use both gas and gld on sparc-sun-solaris2.12, which worked just fine (at least there was no error), unlike with ld, and produces Relocation Section: .rela.dyn index type offset value addend section symbol [...] [9] R_SPARC_64 0x107b0 0 0 .data .gomp_critical_user_ * However, according to my reading of the glibc sources, only the sparc64 runtime linker, /lib64/ld-linux.so.2, accepts the R_SPARC_64 reloc, while the sparc32 one, /lib/ld-linux.so.2 doesn't: sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela) accepts and handles it, while sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela) doesn't and errors out with _dl_reloc_bad_type printing "unexpected reloc type 0x32", just as Solaris ld.so.1 aborts with ld.so.1: main32: fatal: relocation error: file /homes/ro/rel64/libtest32.so: symbol .gomp_critical_user_: invalid relocation type for ELFCLASS32: 32 when trying to run main32. I don't have a Linux/SPARC machine around, so I cannot try this for real and may well be wrong in my reading. If that turns out to be true, though, both runtime linkers are correct (and consistent :-) while gas and gld get it wrong. Rainer -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils