aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elf.c7
2 files changed, 12 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 95355fc..70c7e72 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2013-12-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/16317
+ * elf.c (assign_section_numbers): Set the SHF_INFO_LINK bit for
+ SHT_REL/SHT_RELA sections when setting the sh_info field.
+
2013-12-19 Pierre Muller <muller@sourceware.org>
* peXXigen.c (rsrc_cmp): Fix unused variable warning.
diff --git a/bfd/elf.c b/bfd/elf.c
index b589e60..59b1d4b 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -3075,11 +3075,13 @@ assign_section_numbers (bfd *abfd, struct bfd_link_info *link_info)
{
d->rel.hdr->sh_link = elf_onesymtab (abfd);
d->rel.hdr->sh_info = d->this_idx;
+ d->rel.hdr->sh_flags |= SHF_INFO_LINK;
}
if (d->rela.idx != 0)
{
d->rela.hdr->sh_link = elf_onesymtab (abfd);
d->rela.hdr->sh_info = d->this_idx;
+ d->rela.hdr->sh_flags |= SHF_INFO_LINK;
}
/* We need to set up sh_link for SHF_LINK_ORDER. */
@@ -3166,7 +3168,10 @@ assign_section_numbers (bfd *abfd, struct bfd_link_info *link_info)
name += 5;
s = bfd_get_section_by_name (abfd, name);
if (s != NULL)
- d->this_hdr.sh_info = elf_section_data (s)->this_idx;
+ {
+ d->this_hdr.sh_info = elf_section_data (s)->this_idx;
+ d->this_hdr.sh_flags |= SHF_INFO_LINK;
+ }
break;
case SHT_STRTAB: