2001-01-03 Philip Blundell <pb@futuretv.com>
[binutils.git] / ld / emulparams / elf64alpha.sh
blob5c69816b2b797332f6785ca35445c7a3740ec8bf
1 ENTRY=_start
2 SCRIPT_NAME=elf
3 ELFSIZE=64
4 TEMPLATE_NAME=elf32
5 OUTPUT_FORMAT="elf64-alpha"
6 TEXT_START_ADDR="0x120000000"
7 MAXPAGESIZE=0x10000
8 NONPAGED_TEXT_START_ADDR="0x120000000"
9 ARCH=alpha
10 MACHINE=
11 GENERATE_SHLIB_SCRIPT=yes
12 DATA_PLT=
13 NOP=0x47ff041f
15 OTHER_READONLY_SECTIONS='.reginfo : { *(.reginfo) }'
17 # This code gets inserted into the generic elf32.sc linker script
18 # and allows us to define our own command line switches.
19 PARSE_AND_LIST_PROLOGUE='
20 #define OPTION_TASO 300
21 /* Set the start address as in the Tru64 ld */
22 #define ALPHA_TEXT_START_32BIT 0x12000000
24 static int elf64alpha_32bit = 0;
26 struct ld_emulation_xfer_struct ld_elf64alpha_emulation;
27 static void gld_elf64alpha_finish ();
30 PARSE_AND_LIST_LONGOPTS='
31 {"taso", no_argument, NULL, OPTION_TASO},
34 PARSE_AND_LIST_OPTIONS='
35 fprintf (file, _(" -taso\t\t\tLoad executable in the lower 31-bit addressable\n"));
36 fprintf (file, _("\t\t\t virtual address range\n"));
39 PARSE_AND_LIST_ARGS_CASES='
40 case EOF:
41 if (elf64alpha_32bit && !link_info.shared && !link_info.relocateable)
43 lang_section_start (".interp",
44 exp_binop ('\''+'\'',
45 exp_intop (ALPHA_TEXT_START_32BIT),
46 exp_nameop (SIZEOF_HEADERS, NULL)));
47 ld_elf64alpha_emulation.finish = gld_elf64alpha_finish;
49 return 0;
51 case OPTION_TASO:
52 elf64alpha_32bit = 1;
53 break;
56 PARSE_AND_LIST_EPILOGUE='
57 #include "elf/internal.h"
58 #include "elf/alpha.h"
59 #include "elf-bfd.h"
61 static void
62 gld_elf64alpha_finish()
64 elf_elfheader (output_bfd)->e_flags |= EF_ALPHA_32BIT;