--- elfutils/backends/ChangeLog
+++ elfutils/backends/ChangeLog
-@@ -157,6 +157,11 @@
+@@ -229,6 +229,11 @@
* sparc_init.c: Likewise.
* x86_64_init.c: Likewise.
2005-11-19 Roland McGrath <roland@redhat.com>
* ppc64_reloc.def: REL30 -> ADDR30.
-@@ -179,6 +184,9 @@
+@@ -251,6 +256,9 @@
* Makefile.am (uninstall): Don't try to remove $(pkgincludedir).
(CLEANFILES): Add libebl_$(m).so.
libebl_%.map: Makefile
--- elfutils/backends/Makefile.in
+++ elfutils/backends/Makefile.in
-@@ -147,6 +147,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
+@@ -152,6 +152,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LEX = @LEX@
LEXLIB = @LEXLIB@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
-@@ -176,6 +177,7 @@ SHELL = @SHELL@
+@@ -181,6 +182,7 @@ SHELL = @SHELL@
STRIP = @STRIP@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
XGETTEXT = @XGETTEXT@
XGETTEXT_015 = @XGETTEXT_015@
YACC = @YACC@
-@@ -231,9 +233,9 @@ target_alias = @target_alias@
+@@ -236,9 +238,9 @@ target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
@MUDFLAP_FALSE@AM_CFLAGS = -fpic -Wall -Wshadow -Werror -Wunused \
INCLUDES = -I$(srcdir) -I$(top_srcdir)/libebl \
-I$(top_srcdir)/libelf -I$(top_srcdir)/libdw \
-I$(top_srcdir)/lib -I..
-@@ -605,7 +607,7 @@ uninstall-am:
+@@ -626,7 +628,7 @@ uninstall-am:
libebl_%.so: libebl_%_pic.a libebl_%.map $(libelf) $(libdw)
$(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
-Wl,--version-script,$(word 2,$^) \
libcpu_i386_a_SOURCES = i386_dis.c
--- elfutils/libdw/ChangeLog
+++ elfutils/libdw/ChangeLog
-@@ -370,6 +370,11 @@
+@@ -406,6 +406,11 @@
2005-05-31 Roland McGrath <roland@redhat.com>
$(COMPILE)))
--- elfutils/libdwfl/ChangeLog
+++ elfutils/libdwfl/ChangeLog
-@@ -504,6 +504,11 @@
+@@ -647,6 +647,11 @@
2005-07-21 Roland McGrath <roland@redhat.com>
VERSION = 1
--- elfutils/libdwfl/Makefile.in
+++ elfutils/libdwfl/Makefile.in
-@@ -124,6 +124,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
+@@ -128,6 +128,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LEX = @LEX@
LEXLIB = @LEXLIB@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
-@@ -153,6 +154,7 @@ SHELL = @SHELL@
+@@ -157,6 +158,7 @@ SHELL = @SHELL@
STRIP = @STRIP@
USE_NLS = @USE_NLS@
VERSION = 1
XGETTEXT = @XGETTEXT@
XGETTEXT_015 = @XGETTEXT_015@
YACC = @YACC@
-@@ -208,9 +210,9 @@ target_alias = @target_alias@
+@@ -212,9 +214,9 @@ target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
@MUDFLAP_FALSE@AM_CFLAGS = -Wall -Werror -Wshadow -Wunused -Wformat=2 \
--- elfutils/libebl/ChangeLog
+++ elfutils/libebl/ChangeLog
-@@ -469,6 +469,11 @@
+@@ -501,6 +501,11 @@
* Makefile.am (libebl_*_so_SOURCES): Set to $(*_SRCS) so dependency
tracking works right.
--- elfutils/libelf/ChangeLog
+++ elfutils/libelf/ChangeLog
-@@ -225,6 +225,11 @@
+@@ -295,6 +295,11 @@
If section content hasn't been read yet, do it before looking for the
block size. If no section data present, infer size of section header.
@MUDFLAP_FALSE@noinst_PROGRAMS = $(am__EXEEXT_1)
@MUDFLAP_TRUE@am_libelf_pic_a_OBJECTS =
subdir = libelf
-@@ -167,6 +167,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
+@@ -168,6 +168,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LEX = @LEX@
LEXLIB = @LEXLIB@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
-@@ -196,6 +197,7 @@ SHELL = @SHELL@
+@@ -197,6 +198,7 @@ SHELL = @SHELL@
STRIP = @STRIP@
USE_NLS = @USE_NLS@
VERSION = 1
XGETTEXT = @XGETTEXT@
XGETTEXT_015 = @XGETTEXT_015@
YACC = @YACC@
-@@ -251,10 +253,10 @@ target_alias = @target_alias@
+@@ -252,10 +254,10 @@ target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
@MUDFLAP_FALSE@AM_CFLAGS = $(am__append_1) -Wall -Wshadow -Werror \
YACC = @YACC@
--- elfutils/src/ChangeLog
+++ elfutils/src/ChangeLog
-@@ -176,6 +176,10 @@
+@@ -1,3 +1,7 @@
++2007-10-16 Roland McGrath <roland@redhat.com>
++
++ * Makefile.am (readelf_no_Werror): New variable.
++
+ 2007-10-15 Roland McGrath <roland@redhat.com>
+
+ * make-debug-archive.in: New file.
+@@ -437,6 +441,10 @@
* elflint.c (valid_e_machine): Add EM_ALPHA.
Reported by Christian Aichinger <Greek0@gmx.net>.
2006-08-08 Ulrich Drepper <drepper@redhat.com>
* elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
-@@ -252,6 +256,10 @@
+@@ -513,6 +521,10 @@
* Makefile.am: Add hacks to create dependency files for non-generic
linker.
2006-06-12 Ulrich Drepper <drepper@redhat.com>
* ldgeneric.c (ld_generic_generate_sections): Don't create .interp
-@@ -600,6 +608,11 @@
+@@ -861,6 +873,11 @@
* readelf.c (print_debug_loc_section): Fix indentation for larger
address size.
$(if $($(*F)_no_Wformat),,-Wformat=2) $(CFLAGS_$(*F))
INCLUDES = -I$(srcdir) -I$(srcdir)/../libelf -I$(srcdir)/../libebl \
+@@ -108,6 +109,9 @@ strings_no_Wformat = yes
+ # XXX While the file is not finished, don't warn about this
+ ldgeneric_no_Wunused = yes
+
++# Buggy old compilers.
++readelf_no_Werror = yes
++
+ readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
+ nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
+ size_LDADD = $(libelf) $(libeu) $(libmudflap)
--- elfutils/src/Makefile.in
+++ elfutils/src/Makefile.in
-@@ -197,6 +197,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
+@@ -200,6 +200,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LEX = @LEX@
LEXLIB = @LEXLIB@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
-@@ -226,6 +227,7 @@ SHELL = @SHELL@
+@@ -229,6 +230,7 @@ SHELL = @SHELL@
STRIP = @STRIP@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
XGETTEXT = @XGETTEXT@
XGETTEXT_015 = @XGETTEXT_015@
YACC = @YACC@ -d
-@@ -283,13 +285,13 @@ top_srcdir = @top_srcdir@
+@@ -286,13 +288,13 @@ top_srcdir = @top_srcdir@
@MUDFLAP_FALSE@AM_CFLAGS = -Wall -Wshadow -std=gnu99 \
@MUDFLAP_FALSE@ $(native_ld_cflags) $(if \
@MUDFLAP_FALSE@ $($(*F)_no_Werror),,-Werror) $(if \
@MUDFLAP_TRUE@ $($(*F)_no_Wformat),,-Wformat=2) $(CFLAGS_$(*F))
INCLUDES = -I$(srcdir) -I$(srcdir)/../libelf -I$(srcdir)/../libebl \
-I$(srcdir)/../libdw -I$(srcdir)/../libdwfl \
+@@ -334,6 +336,9 @@ size_no_Wformat = yes
+ strings_no_Wformat = yes
+ # XXX While the file is not finished, don't warn about this
+ ldgeneric_no_Wunused = yes
++
++# Buggy old compilers.
++readelf_no_Werror = yes
+ readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
+ nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
+ size_LDADD = $(libelf) $(libeu) $(libmudflap)
--- elfutils/src/strings.c
+++ elfutils/src/strings.c
@@ -51,6 +51,10 @@
cannot set access and modification date of '%s'"), fname);
--- elfutils/tests/ChangeLog
+++ elfutils/tests/ChangeLog
-@@ -525,6 +525,11 @@
+@@ -585,6 +585,11 @@
* Makefile.am (TESTS): Add run-elflint-test.sh.
(EXTRA_DIST): Add run-elflint-test.sh and testfile18.bz2.
endif
--- elfutils/tests/Makefile.in
+++ elfutils/tests/Makefile.in
-@@ -315,6 +315,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
+@@ -323,6 +323,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LEX = @LEX@
LEXLIB = @LEXLIB@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
-@@ -344,6 +345,7 @@ SHELL = @SHELL@
+@@ -352,6 +353,7 @@ SHELL = @SHELL@
STRIP = @STRIP@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
XGETTEXT = @XGETTEXT@
XGETTEXT_015 = @XGETTEXT_015@
YACC = @YACC@
-@@ -398,10 +400,10 @@ sysconfdir = @sysconfdir@
+@@ -406,10 +408,10 @@ sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
(check_symtab, is_rel_dyn, check_rela, check_rel, check_dynamic,
check_symtab_shndx, check_hash, check_versym): Robustify.
---- elfutils-0.127/src/readelf.c.robustify
-+++ elfutils-0.127/src/readelf.c
-@@ -958,6 +958,8 @@ handle_scngrp (Ebl *ebl, Elf_Scn *scn, G
+--- elfutils-0.130/src/readelf.c.robustify
++++ elfutils-0.130/src/readelf.c
+@@ -1053,6 +1053,8 @@ handle_scngrp (Ebl *ebl, Elf_Scn *scn, G
Elf32_Word *grpref = (Elf32_Word *) data->d_buf;
GElf_Sym sym_mem;
printf ((grpref[0] & GRP_COMDAT)
? ngettext ("\
\nCOMDAT section group [%2zu] '%s' with signature '%s' contains %zu entry:\n",
-@@ -970,8 +972,8 @@ handle_scngrp (Ebl *ebl, Elf_Scn *scn, G
+@@ -1065,8 +1067,8 @@ handle_scngrp (Ebl *ebl, Elf_Scn *scn, G
data->d_size / sizeof (Elf32_Word) - 1),
elf_ndxscn (scn),
elf_strptr (ebl->elf, shstrndx, shdr->sh_name),
?: gettext ("<INVALID SYMBOL>"),
data->d_size / sizeof (Elf32_Word) - 1);
-@@ -1122,7 +1124,8 @@ static void
+@@ -1217,7 +1219,8 @@ static void
handle_dynamic (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr)
{
int class = gelf_getclass (ebl->elf);
Elf_Data *data;
size_t cnt;
size_t shstrndx;
-@@ -1137,6 +1140,11 @@ handle_dynamic (Ebl *ebl, Elf_Scn *scn,
+@@ -1232,6 +1235,11 @@ handle_dynamic (Ebl *ebl, Elf_Scn *scn,
error (EXIT_FAILURE, 0,
gettext ("cannot get section header string table index"));
printf (ngettext ("\
\nDynamic segment contains %lu entry:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n",
"\
-@@ -1146,9 +1154,7 @@ handle_dynamic (Ebl *ebl, Elf_Scn *scn,
+@@ -1241,9 +1249,7 @@ handle_dynamic (Ebl *ebl, Elf_Scn *scn,
class == ELFCLASS32 ? 10 : 18, shdr->sh_addr,
shdr->sh_offset,
(int) shdr->sh_link,
fputs_unlocked (gettext (" Type Value\n"), stdout);
for (cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt)
-@@ -1666,6 +1672,13 @@ handle_symtab (Ebl *ebl, Elf_Scn *scn, G
+@@ -1761,6 +1767,13 @@ handle_symtab (Ebl *ebl, Elf_Scn *scn, G
error (EXIT_FAILURE, 0,
gettext ("cannot get section header string table index"));
/* Now we can compute the number of entries in the section. */
unsigned int nsyms = data->d_size / (class == ELFCLASS32
? sizeof (Elf32_Sym)
-@@ -1676,15 +1689,12 @@ handle_symtab (Ebl *ebl, Elf_Scn *scn, G
+@@ -1771,15 +1784,12 @@ handle_symtab (Ebl *ebl, Elf_Scn *scn, G
nsyms),
(unsigned int) elf_ndxscn (scn),
elf_strptr (ebl->elf, shstrndx, shdr->sh_name), nsyms);
fputs_unlocked (class == ELFCLASS32
? gettext ("\
-@@ -1920,7 +1930,13 @@ handle_verneed (Ebl *ebl, Elf_Scn *scn,
+@@ -2015,7 +2025,13 @@ handle_verneed (Ebl *ebl, Elf_Scn *scn,
error (EXIT_FAILURE, 0,
gettext ("cannot get section header string table index"));
printf (ngettext ("\
\nVersion needs section [%2u] '%s' contains %d entry:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n",
"\
-@@ -1931,9 +1947,7 @@ handle_verneed (Ebl *ebl, Elf_Scn *scn,
+@@ -2026,9 +2042,7 @@ handle_verneed (Ebl *ebl, Elf_Scn *scn,
class == ELFCLASS32 ? 10 : 18, shdr->sh_addr,
shdr->sh_offset,
(unsigned int) shdr->sh_link,
unsigned int offset = 0;
for (int cnt = shdr->sh_info; --cnt >= 0; )
-@@ -1986,8 +2000,14 @@ handle_verdef (Ebl *ebl, Elf_Scn *scn, G
+@@ -2081,8 +2095,14 @@ handle_verdef (Ebl *ebl, Elf_Scn *scn, G
error (EXIT_FAILURE, 0,
gettext ("cannot get section header string table index"));
printf (ngettext ("\
\nVersion definition section [%2u] '%s' contains %d entry:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n",
"\
-@@ -1999,9 +2019,7 @@ handle_verdef (Ebl *ebl, Elf_Scn *scn, G
+@@ -2094,9 +2114,7 @@ handle_verdef (Ebl *ebl, Elf_Scn *scn, G
class == ELFCLASS32 ? 10 : 18, shdr->sh_addr,
shdr->sh_offset,
(unsigned int) shdr->sh_link,
unsigned int offset = 0;
for (int cnt = shdr->sh_info; --cnt >= 0; )
-@@ -2263,8 +2281,14 @@ handle_versym (Ebl *ebl, Elf_Scn *scn, G
+@@ -2358,8 +2376,14 @@ handle_versym (Ebl *ebl, Elf_Scn *scn, G
filename = NULL;
}
printf (ngettext ("\
\nVersion symbols section [%2u] '%s' contains %d entry:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'",
"\
-@@ -2276,9 +2300,7 @@ handle_versym (Ebl *ebl, Elf_Scn *scn, G
+@@ -2371,9 +2395,7 @@ handle_versym (Ebl *ebl, Elf_Scn *scn, G
class == ELFCLASS32 ? 10 : 18, shdr->sh_addr,
shdr->sh_offset,
(unsigned int) shdr->sh_link,
/* Now we can finally look at the actual contents of this section. */
for (unsigned int cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt)
-@@ -2330,7 +2352,17 @@ print_hash_info (Ebl *ebl, Elf_Scn *scn,
+@@ -2425,7 +2447,17 @@ print_hash_info (Ebl *ebl, Elf_Scn *scn,
for (Elf32_Word cnt = 0; cnt < nbucket; ++cnt)
++counts[lengths[cnt]];
printf (ngettext ("\
\nHistogram for bucket list length in section [%2u] '%s' (total of %d bucket):\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n",
"\
-@@ -2343,9 +2375,7 @@ print_hash_info (Ebl *ebl, Elf_Scn *scn,
+@@ -2438,9 +2470,7 @@ print_hash_info (Ebl *ebl, Elf_Scn *scn,
shdr->sh_addr,
shdr->sh_offset,
(unsigned int) shdr->sh_link,
if (extrastr != NULL)
fputs (extrastr, stdout);
-@@ -3655,6 +3685,16 @@ print_debug_aranges_section (Ebl *ebl __
+@@ -3834,6 +3864,16 @@ print_debug_aranges_section (Dwfl_Module
return;
}
printf (ngettext ("\
\nDWARF section '%s' at offset %#" PRIx64 " contains %zu entry:\n",
"\
---- elfutils-0.127/src/strip.c.robustify
-+++ elfutils-0.127/src/strip.c
-@@ -412,6 +412,7 @@ handle_elf (int fd, Elf *elf, const char
+--- elfutils-0.128/src/strip.c.orig
++++ elfutils-0.128/src/strip.c
+@@ -413,6 +413,7 @@ handle_elf (int fd, Elf *elf, const char
Elf_Data debuglink_crc_data;
bool any_symtab_changes = false;
Elf_Data *shstrtab_data = NULL;
/* Create the full name of the file. */
if (prefix != NULL)
-@@ -542,6 +543,11 @@ handle_elf (int fd, Elf *elf, const char
+@@ -543,6 +544,11 @@ handle_elf (int fd, Elf *elf, const char
goto fail_close;
}
/* Storage for section information. We leave room for two more
entries since we unconditionally create a section header string
table. Maybe some weird tool created an ELF file without one.
-@@ -563,7 +569,7 @@ handle_elf (int fd, Elf *elf, const char
+@@ -564,7 +570,7 @@ handle_elf (int fd, Elf *elf, const char
{
/* This should always be true (i.e., there should not be any
holes in the numbering). */
shdr_info[cnt].scn = scn;
-@@ -576,6 +582,7 @@ handle_elf (int fd, Elf *elf, const char
+@@ -577,6 +583,7 @@ handle_elf (int fd, Elf *elf, const char
shdr_info[cnt].shdr.sh_name);
if (shdr_info[cnt].name == NULL)
{
error (0, 0, gettext ("illformed file '%s'"), fname);
goto fail_close;
}
-@@ -585,6 +592,8 @@ handle_elf (int fd, Elf *elf, const char
+@@ -586,6 +593,8 @@ handle_elf (int fd, Elf *elf, const char
/* Remember the shdr.sh_link value. */
shdr_info[cnt].old_sh_link = shdr_info[cnt].shdr.sh_link;
/* Sections in files other than relocatable object files which
are not loaded can be freely moved by us. In relocatable
-@@ -597,7 +606,7 @@ handle_elf (int fd, Elf *elf, const char
+@@ -598,7 +607,7 @@ handle_elf (int fd, Elf *elf, const char
appropriate reference. */
if (unlikely (shdr_info[cnt].shdr.sh_type == SHT_SYMTAB_SHNDX))
{
shdr_info[shdr_info[cnt].shdr.sh_link].symtab_idx = cnt;
}
else if (unlikely (shdr_info[cnt].shdr.sh_type == SHT_GROUP))
-@@ -614,7 +623,12 @@ handle_elf (int fd, Elf *elf, const char
+@@ -615,7 +624,12 @@ handle_elf (int fd, Elf *elf, const char
for (inner = 1;
inner < shdr_info[cnt].data->d_size / sizeof (Elf32_Word);
++inner)
if (inner == 1 || (inner == 2 && (grpref[0] & GRP_COMDAT) == 0))
/* If the section group contains only one element and this
-@@ -625,7 +639,7 @@ handle_elf (int fd, Elf *elf, const char
+@@ -626,7 +640,7 @@ handle_elf (int fd, Elf *elf, const char
}
else if (unlikely (shdr_info[cnt].shdr.sh_type == SHT_GNU_versym))
{
shdr_info[shdr_info[cnt].shdr.sh_link].version_idx = cnt;
}
-@@ -633,7 +647,7 @@ handle_elf (int fd, Elf *elf, const char
+@@ -634,7 +648,7 @@ handle_elf (int fd, Elf *elf, const char
discarded right away. */
if ((shdr_info[cnt].shdr.sh_flags & SHF_GROUP) != 0)
{
if (shdr_info[shdr_info[cnt].group_idx].idx == 0)
{
-@@ -708,11 +722,15 @@ handle_elf (int fd, Elf *elf, const char
+@@ -709,11 +723,15 @@ handle_elf (int fd, Elf *elf, const char
{
/* If a relocation section is marked as being removed make
sure the section it is relocating is removed, too. */
if (shdr_info[cnt].idx == 1)
{
-@@ -737,7 +755,7 @@ handle_elf (int fd, Elf *elf, const char
+@@ -738,7 +756,7 @@ handle_elf (int fd, Elf *elf, const char
if (shdr_info[cnt].symtab_idx != 0
&& shdr_info[shdr_info[cnt].symtab_idx].data == NULL)
{
shdr_info[shdr_info[cnt].symtab_idx].data
= elf_getdata (shdr_info[shdr_info[cnt].symtab_idx].scn,
-@@ -777,6 +795,9 @@ handle_elf (int fd, Elf *elf, const char
+@@ -778,6 +796,9 @@ handle_elf (int fd, Elf *elf, const char
else if (scnidx == SHN_XINDEX)
scnidx = xndx;
if (shdr_info[scnidx].idx == 0)
{
/* Mark this section as used. */
-@@ -808,12 +829,16 @@ handle_elf (int fd, Elf *elf, const char
+@@ -809,12 +830,16 @@ handle_elf (int fd, Elf *elf, const char
}
/* Handle references through sh_info. */
/* Mark the section as investigated. */
shdr_info[cnt].idx = 2;
-@@ -912,7 +937,7 @@ handle_elf (int fd, Elf *elf, const char
+@@ -953,7 +978,7 @@ handle_elf (int fd, Elf *elf, const char
error (EXIT_FAILURE, 0, gettext ("while generating output file: %s"),
elf_errmsg (-1));
/* Add this name to the section header string table. */
shdr_info[cnt].se = ebl_strtabadd (shst, shdr_info[cnt].name, 0);
-@@ -949,7 +974,7 @@ handle_elf (int fd, Elf *elf, const char
+@@ -990,7 +1015,7 @@ handle_elf (int fd, Elf *elf, const char
error (EXIT_FAILURE, 0,
gettext ("while create section header section: %s"),
elf_errmsg (-1));
shdr_info[cnt].data = elf_newdata (shdr_info[cnt].newscn);
if (shdr_info[cnt].data == NULL)
-@@ -980,7 +1005,7 @@ handle_elf (int fd, Elf *elf, const char
+@@ -1021,7 +1046,7 @@ handle_elf (int fd, Elf *elf, const char
}
/* Index of the section header table in the shdr_info array. */
/* Add the section header string table section name. */
shdr_info[cnt].se = ebl_strtabadd (shst, ".shstrtab", 10);
-@@ -1005,7 +1030,7 @@ handle_elf (int fd, Elf *elf, const char
+@@ -1046,7 +1071,7 @@ handle_elf (int fd, Elf *elf, const char
error (EXIT_FAILURE, 0,
gettext ("while create section header section: %s"),
elf_errmsg (-1));
/* Finalize the string table and fill in the correct indices in the
section headers. */
-@@ -1095,20 +1120,20 @@ handle_elf (int fd, Elf *elf, const char
+@@ -1136,20 +1161,20 @@ handle_elf (int fd, Elf *elf, const char
shndxdata = elf_getdata (shdr_info[shdr_info[cnt].symtab_idx].scn,
NULL);
>= shdr_info[cnt].data->d_size / elsize);
}
-@@ -1163,7 +1188,7 @@ handle_elf (int fd, Elf *elf, const char
+@@ -1204,7 +1229,7 @@ handle_elf (int fd, Elf *elf, const char
sec = shdr_info[sym->st_shndx].idx;
else
{
sec = shdr_info[xshndx].idx;
}
-@@ -1184,7 +1209,7 @@ handle_elf (int fd, Elf *elf, const char
+@@ -1225,7 +1250,7 @@ handle_elf (int fd, Elf *elf, const char
nxshndx = sec;
}
if ((inner != destidx || nshndx != sym->st_shndx
|| (shndxdata != NULL && nxshndx != xshndx))
-@@ -1207,7 +1232,7 @@ handle_elf (int fd, Elf *elf, const char
+@@ -1248,7 +1273,7 @@ handle_elf (int fd, Elf *elf, const char
else
/* This is a section symbol for a section which has
been removed. */
}
if (destidx != inner)
-@@ -1371,11 +1396,11 @@ handle_elf (int fd, Elf *elf, const char
+@@ -1441,11 +1466,11 @@ handle_elf (int fd, Elf *elf, const char
{
GElf_Sym sym_mem;
GElf_Sym *sym = gelf_getsym (symd, inner, &sym_mem);
size_t hidx = elf_hash (name) % nbucket;
if (bucket[hidx] == 0)
-@@ -1394,7 +1419,7 @@ handle_elf (int fd, Elf *elf, const char
+@@ -1464,7 +1489,7 @@ handle_elf (int fd, Elf *elf, const char
else
{
/* Alpha and S390 64-bit use 64-bit SHT_HASH entries. */
== sizeof (Elf64_Xword));
Elf64_Xword *bucket = (Elf64_Xword *) hashd->d_buf;
-@@ -1428,11 +1453,11 @@ handle_elf (int fd, Elf *elf, const char
+@@ -1495,11 +1520,11 @@ handle_elf (int fd, Elf *elf, const char
{
GElf_Sym sym_mem;
GElf_Sym *sym = gelf_getsym (symd, inner, &sym_mem);
size_t hidx = elf_hash (name) % nbucket;
if (bucket[hidx] == 0)
---- elfutils-0.127/src/elflint.c.robustify
-+++ elfutils-0.127/src/elflint.c
-@@ -123,6 +123,9 @@ static uint32_t shstrndx;
+--- elfutils-0.130/src/elflint.c.robustify
++++ elfutils-0.130/src/elflint.c
+@@ -126,6 +126,9 @@ static uint32_t shstrndx;
/* Array to count references in section groups. */
static int *scnref;
int
main (int argc, char *argv[])
-@@ -312,10 +315,19 @@ section_name (Ebl *ebl, int idx)
+@@ -315,10 +318,19 @@ section_name (Ebl *ebl, int idx)
{
GElf_Shdr shdr_mem;
GElf_Shdr *shdr;
}
-@@ -337,10 +349,6 @@ static const int valid_e_machine[] =
+@@ -340,10 +352,6 @@ static const int valid_e_machine[] =
(sizeof (valid_e_machine) / sizeof (valid_e_machine[0]))
static void
check_elf_header (Ebl *ebl, GElf_Ehdr *ehdr, size_t size)
{
-@@ -603,7 +611,8 @@ section [%2d] '%s': symbol table cannot
+@@ -606,7 +614,8 @@ section [%2d] '%s': symbol table cannot
}
}
ERROR (gettext ("\
section [%2zu] '%s': entry size is does not match ElfXX_Sym\n"),
cnt, section_name (ebl, cnt));
-@@ -641,7 +650,7 @@ section [%2d] '%s': XINDEX for zeroth en
+@@ -644,7 +653,7 @@ section [%2d] '%s': XINDEX for zeroth en
xndxscnidx, section_name (ebl, xndxscnidx));
}
{
sym = gelf_getsymshndx (data, xndxdata, cnt, &sym_mem, &xndx);
if (sym == NULL)
-@@ -659,7 +668,8 @@ section [%2d] '%s': symbol %zu: invalid
+@@ -662,7 +671,8 @@ section [%2d] '%s': symbol %zu: invalid
else
{
name = elf_strptr (ebl->elf, shdr->sh_link, sym->st_name);
}
if (sym->st_shndx == SHN_XINDEX)
-@@ -981,9 +991,11 @@ is_rel_dyn (Ebl *ebl, const GElf_Ehdr *e
+@@ -992,9 +1002,11 @@ is_rel_dyn (Ebl *ebl, const GElf_Ehdr *e
{
GElf_Shdr rcshdr_mem;
const GElf_Shdr *rcshdr = gelf_getshdr (scn, &rcshdr_mem);
{
/* Found the dynamic section. Look through it. */
Elf_Data *d = elf_getdata (scn, NULL);
-@@ -993,7 +1005,9 @@ is_rel_dyn (Ebl *ebl, const GElf_Ehdr *e
+@@ -1004,7 +1016,9 @@ is_rel_dyn (Ebl *ebl, const GElf_Ehdr *e
{
GElf_Dyn dyn_mem;
GElf_Dyn *dyn = gelf_getdyn (d, cnt, &dyn_mem);
if (dyn->d_tag == DT_RELCOUNT)
{
-@@ -1007,7 +1021,9 @@ section [%2d] '%s': DT_RELCOUNT used for
+@@ -1018,7 +1032,9 @@ section [%2d] '%s': DT_RELCOUNT used for
/* Does the number specified number of relative
relocations exceed the total number of
relocations? */
ERROR (gettext ("\
section [%2d] '%s': DT_RELCOUNT value %d too high for this section\n"),
idx, section_name (ebl, idx),
-@@ -1167,7 +1183,8 @@ section [%2d] '%s': no relocations for m
+@@ -1178,7 +1194,8 @@ section [%2d] '%s': no relocations for m
}
}
ERROR (gettext (reltype == ELF_T_RELA ? "\
section [%2d] '%s': section entry size does not match ElfXX_Rela\n" : "\
section [%2d] '%s': section entry size does not match ElfXX_Rel\n"),
-@@ -1389,7 +1406,8 @@ check_rela (Ebl *ebl, GElf_Ehdr *ehdr, G
+@@ -1401,7 +1418,8 @@ check_rela (Ebl *ebl, GElf_Ehdr *ehdr, G
Elf_Data *symdata = elf_getdata (symscn, NULL);
enum load_state state = state_undecided;
{
GElf_Rela rela_mem;
GElf_Rela *rela = gelf_getrela (data, cnt, &rela_mem);
-@@ -1439,7 +1457,8 @@ check_rel (Ebl *ebl, GElf_Ehdr *ehdr, GE
+@@ -1451,7 +1469,8 @@ check_rel (Ebl *ebl, GElf_Ehdr *ehdr, GE
Elf_Data *symdata = elf_getdata (symscn, NULL);
enum load_state state = state_undecided;
{
GElf_Rel rel_mem;
GElf_Rel *rel = gelf_getrel (data, cnt, &rel_mem);
-@@ -1543,7 +1562,8 @@ section [%2d] '%s': referenced as string
+@@ -1555,7 +1574,8 @@ section [%2d] '%s': referenced as string
shdr->sh_link, section_name (ebl, shdr->sh_link),
idx, section_name (ebl, idx));
ERROR (gettext ("\
section [%2d] '%s': section entry size does not match ElfXX_Dyn\n"),
idx, section_name (ebl, idx));
-@@ -1553,7 +1573,7 @@ section [%2d] '%s': section entry size d
+@@ -1565,7 +1585,7 @@ section [%2d] '%s': section entry size d
idx, section_name (ebl, idx));
bool non_null_warned = false;
{
GElf_Dyn dyn_mem;
GElf_Dyn *dyn = gelf_getdyn (data, cnt, &dyn_mem);
-@@ -1834,6 +1854,8 @@ section [%2d] '%s': entry size does not
+@@ -1846,6 +1866,8 @@ section [%2d] '%s': entry size does not
idx, section_name (ebl, idx));
if (symshdr != NULL
&& (shdr->sh_size / shdr->sh_entsize
< symshdr->sh_size / symshdr->sh_entsize))
ERROR (gettext ("\
-@@ -1860,6 +1882,12 @@ section [%2d] '%s': extended section ind
+@@ -1872,6 +1894,12 @@ section [%2d] '%s': extended section ind
}
Elf_Data *data = elf_getdata (elf_getscn (ebl->elf, idx), NULL);
if (*((Elf32_Word *) data->d_buf) != 0)
ERROR (gettext ("symbol 0 should have zero extended section index\n"));
-@@ -1902,7 +1930,7 @@ section [%2d] '%s': hash table section i
+@@ -1914,7 +1942,7 @@ section [%2d] '%s': hash table section i
size_t maxidx = nchain;
{
size_t symsize = symshdr->sh_size / symshdr->sh_entsize;
-@@ -1913,18 +1941,28 @@ section [%2d] '%s': hash table section i
+@@ -1925,18 +1953,28 @@ section [%2d] '%s': hash table section i
maxidx = symsize;
}
}
-@@ -1954,18 +1992,28 @@ section [%2d] '%s': hash table section i
+@@ -1966,18 +2004,28 @@ section [%2d] '%s': hash table section i
maxidx = symsize;
}
}
-@@ -1990,7 +2038,7 @@ section [%2d] '%s': bitmask size not pow
+@@ -2002,7 +2050,7 @@ section [%2d] '%s': bitmask size not pow
if (shdr->sh_size < (4 + bitmask_words + nbuckets) * sizeof (Elf32_Word))
{
ERROR (gettext ("\
idx, section_name (ebl, idx), (long int) shdr->sh_size,
(long int) ((4 + bitmask_words + nbuckets) * sizeof (Elf32_Word)));
return;
-@@ -2644,8 +2692,9 @@ section [%2d] '%s' refers in sh_link to
+@@ -2659,8 +2707,9 @@ section [%2d] '%s' refers in sh_link to
/* The number of elements in the version symbol table must be the
same as the number of symbols. */
ERROR (gettext ("\
section [%2d] '%s' has different number of entries than symbol table [%2d] '%s'\n"),
idx, section_name (ebl, idx),
-@@ -3574,6 +3623,8 @@ phdr[%d]: no note entries defined for th
- return;
-
- char *notemem = gelf_rawchunk (ebl->elf, phdr->p_offset, phdr->p_filesz);
-+ if (notemem == NULL)
-+ return;
-
- /* ELF64 files often use note section entries in the 32-bit format.
- The p_align field is set to 8 in case the 64-bit format is used.
--- elfutils-0.127/libelf/elf_begin.c.robustify
+++ elfutils-0.127/libelf/elf_begin.c
@@ -155,7 +155,8 @@ get_shnum (void *map_address, unsigned c