diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2015-04-21 09:02:28 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2015-04-21 14:56:59 -0700 |
commit | cbdbbfcb5c99cf5316ea8e8e21cb4422c9ac57be (patch) | |
tree | f0a792c74dffaf104b87ef7ecf8fec42c0cbba90 /ld/testsuite/ld-i386/pr17689.out | |
parent | 8aae434443df61440ff5228f5c8fe3e5d4a38798 (diff) | |
download | binutils-gdb-users/hjl/pr18289.tar.gz |
i386: Allow copy relocs for building PIEusers/hjl/pr18289
This patch allows copy relocs for R_386_GOTOFF relocations in PIE.
bfd/
PR ld/18289
* elf32-i386.c (elf_i386_link_hash_entry): Add gotoff_ref.
(elf_i386_link_hash_newfunc): Initialize gotoff_ref to 0.
(elf_i386_create_dynamic_sections): Always allow copy relocs for
building executables.
(elf_i386_copy_indirect_symbol): Also copy gotoff_ref.
(elf_i386_check_relocs): Set gotoff_ref for R_386_GOTOFF.
(elf_i386_adjust_dynamic_symbol): Also allocate copy relocs for
PIE and R_386_GOTOFF.
(elf_i386_relocate_section): Allow R_386_GOTOFF in executable.
ld/testsuite/
PR ld/18289
* ld-i386/copyreloc-lib.c: New file.
* ld-i386/copyreloc-main.S: Likewise.
* ld-i386/copyreloc-main.out: Likewise.
* ld-i386/copyreloc-main1.rd: Likewise.
* ld-i386/copyreloc-main2.rd: Likewise.
* ld-i386/pr17689.out: Likewise.
* ld-i386/pr17689.rd: Likewise.
* ld-i386/pr17689a.c: Likewise.
* ld-i386/pr17689b.S: Likewise.
* ld-i386/pr17827.rd: Likewise.
* ld-i386/i386.exp: Run copyreloc tests.
Diffstat (limited to 'ld/testsuite/ld-i386/pr17689.out')
-rw-r--r-- | ld/testsuite/ld-i386/pr17689.out | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ld/testsuite/ld-i386/pr17689.out b/ld/testsuite/ld-i386/pr17689.out new file mode 100644 index 00000000000..38e03525155 --- /dev/null +++ b/ld/testsuite/ld-i386/pr17689.out @@ -0,0 +1,2 @@ +PASS +PASS |