]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
patch ../102425721.patch
authorDoug Evans <dje@google.com>
Thu, 10 Dec 2015 20:00:29 +0000 (12:00 -0800)
committerDoug Evans <dje@google.com>
Thu, 10 Dec 2015 20:00:29 +0000 (12:00 -0800)
README.google
bfd/elf.c

index a592883b5cee6202f3842335e03d51de8a5795ae..355d20c271d0b5a63b97ebd6c3d2d1355a0e06e7 100644 (file)
@@ -68,3 +68,11 @@ they are an ongoing maintenance burden.
 +      * dwarf2read.c (use_index_sections): New static global.
 +      (read_index_from_section): Check it.
 +      (_initialize_dwarf2_read): New option "use-index-sections".
+--- README.google      2015-09-05 15:21:34.000000000 -0700
++++ README.google      2015-09-05 15:24:02.000000000 -0700
++
++2015-09-05  Doug Evans  <dje@google.com>
++
++      Temp fix for http://sourceware.org/bugzilla/show_bug.cgi?id=14704
++      * bfd/elf.c (bfd_section_from_shdr, case SHT_REL,SHT_RELA): Don't mark
++      the target section as having relocs if the reloc section is empty.
index 98460467d0c32908e98b068320e1e2c94ec750be..2d551930fe81a15cee382a28459b541dee79f217 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -2010,14 +2010,16 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex)
        *hdr2 = *hdr;
        *p_hdr = hdr2;
        elf_elfsections (abfd)[shindex] = hdr2;
-       target_sect->reloc_count += NUM_SHDR_ENTRIES (hdr);
-       target_sect->flags |= SEC_RELOC;
-       target_sect->relocation = NULL;
-       target_sect->rel_filepos = hdr->sh_offset;
-       /* In the section to which the relocations apply, mark whether
-          its relocations are of the REL or RELA variety.  */
+       /* Don't mark the target section as having relocs if this
+          section is empty.  */
        if (hdr->sh_size != 0)
          {
+           target_sect->reloc_count += NUM_SHDR_ENTRIES (hdr);
+           target_sect->flags |= SEC_RELOC;
+           target_sect->relocation = NULL;
+           target_sect->rel_filepos = hdr->sh_offset;
+           /* In the section to which the relocations apply, mark whether
+              its relocations are of the REL or RELA variety.  */
            if (hdr->sh_type == SHT_RELA)
              target_sect->use_rela_p = 1;
          }