This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: elf.c special_sections: missing .debug_<dwarf> sections?


Alan Modra writes:
 > On Wed, Oct 03, 2012 at 12:19:40PM -0700, dje@google.com wrote:
 > > static const struct bfd_elf_special_section special_sections_d[] =
 > [snip]
 > > There's a whole lot more DWARF sections than just those ones.
 > 
 > My recollection is that this code was invented to cover for versions
 > of gcc that emitted .section directives without specifying section
 > type and attributes.  So you really only need to add entries here if
 > some compiler emits bare .section directives against the other dwarf
 > sections, or you'd like to help out user asm.

Ok to check in?

2012-10-08  Doug Evans  <dje@google.com>

	* elf.c (special_sections_d): Add comment.

Index: elf.c
===================================================================
RCS file: /cvs/src/src/bfd/elf.c,v
retrieving revision 1.571
diff -u -p -r1.571 elf.c
--- elf.c	7 Oct 2012 23:59:26 -0000	1.571
+++ elf.c	8 Oct 2012 16:46:02 -0000
@@ -2061,6 +2064,9 @@ static const struct bfd_elf_special_sect
 {
   { STRING_COMMA_LEN (".data"),         -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
   { STRING_COMMA_LEN (".data1"),         0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+  /* There are more DWARF sections than these, but they needn't be added here
+     unless you have to cope with broken compilers that don't emit section
+     attributes or you want to help the user writing assembler.  */
   { STRING_COMMA_LEN (".debug"),         0, SHT_PROGBITS, 0 },
   { STRING_COMMA_LEN (".debug_line"),    0, SHT_PROGBITS, 0 },
   { STRING_COMMA_LEN (".debug_info"),    0, SHT_PROGBITS, 0 },


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]