diff options
author | Doug Evans <dje@google.com> | 2015-12-10 12:00:29 -0800 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2015-12-10 12:00:29 -0800 |
commit | 2504c7b071262e2ee2a2e331f4550eabc7e25520 (patch) | |
tree | 4aea6e4302cae18891df579117b58cb237d962cf | |
parent | 5280a7a34ac72b2aeb5004fc8508b92c54c6e765 (diff) | |
download | fsf-binutils-gdb-2504c7b071262e2ee2a2e331f4550eabc7e25520.zip fsf-binutils-gdb-2504c7b071262e2ee2a2e331f4550eabc7e25520.tar.gz fsf-binutils-gdb-2504c7b071262e2ee2a2e331f4550eabc7e25520.tar.bz2 |
patch ../102425721.patch
-rw-r--r-- | README.google | 8 | ||||
-rw-r--r-- | bfd/elf.c | 14 |
2 files changed, 16 insertions, 6 deletions
diff --git a/README.google b/README.google index a592883..355d20c 100644 --- a/README.google +++ b/README.google @@ -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. @@ -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; } |