OSDN Git Service

Include compressed DWARF debug sections in ELF linker scripts.
[pf3gnuchains/sourceware.git] / ld / scripttempl / elf32crx.sc
index 94b8644..e36e27f 100644 (file)
@@ -1,5 +1,4 @@
 # Linker Script for National Semiconductor's CRX-ELF32.
-test -z "$RELOCATING" && exit 0
 
 # The next line should be uncommented if it is desired to link
 # without libstart.o and directly enter main.
@@ -13,7 +12,7 @@ cat <<EOF
 
 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
 OUTPUT_ARCH(${ARCH})
-ENTRY(${ENTRY})
+${RELOCATING+ENTRY(${ENTRY})}
 
 /* Define memory regions.  */
 MEMORY
@@ -157,15 +156,15 @@ SECTIONS
      Symbols in the DWARF debugging sections are relative to the beginning
      of the section so we begin them at 0.  */
 
-  .debug_aranges  0 : { *(.debug_aranges) }
-  .debug_pubnames 0 : { *(.debug_pubnames) }
-  .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_aranges  0 : { *(.debug_aranges .zdebug_aranges) }
+  .debug_pubnames 0 : { *(.debug_pubnames .zdebug_pubnames) }
+  .debug_info     0 : { *(.debug_info${RELOCATING+ .gnu.linkonce.wi.*} .zdebug_info) }
+  .debug_abbrev   0 : { *(.debug_abbrev .zdebug_abbrev) }
+  .debug_line     0 : { *(.debug_line .zdebug_line) }
+  .debug_frame    0 : { *(.debug_frame .zdebug_frame) }
+  .debug_str      0 : { *(.debug_str .zdebug_str) }
+  .debug_loc      0 : { *(.debug_loc .zdebug_loc) }
+  .debug_macinfo  0 : { *(.debug_macinfo .zdebug_macinfo) }
 }
 
 __DATA_IMAGE_START = LOADADDR(.data);