]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Handle new .comment section flags.
authorMark Wielaard <mjw@redhat.com>
Mon, 21 Sep 2009 23:47:07 +0000 (16:47 -0700)
committerUlrich Drepper <drepper@redhat.com>
Mon, 21 Sep 2009 23:47:07 +0000 (16:47 -0700)
Newer gcc+ld combinations use string merging in the .comment
section.  Allow that in elflint.

src/ChangeLog
src/elflint.c

index 5e439104eea60abdc666fe564aebedad03d277c1..d59072a3a91be3e8f8f3c148a650aca14031ecc8 100644 (file)
@@ -1,3 +1,9 @@
+2009-09-21  Ulrich Drepper  <drepper@redhat.com>
+
+       * elflint.c (special_sections): Allow MERGE and STRINGS flags to be
+       set for .comment section.
+       Patch by Mark Wielaard <mjw@redhat.com>.
+
 2009-09-08  Roland McGrath  <roland@redhat.com>
 
        * ar.c (main): Fix typo in message format.
index f85d28643d34673f2ee1d8318142fed21688e27a..12e7242f25363eec138f6afb849f9ac1b34e5a85 100644 (file)
@@ -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 },