diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2016-04-11 09:21:27 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2016-04-11 09:21:27 -0700 |
commit | b9e99a0be4ba956203e5f2e172d936e1e5f23d88 (patch) | |
tree | b9f340267ab1e3c40f84df0b01d291d666f915d6 /ld/testsuite/ld-i386/pr19939a.d | |
parent | 994aad6437e82ba41192b2235aed5adad61331fd (diff) | |
download | binutils-gdb-b9e99a0be4ba956203e5f2e172d936e1e5f23d88.tar.gz |
Properly handle dynamic reloc against normal symbolusers/hjl/pr19939
We shouldn't issue an error for read-only segment with dynamic IFUNC
relocations when dynamic relocations are against normal symbols.
bfd/
PR ld/19939
* elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Set
readonly_dynrelocs_against_ifunc to TRUE if dynamic reloc applies
to read-only section.
* elf32-i386.c (elf_i386_size_dynamic_sections): Issue an error
for read-only segment with dynamic IFUNC relocations only if
readonly_dynrelocs_against_ifunc is TRUE.
* elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
include/
PR ld/19939
* bfdlink.h (bfd_link_info): Add readonly_dynrelocs_against_ifunc.
ld/
PR ld/19939
* testsuite/ld-i386/i386.exp: Run PR ld/19939 tests.
* testsuite/ld-x86-64/x86-64.exp: Likewise.
* testsuite/ld-i386/pr19939.s: New file.
* testsuite/ld-i386/pr19939a.d: Likewise.
* testsuite/ld-i386/pr19939b.d: Likewise.
* testsuite/ld-x86-64/pr19939.s: Likewise.
* testsuite/ld-x86-64/pr19939a.d: Likewise.
* testsuite/ld-x86-64/pr19939b.d: Likewise.
Diffstat (limited to 'ld/testsuite/ld-i386/pr19939a.d')
-rw-r--r-- | ld/testsuite/ld-i386/pr19939a.d | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ld/testsuite/ld-i386/pr19939a.d b/ld/testsuite/ld-i386/pr19939a.d new file mode 100644 index 00000000000..5883caefe7f --- /dev/null +++ b/ld/testsuite/ld-i386/pr19939a.d @@ -0,0 +1,4 @@ +#source: pr19939.s +#as: --32 +#ld: -melf_i386 -shared -z defs +#error: undefined reference to `foo' |