From: Mark Wielaard Date: Mon, 21 Sep 2009 23:47:07 +0000 (-0700) Subject: Handle new .comment section flags. X-Git-Tag: elfutils-0.144~34 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c49d00afc4bda21181cd4237e67930f3f5228adf;p=thirdparty%2Felfutils.git Handle new .comment section flags. Newer gcc+ld combinations use string merging in the .comment section. Allow that in elflint. --- diff --git a/src/ChangeLog b/src/ChangeLog index 5e439104e..d59072a3a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2009-09-21 Ulrich Drepper + + * elflint.c (special_sections): Allow MERGE and STRINGS flags to be + set for .comment section. + Patch by Mark Wielaard . + 2009-09-08 Roland McGrath * ar.c (main): Fix typo in message format. diff --git a/src/elflint.c b/src/elflint.c index f85d28643..12e7242f2 100644 --- a/src/elflint.c +++ b/src/elflint.c @@ -785,7 +785,7 @@ section [%2d] '%s': symbol %zu: referenced section [%2d] '%s' does not have SHF_ if (ehdr->e_type == ET_REL) { /* For object files the symbol value must fall - into the section. */ + into the section. */ if (sym->st_value > destshdr->sh_size) ERROR (gettext ("\ section [%2d] '%s': symbol %zu: st_value out of bounds of referenced section [%2d] '%s'\n"), @@ -3330,7 +3330,7 @@ static const struct { /* See figure 4-14 in the gABI. */ { ".bss", 5, SHT_NOBITS, exact, SHF_ALLOC | SHF_WRITE, 0 }, - { ".comment", 8, SHT_PROGBITS, exact, 0, 0 }, + { ".comment", 8, SHT_PROGBITS, atleast, 0, SHF_MERGE | SHF_STRINGS }, { ".data", 6, SHT_PROGBITS, exact, SHF_ALLOC | SHF_WRITE, 0 }, { ".data1", 7, SHT_PROGBITS, exact, SHF_ALLOC | SHF_WRITE, 0 }, { ".debug_str", 11, SHT_PROGBITS, exact_or_gnuld, SHF_MERGE | SHF_STRINGS, 0 },