]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Merge branch 'master' into robustify
authorMark Wielaard <mjw@redhat.com>
Wed, 25 May 2011 11:45:06 +0000 (13:45 +0200)
committerMark Wielaard <mjw@redhat.com>
Wed, 25 May 2011 11:55:13 +0000 (13:55 +0200)
Conflicts:
src/strip.c: Change assert to elf_assert.

1  2 
libdwfl/ChangeLog
libelf/libelfP.h
src/ChangeLog
src/elflint.c
src/readelf.c
src/strip.c

index 5a002b15de0baa30725f26474ea691d46a5bd717,abad77b56a168a731f0fb45452ead8925f0baced..4d6e8952ae181b9d603492762e707e4dd4bc2e09
@@@ -1,8 -1,14 +1,19 @@@
+ 2011-04-11  Mark Wielaard  <mjw@redhat.com>
+       * linux-kernel-modules.c (vmlinux_suffixes): Guard definition
+       by check for zlib, bzlib or lzma defines to check it isn't empty.
+       (try_kernel_name): Use same guard for use of vmlinux_suffixes.
+ 2011-03-08  Roland McGrath  <roland@redhat.com>
+       * dwfl_module_getdwarf.c (open_elf): Clear errno before CBFAIL.
+       Reported by Kurt Roeckx <kurt@roeckx.be>.
 +2011-03-23  Petr Machata  <pmachata@redhat.com>
 +
 +      * relocate.c (relocate_section): Use gelf_fsize instead of relying
 +      on shdr->sh_entsize.
 +
  2011-02-11  Roland McGrath  <roland@redhat.com>
  
        * linux-kernel-modules.c (try_kernel_name): Try .gz, .bz2, .xz
Simple merge
diff --cc src/ChangeLog
index ead1235c03ec40ffcc5b7792677c1a8533ebd720,007236a4c8312f1bf58c982695ca55ec563c2100..d1d62dd8702171f011b9beb7e11d4fac7086445e
+ 2011-05-23  Mark Wielaard  <mjw@redhat.com>
+       * strip.c (relocate): Take new arguments is_rela to indicate
+       whether the relocation is from a SHT_REL or SHT_RELA section. 
+       Relocate against any debug section symbol, not just STT_SECTION
+       symbols. For SHT_REL relocations, fetch addend from offset and
+       add it to symbol value if not zero.
+ 2011-05-23  Mark Wielaard  <mjw@redhat.com>
+       * strip.c (OPT_RELOC_DEBUG): New option.
+       (argp_option): Add new --reloc-debug-sections option.
+       (main): Check new option.
+       (parse_opt): Likewise.
+       (handle_elf): Remove any relocations between debug sections
+       in ET_REL for the debug file when requested.
+ 2011-05-18  Mark Wielaard  <mjw@redhat.com>
+       * strip.c (handle_elf): Make sure all sections of a removed group
+       section are removed too. Don't discard SHT_GROUP sections, copy
+       section table before it gets modified. Section group signature
+       symbols don't have to be retained.
+ 2011-05-16  Jakub Jelinek  <jakub@redhat.com>
+       * readelf.c (print_ops): Handle DW_OP_GNU_const_type,
+       DW_OP_GNU_regval_type, DW_OP_GNU_deref_type, DW_OP_GNU_convert
+       and DW_OP_GNU_reinterpret.
+ 2011-05-17  Mark Wielaard  <mjw@redhat.com>
+       * readelf.c (dwarf_tag_string): Fixup DW_TAG_GNU_call_site and
+       DW_TAG_GNU_call_site_parameter return strings.
+ 2011-05-11  Marek Polacek  <mpolacek@redhat.com>
+       * nm.c (show_symbols_sysv): Remove unused if/else, remove
+       unused `prefix' and `fname' parameters.
+ 2011-05-07  Marek Polacek  <mpolacek@redhat.com>
+       * unstrip.c (compare_sections_nonrel): Mark this function as static.
+ 2011-04-26  Mark Wielaard  <mjw@redhat.com>
+       * readelf.c (handle_notes_data): Call ebl_object_note_type_name
+       with note name.
+ 2011-04-14  Mark Wielaard  <mjw@redhat.com>
+       * readelf.c (options): Add gdb_index.
+       (section_e): Define section_gdb_index.
+       (parse_opt): Recognize gdb_index debug-dump argument.
+       (print_gdb_index_section): New function.
+       (print_debug): Add gdb_index to debug_sections.
+ 2011-03-24  Petr Machata  <pmachata@redhat.com>
+       * readelf.c (print_debug_line_section): Emit initial space for all
+       opcode lines.  Print offset in front of each opcode.
+ 2011-03-22  Marek Polacek  <mpolacek@redhat.com>
+       * readelf.c (handle_dynamic): Don't segfault at DT_PLTREL case.
+ 2011-03-22  Mark Wielaard  <mjw@redhat.com>
+       * readelf.c (dwarf_tag_string): Support DW_TAG_GNU_call_site
+       and DW_TAG_GNU_call_site_parameter.
+       (dwarf_attr_string): Support DW_AT_GNU_call_site_value,
+       DW_AT_GNU_call_site_data_value,
+       DW_AT_GNU_call_site_target,
+       DW_AT_GNU_call_site_target_clobbered,
+       DW_AT_GNU_tail_call,
+       DW_AT_GNU_all_tail_call_sites,
+       DW_AT_GNU_all_call_sites,
+       and DW_AT_GNU_all_source_call_sites.
+       (print_ops): Handle DW_OP_GNU_entry_value.
+       (attr_callback): Handle DW_AT_GNU_call_site_value,
+       DW_AT_GNU_call_site_data_value,
+       DW_AT_GNU_call_site_target,
+       and DW_AT_GNU_call_site_target_clobbered.
+ 2011-03-10  Mark Wielaard  <mjw@redhat.com>
+       * elflint.c (check_symtab): Use ebl_check_st_other_bits.
+ 2011-02-27  Jan Kratochvil  <jan.kratochvil@redhat.com>
+       * readelf.c (reset_listptr): Clear TABLE->TABLE.
+ 2011-02-25  Mark Wielaard  <mjw@redhat.com>
+       * readelf.c (dwarf_attr_string): Add DW_AT_GNU_* handling.
+       (dwarf_form_string): Properly format and return unknown form.
+ 2011-02-23  Roland McGrath  <roland@redhat.com>
+       * readelf.c (section_name): New function.
+       (print_debug_abbrev_section): Use it instead of constant.
+       (print_debug_aranges_section): Likewise.
+       (print_debug_ranges_section): Likewise.
+       (print_debug_units): Likewise.
+       (print_debug_line_section): Likewise.
+       (print_debug_loc_section): Likewise.
+       (print_debug_macinfo_section): Likewise.
+       (print_debug_pubnames_section): Likewise.
+       (print_debug_str_section): Likewise.
+       (print_debug) [USE_ZLIB]: Match .zdebug_* sections too.
+       (print_debug_abbrev_section): Use decoded d_size, not sh_size.
+       (print_debug_str_section): Likewise.
+       * readelf.c (dwarf_attr_string): Grok DW_AT_GNU_odr_signature.
 +2011-03-23  Petr Machata  <pmachata@redhat.com>
 +
 +      * readelf.c (handle_dynamic, handle_relocs_rel)
 +      (handle_relocs_rela, handle_versym, print_liblist):
 +      Use gelf_fsize instead of relying on shdr->sh_entsize.
 +
  2011-02-11  Roland McGrath  <roland@redhat.com>
  
        * elfcmp.c (verbose): New variable.
