aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@cygnus>1993-07-08 22:44:34 +0000
committerKen Raeburn <raeburn@cygnus>1993-07-08 22:44:34 +0000
commitf90bb826e51c771bc6d1aeba49a328256feec24e (patch)
treec46e395a24072b6d15e1719c414fea4a33dc7916 /ld
parent3b7f6de0e69324fc128f3d01984c858c9313075c (diff)
downloadgdb-f90bb826e51c771bc6d1aeba49a328256feec24e.zip
gdb-f90bb826e51c771bc6d1aeba49a328256feec24e.tar.gz
gdb-f90bb826e51c771bc6d1aeba49a328256feec24e.tar.bz2
initial v9 stuff
Diffstat (limited to 'ld')
-rw-r--r--ld/config/sparc64-elf.mt5
-rw-r--r--ld/configure.in2
-rw-r--r--ld/emulparams/elf64-sparc.sh7
-rw-r--r--ld/scripttempl/elf.sc32
4 files changed, 46 insertions, 0 deletions
diff --git a/ld/config/sparc64-elf.mt b/ld/config/sparc64-elf.mt
new file mode 100644
index 0000000..5cab18e
--- /dev/null
+++ b/ld/config/sparc64-elf.mt
@@ -0,0 +1,5 @@
+EMUL=elf64_sparc
+OTHER_EMULATIONS= em_elf64_sparc.o
+em_elf64_sparc.c: $(srcdir)/emulparams/elf64-sparc.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf64-sparc.sh
diff --git a/ld/configure.in b/ld/configure.in
index d3a45b4..1bf0aab 100644
--- a/ld/configure.in
+++ b/ld/configure.in
@@ -30,6 +30,8 @@ case "${target}" in
sparc*-*-aout) my_target=sun4
;;
# start-sanitize-v9
+ sparc64-*-elf*) my_target=sparc64-elf
+ ;;
sparc64*) my_target=sun4
;;
# end-sanitize-v9
diff --git a/ld/emulparams/elf64-sparc.sh b/ld/emulparams/elf64-sparc.sh
new file mode 100644
index 0000000..df6a3cb
--- /dev/null
+++ b/ld/emulparams/elf64-sparc.sh
@@ -0,0 +1,7 @@
+EMULATION_NAME=elf64_sparc
+SCRIPT_NAME=elf
+OUTPUT_FORMAT="elf64-sparc"
+TEXT_START_ADDR=0x2020
+PAGE_SIZE=0x2000
+NONPAGED_TEXT_START_ADDR=0x2000
+ARCH=sparc
diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
new file mode 100644
index 0000000..0643925
--- /dev/null
+++ b/ld/scripttempl/elf.sc
@@ -0,0 +1,32 @@
+cat <<EOF
+OUTPUT_FORMAT("${OUTPUT_FORMAT}")
+OUTPUT_ARCH(${ARCH})
+
+${RELOCATING+${LIB_SEARCH_DIRS}}
+${RELOCATING+__DYNAMIC = 0;}
+${STACKZERO+${RELOCATING+${STACKZERO}}}
+${SHLIB_PATH+${RELOCATING+${SHLIB_PATH}}}
+SECTIONS
+{
+ .text ${RELOCATING+${TEXT_START_ADDR}}:
+ {
+ CREATE_OBJECT_SYMBOLS
+ *(.text)
+ ${RELOCATING+_etext = ${DATA_ALIGNMENT};}
+ }
+ .data ${RELOCATING+${DATA_ALIGNMENT}} :
+ {
+ *(.data)
+ ${CONSTRUCTING+CONSTRUCTORS}
+ ${RELOCATING+_edata = .;}
+ }
+ .bss ${RELOCATING+SIZEOF(.data) + ADDR(.data)} :
+ {
+ ${RELOCATING+ __bss_start = .};
+ *(.bss)
+ *(COMMON)
+ ${RELOCATING+_end = . };
+ ${RELOCATING+__end = . };
+ }
+}
+EOF