aboutsummaryrefslogtreecommitdiff
path: root/ld/i386coff.sc-sh
diff options
context:
space:
mode:
Diffstat (limited to 'ld/i386coff.sc-sh')
-rw-r--r--ld/i386coff.sc-sh46
1 files changed, 18 insertions, 28 deletions
diff --git a/ld/i386coff.sc-sh b/ld/i386coff.sc-sh
index 485f3bb..d18fd24 100644
--- a/ld/i386coff.sc-sh
+++ b/ld/i386coff.sc-sh
@@ -1,39 +1,29 @@
-# This is totally made up, from the a29k stuff. If you know better,
-# tell us about it.
+# Linker script for 386 COFF. This works on SVR3.2 and SCO Unix 3.2.2.
+# .data2 handles SCO, which uses two data sections.
+# Ian Taylor <ian@cygnus.com>.
cat <<EOF
OUTPUT_FORMAT("${OUTPUT_FORMAT}")
${LIB_SEARCH_DIRS}
-MEMORY {
- text : ORIGIN = 0x1000000, LENGTH = 0x1000000
- talias : ORIGIN = 0x2000000, LENGTH = 0x1000000
- data : ORIGIN = 0x3000000, LENGTH = 0x1000000
- mstack : ORIGIN = 0x4000000, LENGTH = 0x1000000
- rstack : ORIGIN = 0x5000000, LENGTH = 0x1000000
-}
+ENTRY(_start)
+
SECTIONS
{
- .text : {
+ .text ${RELOCATING+ SIZEOF_HEADERS} : {
+ *(.init)
*(.text)
- ${RELOCATING+ _etext = .};
- *(.lit)
- *(.shdata)
- } ${RELOCATING+ > text}
- .shbss SIZEOF(.text) + ADDR(.text) : {
- *(.shbss)
- }
- .talias : { } ${RELOCATING+ > talias}
- .data : {
- *(.data)
- ${RELOCATING+ _edata = .};
- } ${RELOCATING+ > data}
- .bss SIZEOF(.data) + ADDR(.data) :
+ *(.fini)
+ ${RELOCATING+ etext = .};
+ }
+ .data ${RELOCATING+ 0x400000 + (. & 0xffc00fff)} : {
+ *(.data .data2)
+ ${RELOCATING+ edata = .};
+ }
+ .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
{
- *(.bss)
- *(COMMON)
- ${RELOCATING+ _end = ALIGN(0x8)};
+ *(.bss)
+ *(COMMON)
+ ${RELOCATING+ end = .};
}
- .mstack : { } ${RELOCATING+ > mstack}
- .rstack : { } ${RELOCATING+ > rstack}
}
EOF