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 /ld | |
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 'ld')
-rw-r--r-- | ld/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/linkinfo1.s | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/linkinfo1a.d | 8 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/linkinfo1b.d | 9 |
4 files changed, 26 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index f7e6e58..519c2cd 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2013-12-19 H.J. Lu <hongjiu.lu@intel.com> + + PR binutils/16317 + * ld-elf/linkinfo1.s: New file. + * ld-elf/linkinfo1a.d: Likewise. + * ld-elf/linkinfo1b.d: Likewise. + 2013-12-18 Vidya Praveen <vidyapraveen@arm.com> * lib/ld-lib.exp (check_lto_available): Support cflags, ldflags and diff --git a/ld/testsuite/ld-elf/linkinfo1.s b/ld/testsuite/ld-elf/linkinfo1.s new file mode 100644 index 0000000..dadda31 --- /dev/null +++ b/ld/testsuite/ld-elf/linkinfo1.s @@ -0,0 +1,2 @@ + .text + call foo@PLT diff --git a/ld/testsuite/ld-elf/linkinfo1a.d b/ld/testsuite/ld-elf/linkinfo1a.d new file mode 100644 index 0000000..8c6fb71 --- /dev/null +++ b/ld/testsuite/ld-elf/linkinfo1a.d @@ -0,0 +1,8 @@ +#source: linkinfo1.s +#ld: -shared +#readelf: -SW +#target: x86_64-* i?86-* + +#... + \[[ 0-9]+\] \.rel[a]?\.plt[ \t]+REL[A]?[ \t][ \t0-9a-f]+AI[ \t0-9a-f]+ +#pass diff --git a/ld/testsuite/ld-elf/linkinfo1b.d b/ld/testsuite/ld-elf/linkinfo1b.d new file mode 100644 index 0000000..cc3aaed --- /dev/null +++ b/ld/testsuite/ld-elf/linkinfo1b.d @@ -0,0 +1,9 @@ +#source: linkinfo1.s +#ld: -shared +#objcopy_linked_file: --strip-debug +#readelf: -SW +#target: x86_64-* i?86-* + +#... + \[[ 0-9]+\] \.rel[a]?\.plt[ \t]+REL[A]?[ \t][ \t0-9a-f]+AI[ \t0-9a-f]+ +#pass |