diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2013-12-19 11:34:47 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2013-12-19 11:34:47 -0800 |
commit | 9ef5d938819dff73d7640a2654b07df64670d7f9 (patch) | |
tree | 035e8760ec659165e1dc2d2665604c02d3a85f33 /binutils | |
parent | fa8761a3e0d999ada63194291ddf9b308a8d8276 (diff) | |
download | gdb-9ef5d938819dff73d7640a2654b07df64670d7f9.zip gdb-9ef5d938819dff73d7640a2654b07df64670d7f9.tar.gz gdb-9ef5d938819dff73d7640a2654b07df64670d7f9.tar.bz2 |
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.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/readelf.s | 2 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/readelf.s-64 | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/binutils/testsuite/ChangeLog b/binutils/testsuite/ChangeLog index 1023526..a1e6724 100644 --- a/binutils/testsuite/ChangeLog +++ b/binutils/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2013-12-19 H.J. Lu <hongjiu.lu@intel.com> + + PR binutils/16317 + * binutils-all/readelf.s: Updated. + * binutils-all/readelf.s-64: Likewise. + 2013-12-13 Kuan-Lin Chen <kuanlinchentw@gmail.com> Wei-Cheng Wang <cole945@gmail.com> diff --git a/binutils/testsuite/binutils-all/readelf.s b/binutils/testsuite/binutils-all/readelf.s index 22fb5d1..303e0c7 100644 --- a/binutils/testsuite/binutils-all/readelf.s +++ b/binutils/testsuite/binutils-all/readelf.s @@ -6,7 +6,7 @@ Section Headers: # On the normal MIPS systems, sections must be aligned to 16 byte # boundaries. On IA64, text sections are aligned to 16 byte boundaries. +\[ 1\] .text +PROGBITS +00000000 0000(34|40) 0000(08|10) 00 +AX +0 +0 +(.|..) - +\[ 2\] .rel.+text +REL. +0+ 0+.* 0000.. 0. +. +1 +4 + +\[ 2\] .rel.+text +REL. +0+ 0+.* 0000.. 0. +I +. +1 +4 # MIPS targets put .rela.text here. #... +\[ .\] .data +PROGBITS +00000000 0000(3c|48|50) 0000(04|10) 00 +WA +0 +0 +(.|..) diff --git a/binutils/testsuite/binutils-all/readelf.s-64 b/binutils/testsuite/binutils-all/readelf.s-64 index ec31f3f..2e05d68 100644 --- a/binutils/testsuite/binutils-all/readelf.s-64 +++ b/binutils/testsuite/binutils-all/readelf.s-64 @@ -8,7 +8,7 @@ Section Headers: +\[ 1\] .text +PROGBITS +0000000000000000 +00000040 +00000000000000.. +0000000000000000 +AX +0 +0 +.* +\[ 2\] .rel.+text +REL. +0+ +0+.* - +000000000000001. +000000000000001. +. +1 +8 + +000000000000001. +000000000000001. +I +. +1 +8 +\[ 3\] .data +PROGBITS +0000000000000000 +000000(48|50) +000000000000000[48] +0000000000000000 +WA +0 +0 +.* +\[ 4\] .bss +NOBITS +0000000000000000 +000000(4c|50|54|58) |