Set SHF_INFO_LINK bit for SHT_REL/SHT_RELA sections
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 19 Dec 2013 19:34:47 +0000 (11:34 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 19 Dec 2013 19:34:47 +0000 (11:34 -0800)
commit9ef5d938819dff73d7640a2654b07df64670d7f9
tree035e8760ec659165e1dc2d2665604c02d3a85f33
parentfa8761a3e0d999ada63194291ddf9b308a8d8276
Set SHF_INFO_LINK bit for SHT_REL/SHT_RELA sections

It is a good pratice to set the SHF_INFO_LINK bit when the sh_info field
represents a section header index.

bfd/

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.

binutils/testsuite/

PR binutils/16317
* binutils-all/readelf.s: Updated.
* binutils-all/readelf.s-64: Likewise.

ld/testsuite/

PR binutils/16317
* ld-elf/linkinfo1.s: New file.
* ld-elf/linkinfo1a.d: Likewise.
* ld-elf/linkinfo1b.d: Likewise.
bfd/ChangeLog
bfd/elf.c
binutils/testsuite/ChangeLog
binutils/testsuite/binutils-all/readelf.s
binutils/testsuite/binutils-all/readelf.s-64
ld/testsuite/ChangeLog
ld/testsuite/ld-elf/linkinfo1.s [new file with mode: 0644]
ld/testsuite/ld-elf/linkinfo1a.d [new file with mode: 0644]
ld/testsuite/ld-elf/linkinfo1b.d [new file with mode: 0644]