aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2016-06-13 09:27:12 -0700
committerH.J. Lu <hjl.tools@gmail.com>2016-06-13 09:27:12 -0700
commitca8c86efe7765262e25ebb08004012ba2fdadf52 (patch)
tree552a4e2008c34cc8f907c9d0848754befd8748fa /bfd
parent97f50151221de0a023a8317559b1992a90f9cb8f (diff)
downloadgdb-ca8c86efe7765262e25ebb08004012ba2fdadf52.zip
gdb-ca8c86efe7765262e25ebb08004012ba2fdadf52.tar.gz
gdb-ca8c86efe7765262e25ebb08004012ba2fdadf52.tar.bz2
Add 2 i386 tests to call IFUNC functions via GOT
bfd/ * elf32-i386.c (elf_i386_relocate_section): Simplify IFUNC GOT32 adjustment for static executables. ld/ 2016-06-13 H.J. Lu <hongjiu.lu@intel.com> * testsuite/ld-i386/i386.exp: Run ifunc-1a and ifunc-1b. * testsuite/ld-i386/ifunc-1a.c: New file. * testsuite/ld-i386/ifunc-1b.S: Likewise. * testsuite/ld-i386/ifunc-1c.S: Likewise. * testsuite/ld-i386/ifunc-1d.S: Likewise.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf32-i386.c21
2 files changed, 13 insertions, 13 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 8e9ad82..2a1ae13 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2016-06-13 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf32-i386.c (elf_i386_relocate_section): Simplify IFUNC
+ GOT32 adjustment for static executables.
+
2016-06-13 Maciej W. Rozycki <macro@imgtec.com>
* elf32-mips.c (elf_mips_gnu_pcrel32): Update comment.
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 7e2b2cb..fbbf4ab 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -4032,21 +4032,16 @@ elf_i386_relocate_section (bfd *output_bfd,
}
relocation = off;
-
- /* Adjust for static executables. */
- if (htab->elf.splt == NULL)
- relocation += gotplt->output_offset;
}
else
- {
- relocation = (base_got->output_section->vma
- + base_got->output_offset + off
- - gotplt->output_section->vma
- - gotplt->output_offset);
- /* Adjust for static executables. */
- if (htab->elf.splt == NULL)
- relocation += gotplt->output_offset;
- }
+ relocation = (base_got->output_section->vma
+ + base_got->output_offset + off
+ - gotplt->output_section->vma
+ - gotplt->output_offset);
+
+ /* Adjust for static executables. */
+ if (htab->elf.splt == NULL)
+ relocation += gotplt->output_offset;
goto do_relocation;