elf64alpha.sh revision 77318
1# $FreeBSD: head/contrib/binutils/ld/emulparams/elf64alpha.sh 77318 2001-05-28 06:19:25Z obrien $
2
3
4ENTRY=_start
5SCRIPT_NAME=elf
6ELFSIZE=64
7TEMPLATE_NAME=elf32
8OUTPUT_FORMAT="elf64-alpha"
9TEXT_START_ADDR="0x120000000"
10MAXPAGESIZE=0x10000
11NONPAGED_TEXT_START_ADDR="0x120000000"
12ARCH=alpha
13MACHINE=
14GENERATE_SHLIB_SCRIPT=yes
15DATA_PLT=
16NOP=0x47ff041f
17
18OTHER_READONLY_SECTIONS='.reginfo : { *(.reginfo) }'
19
20# This code gets inserted into the generic elf32.sc linker script
21# and allows us to define our own command line switches.
22PARSE_AND_LIST_PROLOGUE='
23#define OPTION_TASO            300
24/* Set the start address as in the Tru64 ld */
25#define ALPHA_TEXT_START_32BIT 0x12000000
26
27static int elf64alpha_32bit = 0;
28
29struct ld_emulation_xfer_struct ld_elf64alpha_emulation;
30static void gld_elf64alpha_finish ();
31'
32
33PARSE_AND_LIST_LONGOPTS='
34  {"taso", no_argument, NULL, OPTION_TASO},
35'
36
37PARSE_AND_LIST_OPTIONS='
38  fprintf (file, _("  -taso\t\t\tLoad executable in the lower 31-bit addressable\n"));
39  fprintf (file, _("\t\t\t  virtual address range\n"));
40'
41
42PARSE_AND_LIST_ARGS_CASES='
43    case EOF:
44      if (elf64alpha_32bit && !link_info.shared && !link_info.relocateable)
45	{
46	  lang_section_start (".interp",
47			      exp_binop ('\''+'\'',
48					 exp_intop (ALPHA_TEXT_START_32BIT),
49					 exp_nameop (SIZEOF_HEADERS, NULL)));
50	  ld_elf64alpha_emulation.finish = gld_elf64alpha_finish;
51	}
52      return 0;
53
54    case OPTION_TASO:
55      elf64alpha_32bit = 1;
56      break;
57'
58
59PARSE_AND_LIST_EPILOGUE='
60#include "elf/internal.h"
61#include "elf/alpha.h"
62#include "elf-bfd.h"
63
64static void
65gld_elf64alpha_finish()
66{
67  elf_elfheader (output_bfd)->e_flags |= EF_ALPHA_32BIT;
68}
69'
70