diff options
-rw-r--r-- | ld/config/coff-a29k.mt | 1 | ||||
-rwxr-xr-x | ld/config/decstation.mh | 2 | ||||
-rw-r--r-- | ld/config/dgux.mh | 9 | ||||
-rw-r--r-- | ld/config/m88k-bcs.mt | 1 | ||||
-rw-r--r-- | ld/config/rtbsd.mh | 7 | ||||
-rw-r--r-- | ld/config/sparc-ll.mh | 8 | ||||
-rwxr-xr-x | ld/config/sparc.mh | 8 | ||||
-rw-r--r-- | ld/config/sun3.mh | 9 | ||||
-rw-r--r-- | ld/config/sun4.mt | 1 | ||||
-rwxr-xr-x | ld/ldgld.sc | 30 | ||||
-rwxr-xr-x | ld/ldgld68k.sc | 28 | ||||
-rwxr-xr-x | ld/ldgld68kUr.sc | 21 | ||||
-rwxr-xr-x | ld/ldgld68kr.sc | 22 | ||||
-rwxr-xr-x | ld/ldgld960.sc | 23 | ||||
-rwxr-xr-x | ld/ldgldUr.sc | 24 | ||||
-rwxr-xr-x | ld/ldglda29k.sc | 38 | ||||
-rwxr-xr-x | ld/ldglda29kUr.sc | 32 | ||||
-rwxr-xr-x | ld/ldglda29kr.sc | 32 | ||||
-rwxr-xr-x | ld/ldgldm88kbcs.sc | 40 | ||||
-rwxr-xr-x | ld/ldgldm88kbcsUr.sc | 31 | ||||
-rwxr-xr-x | ld/ldgldm88kbcsr.sc | 20 | ||||
-rwxr-xr-x | ld/ldgldr.sc | 20 | ||||
-rwxr-xr-x | ld/ldlnk960.sc | 21 | ||||
-rwxr-xr-x | ld/ldlnk960r.sc | 17 |
24 files changed, 445 insertions, 0 deletions
diff --git a/ld/config/coff-a29k.mt b/ld/config/coff-a29k.mt new file mode 100644 index 0000000..5c55415 --- /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 0000000..4a17e63 --- /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 0000000..9c4e9bc --- /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 0000000..94e8c66 --- /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 0000000..7d2ff5a --- /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 0000000..92f74ad --- /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 0000000..b53bfde --- /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 0000000..5922ac1 --- /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 0000000..d68947e --- /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 0000000..15ff71f --- /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 0000000..be91d91 --- /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 0000000..aa89c6a --- /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 0000000..8cbc9dc --- /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 0000000..1c40a73 --- /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 0000000..e7d9b44 --- /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 0000000..6d7d19a --- /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 0000000..c8e8e2c --- /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 0000000..c8e8e2c --- /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 0000000..c4cb37e --- /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 0000000..8d3f12b --- /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 0000000..a3b39fe --- /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 0000000..a3b39fe --- /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 0000000..f498412 --- /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 0000000..daf59bb --- /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] + } +} + |