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