public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* RFC: Add DWARF 2 support for section group
@ 2004-04-29  0:49 H. J. Lu
  2004-04-29 20:13 ` Zack Weinberg
  0 siblings, 1 reply; 2+ messages in thread
From: H. J. Lu @ 2004-04-29  0:49 UTC (permalink / raw)
  To: binutils; +Cc: GDB

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: RFC: Add DWARF 2 support for section group
  2004-04-29  0:49 RFC: Add DWARF 2 support for section group H. J. Lu
@ 2004-04-29 20:13 ` Zack Weinberg
  0 siblings, 0 replies; 2+ messages in thread
From: Zack Weinberg @ 2004-04-29 20:13 UTC (permalink / raw)
  To: H. J. Lu; +Cc: binutils, GDB

"H. J. Lu" <hjl@lucon.org> writes:

> The current ELF linker doesn't support DWARF for section group.
[...]

Barf.  Why are we continuing to extend the .gnu.linkonce hack, when we
should be using proper ELF comdat groups?

zw

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-04-29  0:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-29  0:49 RFC: Add DWARF 2 support for section group H. J. Lu
2004-04-29 20:13 ` Zack Weinberg

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).