public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: "H. J. Lu" <hjl@lucon.org>
To: binutils@sources.redhat.com
Cc: GDB <gdb@sources.redhat.com>
Subject: RFC: Add DWARF 2 support for section group
Date: Thu, 29 Apr 2004 00:49:00 -0000	[thread overview]
Message-ID: <20040429003204.GA4634@lucon.org> (raw)

The current ELF linker doesn't support DWARF for section group. We
have

  /* DWARF 1.1 and DWARF 2 */
  .debug_aranges  0 : { *(.debug_aranges) }
  .debug_pubnames 0 : { *(.debug_pubnames) }
                                                                                
  /* DWARF 2 */
  .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
  .debug_abbrev   0 : { *(.debug_abbrev) }
  .debug_line     0 : { *(.debug_line) }
  .debug_frame    0 : { *(.debug_frame) }
  .debug_str      0 : { *(.debug_str) }
  .debug_loc      0 : { *(.debug_loc) }
  .debug_macinfo  0 : { *(.debug_macinfo) }

For each section, it can be in a section group. I am thinking
something like. Also we need to support exception for section group.
Do we need something like

--- scripttempl/elf.sc.debug	2004-04-22 08:22:22.000000000 -0700
+++ scripttempl/elf.sc	2004-04-28 17:30:38.000000000 -0700
@@ -283,7 +283,7 @@ cat <<EOF
   ${CREATE_SHLIB-${SDATA2}}
   ${CREATE_SHLIB-${SBSS2}}
   ${OTHER_READONLY_SECTIONS}
-  .eh_frame_hdr : { *(.eh_frame_hdr) }
+  .eh_frame_hdr : { *(.eh_frame_hdr .gnu.linkonce.efhdr.*) }
 
   /* Adjust the address for the data segment.  We want to adjust up to
      the same address within the page on the next page up.  */
@@ -318,7 +318,7 @@ cat <<EOF
   .data1        ${RELOCATING-0} : { *(.data1) }
   .tdata	${RELOCATING-0} : { *(.tdata${RELOCATING+ .tdata.* .gnu.linkonce.td.*}) }
   .tbss		${RELOCATING-0} : { *(.tbss${RELOCATING+ .tbss.* .gnu.linkonce.tb.*})${RELOCATING+ *(.tcommon)} }
-  .eh_frame     ${RELOCATING-0} : { KEEP (*(.eh_frame)) }
+  .eh_frame     ${RELOCATING-0} : { KEEP (*(.eh_frame .gnu.linkonce.ef.*)) }
   .gcc_except_table ${RELOCATING-0} : { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) }
   ${WRITABLE_RODATA+${RODATA}}
   ${OTHER_READWRITE_SECTIONS}
@@ -380,17 +380,17 @@ cat <<EOF
   .debug_sfnames  0 : { *(.debug_sfnames) }
 
   /* DWARF 1.1 and DWARF 2 */
-  .debug_aranges  0 : { *(.debug_aranges) }
-  .debug_pubnames 0 : { *(.debug_pubnames) }
+  .debug_aranges  0 : { *(.debug_aranges .gnu.linkonce.wa.*) }
+  .debug_pubnames 0 : { *(.debug_pubnames .gnu.linkonce.wp.*) }
 
   /* DWARF 2 */
   .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
-  .debug_abbrev   0 : { *(.debug_abbrev) }
-  .debug_line     0 : { *(.debug_line) }
-  .debug_frame    0 : { *(.debug_frame) }
-  .debug_str      0 : { *(.debug_str) }
-  .debug_loc      0 : { *(.debug_loc) }
-  .debug_macinfo  0 : { *(.debug_macinfo) }
+  .debug_abbrev   0 : { *(.debug_abbrev .gnu.linkonce.wA.*) }
+  .debug_line     0 : { *(.debug_line .gnu.linkonce.wl.*) }
+  .debug_frame    0 : { *(.debug_frame .gnu.linkonce.wf.*) }
+  .debug_str      0 : { *(.debug_str .gnu.linkonce.ws.*) }
+  .debug_loc      0 : { *(.debug_loc .gnu.linkonce.wL.*) }
+  .debug_macinfo  0 : { *(.debug_macinfo .gnu.linkonce.wm.*) }
 
   /* SGI/MIPS DWARF 2 extensions */
   .debug_weaknames 0 : { *(.debug_weaknames) }

H.J.

             reply	other threads:[~2004-04-29  0:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-29  0:49 H. J. Lu [this message]
2004-04-29 20:13 ` Zack Weinberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040429003204.GA4634@lucon.org \
    --to=hjl@lucon.org \
    --cc=binutils@sources.redhat.com \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).