diff --cc src/elflint.c
Simple merge
diff --cc src/readelf.c
Simple merge
diff --cc src/strip.c
index ddf3f1655fcd0d55510554ceeb60396737fe95c7,cf6bd971a5459ef7e6c78c310da1427ac88c3ccd..d2006091ed8366954f8a2b8b39c862e310d6f870
@@@ -735,14 -739,26 +752,30 @@@ handle_elf (int fd, Elf *elf, const cha
            {
              /* If a relocation section is marked as being removed make
                 sure the section it is relocating is removed, too.  */
 -            if ((shdr_info[cnt].shdr.sh_type == SHT_REL
 +            if (shdr_info[cnt].shdr.sh_type == SHT_REL
                   || shdr_info[cnt].shdr.sh_type == SHT_RELA)
 -                && shdr_info[shdr_info[cnt].shdr.sh_info].idx != 0)
 -              shdr_info[cnt].idx = 1;
 +              {
 +                if (shdr_info[cnt].shdr.sh_info >= shnum)
 +                  goto illformed;
 +                else if (shdr_info[shdr_info[cnt].shdr.sh_info].idx != 0)
-               shdr_info[cnt].idx = 1;
-           }
++                  shdr_info[cnt].idx = 1;
++              }
+             /* If a group section is marked as being removed make
+                sure all the sections it contains are being removed, too.  */
+             if (shdr_info[cnt].shdr.sh_type == SHT_GROUP)
+               {
+                 Elf32_Word *grpref;
+                 grpref = (Elf32_Word *) shdr_info[cnt].data->d_buf;
+                 for (size_t in = 1;
+                      in < shdr_info[cnt].data->d_size / sizeof (Elf32_Word);
+                      ++in)
+                   if (shdr_info[grpref[in]].idx != 0)
+                     {
+                       shdr_info[cnt].idx = 1;
+                       break;
+                     }
+               }
            }
  
          if (shdr_info[cnt].idx == 1)
                      }
                    else if (debug_fname == NULL
                             || shdr_info[cnt].debug_data == NULL)
-                     /* This is a section symbol for a section which has
-                        been removed.  */
-                     elf_assert (GELF_ST_TYPE (sym->st_info) == STT_SECTION);
+                     /* This is a section or group signature symbol
+                        for a section which has been removed.  */
+                     {
+                       size_t sidx = (sym->st_shndx != SHN_XINDEX
+                                       ? sym->st_shndx : xshndx);
 -                      assert (GELF_ST_TYPE (sym->st_info) == STT_SECTION
 -                              || (shdr_info[sidx].shdr.sh_type == SHT_GROUP
 -                                  && shdr_info[sidx].shdr.sh_info == inner));
++                      elf_assert (GELF_ST_TYPE (sym->st_info) == STT_SECTION
++                                  || ((shdr_info[sidx].shdr.sh_type
++                                       == SHT_GROUP)
++                                      && (shdr_info[sidx].shdr.sh_info
++                                          == inner)));
+                     }
                  }
  
                if (destidx != inner)