daily update
[binutils.git] / ld / emulparams / elf64alpha.sh
blob3dd28ef58c00e04c1cd2d9b65885b051154c795c
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 COMMONPAGESIZE=0x2000
9 NONPAGED_TEXT_START_ADDR="0x120000000"
10 ARCH=alpha
11 MACHINE=
12 GENERATE_SHLIB_SCRIPT=yes
13 DATA_PLT=
14 # Note that the number is always big-endian, thus we have to
15 # reverse the digit string.
16 NOP=0x0000fe2f1f04ff47 # unop; nop
18 OTHER_READONLY_SECTIONS="
19 .reginfo ${RELOCATING-0} : { *(.reginfo) }"
21 # This code gets inserted into the generic elf32.sc linker script
22 # and allows us to define our own command line switches.
23 PARSE_AND_LIST_PROLOGUE='
24 #define OPTION_TASO 300
25 /* Set the start address as in the Tru64 ld */
26 #define ALPHA_TEXT_START_32BIT 0x12000000
28 static int elf64alpha_32bit = 0;
30 struct ld_emulation_xfer_struct ld_elf64alpha_emulation;
31 static void gld_elf64alpha_finish PARAMS ((void));
34 PARSE_AND_LIST_LONGOPTS='
35 {"taso", no_argument, NULL, OPTION_TASO},
38 PARSE_AND_LIST_OPTIONS='
39 fprintf (file, _(" -taso\t\t\tLoad executable in the lower 31-bit addressable\n"));
40 fprintf (file, _("\t\t\t virtual address range\n"));
43 PARSE_AND_LIST_ARGS_CASES='
44 case EOF:
45 if (elf64alpha_32bit && !link_info.shared && !link_info.relocateable)
47 lang_section_start (".interp",
48 exp_binop ('\''+'\'',
49 exp_intop (ALPHA_TEXT_START_32BIT),
50 exp_nameop (SIZEOF_HEADERS, NULL)));
51 ld_elf64alpha_emulation.finish = gld_elf64alpha_finish;
53 return 0;
55 case OPTION_TASO:
56 elf64alpha_32bit = 1;
57 break;
60 PARSE_AND_LIST_EPILOGUE='
61 #include "elf/internal.h"
62 #include "elf/alpha.h"
63 #include "elf-bfd.h"
65 static void
66 gld_elf64alpha_finish()
68 elf_elfheader (output_bfd)->e_flags |= EF_ALPHA_32BIT;