2009-06-15 H.J. Lu <hongjiu.lu@intel.com>

* elf32-i386.c (elf_i386_allocate_dynrelocs): Update comments.
	* elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
This commit is contained in:
H.J. Lu 2009-06-15 18:25:20 +00:00
parent 048cbda441
commit 188dbb07f1
3 changed files with 15 additions and 10 deletions

View File

@ -1,3 +1,8 @@
2009-06-15 H.J. Lu <hongjiu.lu@intel.com>
* elf32-i386.c (elf_i386_allocate_dynrelocs): Update comments.
* elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
2009-06-15 H.J. Lu <hongjiu.lu@intel.com> 2009-06-15 H.J. Lu <hongjiu.lu@intel.com>
* elf32-i386.c (elf_i386_check_relocs): Reformat. * elf32-i386.c (elf_i386_check_relocs): Reformat.

View File

@ -2141,11 +2141,11 @@ elf_i386_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
asection *plt, *gotplt, *relplt; asection *plt, *gotplt, *relplt;
/* When a shared library references a STT_GNU_IFUNC symbol /* When a shared library references a STT_GNU_IFUNC symbol
defined in executable. the .got.plt slot in the shared library defined in executable, the address of the resolved function
will contain address of the .plt slot in the binary and only may be used. But in non-shared executable, the address of
its .got.plt will contain the resolved function that should be its .plt slot may be used. Pointer equality may not work
called. Pointer equality won't work correctly. PIE should correctly. PIE should be used if pointer equality is
be used if pointer equality is required here. */ required here. */
if (!info->shared if (!info->shared
&& (h->dynindx != -1 && (h->dynindx != -1
|| info->export_dynamic) || info->export_dynamic)

View File

@ -1983,11 +1983,11 @@ elf64_x86_64_allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
asection *plt, *gotplt, *relplt; asection *plt, *gotplt, *relplt;
/* When a shared library references a STT_GNU_IFUNC symbol /* When a shared library references a STT_GNU_IFUNC symbol
defined in executable. the .got.plt slot in the shared library defined in executable, the address of the resolved function
will contain address of the .plt slot in the binary and only may be used. But in non-shared executable, the address of
its .got.plt will contain the resolved function that should be its .plt slot may be used. Pointer equality may not work
called. Pointer equality won't work correctly. PIE should correctly. PIE should be used if pointer equality is
be used if pointer equality is required here. */ required here. */
if (!info->shared if (!info->shared
&& (h->dynindx != -1 && (h->dynindx != -1
|| info->export_dynamic) || info->export_dynamic)