2001-10-30 15:20:14 +00:00
|
|
|
TEMPLATE_NAME=elf32
|
|
|
|
GENERATE_SHLIB_SCRIPT=yes
|
|
|
|
ELFSIZE=64
|
|
|
|
SCRIPT_NAME=elf
|
|
|
|
OUTPUT_FORMAT="elf64-mmix"
|
* scripttempl/elf.sc (NO_REL_RELOCS, NO_RELA_RELOCS, NON_ALLOC_DYN):
Handle these defines.
* emulparams/criself.sh, * emulparams/crislinux.sh,
* emulparams/elf32am33lin.sh, * emulparams/elf32fr30.sh,
* emulparams/elf32_i860.sh, * emulparams/elf32ip2k.sh,
* emulparams/elf32mcore.sh, * emulparams/elf32ppccommon.sh,
* emulparams/elf32ppcwindiss.sh, * emulparams/elf32_sparc.sh,
* emulparams/elf32_spu.sh, * emulparams/elf32vax.sh,
* emulparams/elf64alpha.sh, * emulparams/elf64mmix.sh,
* emulparams/elf64ppc.sh, * emulparams/elf64_s390.sh,
* emulparams/elf64_sparc.sh, * emulparams/elf_s390.sh,
* emulparams/elf_x86_64.sh, * emulparams/h8300elf.sh,
* emulparams/hppa64linux.sh, * emulparams/hppalinux.sh,
* emulparams/m68kelf.sh, * emulparams/mn10200.sh,
* emulparams/pjelf.sh, * emulparams/ppclynx.sh,
* emulparams/shelf32.sh, * emulparams/shelf_nto.sh,
* emulparams/shelf.sh, * emulparams/shelf_vxworks.sh,
* emulparams/shlelf32_linux.sh, * emulparams/shlelf_linux.sh,
* emulparams/shlelf_nto.sh (NO_REL_RELOCS): Set.
* emulparams/arcelf.sh, * emulparams/elf32_i960.sh,
* emulparams/elf32openrisc.sh, * emulparams/elf_i386_be.sh,
* emulparams/elf_i386_ldso.sh, * emulparams/elf_i386.sh,
* emulparams/elf_i386_vxworks.sh, * emulparams/i386lynx.sh,
* emulparams/i386moss.sh, * emulparams/i386nto.sh,
* emulparams/or32elf.sh, * emulparams/scoreelf.sh (NO_RELA_RELOCS): Set.
2008-10-22 05:20:44 +00:00
|
|
|
NO_REL_RELOCS=yes
|
2001-10-30 15:20:14 +00:00
|
|
|
ENTRY=_start.
|
|
|
|
|
|
|
|
# Default to 0 as mmixal does.
|
|
|
|
TEXT_START_ADDR='DEFINED (__.MMIX.start..text) ? __.MMIX.start..text : 0'
|
|
|
|
# Don't add SIZEOF_HEADERS.
|
|
|
|
# Don't set EMBEDDED, that would be misleading; it's not that kind of system.
|
|
|
|
TEXT_BASE_ADDRESS=$TEXT_START_ADDR
|
|
|
|
DATA_ADDR='DEFINED (__.MMIX.start..data) ? __.MMIX.start..data : 0x2000000000000000'
|
|
|
|
|
2006-05-30 16:45:32 +00:00
|
|
|
MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
|
2001-10-30 15:20:14 +00:00
|
|
|
ARCH=mmix
|
|
|
|
MACHINE=
|
|
|
|
COMPILE_IN=yes
|
|
|
|
EXTRA_EM_FILE=mmixelf
|
|
|
|
|
|
|
|
# The existence of a symbol __start (or _start) should overrule Main, so
|
|
|
|
# it can be a user symbol without the associated mmixal magic. We
|
|
|
|
# also want to provide Main as a synonym for _start, if Main wasn't
|
|
|
|
# defined but is referred to, and _start was defined.
|
|
|
|
#
|
|
|
|
# The reason we use a symbol "_start." as a mediator is to avoid
|
|
|
|
# causing ld to force the type of _start to object rather than no
|
|
|
|
# type, which confuses disassembly; we also make it alphanumerically
|
|
|
|
# a successor of _start for similar reasons. Perhaps it's a linker
|
|
|
|
# bug that linker-defined symbols set the symbol-type.
|
|
|
|
#
|
|
|
|
# Note that we smuggle this into OTHER_TEXT_SECTIONS (at the end
|
|
|
|
# of .text) rather than TEXT_START_SYMBOLS. This is necessary, as
|
|
|
|
# DEFINED wouldn't find the symbol if it was at the top; presumably
|
|
|
|
# before the definition, if the definition is not in the first file.
|
|
|
|
# FIXME: Arguably a linker bug.
|
|
|
|
OTHER_TEXT_SECTIONS='
|
|
|
|
_start. = (DEFINED (_start) ? _start
|
|
|
|
: (DEFINED (Main) ? Main : (DEFINED (.text) ? .text : 0)));
|
|
|
|
PROVIDE (Main = DEFINED (Main) ? Main : (DEFINED (_start) ? _start : _start.));
|
|
|
|
'
|
|
|
|
|
2002-02-01 08:24:03 +00:00
|
|
|
OTHER_SECTIONS='
|
2001-10-30 15:20:14 +00:00
|
|
|
.MMIX.reg_contents :
|
|
|
|
{
|
|
|
|
/* Note that this section always has a fixed VMA - that of its
|
|
|
|
first register * 8. */
|
2002-02-01 08:24:03 +00:00
|
|
|
*(.MMIX.reg_contents.linker_allocated);
|
2001-10-30 15:20:14 +00:00
|
|
|
*(.MMIX.reg_contents);
|
|
|
|
}
|
2002-02-01 08:24:03 +00:00
|
|
|
'
|
2001-10-30 15:20:14 +00:00
|
|
|
|
|
|
|
# FIXME: Also bit by the PROVIDE bug? If not, this could be
|
|
|
|
# EXECUTABLE_SYMBOLS.
|
|
|
|
# By default, put the high end of the stack where the register stack
|
|
|
|
# begins. They grow in opposite directions. */
|
2005-08-05 04:29:57 +00:00
|
|
|
OTHER_SYMBOLS="PROVIDE (__Stack_start = 0x6000000000000000);"
|