aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2004-04-29 16:40:20 +0000
committerNick Clifton <nickc@redhat.com>2004-04-29 16:40:20 +0000
commit8a7140c38f21984c512ac97bcfa2f0d7417bdc27 (patch)
tree76e7acd4ab2d9c332be69e6b4cdb49984c2c57d2 /ld
parente63bbc887e4d3f7cd78ed15a1fe478e0a9eb4f8e (diff)
downloadfsf-binutils-gdb-8a7140c38f21984c512ac97bcfa2f0d7417bdc27.zip
fsf-binutils-gdb-8a7140c38f21984c512ac97bcfa2f0d7417bdc27.tar.gz
fsf-binutils-gdb-8a7140c38f21984c512ac97bcfa2f0d7417bdc27.tar.bz2
Add support for generating DWARF2 debug sections in the x86 PE port
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog5
-rw-r--r--ld/scripttempl/pe.sc82
2 files changed, 85 insertions, 2 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 6d535da..d511853 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+2004-04-29 Brian Ford <ford@vss.fsi.com>
+
+ * scripttempl/pe.sc: Handle .debug* and .gnu.linkonce.wi.* sections
+ for DWARF 2/3. Update stab section's syntax.
+
2004-04-29 Alan Modra <amodra@bigpond.net.au>
* pe-dll.c: Revert changes accidentally committed 2004-03-08.
diff --git a/ld/scripttempl/pe.sc b/ld/scripttempl/pe.sc
index 91c6c55..60d4ed1 100644
--- a/ld/scripttempl/pe.sc
+++ b/ld/scripttempl/pe.sc
@@ -159,13 +159,91 @@ SECTIONS
.stab ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
{
- [ .stab ]
+ *(.stab)
}
.stabstr ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
{
- [ .stabstr ]
+ *(.stabstr)
}
+ /* DWARF debug sections.
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section. Unlike other targets that fake this by putting the
+ section VMA at 0, the PE format will not allow it. */
+
+ /* DWARF 1.1 and DWARF 2. */
+ .debug_aranges ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_aranges)
+ }
+
+ .debug_pubnames ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_pubnames)
+ }
+
+ /* DWARF 2. */
+ .debug_info ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_info) *(.gnu.linkonce.wi.*)
+ }
+
+ .debug_abbrev ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_abbrev)
+ }
+
+ .debug_line ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_line)
+ }
+
+ .debug_frame ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_frame)
+ }
+
+ .debug_str ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_str)
+ }
+
+ .debug_loc ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_loc)
+ }
+
+ .debug_macinfo ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_macinfo)
+ }
+
+ /* SGI/MIPS DWARF 2 extensions. */
+ .debug_weaknames ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_weaknames)
+ }
+
+ .debug_funcnames ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_funcnames)
+ }
+
+ .debug_typenames ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_typenames)
+ }
+
+ .debug_varnames ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_varnames)
+ }
+
+ /* DWARF 3. */
+ .debug_ranges ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_ranges)
+ }
}
EOF