Blame ld/emulparams/elf32mcore.sh

Packit ba3681
SCRIPT_NAME=elf
Packit ba3681
OUTPUT_FORMAT="elf32-mcore-little"
Packit ba3681
BIG_OUTPUT_FORMAT="elf32-mcore-big"
Packit ba3681
LITTLE_OUTPUT_FORMAT="elf32-mcore-little"
Packit ba3681
NO_REL_RELOCS=yes
Packit ba3681
PAGE_SIZE=0x1000
Packit ba3681
TARGET_PAGE_SIZE=0x400
Packit ba3681
MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
Packit ba3681
TEXT_START_ADDR=0
Packit ba3681
ARCH=mcore
Packit ba3681
EMBEDDED=yes
Packit ba3681
Packit ba3681
# There is a problem with the NOP value - it must work for both
Packit ba3681
# big endian and little endian systems.  Unfortunately there is
Packit ba3681
# no symmetrical mcore opcode that functions as a noop.  The
Packit ba3681
# chosen solution is to use "tst r0, r14".  This is a symetrical
Packit ba3681
# value, and apart from the corruption of the C bit, it has no other
Packit ba3681
# side effects.  Since the carry bit is never tested without being
Packit ba3681
# explicitly set first, and since the NOP code is only used as a
Packit ba3681
# fill value between independantly viable peices of code, it should
Packit ba3681
# not matter.
Packit ba3681
NOP=0x0e0e0e0e
Packit ba3681
Packit ba3681
OTHER_BSS_SYMBOLS="__bss_start__ = . ;"
Packit ba3681
OTHER_BSS_END_SYMBOLS="__bss_end__ = . ;"
Packit ba3681
Packit ba3681
# This sets the stack to the top of the simulator memory (2^19 bytes).
Packit ba3681
STACK_ADDR=0x80000
Packit ba3681
Packit ba3681
TEMPLATE_NAME=elf32
Packit ba3681
Packit ba3681
# This code gets inserted into the generic elf32.sc linker script
Packit ba3681
# and allows us to define our own command line switches.
Packit ba3681
PARSE_AND_LIST_PROLOGUE='
Packit ba3681
#define OPTION_BASE_FILE		300
Packit ba3681
'
Packit ba3681
Packit ba3681
PARSE_AND_LIST_LONGOPTS='
Packit ba3681
  {"base-file", required_argument, NULL, OPTION_BASE_FILE},
Packit ba3681
'
Packit ba3681
Packit ba3681
PARSE_AND_LIST_OPTIONS='
Packit ba3681
  fprintf (file, _("  --base_file <basefile>\n"));
Packit ba3681
  fprintf (file, _("\t\t\tGenerate a base file for relocatable DLLs\n"));
Packit ba3681
'
Packit ba3681
Packit ba3681
PARSE_AND_LIST_ARGS_CASES='
Packit ba3681
    case OPTION_BASE_FILE:
Packit ba3681
      link_info.base_file = fopen (optarg, FOPEN_WB);
Packit ba3681
      if (link_info.base_file == NULL)
Packit ba3681
	einfo (_("%F%P: cannot open base file %s\n"), optarg);
Packit ba3681
      break;
Packit ba3681
'