mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-24 09:43:36 +08:00
97d343d400
x86, PLT relocation may contain R_386_TLS_DESC or R_X86_64_TLSDESC even though there is no real PLT. We need to add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL if there is a .rel.plt/.rela.plt section. bfd/ * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section. * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section. ld/ * testsuite/ld-i386/tlsdesc2.d: New test. * testsuite/ld-x86-64/tlsdesc2.d: Likewise.
11 lines
139 B
Makefile
11 lines
139 B
Makefile
#source: tlsdesc.s
|
|
#as: --32
|
|
#ld: -melf_i386 -shared -z now
|
|
#readelf: -d --wide
|
|
|
|
#...
|
|
.*\(PLTRELSZ\).*
|
|
.*\(PLTREL\).*
|
|
.*\(JMPREL\).*
|
|
#pass
|