Set SHF_INFO_LINK for .PARISC.unwind
authorAlan Modra <amodra@gmail.com>
Mon, 2 Jan 2017 11:58:29 +0000 (22:28 +1030)
committerAlan Modra <amodra@gmail.com>
Mon, 2 Jan 2017 11:59:09 +0000 (22:29 +1030)
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.

bfd/ChangeLog
bfd/elf-hppa.h

index c129543fd742730f152a2ad0f08377a67689f422..0db54c0993df5f71912e62627158de46451a6872 100644 (file)
@@ -1,3 +1,8 @@
+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
index 3871980d739f3a528f3a91a9e3f843a55d063c2f..b1c959ea14c31f884100e3a715f0c52543454db6 100644 (file)
@@ -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;
            }
        }