[Top][All Lists]

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

[Bug gas/20427] Solaris rtld on SPARC does not allow R_SPARC_UA64 or R_S

From: ro at CeBiTec dot Uni-Bielefeld.DE
Subject: [Bug gas/20427] Solaris rtld on SPARC does not allow R_SPARC_UA64 or R_SPARC_64 relocations in 32-bit executables
Date: Wed, 03 Aug 2016 18:28:20 +0000


--- 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

Relocation Section:  .rela.dyn
  index  type               offset value  addend  section     symbol
    [9]  R_SPARC_64        0x107b0     0       0  .data      

* 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

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.


You are receiving this mail because:
You are on the CC list for the bug.

reply via email to

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