This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH][AArch64] Skip IFUNC relocations in debug sections
- From: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- To: Binutils <binutils at sourceware dot org>
- Cc: nd at arm dot com
- Date: Wed, 09 Aug 2017 12:05:39 +0100
- Subject: [PATCH][AArch64] Skip IFUNC relocations in debug sections
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Szabolcs dot Nagy at arm dot com;
- Nodisclaimer: True
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
Skip IFUNC relocations in debug sections ignored by ld.so.
Fixes the following ld test failures on aarch64:
FAIL: Build libpr18808.so
FAIL: Build libpr18808.so_2
FAIL: Run pr18808
aborting at bfd/elfnn-aarch64.c:4986 in elf64_aarch64_final_link_relocate.
bfd/
2017-08-09 Szabolcs Nagy <szabolcs.nagy@arm.com>
PR ld/18808
* elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
relocations in debug sections.
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c
index 86bae0eaa8..1ee56a4515 100644
--- a/bfd/elfnn-aarch64.c
+++ b/bfd/elfnn-aarch64.c
@@ -4981,8 +4981,16 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto,
const char *name;
bfd_vma addend = 0;
- if ((input_section->flags & SEC_ALLOC) == 0
- || h->plt.offset == (bfd_vma) -1)
+ if ((input_section->flags & SEC_ALLOC) == 0)
+ {
+ /* Dynamic relocs are not propagated for SEC_DEBUGGING
+ sections because such sections are not SEC_ALLOC and
+ thus ld.so will not process them. */
+ if ((input_section->flags & SEC_DEBUGGING) != 0)
+ return bfd_reloc_ok;
+ abort ();
+ }
+ else if (h->plt.offset == (bfd_vma) -1)
abort ();
/* STT_GNU_IFUNC symbol must go through PLT. */