https://sourceware.org/bugzilla/show_bug.cgi?id=21725
--- Comment #9 from Jiong Wang <jiwang at gcc dot gnu.org> --- (In reply to Jiong Wang from comment #8) > sysdeps/arm/dl-machine.h: > > elf_machine_load_address (void) > extern Elf32_Addr internal_function __dl_start (void *) asm ("_dl_start"); > Elf32_Addr got_addr = (Elf32_Addr) &__dl_start; > Elf32_Addr pcrel_addr; > #ifdef __thumb__ > /* Clear the low bit of the funciton address. */ > got_addr &= ~(Elf32_Addr) 1; > #endif > asm ("adr %0, _dl_start" : "=r" (pcrel_addr)); > return pcrel_addr - got_addr; > > The __thumb__ hunk is suspicious, as Nick's patch will also update the low > bit. > > If I remove the "#ifdef __thumb__", the generated ld.so will also work. I think GLIBC ought to be fixed there to be more portable, the __thumb__ can be kept, but pcrel_addr should always be strippted as well if it's __thumb__. As the assumption of PC-rel relocation finished within assembler does not touch bit0 does not holds after Nick's fix. I will post a GLIBC fix. -- 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