As discussed here: https://sourceware.org/ml/binutils/2013-11/msg00315.html The testcase for SHF_INFO_LINK: a.c: int global_var = 42; int function(int i) { return i + global_var; } $> gcc a.c -fpic -c -m32 $> ld.gold a.o --shared -o not_stripped.so $> strip --strip-debug not_stripped.so -o stripped.so $> readelf -S stripped.so > stripped_readelf.txt $> readelf -S not_stripped.so > not_stripped_readelf.txt $> diff stripped_readelf.txt not_stripped_readelf.txt 10c10 < [ 5] .rel.plt REL 000001b0 0001b0 000008 08 A 1 6 4 --- > [ 5] .rel.plt REL 000001b0 0001b0 000008 08 AI 1 6 4
(In reply to Alexander Ivchenko from comment #0) > As discussed here: https://sourceware.org/ml/binutils/2013-11/msg00315.html > > The testcase for SHF_INFO_LINK: > > a.c: > > int global_var = 42; > > int function(int i) { > return i + global_var; > } Wrong test. The correct one is --- extern int bar (int); int function(int i) { return bar (i); } ---
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "gdb and binutils". The branch, master has been updated via 9ef5d938819dff73d7640a2654b07df64670d7f9 (commit) from fa8761a3e0d999ada63194291ddf9b308a8d8276 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9ef5d938819dff73d7640a2654b07df64670d7f9 commit 9ef5d938819dff73d7640a2654b07df64670d7f9 Author: H.J. Lu <hjl.tools@gmail.com> Date: Thu Dec 19 11:34:47 2013 -0800 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. ----------------------------------------------------------------------- Summary of changes: bfd/ChangeLog | 6 ++++++ bfd/elf.c | 7 ++++++- binutils/testsuite/ChangeLog | 6 ++++++ binutils/testsuite/binutils-all/readelf.s | 2 +- binutils/testsuite/binutils-all/readelf.s-64 | 2 +- ld/testsuite/ChangeLog | 7 +++++++ ld/testsuite/ld-elf/linkinfo1.s | 2 ++ ld/testsuite/ld-elf/linkinfo1a.d | 8 ++++++++ ld/testsuite/ld-elf/linkinfo1b.d | 9 +++++++++ 9 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 ld/testsuite/ld-elf/linkinfo1.s create mode 100644 ld/testsuite/ld-elf/linkinfo1a.d create mode 100644 ld/testsuite/ld-elf/linkinfo1b.d
Fixed for 2.25.
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "gdb and binutils". The branch, master has been updated via bcf1df010c8e886c8bc23cd12ab396064537455d (commit) from c6044dd124bee08ce8ebd2909582f9aed53b5499 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=bcf1df010c8e886c8bc23cd12ab396064537455d commit bcf1df010c8e886c8bc23cd12ab396064537455d Author: Nick Clifton <nickc@redhat.com> Date: Tue Jan 28 11:56:13 2014 +0000 Update the tic6x linker tests to match the current behaviour of the linker and readelf. PR binutils/16317 * ld-tic6x/shlib-1.rd: Expect I attribute with RELA sections. * ld-tic6x/shlib-1b.rd: Likewise. * ld-tic6x/shlib-1r.rd: Likewise. * ld-tic6x/shlib-1rb.rd: Likewise. * ld-tic6x/shlib-app-1rd: Likewise. * ld-tic6x/shlib-app-1b.rd: Likewise. * ld-tic6x/shlib-app-1r.rd: Likewise. * ld-tic6x/shlib-app-1rb.rd: Likewise. * ld-tic6x/shlib-noindex.rd: Likewise. * ld-tic6x/static-app-1.rd: Likewise. * ld-tic6x/static-app-1b.rd: Likewise. * ld-tic6x/static-app-1r.rd: Likewise. * ld-tic6x/static-app-1rb.rd: Likewise. PR binutils/16318 * ld-tic6x/tic6x.exp: Expect C6000 osabi value in relocatable objects. ----------------------------------------------------------------------- Summary of changes: ld/testsuite/ChangeLog | 20 ++++++++++++++++++++ ld/testsuite/ld-tic6x/shlib-1.rd | 6 +++--- ld/testsuite/ld-tic6x/shlib-1b.rd | 6 +++--- ld/testsuite/ld-tic6x/shlib-1r.rd | 6 +++--- ld/testsuite/ld-tic6x/shlib-1rb.rd | 6 +++--- ld/testsuite/ld-tic6x/shlib-app-1.rd | 8 ++++---- ld/testsuite/ld-tic6x/shlib-app-1b.rd | 8 ++++---- ld/testsuite/ld-tic6x/shlib-app-1r.rd | 6 +++--- ld/testsuite/ld-tic6x/shlib-app-1rb.rd | 6 +++--- ld/testsuite/ld-tic6x/shlib-noindex.rd | 8 ++++---- ld/testsuite/ld-tic6x/static-app-1.rd | 4 ++-- ld/testsuite/ld-tic6x/static-app-1b.rd | 4 ++-- ld/testsuite/ld-tic6x/static-app-1r.rd | 4 ++-- ld/testsuite/ld-tic6x/static-app-1rb.rd | 4 ++-- ld/testsuite/ld-tic6x/tic6x.exp | 2 -- 15 files changed, 58 insertions(+), 40 deletions(-)
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "gdb and binutils". The branch, master has been updated via d82ba9f90a5de61c4286fac371673d56a38108fc (commit) from bcf1df010c8e886c8bc23cd12ab396064537455d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d82ba9f90a5de61c4286fac371673d56a38108fc commit d82ba9f90a5de61c4286fac371673d56a38108fc Author: Nick Clifton <nickc@redhat.com> Date: Tue Jan 28 12:18:01 2014 +0000 A recent update to the binutils means that RELA sections now have the SHF_INFO_LINK bit set, which shows up in readelf section dumps. This has broken a couple of IA64 testcases in the gas testsuite, which are fixed by this patch. PR binutils/16317 * gas/ia64/group-2.d: Expect I attribute with RELA sections. * gas/ia64/xdata.d: Likewise. ----------------------------------------------------------------------- Summary of changes: gas/testsuite/ChangeLog | 6 ++++++ gas/testsuite/gas/ia64/group-2.d | 2 +- gas/testsuite/gas/ia64/xdata.d | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-)