This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Set SHF_INFO_LINK for .PARISC.unwind


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7bd9df3bcdb1f736b696566b6142cb94d6b9b0d9

commit 7bd9df3bcdb1f736b696566b6142cb94d6b9b0d9
Author: Alan Modra <amodra@gmail.com>
Date:   Mon Jan 2 22:28:29 2017 +1030

    Set SHF_INFO_LINK for .PARISC.unwind
    
    This flag should be set for any section header using sh_info to
    point to another section.
    
    Fixes a readelf warning about an unexpected value in info field,
    resulting in FAIL: Build warn libbar.so
    
    	* elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
    	.PARISC.unwind section.

Diff:
---
 bfd/ChangeLog  | 5 +++++
 bfd/elf-hppa.h | 1 +
 2 files changed, 6 insertions(+)

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index c129543..0db54c0 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,10 @@
 2017-01-02  Alan Modra  <amodra@gmail.com>
 
+	* elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
+	.PARISC.unwind section.
+
+2017-01-02  Alan Modra  <amodra@gmail.com>
+
 	PR ld/20989
 	* elfxx-sparc.c (gdop_relative_offset_ok): New function.
 	(_bfd_sparc_elf_relocate_section): Use it to validate GOT
diff --git a/bfd/elf-hppa.h b/bfd/elf-hppa.h
index 3871980..b1c959e 100644
--- a/bfd/elf-hppa.h
+++ b/bfd/elf-hppa.h
@@ -1117,6 +1117,7 @@ elf_hppa_fake_sections (bfd *abfd, Elf_Internal_Shdr *hdr, asection *sec)
 	  if (asec->name && strcmp (asec->name, ".text") == 0)
 	    {
 	      hdr->sh_info = indx;
+	      hdr->sh_flags |= SHF_INFO_LINK;
 	      break;
 	    }
 	}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]