summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/binutils/ld/emulparams
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>2002-05-13 17:07:46 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>2002-05-13 17:07:46 +0000
commitc866442bb5e16be2b5323fee961ceb1315393514 (patch)
treef12f495081042abe1a40d83bf05d076ff8aa8a17 /gnu/usr.bin/binutils/ld/emulparams
parent99d2ba46f95f9f99286b4c66576c4607669b0e7f (diff)
resolve conflicts.
Diffstat (limited to 'gnu/usr.bin/binutils/ld/emulparams')
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/elf32lppc.sh16
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/elf32ppc.sh12
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/elf64_sparc.sh15
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/elf64alpha.sh53
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/hppaelf.sh6
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/m68kcoff.sh1
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/m68kelf.sh1
7 files changed, 94 insertions, 10 deletions
diff --git a/gnu/usr.bin/binutils/ld/emulparams/elf32lppc.sh b/gnu/usr.bin/binutils/ld/emulparams/elf32lppc.sh
index edffc610d49..bc9125d80d3 100644
--- a/gnu/usr.bin/binutils/ld/emulparams/elf32lppc.sh
+++ b/gnu/usr.bin/binutils/ld/emulparams/elf32lppc.sh
@@ -1,8 +1,18 @@
TEMPLATE_NAME=elf32
+# If you change this, please also look at:
+# elf32ppc.sh elf32ppcsim.sh elf32lppc.sh elf32lppcsim.sh elf32ppclinux.sh
GENERATE_SHLIB_SCRIPT=yes
-SCRIPT_NAME=elfppc
+SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-powerpcle"
-TEXT_START_ADDR=0x40000
-MAXPAGESIZE=0x40000
+TEXT_START_ADDR=0x01800000
+MAXPAGESIZE=0x10000
ARCH=powerpc
MACHINE=
+BSS_PLT=
+EXECUTABLE_SYMBOLS='PROVIDE (__stack = 0); PROVIDE (___stack = 0);'
+OTHER_BSS_END_SYMBOLS='__end = .;'
+OTHER_READWRITE_SECTIONS='
+ .fixup : { *(.fixup) }
+ .got1 : { *(.got1) }
+ .got2 : { *(.got2) }
+'
diff --git a/gnu/usr.bin/binutils/ld/emulparams/elf32ppc.sh b/gnu/usr.bin/binutils/ld/emulparams/elf32ppc.sh
index 3e3880c63d2..22208105a70 100644
--- a/gnu/usr.bin/binutils/ld/emulparams/elf32ppc.sh
+++ b/gnu/usr.bin/binutils/ld/emulparams/elf32ppc.sh
@@ -1,8 +1,18 @@
TEMPLATE_NAME=elf32
+# If you change this, please also look at:
+# elf32ppc.sh elf32ppcsim.sh elf32lppc.sh elf32lppcsim.sh elf32ppclinux.sh
GENERATE_SHLIB_SCRIPT=yes
-SCRIPT_NAME=elfppc
+SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-powerpc"
TEXT_START_ADDR=0x01800000
MAXPAGESIZE=0x10000
ARCH=powerpc
MACHINE=
+BSS_PLT=
+EXECUTABLE_SYMBOLS='PROVIDE (__stack = 0); PROVIDE (___stack = 0);'
+OTHER_BSS_END_SYMBOLS='__end = .;'
+OTHER_READWRITE_SECTIONS='
+ .fixup : { *(.fixup) }
+ .got1 : { *(.got1) }
+ .got2 : { *(.got2) }
+'
diff --git a/gnu/usr.bin/binutils/ld/emulparams/elf64_sparc.sh b/gnu/usr.bin/binutils/ld/emulparams/elf64_sparc.sh
index 2ab2e4fabb9..b0a58eadcb7 100644
--- a/gnu/usr.bin/binutils/ld/emulparams/elf64_sparc.sh
+++ b/gnu/usr.bin/binutils/ld/emulparams/elf64_sparc.sh
@@ -2,15 +2,24 @@ SCRIPT_NAME=elf
ELFSIZE=64
TEMPLATE_NAME=elf32
OUTPUT_FORMAT="elf64-sparc"
-TEXT_START_ADDR=0x100000
MAXPAGESIZE=0x100000
-NONPAGED_TEXT_START_ADDR=0x100000
ARCH="sparc:v9"
MACHINE=
DATA_PLT=
GENERATE_SHLIB_SCRIPT=yes
NOP=0x01000000
+case "$target" in
+ sparc*-solaris*)
+ TEXT_START_ADDR=0x100000000
+ NONPAGED_TEXT_START_ADDR=0x100000000
+ ;;
+ *)
+ TEXT_START_ADDR=0x100000
+ NONPAGED_TEXT_START_ADDR=0x100000
+ ;;
+esac
+
if [ "x${host}" = "x${target}" ]; then
case " $EMULATION_LIBPATH " in
*" ${EMULATION_NAME} "*)
@@ -31,7 +40,7 @@ if [ "x${host}" = "x${target}" ]; then
LIB_PATH=/lib${suffix}:/lib
LIB_PATH=${LIB_PATH}:/usr/lib${suffix}:/usr/lib
if [ -n "${NATIVE_LIB_DIRS}" ]; then
- LIB_PATH=${LIB_PATH}:`echo ${NATIVE_LIB_DIRS} | sed s/:/${suffix}:/g`${suffix}:${NATIVE_LIB_DIRS}
+ LIB_PATH=${LIB_PATH}:`echo ${NATIVE_LIB_DIRS} | sed s_:_${suffix}:_g`${suffix}:${NATIVE_LIB_DIRS}
fi
if [ "${libdir}" != /usr/lib ]; then
LIB_PATH=${LIB_PATH}:${libdir}${suffix}:${libdir}
diff --git a/gnu/usr.bin/binutils/ld/emulparams/elf64alpha.sh b/gnu/usr.bin/binutils/ld/emulparams/elf64alpha.sh
index cb17a22f5b4..5c69816b2b7 100644
--- a/gnu/usr.bin/binutils/ld/emulparams/elf64alpha.sh
+++ b/gnu/usr.bin/binutils/ld/emulparams/elf64alpha.sh
@@ -1,4 +1,4 @@
-ENTRY=__start
+ENTRY=_start
SCRIPT_NAME=elf
ELFSIZE=64
TEMPLATE_NAME=elf32
@@ -13,3 +13,54 @@ DATA_PLT=
NOP=0x47ff041f
OTHER_READONLY_SECTIONS='.reginfo : { *(.reginfo) }'
+
+# This code gets inserted into the generic elf32.sc linker script
+# and allows us to define our own command line switches.
+PARSE_AND_LIST_PROLOGUE='
+#define OPTION_TASO 300
+/* Set the start address as in the Tru64 ld */
+#define ALPHA_TEXT_START_32BIT 0x12000000
+
+static int elf64alpha_32bit = 0;
+
+struct ld_emulation_xfer_struct ld_elf64alpha_emulation;
+static void gld_elf64alpha_finish ();
+'
+
+PARSE_AND_LIST_LONGOPTS='
+ {"taso", no_argument, NULL, OPTION_TASO},
+'
+
+PARSE_AND_LIST_OPTIONS='
+ fprintf (file, _(" -taso\t\t\tLoad executable in the lower 31-bit addressable\n"));
+ fprintf (file, _("\t\t\t virtual address range\n"));
+'
+
+PARSE_AND_LIST_ARGS_CASES='
+ case EOF:
+ if (elf64alpha_32bit && !link_info.shared && !link_info.relocateable)
+ {
+ lang_section_start (".interp",
+ exp_binop ('\''+'\'',
+ exp_intop (ALPHA_TEXT_START_32BIT),
+ exp_nameop (SIZEOF_HEADERS, NULL)));
+ ld_elf64alpha_emulation.finish = gld_elf64alpha_finish;
+ }
+ return 0;
+
+ case OPTION_TASO:
+ elf64alpha_32bit = 1;
+ break;
+'
+
+PARSE_AND_LIST_EPILOGUE='
+#include "elf/internal.h"
+#include "elf/alpha.h"
+#include "elf-bfd.h"
+
+static void
+gld_elf64alpha_finish()
+{
+ elf_elfheader (output_bfd)->e_flags |= EF_ALPHA_32BIT;
+}
+'
diff --git a/gnu/usr.bin/binutils/ld/emulparams/hppaelf.sh b/gnu/usr.bin/binutils/ld/emulparams/hppaelf.sh
index 47b89ea92aa..77dcb397736 100644
--- a/gnu/usr.bin/binutils/ld/emulparams/hppaelf.sh
+++ b/gnu/usr.bin/binutils/ld/emulparams/hppaelf.sh
@@ -1,7 +1,9 @@
SCRIPT_NAME=hppaelf
OUTPUT_FORMAT="elf32-hppa"
TEXT_START_ADDR=0x1000
-TARGET_PAGE_SIZE=4096
+TARGET_PAGE_SIZE=0x1000
ARCH=hppa
+NOP=0x08000240
START="$START$"
-TEMPLATE_NAME=hppaelf
+TEMPLATE_NAME=elf32
+EXTRA_EM_FILE=hppaelf
diff --git a/gnu/usr.bin/binutils/ld/emulparams/m68kcoff.sh b/gnu/usr.bin/binutils/ld/emulparams/m68kcoff.sh
index b417c0da45c..bd884c9f805 100644
--- a/gnu/usr.bin/binutils/ld/emulparams/m68kcoff.sh
+++ b/gnu/usr.bin/binutils/ld/emulparams/m68kcoff.sh
@@ -3,3 +3,4 @@ OUTPUT_FORMAT="coff-m68k"
TEXT_START_ADDR=0x1000000
TARGET_PAGE_SIZE=0x1000000
ARCH=m68k
+TEMPLATE_NAME=m68kcoff
diff --git a/gnu/usr.bin/binutils/ld/emulparams/m68kelf.sh b/gnu/usr.bin/binutils/ld/emulparams/m68kelf.sh
index ad352c585b3..a27f63cff5c 100644
--- a/gnu/usr.bin/binutils/ld/emulparams/m68kelf.sh
+++ b/gnu/usr.bin/binutils/ld/emulparams/m68kelf.sh
@@ -7,4 +7,5 @@ ARCH=m68k
MACHINE=
NOP=0x4e75
TEMPLATE_NAME=elf32
+EXTRA_EM_FILE=m68kelf
GENERATE_SHLIB_SCRIPT=yes