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