old-cross-binutils/ld/emulparams/nds32elf_linux.sh
Alan Modra 7225345dbb Allow ld target customiser script to force on disk scripts.
Mucking with EMULATION_LIBPATH has unwanted side effects.  Allow nds32
emulparams scripts to disable compiled-in scripts naturally, by
setting COMPILE_IN=no.

	* genscripts.sh (COMPILE_IN): Don't set if already set.
	* emulparams/nds32elf.sh: Don't clear EMULATION_LIBPATH, set
	COMPILE_IN=no.
	* emulparams/nds32elf16m.sh: Likewise.
	* emulparams/nds32elf_linux.sh: Likewise.
	* emultempl/aix.em: Test COMPILE_IN value is "yes".
	* emultempl/armcoff.em: Likewise.
	* emultempl/elf32.em: Likewise.
	* emultempl/generic.em: Likewise.
	* emultempl/gld960.em: Likewise.
	* emultempl/gld960c.em: Likewise.
	* emultempl/linux.em: Likewise.
	* emultempl/lnk960.em: Likewise.
	* emultempl/m68kcoff.em: Likewise.
	* emultempl/sunos.em: Likewise.
	* emultempl/ticoff.em: Likewise.
2014-01-17 10:41:49 +10:30

35 lines
927 B
Bash

DEFAULT_TEXT_START_ADDR=0
DEFAULT_STACK_START_ADDR=0
MACHINE=
SCRIPT_NAME=nds32elf
TEMPLATE_NAME=elf32
EXTRA_EM_FILE=nds32elf
BIG_OUTPUT_FORMAT="elf32-nds32be-linux"
LITTLE_OUTPUT_FORMAT="elf32-nds32le-linux"
OUTPUT_FORMAT="$LITTLE_OUTPUT_FORMAT"
LIB_PATH="=/usr/local/lib:=/lib:=/usr/lib/"
if [ "${DEFAULT_TEXT_START_ADDR}" = "0" ]; then
TEXT_START_ADDR=0x8000
else
TEXT_START_ADDR=${DEFAULT_TEXT_START_ADDR}
fi
ARCH=nds32
MACHINE=
MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
# Hmmm, there's got to be a better way. This sets the stack to the
# top of simulator memory (32MB).
if [ "${DEFAULT_STACK_START_ADDR}" = "0" ]; then
OTHER_RELOCATING_SECTIONS='PROVIDE (_stack = 0x2000000);'
else
OTHER_RELOCATING_SECTIONS="PROVIDE (_stack = ${DEFAULT_STACK_START_ADDR});"
fi
GENERATE_SHLIB_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
# Use external linker script files.
COMPILE_IN=no