elf64alpha.sh revision 104846
1168054Sflz# $FreeBSD: head/contrib/binutils/ld/emulparams/elf64alpha.sh 104846 2002-10-11 06:14:49Z obrien $ 2168054Sflz 3168266Sgabor 4168266SgaborENTRY=_start 5168266SgaborSCRIPT_NAME=elf 6168266SgaborELFSIZE=64 7168266SgaborTEMPLATE_NAME=elf32 8168266SgaborOUTPUT_FORMAT="elf64-alpha" 9168266SgaborTEXT_START_ADDR="0x120000000" 10168266SgaborMAXPAGESIZE=0x10000 11168054SflzCOMMONPAGESIZE=0x2000 12168054SflzNONPAGED_TEXT_START_ADDR="0x120000000" 13168064SflzARCH=alpha 14168064SflzMACHINE= 15168064SflzGENERATE_SHLIB_SCRIPT=yes 16168064SflzDATA_PLT= 17168064Sflz# Note that the number is always big-endian, thus we have to 18168064Sflz# reverse the digit string. 19168064SflzNOP=0x0000fe2f1f04ff47 # unop; nop 20168064Sflz 21168064SflzOTHER_READONLY_SECTIONS=" 22168064Sflz .reginfo ${RELOCATING-0} : { *(.reginfo) }" 23168064Sflz 24168064Sflz# This code gets inserted into the generic elf32.sc linker script 25168064Sflz# and allows us to define our own command line switches. 26168064SflzPARSE_AND_LIST_PROLOGUE=' 27168054Sflz#define OPTION_TASO 300 28168054Sflz/* Set the start address as in the Tru64 ld */ 29168064Sflz#define ALPHA_TEXT_START_32BIT 0x12000000 30168054Sflz 31168188Sgaborstatic int elf64alpha_32bit = 0; 32168357Syar 33168673Sjulianstruct ld_emulation_xfer_struct ld_elf64alpha_emulation; 34168188Sgaborstatic void gld_elf64alpha_finish PARAMS ((void)); 35168263Sru' 36168194Simp 37168357SyarPARSE_AND_LIST_LONGOPTS=' 38168188Sgabor {"taso", no_argument, NULL, OPTION_TASO}, 39168188Sgabor' 40168188Sgabor 41168188SgaborPARSE_AND_LIST_OPTIONS=' 42168188Sgabor fprintf (file, _(" -taso\t\t\tLoad executable in the lower 31-bit addressable\n")); 43168188Sgabor fprintf (file, _("\t\t\t virtual address range\n")); 44168188Sgabor' 45168202Sume 46168188SgaborPARSE_AND_LIST_ARGS_CASES=' 47168188Sgabor case EOF: 48168202Sume if (elf64alpha_32bit && !link_info.shared && !link_info.relocateable) 49168188Sgabor { 50168127Sdwmalone lang_section_start (".interp", 51168054Sflz exp_binop ('\''+'\'', 52168054Sflz exp_intop (ALPHA_TEXT_START_32BIT), 53168054Sflz exp_nameop (SIZEOF_HEADERS, NULL))); 54168054Sflz ld_elf64alpha_emulation.finish = gld_elf64alpha_finish; 55168215Sache } 56168149Simp return 0; 57168149Simp 58168179Sgabor case OPTION_TASO: 59168083Sjkim elf64alpha_32bit = 1; 60176001Santoine break; 61168123Snetchild' 62188752Savg 63168080SmlaierPARSE_AND_LIST_EPILOGUE=' 64168195Sbenno#include "elf/internal.h" 65168131Sbmah#include "elf/alpha.h" 66168183Sgabor#include "elf-bfd.h" 67168080Smlaier 68168309Sbrianstatic void 69168308Sbriangld_elf64alpha_finish() 70203168Sbrucec{ 71168150Srwatson elf_elfheader (output_bfd)->e_flags |= EF_ALPHA_32BIT; 72168149Simp} 73203555Sbschmidt' 74168150Srwatson