mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 14:49:38 +08:00

Since symbols created by HIDDEN and PROVIDE_HIDDEN assignments in linker script may be marked as defined, but not hidden, we can't set eh->local_ref to 1 in _bfd_x86_elf_link_symbol_references_local. Also R_386_GOT32X should be handled as just like R_386_GOT32 when relocating a section. The input R_386_GOT32X relocations, which can be relaxed, should have been converted to R_386_PC32, R_386_32 or R_386_GOTOFF. bfd/ PR ld/23189 * elf32-i386.c (elf_i386_relocate_section): Handle R_386_GOT32X like R_386_GOT32. * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't set eh->local_ref to 1 for linker defined symbols. ld/ PR ld/23189 * testsuite/ld-i386/i386.exp: Run pr23189. * testsuite/ld-x86-64/x86-64.exp: Likewise. * testsuite/ld-i386/pr23189.d: New file. * testsuite/ld-i386/pr23189.s: Likewise. * testsuite/ld-i386/pr23189.t: Likewise. * testsuite/ld-x86-64/pr23189.d: Likewise. * testsuite/ld-x86-64/pr23189.s: Likewise. * testsuite/ld-x86-64/pr23189.t: Likewise.
8 lines
268 B
Makefile
8 lines
268 B
Makefile
#as: --32 -mrelax-relocations=yes
|
|
#ld: -shared -melf_i386 -T pr23189.t
|
|
#readelf: -r --wide
|
|
|
|
Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 1 entry:
|
|
Offset Info Type Sym. Value Symbol's Name
|
|
[0-9a-f]+ +[0-9a-f]+ +R_386_RELATIVE +
|