PATCH: Resolve size relocation against non-empty TLS symbol
H.J. Lu
hongjiu.lu@intel.com
Fri Jan 18 22:59:00 GMT 2013
Hi,
Run-time size relocations against TLS symbols don't always work:
http://www.sourceware.org/bugzilla/show_bug.cgi?id=15030
since size relocations don't count as TLS relocations. As the result,
size relocations against TLS symbols may be resolved to 0. I checked
in this patch to resolve size relocation against non-empty TLS symbols.
As the consequence, if the TLS symbol size is changed at run-time,
the TLS symbol size at link-time will still be used since it has been
resolved at link-time.
H.J.
---
bfd/
2013-01-18 H.J. Lu <hongjiu.lu@intel.com>
* elf32-i386.c (elf_i386_allocate_dynrelocs): Clear pc_count for
non-zero TLS symbol.
(elf_i386_relocate_section): Resolve size relocation against
non-zero TLS symbol.
* elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Clear pc_count
for non-zero TLS symbol.
(elf_x86_64_relocate_section): Resolve size relocation against
non-zero TLS symbol.
ld/testsuite/
2013-01-18 H.J. Lu <hongjiu.lu@intel.com>
* ld-size/size-10.rd: Updated.
* ld-size/size-8.rd: Likewise.
* ld-size/size32-2-i386.d: Likewise.
* ld-size/size32-2-x32.d: Likewise.
* ld-size/size32-2-x86-64.d: Likewise.
* ld-size/size64-2-x32.d: Likewise.
* ld-size/size64-2-x86-64.d: Likewise.
More information about the Binutils
mailing list