summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2000-11-08 22:57:05 +0000
committerNick Clifton <nickc@redhat.com>2000-11-08 22:57:05 +0000
commit2fc047a63e36a7e2df3e9c021c0668d454f3f877 (patch)
tree8665545a718df379f19183c66227ee04488c5e3d
parent868b375a3021d759c15f5bcbaeb6c0f29603f497 (diff)
downloadbinutils-gdb-binutils-2_10-branch.tar.gz
Use ${CONSTRUCTING...} to enclose constructors and destructors.binutils-2_10-branch
-rw-r--r--ld/ChangeLog15
-rw-r--r--ld/scripttempl/h8300.sc90
-rw-r--r--ld/scripttempl/h8300h.sc95
-rw-r--r--ld/scripttempl/h8300s.sc95
-rw-r--r--ld/scripttempl/h8500.sc59
-rw-r--r--ld/scripttempl/h8500b.sc18
-rw-r--r--ld/scripttempl/h8500c.sc21
-rw-r--r--ld/scripttempl/h8500m.sc54
-rw-r--r--ld/scripttempl/h8500s.sc57
-rw-r--r--ld/scripttempl/v850.sc68
-rw-r--r--ld/scripttempl/w65.sc65
-rw-r--r--ld/scripttempl/z8000.sc45
12 files changed, 401 insertions, 281 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 39a6b79e377..359aae64530 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,18 @@
+2000-11-08 Nick Clifton <nickc@redhat.com>
+
+ * scripttempl/h8300.sc: Use ${CONSTRUCTING...} to enclose
+ constructors and destructors.
+ * scripttempl/h8300h.sc: Ditto.
+ * scripttempl/h8300s.sc: Ditto.
+ * scripttempl/h8500.sc: Ditto.
+ * scripttempl/h8500b.sc: Ditto.
+ * scripttempl/h8500c.sc: Ditto.
+ * scripttempl/h8500m.sc: Ditto.
+ * scripttempl/h8500s.sc: Ditto.
+ * scripttempl/v850.sc: Ditto.
+ * scripttempl/w65.sc: Ditto.
+ * scripttempl/z8000.sc: Ditto.
+
2000-11-06 Alan Modra <alan@linuxcare.com.au>
Merge most place_orphan changes from mainline.
diff --git a/ld/scripttempl/h8300.sc b/ld/scripttempl/h8300.sc
index f2f876e2835..6f4cdcec4b6 100644
--- a/ld/scripttempl/h8300.sc
+++ b/ld/scripttempl/h8300.sc
@@ -1,3 +1,13 @@
+TORS=".tors :
+ {
+ ___ctors = . ;
+ *(.ctors)
+ ___ctors_end = . ;
+ ___dtors = . ;
+ *(.dtors)
+ ___dtors_end = . ;
+ } > ram"
+
cat <<EOF
OUTPUT_FORMAT("${OUTPUT_FORMAT}")
OUTPUT_ARCH(${ARCH})
@@ -18,52 +28,60 @@ MEMORY
SECTIONS
{
-.vectors : {
- /* Use something like this to place a specific function's address
- into the vector table.
+.vectors :
+ {
+ /* Use something like this to place a specific
+ function's address into the vector table.
- SHORT(ABSOLUTE(_foobar)) */
+ SHORT (ABSOLUTE (_foobar)). */
- *(.vectors)
+ *(.vectors)
} ${RELOCATING+ > vectors}
-.text : {
- *(.rodata)
- *(.text)
- *(.strings)
- ${RELOCATING+ _etext = . ; }
- } ${RELOCATING+ > ram}
-.tors : {
- ___ctors = . ;
- *(.ctors)
- ___ctors_end = . ;
- ___dtors = . ;
- *(.dtors)
- ___dtors_end = . ;
+.text :
+ {
+ *(.rodata)
+ *(.text)
+ *(.strings)
+ ${RELOCATING+ _etext = . ; }
} ${RELOCATING+ > ram}
-.data : {
- *(.data)
- *(.tiny)
- ${RELOCATING+ _edata = . ; }
+
+ ${CONSTRUCTING+${TORS}}
+
+.data :
+ {
+ *(.data)
+ *(.tiny)
+ ${RELOCATING+ _edata = . ; }
} ${RELOCATING+ > ram}
-.bss : {
- ${RELOCATING+ _bss_start = . ;}
- *(.bss)
- *(COMMON)
- ${RELOCATING+ _end = . ; }
+
+.bss :
+ {
+ ${RELOCATING+ _bss_start = . ;}
+ *(.bss)
+ *(COMMON)
+ ${RELOCATING+ _end = . ; }
} ${RELOCATING+ >ram}
-.stack : {
- ${RELOCATING+ _stack = . ; }
- *(.stack)
+
+.stack :
+ {
+ ${RELOCATING+ _stack = . ; }
+ *(.stack)
} ${RELOCATING+ > topram}
-.eight : {
- *(.eight)
+
+.eight :
+ {
+ *(.eight)
} ${RELOCATING+ > eight}
-.stab 0 ${RELOCATING+(NOLOAD)} : {
- [ .stab ]
+
+.stab 0 ${RELOCATING+(NOLOAD)} :
+ {
+ [ .stab ]
}
-.stabstr 0 ${RELOCATING+(NOLOAD)} : {
- [ .stabstr ]
+
+.stabstr 0 ${RELOCATING+(NOLOAD)} :
+ {
+ [ .stabstr ]
}
}
EOF
diff --git a/ld/scripttempl/h8300h.sc b/ld/scripttempl/h8300h.sc
index d1cfd860b65..e543df924ec 100644
--- a/ld/scripttempl/h8300h.sc
+++ b/ld/scripttempl/h8300h.sc
@@ -1,3 +1,13 @@
+TORS=".tors :
+ {
+ ___ctors = . ;
+ *(.ctors)
+ ___ctors_end = . ;
+ ___dtors = . ;
+ *(.dtors)
+ ___dtors_end = . ;
+ } > ram"
+
cat <<EOF
OUTPUT_FORMAT("${OUTPUT_FORMAT}")
OUTPUT_ARCH(h8300h)
@@ -24,53 +34,64 @@ MEMORY
SECTIONS
{
-.vectors : {
- /* Use something like this to place a specific function's address
- into the vector table.
+.vectors :
+ {
+ /* Use something like this to place a specific
+ function's address into the vector table.
- LONG(ABSOLUTE(_foobar)) */
+ LONG (ABSOLUTE (_foobar)). */
- *(.vectors)
+ *(.vectors)
} ${RELOCATING+ > vectors}
-.text : {
- *(.rodata)
- *(.text)
- *(.strings)
- ${RELOCATING+ _etext = . ; }
- } ${RELOCATING+ > ram}
-.tors : {
- ___ctors = . ;
- *(.ctors)
- ___ctors_end = . ;
- ___dtors = . ;
- *(.dtors)
- ___dtors_end = . ;
+
+.text :
+ {
+ *(.rodata)
+ *(.text)
+ *(.strings)
+ ${RELOCATING+ _etext = . ; }
} ${RELOCATING+ > ram}
-.data : {
- *(.data)
- ${RELOCATING+ _edata = . ; }
+
+ ${CONSTRUCTING+${TORS}}
+
+.data :
+ {
+ *(.data)
+ ${RELOCATING+ _edata = . ; }
} ${RELOCATING+ > ram}
-.bss : {
- ${RELOCATING+ _bss_start = . ;}
- *(.bss)
- *(COMMON)
- ${RELOCATING+ _end = . ; }
+
+.bss :
+ {
+ ${RELOCATING+ _bss_start = . ;}
+ *(.bss)
+ *(COMMON)
+ ${RELOCATING+ _end = . ; }
} ${RELOCATING+ >ram}
-.stack : {
- ${RELOCATING+ _stack = . ; }
- *(.stack)
+
+.stack :
+ {
+ ${RELOCATING+ _stack = . ; }
+ *(.stack)
} ${RELOCATING+ > topram}
-.tiny : {
- *(.tiny)
+
+.tiny :
+ {
+ *(.tiny)
} ${RELOCATING+ > tiny}
-.eight : {
- *(.eight)
+
+.eight :
+ {
+ *(.eight)
} ${RELOCATING+ > eight}
-.stab 0 ${RELOCATING+(NOLOAD)} : {
- [ .stab ]
+
+.stab 0 ${RELOCATING+(NOLOAD)} :
+ {
+ [ .stab ]
}
-.stabstr 0 ${RELOCATING+(NOLOAD)} : {
- [ .stabstr ]
+
+.stabstr 0 ${RELOCATING+(NOLOAD)} :
+ {
+ [ .stabstr ]
}
}
EOF
diff --git a/ld/scripttempl/h8300s.sc b/ld/scripttempl/h8300s.sc
index 45474fc51ce..b8a3ea53b52 100644
--- a/ld/scripttempl/h8300s.sc
+++ b/ld/scripttempl/h8300s.sc
@@ -1,3 +1,13 @@
+TORS=".tors :
+ {
+ ___ctors = . ;
+ *(.ctors)
+ ___ctors_end = . ;
+ ___dtors = . ;
+ *(.dtors)
+ ___dtors_end = . ;
+ } > ram"
+
cat <<EOF
OUTPUT_FORMAT("${OUTPUT_FORMAT}")
OUTPUT_ARCH(h8300s)
@@ -24,53 +34,64 @@ MEMORY
SECTIONS
{
-.vectors : {
- /* Use something like this to place a specific function's address
- into the vector table.
+.vectors :
+ {
+ /* Use something like this to place a specific function's address
+ into the vector table.
- LONG(ABSOLUTE(_foobar)) */
+ LONG (ABSOLUTE (_foobar)). */
- *(.vectors)
+ *(.vectors)
} ${RELOCATING+ > vectors}
-.text : {
- *(.rodata)
- *(.text)
- *(.strings)
- ${RELOCATING+ _etext = . ; }
- } ${RELOCATING+ > ram}
-.tors : {
- ___ctors = . ;
- *(.ctors)
- ___ctors_end = . ;
- ___dtors = . ;
- *(.dtors)
- ___dtors_end = . ;
+
+.text :
+ {
+ *(.rodata)
+ *(.text)
+ *(.strings)
+ ${RELOCATING+ _etext = . ; }
} ${RELOCATING+ > ram}
-.data : {
- *(.data)
- ${RELOCATING+ _edata = . ; }
+
+ ${CONSTRUCTING+${TORS}}
+
+.data :
+ {
+ *(.data)
+ ${RELOCATING+ _edata = . ; }
} ${RELOCATING+ > ram}
-.bss : {
- ${RELOCATING+ _bss_start = . ;}
- *(.bss)
- *(COMMON)
- ${RELOCATING+ _end = . ; }
+
+.bss :
+ {
+ ${RELOCATING+ _bss_start = . ;}
+ *(.bss)
+ *(COMMON)
+ ${RELOCATING+ _end = . ; }
} ${RELOCATING+ >ram}
-.stack : {
- ${RELOCATING+ _stack = . ; }
- *(.stack)
+
+.stack :
+ {
+ ${RELOCATING+ _stack = . ; }
+ *(.stack)
} ${RELOCATING+ > topram}
-.tiny : {
- *(.tiny)
+
+.tiny :
+ {
+ *(.tiny)
} ${RELOCATING+ > tiny}
-.eight : {
- *(.eight)
+
+.eight :
+ {
+ *(.eight)
} ${RELOCATING+ > eight}
-.stab 0 ${RELOCATING+(NOLOAD)} : {
- [ .stab ]
+
+.stab 0 ${RELOCATING+(NOLOAD)} :
+ {
+ [ .stab ]
}
-.stabstr 0 ${RELOCATING+(NOLOAD)} : {
- [ .stabstr ]
+
+.stabstr 0 ${RELOCATING+(NOLOAD)} :
+ {
+ [ .stabstr ]
}
}
EOF
diff --git a/ld/scripttempl/h8500.sc b/ld/scripttempl/h8500.sc
index d6a39eec38c..f6e88c61dfc 100644
--- a/ld/scripttempl/h8500.sc
+++ b/ld/scripttempl/h8500.sc
@@ -1,3 +1,11 @@
+TORS="
+ ___ctors = . ;
+ *(.ctors)
+ ___ctors_end = . ;
+ ___dtors = . ;
+ *(.dtors)
+ ___dtors_end = . ;"
+
cat <<EOF
OUTPUT_FORMAT("${OUTPUT_FORMAT}")
OUTPUT_ARCH(${ARCH})
@@ -8,52 +16,47 @@ SECTIONS
{
.text ${RELOCATING+ 0x0000 } :
{
- *(.text)
-
- ${RELOCATING+ _etext = . ; }
+ *(.text)
+ ${RELOCATING+ _etext = . ; }
}
-
.data ${RELOCATING+ . } :
{
- *(.data)
- ${RELOCATING+ _edata = . ; }
+ *(.data)
+ ${RELOCATING+ _edata = . ; }
}
.rdata ${RELOCATING+ . } :
{
- *(.rdata);
+ *(.rdata);
*(.strings)
- ___ctors = . ;
- *(.ctors)
- ___ctors_end = . ;
- ___dtors = . ;
- *(.dtors)
- ___dtors_end = . ;
-}
+
+ ${CONSTRUCTING+${TORS}}
+ }
.bss ${RELOCATING+ . } :
{
- ${RELOCATING+ __start_bss = . ; }
- *(.bss)
- *(COMMON)
- ${RELOCATING+ _end = . ; }
+ ${RELOCATING+ __start_bss = . ; }
+ *(.bss)
+ *(COMMON)
+ ${RELOCATING+ _end = . ; }
}
.stack ${RELOCATING+ 0xfff0} :
{
- ${RELOCATING+ _stack = . ; }
- *(.stack)
+ ${RELOCATING+ _stack = . ; }
+ *(.stack)
}
- .stab 0 ${RELOCATING+(NOLOAD)} :
- {
- [ .stab ]
- }
- .stabstr 0 ${RELOCATING+(NOLOAD)} :
- {
- [ .stabstr ]
- }
+.stab 0 ${RELOCATING+(NOLOAD)} :
+ {
+ [ .stab ]
+ }
+
+.stabstr 0 ${RELOCATING+(NOLOAD)} :
+ {
+ [ .stabstr ]
+ }
}
EOF
diff --git a/ld/scripttempl/h8500b.sc b/ld/scripttempl/h8500b.sc
index ef5fa2c488a..a64eebcfa5e 100644
--- a/ld/scripttempl/h8500b.sc
+++ b/ld/scripttempl/h8500b.sc
@@ -1,3 +1,11 @@
+TORS="
+ ___ctors = . ;
+ *(.ctors)
+ ___ctors_end = . ;
+ ___dtors = . ;
+ *(.dtors)
+ ___dtors_end = . ;"
+
cat <<EOF
OUTPUT_FORMAT("${OUTPUT_FORMAT}")
OUTPUT_ARCH(${ARCH})
@@ -24,13 +32,9 @@ SECTIONS
{
*(.rdata);
*(.strings)
- ___ctors = . ;
- *(.ctors)
- ___ctors_end = . ;
- ___dtors = . ;
- *(.dtors)
- ___dtors_end = . ;
-}
+
+ ${CONSTRUCTING+${TORS}}
+ }
.bss ${RELOCATING+ 0x40000} :
{
diff --git a/ld/scripttempl/h8500c.sc b/ld/scripttempl/h8500c.sc
index 03880e3f068..bc696499986 100644
--- a/ld/scripttempl/h8500c.sc
+++ b/ld/scripttempl/h8500c.sc
@@ -1,3 +1,11 @@
+TORS="
+ ___ctors = . ;
+ *(.ctors)
+ ___ctors_end = . ;
+ ___dtors = . ;
+ *(.dtors)
+ ___dtors_end = . ;"
+
cat <<EOF
OUTPUT_FORMAT("${OUTPUT_FORMAT}")
OUTPUT_ARCH(${ARCH})
@@ -20,15 +28,12 @@ SECTIONS
${RELOCATING+ _edata = . ; }
} ${RELOCATING+ > ram}
-.rdata 0x30000 : {
+.rdata 0x30000 :
+ {
*(.rdata);
- ___ctors = . ;
- *(.ctors)
- ___ctors_end = . ;
- ___dtors = . ;
- *(.dtors)
- ___dtors_end = . ;
-} ${RELOCATING+ > ram}
+
+ ${CONSTRUCTING+${TORS}}
+ } ${RELOCATING+ > ram}
.bss 0x40000 :
{
diff --git a/ld/scripttempl/h8500m.sc b/ld/scripttempl/h8500m.sc
index 040a4a7c637..06ce2af6b46 100644
--- a/ld/scripttempl/h8500m.sc
+++ b/ld/scripttempl/h8500m.sc
@@ -1,3 +1,11 @@
+TORS="
+ ___ctors = . ;
+ *(.ctors)
+ ___ctors_end = . ;
+ ___dtors = . ;
+ *(.dtors)
+ ___dtors_end = . ;"
+
cat <<EOF
OUTPUT_FORMAT("${OUTPUT_FORMAT}")
OUTPUT_ARCH(${ARCH})
@@ -9,50 +17,46 @@ SECTIONS
.text ${RELOCATING+ 0x10000} :
{
*(.text)
- ${RELOCATING+ _etext = . ; }
+ ${RELOCATING+ _etext = . ; }
}
-
.data ${RELOCATING+ 0x20000} :
{
- *(.data)
- ${RELOCATING+ _edata = . ; }
+ *(.data)
+ ${RELOCATING+ _edata = . ; }
}
.rdata ${RELOCATING+ . } :
{
- *(.rdata);
+ *(.rdata);
*(.strings)
- ___ctors = . ;
- *(.ctors)
- ___ctors_end = . ;
- ___dtors = . ;
- *(.dtors)
- ___dtors_end = . ;
+
+ ${CONSTRUCTING+${TORS}}
}
.bss ${RELOCATING+ . } :
{
- ${RELOCATING+ __start_bss = . ; }
- *(.bss)
- *(COMMON)
- ${RELOCATING+ _end = . ; }
+ ${RELOCATING+ __start_bss = . ; }
+ *(.bss)
+ *(COMMON)
+ ${RELOCATING+ _end = . ; }
}
.stack ${RELOCATING+ 0x2fff0} :
{
- ${RELOCATING+ _stack = . ; }
- *(.stack)
+ ${RELOCATING+ _stack = . ; }
+ *(.stack)
}
- .stab 0 ${RELOCATING+(NOLOAD)} :
- {
- [ .stab ]
- }
- .stabstr 0 ${RELOCATING+(NOLOAD)} :
- {
- [ .stabstr ]
- }
+.stab 0 ${RELOCATING+(NOLOAD)} :
+ {
+ [ .stab ]
+ }
+
+.stabstr 0 ${RELOCATING+(NOLOAD)} :
+ {
+ [ .stabstr ]
+ }
}
EOF
diff --git a/ld/scripttempl/h8500s.sc b/ld/scripttempl/h8500s.sc
index 11615d8afe9..2567489e1d0 100644
--- a/ld/scripttempl/h8500s.sc
+++ b/ld/scripttempl/h8500s.sc
@@ -1,3 +1,11 @@
+TORS="
+ ___ctors = . ;
+ *(.ctors)
+ ___ctors_end = . ;
+ ___dtors = . ;
+ *(.dtors)
+ ___dtors_end = . ;"
+
cat <<EOF
OUTPUT_FORMAT("${OUTPUT_FORMAT}")
OUTPUT_ARCH(${ARCH})
@@ -8,50 +16,47 @@ SECTIONS
{
.text ${RELOCATING+ 0x10000 } :
{
- *(.text)
- ${RELOCATING+ _etext = . ; }
+ *(.text)
+ ${RELOCATING+ _etext = . ; }
}
.rdata ${RELOCATING+ 0x20000 } :
{
- *(.rdata);
- *(.strings)
- ___ctors = . ;
- *(.ctors)
- ___ctors_end = . ;
- ___dtors = . ;
- *(.dtors)
- ___dtors_end = . ;
+ *(.rdata);
+ *(.strings)
+
+ ${CONSTRUCTING+${TORS}}
}
.data ${RELOCATING+ . } :
{
- *(.data)
- ${RELOCATING+ _edata = . ; }
+ *(.data)
+ ${RELOCATING+ _edata = . ; }
}
.bss ${RELOCATING+ .} :
{
- ${RELOCATING+ __start_bss = . ; }
- *(.bss)
- *(COMMON)
- ${RELOCATING+ _end = . ; }
+ ${RELOCATING+ __start_bss = . ; }
+ *(.bss)
+ *(COMMON)
+ ${RELOCATING+ _end = . ; }
}
.stack ${RELOCATING+ 0x2fff0} :
{
- ${RELOCATING+ _stack = . ; }
- *(.stack)
+ ${RELOCATING+ _stack = . ; }
+ *(.stack)
}
- .stab 0 ${RELOCATING+(NOLOAD)} :
- {
- [ .stab ]
- }
- .stabstr 0 ${RELOCATING+(NOLOAD)} :
- {
- [ .stabstr ]
- }
+.stab 0 ${RELOCATING+(NOLOAD)} :
+ {
+ [ .stab ]
+ }
+
+.stabstr 0 ${RELOCATING+(NOLOAD)} :
+ {
+ [ .stabstr ]
+ }
}
EOF
diff --git a/ld/scripttempl/v850.sc b/ld/scripttempl/v850.sc
index 0a20954d65c..90731de8749 100644
--- a/ld/scripttempl/v850.sc
+++ b/ld/scripttempl/v850.sc
@@ -4,13 +4,13 @@ OUTPUT_FORMAT("elf32-v850", "elf32-v850",
OUTPUT_ARCH(v850)
ENTRY(_start)
SEARCH_DIR(.);
-/*/critters/slug/grossman/install/sun4/v850-elf/lib*/
SECTIONS
{
/* This saves a little space in the ELF file, since the zda starts
at a higher location that the ELF headers take up. */
- .zdata ${ZDATA_START_ADDR} : {
+ .zdata ${ZDATA_START_ADDR} :
+ {
*(.zdata)
*(.zbss)
*(reszdata)
@@ -23,13 +23,14 @@ SECTIONS
section. Specifically it prevents the zdata
section from being marked READONLY. */
- .rozdata ${ROZDATA_START_ADDR} : {
+ .rozdata ${ROZDATA_START_ADDR} :
+ {
*(.rozdata)
*(romzdata)
*(romzbss)
}
- /* Read-only sections, merged into text segment: */
+ /* Read-only sections, merged into text segment. */
. = ${TEXT_START_ADDR};
.interp : { *(.interp) }
.hash : { *(.hash) }
@@ -58,9 +59,11 @@ SECTIONS
.init : { KEEP (*(.init)) } =0
.plt : { *(.plt) }
- .text : {
+ .text :
+ {
*(.text)
${RELOCATING+*(.text.*)}
+
/* .gnu.warning sections are handled specially by elf32.em. */
*(.gnu.warning)
*(.gnu.linkonce.t*)
@@ -73,45 +76,51 @@ SECTIONS
It contains a small lookup table at the start followed by the
code pointed to by entries in the lookup table. */
- .call_table_data ${CALL_TABLE_START_ADDR} : {
+ .call_table_data ${CALL_TABLE_START_ADDR} :
+ {
${RELOCATING+PROVIDE(__ctbp = .);}
*(.call_table_data)
- } = 0xff /* fill gaps with 0xff */
- .call_table_text : {
+ } = 0xff /* Fill gaps with 0xff. */
+
+ .call_table_text :
+ {
*(.call_table_text)
}
- .fini : { KEEP (*(.fini)) } =0
+ .fini : { KEEP (*(.fini)) } =0
.rodata : { *(.rodata) ${RELOCATING+*(.rodata.*)} *(.gnu.linkonce.r*) }
.rodata1 : { *(.rodata1) }
- .data : {
+ .data :
+ {
*(.data)
${RELOCATING+*(.data.*)}
*(.gnu.linkonce.d*)
CONSTRUCTORS
}
.data1 : { *(.data1) }
- .ctors : {
- ${RELOCATING+___ctors = .;}
+ .ctors :
+ {
+ ${CONSTRUCTING+___ctors = .;}
KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*crtend(.ctors))
- ${RELOCATING+___ctors_end = .;}
+ ${CONSTRUCTING+___ctors_end = .;}
}
-
- .dtors : {
- ${RELOCATING+___dtors = .;}
+ .dtors :
+ {
+ ${CONSTRUCTING+___dtors = .;}
KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
KEEP (*(SORT(.dtors.*)))
KEEP (*crtend.o(.dtors))
- ${RELOCATING+___dtors_end = .;}
+ ${CONSTRUCTING+___dtors_end = .;}
}
.got : { *(.got.plt) *(.got) }
.dynamic : { *(.dynamic) }
- .tdata ${TDATA_START_ADDR} : {
+ .tdata ${TDATA_START_ADDR} :
+ {
${RELOCATING+PROVIDE (__ep = .);}
*(.tbyte)
*(.tcommon_byte)
@@ -123,21 +132,26 @@ SECTIONS
/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
- .sdata ${SDATA_START_ADDR} : {
+
+ .sdata ${SDATA_START_ADDR} :
+ {
${RELOCATING+PROVIDE (__gp = . + 0x8000);}
*(.sdata)
}
/* See comment about .rozdata. */
- .rosdata ${ROSDATA_START_ADDR} : {
+ .rosdata ${ROSDATA_START_ADDR} :
+ {
*(.rosdata)
}
/* We place the .sbss data section AFTER the .rosdata section, so that
it can directly preceed the .bss section. This allows runtime startup
code to initialise all the zero-data sections by simply taking the
- value of '_edata' and zeroing until it reaches '_end' */
- .sbss : {
+ value of '_edata' and zeroing until it reaches '_end'. */
+
+ .sbss :
+ {
${RELOCATING+__sbss_start = .;}
*(.sbss)
*(.scommon)
@@ -184,7 +198,7 @@ SECTIONS
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
- .debug_info 0 : { *(.debug_info) }
+ .debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
@@ -192,17 +206,17 @@ SECTIONS
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
- /* SGI/MIPS DWARF 2 extensions */
+ /* SGI/MIPS DWARF 2 extensions. */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
- /* User stack */
- .stack 0x200000 : {
+ /* User stack. */
+ .stack 0x200000 :
+ {
${RELOCATING+__stack = .;}
*(.stack)
}
- /* These must appear regardless of . */
}
EOF
diff --git a/ld/scripttempl/w65.sc b/ld/scripttempl/w65.sc
index f9044952952..f92d9994310 100644
--- a/ld/scripttempl/w65.sc
+++ b/ld/scripttempl/w65.sc
@@ -1,10 +1,21 @@
+TORS=".tors :
+ {
+ ___ctors = . ;
+ *(.ctors)
+ ___ctors_end = . ;
+ ___dtors = . ;
+ *(.dtors)
+ ___dtors_end = . ;
+ } > ram"
+
cat <<EOF
OUTPUT_FORMAT("${OUTPUT_FORMAT}")
OUTPUT_ARCH(${ARCH})
-MEMORY {
+MEMORY
+{
ram : o = 0x1000, l = 512k
- }
+}
SECTIONS
{
@@ -12,44 +23,40 @@ SECTIONS
{
*(.text)
*(.strings)
- ${RELOCATING+ _etext = . ; }
+ ${RELOCATING+ _etext = . ; }
} ${RELOCATING+ > ram}
-
-.tors : {
- ___ctors = . ;
- *(.ctors)
- ___ctors_end = . ;
- ___dtors = . ;
- *(.dtors)
- ___dtors_end = . ;
-} ${RELOCATING+ > ram}
+ ${CONSTRUCTING+${TORS}}
.data :
{
- *(.data)
- ${RELOCATING+ _edata = . ; }
+ *(.data)
+ ${RELOCATING+ _edata = . ; }
} ${RELOCATING+ > ram}
+
.bss :
{
- ${RELOCATING+ _bss_start = . ; }
- *(.bss)
- *(COMMON)
- ${RELOCATING+ _end = . ; }
+ ${RELOCATING+ _bss_start = . ; }
+ *(.bss)
+ *(COMMON)
+ ${RELOCATING+ _end = . ; }
} ${RELOCATING+ >ram}
-.stack ${RELOCATING+ 0x30000 } :
+
+.stack ${RELOCATING+ 0x30000 } :
{
- ${RELOCATING+ _stack = . ; }
- *(.stack)
+ ${RELOCATING+ _stack = . ; }
+ *(.stack)
} ${RELOCATING+ > ram}
- .stab . (NOLOAD) :
- {
- [ .stab ]
- }
- .stabstr . (NOLOAD) :
- {
- [ .stabstr ]
- }
+
+.stab . (NOLOAD) :
+ {
+ [ .stab ]
+ }
+
+.stabstr . (NOLOAD) :
+ {
+ [ .stabstr ]
+ }
}
EOF
diff --git a/ld/scripttempl/z8000.sc b/ld/scripttempl/z8000.sc
index 2b87930100e..646c88080a9 100644
--- a/ld/scripttempl/z8000.sc
+++ b/ld/scripttempl/z8000.sc
@@ -5,7 +5,8 @@ ENTRY(_start)
SECTIONS
{
-.text ${BIG+ ${RELOCATING+ 0x0000000}} : {
+.text ${BIG+ ${RELOCATING+ 0x0000000}} :
+ {
*(.text)
*(.strings)
*(.rdata)
@@ -13,38 +14,40 @@ SECTIONS
.ctors ${BIG+ ${RELOCATING+ 0x2000000}} :
{
- ${RELOCATING+ ___ctors = . ; }
+ ${CONSTRUCTING+ ___ctors = . ; }
*(.ctors);
- ${RELOCATING+ ___ctors_end = . ; }
+ ${CONSTRUCTING+ ___ctors_end = . ; }
___dtors = . ;
*(.dtors);
- ${RELOCATING+ ___dtors_end = . ; }
+ ${CONSTRUCTING+ ___dtors_end = . ; }
}
-.data ${BIG+ ${RELOCATING+ 0x3000000}} : {
- *(.data)
+.data ${BIG+ ${RELOCATING+ 0x3000000}} :
+ {
+ *(.data)
}
.bss ${BIG+ ${RELOCATING+ 0x4000000}} :
- {
- ${RELOCATING+ __start_bss = . ; }
- *(.bss);
- *(COMMON);
- ${RELOCATING+ __end_bss = . ; }
- }
-
-.heap ${BIG+ ${RELOCATING+ 0x5000000}} : {
- ${RELOCATING+ __start_heap = . ; }
- ${RELOCATING+ . = . + 20k ; }
- ${RELOCATING+ __end_heap = . ; }
+ {
+ ${RELOCATING+ __start_bss = . ; }
+ *(.bss);
+ *(COMMON);
+ ${RELOCATING+ __end_bss = . ; }
+ }
+
+.heap ${BIG+ ${RELOCATING+ 0x5000000}} :
+ {
+ ${RELOCATING+ __start_heap = . ; }
+ ${RELOCATING+ . = . + 20k ; }
+ ${RELOCATING+ __end_heap = . ; }
}
.stack ${RELOCATING+ 0xf000 } :
{
- ${RELOCATING+ _stack = . ; }
- *(.stack)
- ${RELOCATING+ __stack_top = . ; }
- }
+ ${RELOCATING+ _stack = . ; }
+ *(.stack)
+ ${RELOCATING+ __stack_top = . ; }
+ }
}
EOF