import insight-2000-02-04 snapshot (2nd try)
[external/binutils.git] / ld / scripttempl / aix.sc
index e901f7c..3f4b617 100644 (file)
@@ -3,13 +3,15 @@
 # unimportant.  The native linker aligns the sections on boundaries
 # specified by the -H option.
 cat <<EOF
+OUTPUT_FORMAT("${OUTPUT_FORMAT}")
 OUTPUT_ARCH(${ARCH})
+${RELOCATING+${LIB_SEARCH_DIRS}}
 ENTRY(__start)
 SECTIONS
 {
   .pad 0 : { *(.pad) }
-  ${RELOCATING+PROVIDE (_text = .);}
   .text ${RELOCATING-0} : {
+    ${RELOCATING+PROVIDE (_text = .);}
     *(.text)
     *(.pr)
     *(.ro)
@@ -18,28 +20,31 @@ SECTIONS
     *(.xo)
     *(.ti)
     *(.tb)
+    ${RELOCATING+PROVIDE (_etext = .);}
   }
-  ${RELOCATING+PROVIDE (_etext = .);}
-  ${RELOCATING+PROVIDE (_data = .);}
-  .data ${RELOCATING-0} : {
+  .data 0 : {
+    ${RELOCATING+PROVIDE (_data = .);}
     *(.data)
     *(.rw)
     *(.sv)
     *(.ua)
+    . = ALIGN(4);
+    ${CONSTRUCTING+CONSTRUCTORS}
     *(.ds)
     *(.tc0)
     *(.tc)
     *(.td)
+    ${RELOCATING+PROVIDE (_edata = .);}
   }
-  ${RELOCATING+PROVIDE (_edata = .);}
   .bss : {
+    *(.tocbss)
     *(.bss)
     *(.bs)
     *(.uc)
     *(COMMON)
+    ${RELOCATING+PROVIDE (_end = .);}
+    ${RELOCATING+PROVIDE (end = .);}
   }
-  ${RELOCATING+PROVIDE (_end = .);}
-  ${RELOCATING+PROVIDE (end = .);}
   .loader 0 : {
     *(.loader)
   }