From 01bc4918d7d850eac440398dbf68807587aeb9a0 Mon Sep 17 00:00:00 2001 From: Steve Chamberlain Date: Tue, 3 Sep 1991 21:01:03 +0000 Subject: [PATCH] Initial revision --- ld/config/coff-a29k.mt | 1 + ld/config/decstation.mh | 2 ++ ld/config/dgux.mh | 9 +++++++++ ld/config/m88k-bcs.mt | 1 + ld/config/rtbsd.mh | 7 +++++++ ld/config/sparc-ll.mh | 8 ++++++++ ld/config/sparc.mh | 8 ++++++++ ld/config/sun3.mh | 9 +++++++++ ld/config/sun4.mt | 1 + ld/ldgld.sc | 30 ++++++++++++++++++++++++++++++ ld/ldgld68k.sc | 28 ++++++++++++++++++++++++++++ ld/ldgld68kUr.sc | 21 +++++++++++++++++++++ ld/ldgld68kr.sc | 22 ++++++++++++++++++++++ ld/ldgld960.sc | 23 +++++++++++++++++++++++ ld/ldgldUr.sc | 24 ++++++++++++++++++++++++ ld/ldglda29k.sc | 38 ++++++++++++++++++++++++++++++++++++++ ld/ldglda29kUr.sc | 32 ++++++++++++++++++++++++++++++++ ld/ldglda29kr.sc | 32 ++++++++++++++++++++++++++++++++ ld/ldgldm88kbcs.sc | 40 ++++++++++++++++++++++++++++++++++++++++ ld/ldgldm88kbcsUr.sc | 31 +++++++++++++++++++++++++++++++ ld/ldgldm88kbcsr.sc | 20 ++++++++++++++++++++ ld/ldgldr.sc | 20 ++++++++++++++++++++ ld/ldlnk960.sc | 21 +++++++++++++++++++++ ld/ldlnk960r.sc | 17 +++++++++++++++++ 24 files changed, 445 insertions(+) create mode 100644 ld/config/coff-a29k.mt create mode 100755 ld/config/decstation.mh create mode 100644 ld/config/dgux.mh create mode 100644 ld/config/m88k-bcs.mt create mode 100644 ld/config/rtbsd.mh create mode 100644 ld/config/sparc-ll.mh create mode 100755 ld/config/sparc.mh create mode 100644 ld/config/sun3.mh create mode 100644 ld/config/sun4.mt create mode 100755 ld/ldgld.sc create mode 100755 ld/ldgld68k.sc create mode 100755 ld/ldgld68kUr.sc create mode 100755 ld/ldgld68kr.sc create mode 100755 ld/ldgld960.sc create mode 100755 ld/ldgldUr.sc create mode 100755 ld/ldglda29k.sc create mode 100755 ld/ldglda29kUr.sc create mode 100755 ld/ldglda29kr.sc create mode 100755 ld/ldgldm88kbcs.sc create mode 100755 ld/ldgldm88kbcsUr.sc create mode 100755 ld/ldgldm88kbcsr.sc create mode 100755 ld/ldgldr.sc create mode 100755 ld/ldlnk960.sc create mode 100755 ld/ldlnk960r.sc diff --git a/ld/config/coff-a29k.mt b/ld/config/coff-a29k.mt new file mode 100644 index 00000000000..5c554154c92 --- /dev/null +++ b/ld/config/coff-a29k.mt @@ -0,0 +1 @@ +TDEFINES = -DDEFAULT_EMULATION=GLD29K_EMULATION_NAME diff --git a/ld/config/decstation.mh b/ld/config/decstation.mh new file mode 100755 index 00000000000..4a17e631b96 --- /dev/null +++ b/ld/config/decstation.mh @@ -0,0 +1,2 @@ +HDEFINES=-DHOST_SYS=DEC3100_SYS +YACC=yacc -vd diff --git a/ld/config/dgux.mh b/ld/config/dgux.mh new file mode 100644 index 00000000000..9c4e9bc77ee --- /dev/null +++ b/ld/config/dgux.mh @@ -0,0 +1,9 @@ +HDEFINES = -DHOST_SYS=DGUX_SYS -D__using_DGUX + +CC = gcc -Wall -ansi +YACC=yacc -tvd + +HOSTING_CRT0=/lib/crt0.o -X +HOSTING_LIBS=/usr/sde/m88kbcs/lib/libc.a +HOSTING_EMU=LDEMULATION=gldm88kbcs; export LDEMULATION + diff --git a/ld/config/m88k-bcs.mt b/ld/config/m88k-bcs.mt new file mode 100644 index 00000000000..94e8c66ae5f --- /dev/null +++ b/ld/config/m88k-bcs.mt @@ -0,0 +1 @@ +TDEFINES = -DDEFAULT_EMULATION=GLDM88KBCS_EMULATION_NAME diff --git a/ld/config/rtbsd.mh b/ld/config/rtbsd.mh new file mode 100644 index 00000000000..7d2ff5a4754 --- /dev/null +++ b/ld/config/rtbsd.mh @@ -0,0 +1,7 @@ +# The IBM RT/PC has only been supported as a host in a cross-development +# environment. If you don't have gcc, I was able to get 'hc -Hnocpp -ma' +# to compile most of the modules, but didn't try running anything. +YACC = yacc -d +HDEFINES = -DHOST_SYS=RTBSD_SYS -DNO_VARARGS +LDFLAGS = +CC=gcc # hc/pcc just can't cut it diff --git a/ld/config/sparc-ll.mh b/ld/config/sparc-ll.mh new file mode 100644 index 00000000000..92f74ad36b1 --- /dev/null +++ b/ld/config/sparc-ll.mh @@ -0,0 +1,8 @@ +HDEFINES=-DHOST_SYS=SUN4_SYS -DHOST_64_BIT="long long" +YACC=yacc -tvd +CC=/usr/latest/bin/gcc -Wall -ansi +#stuff for self hosting +HOSTING_CRT0=/lib/crt0.o +HOSTING_LIBS=/limbo/latest/=sun4/lib/gcc/sparc/1.93/gnulib -lc +HOSTING_EMU=LDEMULATION=gld; export LDEMULATION + diff --git a/ld/config/sparc.mh b/ld/config/sparc.mh new file mode 100755 index 00000000000..b53bfde0ae2 --- /dev/null +++ b/ld/config/sparc.mh @@ -0,0 +1,8 @@ +HDEFINES=-DHOST_SYS=SUN4_SYS +YACC=yacc -tvd +#CC=gcc -Wall -ansi +#stuff for self hosting +HOSTING_CRT0=/lib/crt0.o +HOSTING_LIBS=/limbo/latest/=sun4/lib/gcc/sparc/1.93/gnulib -lc +HOSTING_EMU=LDEMULATION=gld; export LDEMULATION + diff --git a/ld/config/sun3.mh b/ld/config/sun3.mh new file mode 100644 index 00000000000..5922ac16306 --- /dev/null +++ b/ld/config/sun3.mh @@ -0,0 +1,9 @@ +CDEFINES=-DHOST_SYS=SUN3_SYS +#CC=gcc -ansi -Wall +CC=cc +YACC=yacc -d + + +HOSTING_CRT0=/usr/lib/crt0.o /usr/lib/Fcrt1.o -L/usr/lib/fsoft.o +HOSTING_LIBS=-lc +HOSTING_EMU=LDEMULATION=gld68k; export LDEMULATION diff --git a/ld/config/sun4.mt b/ld/config/sun4.mt new file mode 100644 index 00000000000..d68947ec90a --- /dev/null +++ b/ld/config/sun4.mt @@ -0,0 +1 @@ +TDEFINES = -DDEFAULT_EMULATION=GLD_EMULATION_NAME diff --git a/ld/ldgld.sc b/ld/ldgld.sc new file mode 100755 index 00000000000..15ff71fc383 --- /dev/null +++ b/ld/ldgld.sc @@ -0,0 +1,30 @@ +OUTPUT_ARCH(sparc) +OUTPUT_FORMAT("a.out-sunos-big") +SEARCH_DIR(/lib) +SEARCH_DIR(/usr/lib) +SEARCH_DIR(/usr/local/lib) +__DYNAMIC = 0; +SECTIONS +{ + .text 0x2020 BLOCK(0x2000): + { + CREATE_OBJECT_SYMBOLS ; + *(.text); + _etext = ALIGN( 0x2000); + } + .data ALIGN(0x2000) : + { + *(.data); + CONSTRUCTORS; + _edata = .; + } + .bss SIZEOF(.data) + ADDR(.data) : + { + *(.bss) + [COMMON] + _end = .; + __end = .; + } +} + + diff --git a/ld/ldgld68k.sc b/ld/ldgld68k.sc new file mode 100755 index 00000000000..be91d916a97 --- /dev/null +++ b/ld/ldgld68k.sc @@ -0,0 +1,28 @@ +OUTPUT_FORMAT("a.out-sunos-big") +OUTPUT_ARCH(m68k) + +SEARCH_DIR(/lib) +SEARCH_DIR(/usr/lib) +SEARCH_DIR(/usr/local/lib) +__DYNAMIC = 0; +SECTIONS +{ + .text 0x2020 BLOCK(0x2000): + { + CREATE_OBJECT_SYMBOLS + *(.text) + _etext = ALIGN( 0x2000); + } + .data ALIGN(0x20000) : + { + *(.data) + _edata = .; + } + .bss SIZEOF(.data) + ADDR(.data) : + { + *(.bss) + [COMMON] + _end = .; + } +} + diff --git a/ld/ldgld68kUr.sc b/ld/ldgld68kUr.sc new file mode 100755 index 00000000000..aa89c6a355d --- /dev/null +++ b/ld/ldgld68kUr.sc @@ -0,0 +1,21 @@ +SEARCH_DIR(/lib) +SEARCH_DIR(/usr/lib) +SEARCH_DIR(/usr/local/lib) +SECTIONS +{ + .text 0: + { + CREATE_OBJECT_SYMBOLS + *(.text) + } + .data SIZEOF(.text) + ADDR(.text) : + { + *(.data) + } + .bss SIZEOF(.data) + ADDR(.data) : + { + *(.bss) + [COMMON] + } +} + diff --git a/ld/ldgld68kr.sc b/ld/ldgld68kr.sc new file mode 100755 index 00000000000..8cbc9dc8e06 --- /dev/null +++ b/ld/ldgld68kr.sc @@ -0,0 +1,22 @@ + +SEARCH_DIR(/lib) +SEARCH_DIR(/usr/lib) +SEARCH_DIR(/usr/local/lib) +SECTIONS +{ + .text 0: + { + CREATE_OBJECT_SYMBOLS + *(.text) + } + .data SIZEOF(.text) + ADDR(.text) : + { + *(.data) + } + .bss SIZEOF(.data) + ADDR(.data) : + { + *(.bss) + [COMMON] + } +} + diff --git a/ld/ldgld960.sc b/ld/ldgld960.sc new file mode 100755 index 00000000000..1c40a732e77 --- /dev/null +++ b/ld/ldgld960.sc @@ -0,0 +1,23 @@ +SECTIONS +{ + .text : + { + CREATE_OBJECT_SYMBOLS + *(.text) + _etext = .; + } + + .data SIZEOF(.text) + ADDR(.text): + { + + *(.data) + _edata = .; + } + .bss SIZEOF(.data) + ADDR(.data) : + { + _bss_start = .; + *(.bss) + [COMMON] + _end = . ; + } +} diff --git a/ld/ldgldUr.sc b/ld/ldgldUr.sc new file mode 100755 index 00000000000..e7d9b447051 --- /dev/null +++ b/ld/ldgldUr.sc @@ -0,0 +1,24 @@ + +SEARCH_DIR(/lib) +SEARCH_DIR(/usr/lib) +SEARCH_DIR(/usr/local/lib) +SECTIONS +{ + .text 0: + { + CREATE_OBJECT_SYMBOLS + *(.text) + } + .data SIZEOF(.text) + ADDR(.text) : + { + *(.data) + CONSTRUCTORS + ___end_list__ = . ; + } + .bss SIZEOF(.data) + ADDR(.data) : + { + *(.bss) + [COMMON] + } +} + diff --git a/ld/ldglda29k.sc b/ld/ldglda29k.sc new file mode 100755 index 00000000000..6d7d19aa8ee --- /dev/null +++ b/ld/ldglda29k.sc @@ -0,0 +1,38 @@ +OUTPUT_FORMAT("coff-a29k-big") +INPUT(/lab3/u3/sym1/tools/usr/lib/segments.o) /* Has .rstack/.mstack */ +SEARCH_DIR(/lab3/u3/sym1/tools/lib) +SEARCH_DIR(/lab3/u3/sym1/tools/usr/lib) +SEARCH_DIR(/lab3/u3/sym1/tools/usr/local/lib) +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 +} +SECTIONS +{ + .text : { + *(.text) + __etext = .; + *(.lit) + *(.shdata) + } > text + .shbss SIZEOF(.text) + ADDR(.text) : { + *(.shbss) + } + .talias : { } > talias + .data : { + *(.data) + __edata = .; + } > data + .bss SIZEOF(.data) + ADDR(.data) : + { + *(.bss) + [COMMON] + __end = ALIGN(0x8); + } + .mstack : { } > mstack + .rstack : { } > rstack +} + diff --git a/ld/ldglda29kUr.sc b/ld/ldglda29kUr.sc new file mode 100755 index 00000000000..c8e8e2c7cf4 --- /dev/null +++ b/ld/ldglda29kUr.sc @@ -0,0 +1,32 @@ +OUTPUT_FORMAT("coff-a29k-big") +SEARCH_DIR(/lab3/u3/sym1/tools/lib) +SEARCH_DIR(/lab3/u3/sym1/tools/usr/lib) +SEARCH_DIR(/lab3/u3/sym1/tools/usr/local/lib) +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 +} +SECTIONS +{ + .text 0 : { + *(.text) + __etext = .; + *(.lit) + *(.shdata) + } > text + .shbss SIZEOF(.text) + ADDR(.text) : { + *(.shbss) + } + .data SIZEOF(.shbss) + ADDR(.shbss): { + *(.data) + } + .bss SIZEOF(.data) + ADDR(.data) : + { + *(.bss) + [COMMON] + } +} + diff --git a/ld/ldglda29kr.sc b/ld/ldglda29kr.sc new file mode 100755 index 00000000000..c8e8e2c7cf4 --- /dev/null +++ b/ld/ldglda29kr.sc @@ -0,0 +1,32 @@ +OUTPUT_FORMAT("coff-a29k-big") +SEARCH_DIR(/lab3/u3/sym1/tools/lib) +SEARCH_DIR(/lab3/u3/sym1/tools/usr/lib) +SEARCH_DIR(/lab3/u3/sym1/tools/usr/local/lib) +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 +} +SECTIONS +{ + .text 0 : { + *(.text) + __etext = .; + *(.lit) + *(.shdata) + } > text + .shbss SIZEOF(.text) + ADDR(.text) : { + *(.shbss) + } + .data SIZEOF(.shbss) + ADDR(.shbss): { + *(.data) + } + .bss SIZEOF(.data) + ADDR(.data) : + { + *(.bss) + [COMMON] + } +} + diff --git a/ld/ldgldm88kbcs.sc b/ld/ldgldm88kbcs.sc new file mode 100755 index 00000000000..c4cb37ee1db --- /dev/null +++ b/ld/ldgldm88kbcs.sc @@ -0,0 +1,40 @@ +TARGET(m88kbcs) +OUTPUT_FORMAT(m88kbcs) +OUTPUT_ARCH(m88k) +ENTRY(__start) +SEARCH_DIR(/lib) +SEARCH_DIR(/usr/lib) +SEARCH_DIR(/usr/local/lib) +SECTIONS +{ + .text 0x10000 + SIZEOF_HEADERS : + { + __.text.start = .; + __.init.start = .; + LONG(0xf400c001) + __.init.end = .; + *(.text) + __.tdesc_start = .; + *(.tdesc) + __.text_end = .; + __.initp.start = .; + __.initp.end =.; + + _etext =.; + } + .data SIZEOF(.text) + ADDR(.text) + 0x400000: + { + *(.data) + _edata = .; + } + .bss SIZEOF(.data) + ADDR(.data) : + { + *(.bss) + [COMMON] + _end = .; + ___end = .; + } +} + + + diff --git a/ld/ldgldm88kbcsUr.sc b/ld/ldgldm88kbcsUr.sc new file mode 100755 index 00000000000..8d3f12b89ed --- /dev/null +++ b/ld/ldgldm88kbcsUr.sc @@ -0,0 +1,31 @@ +SCRIPT +SEARCH_DIR(/lib) +SEARCH_DIR(/usr/lib) +SEARCH_DIR(/usr/local/lib) +SECTIONS +{ + .text 0: + { + CREATE_OBJECT_SYMBOLS + *(.text) + } + .data SIZEOF(.text) + ADDR(.text) : + { + *(.data) + ___DTOR_LIST__ = . ; + LONG((___CTOR_LIST__ - .) / 4 -2) + *(___DTOR_LIST__) + LONG(0) + ___CTOR_LIST__ = . ; + LONG((___end_list__ - .) / 4 -2) + *(___CTOR_LIST__) + LONG(0) + ___end_list__ = . ; + } + .bss SIZEOF(.data) + ADDR(.data) : + { + *(.bss) + [COMMON] + } +} +ENDSCRIPT diff --git a/ld/ldgldm88kbcsr.sc b/ld/ldgldm88kbcsr.sc new file mode 100755 index 00000000000..a3b39fe8573 --- /dev/null +++ b/ld/ldgldm88kbcsr.sc @@ -0,0 +1,20 @@ +SEARCH_DIR(/lib) +SEARCH_DIR(/usr/lib) +SEARCH_DIR(/usr/local/lib) +SECTIONS +{ + .text 0: + { + CREATE_OBJECT_SYMBOLS + *(.text) + } + .data SIZEOF(.text) + ADDR(.text) : + { + *(.data) + } + .bss SIZEOF(.data) + ADDR(.data) : + { + *(.bss) + [COMMON] + } +} diff --git a/ld/ldgldr.sc b/ld/ldgldr.sc new file mode 100755 index 00000000000..a3b39fe8573 --- /dev/null +++ b/ld/ldgldr.sc @@ -0,0 +1,20 @@ +SEARCH_DIR(/lib) +SEARCH_DIR(/usr/lib) +SEARCH_DIR(/usr/local/lib) +SECTIONS +{ + .text 0: + { + CREATE_OBJECT_SYMBOLS + *(.text) + } + .data SIZEOF(.text) + ADDR(.text) : + { + *(.data) + } + .bss SIZEOF(.data) + ADDR(.data) : + { + *(.bss) + [COMMON] + } +} diff --git a/ld/ldlnk960.sc b/ld/ldlnk960.sc new file mode 100755 index 00000000000..f498412f6f3 --- /dev/null +++ b/ld/ldlnk960.sc @@ -0,0 +1,21 @@ + +SECTIONS +{ + .text : + { + *(.text) + } +_etext = . ; + .data SIZEOF(.text) + ADDR(.text): + { + *(.data) + } +_edata = .; + .bss SIZEOF(.data) + ADDR(.data) : + { + _bss_start = . ; + *(.bss) + [COMMON] + } +_end = . ; +} diff --git a/ld/ldlnk960r.sc b/ld/ldlnk960r.sc new file mode 100755 index 00000000000..daf59bba024 --- /dev/null +++ b/ld/ldlnk960r.sc @@ -0,0 +1,17 @@ +SECTIONS +{ + .text 0: + { + *(.text) + } + .data SIZEOF(.text) + ADDR(.text): + { + *(.data) + } + .bss SIZEOF(.data) + ADDR(.data) : + { + *(.bss) + [COMMON] + } +} + -- 2.30.2