1/* $OpenBSD: ld.script,v 1.3 2012/12/17 20:31:26 miod Exp $ */ 2 3/* 4 * Copyright (c) 2009 Miodrag Vallat. 5 * 6 * Permission to use, copy, modify, and distribute this software for any 7 * purpose with or without fee is hereby granted, provided that the above 8 * copyright notice and this permission notice appear in all copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 */ 18 19/* 20 * Linker script for an alpha static ELF binary, without any C++ code 21 * (ctor/dtor/eh_frame). 22 */ 23 24OUTPUT_FORMAT("elf64-alpha") 25OUTPUT_ARCH(alpha) 26ENTRY(__start) 27SECTIONS 28{ 29 /* 30 * The start address needs to be a physical address allowing for 31 * enough room for the console firmware, and the boot loader. 32 * On most alpha machines, the console fits in no more than 33 * 2MB, to which we need to add 256KB of boot blocks and the 34 * initial kernel stack. 35 * However, some of the last alpha models (*5 D and E series, 36 * *7, and G series) have much larger console sizes. 37 * 38 * For reference, here is a list of systems and their console 39 * sizes: 40 * 41 * AXPpci33 10e000, 110000 42 * EB164 11c000 43 * AS400 (Avanti) 11e000 44 * 2100/A50 (Avanti) 11e500 45 * AS1000 12e000 46 * AS200, AS255 13a000, 1f2000 47 * AS250 148000 48 * AS500 14a000 49 * AS500/600 14c000 50 * Multia 154000, 158000, 166000 51 * DS20 156000 52 * PC164 180000 53 * PWS 1d6000, 1d8000, 1f2000 54 * 3305 (AS1000A) 1da000 55 * 164SX 1de000 56 * AS1200 1f0000 57 * XP1000, AS2100, AS4100 200000 58 * ES40, CS20, DS10 200000 59 * AS8400 200000 60 * ES45 32c000 61 * DS25 51c000 62 * GS160 5f2000 63 * 64 * If you change this value, make sure to update KERNBASE in 65 * <machine/param.h> as well. 66 * 67 * Note that the current setting will not work on a GS160. If you 68 * are the lucky owner of such a system and want to run OpenBSD on 69 * it, please contact <alpha@openbsd.org> 70 */ 71 . = 0xfffffc0000580000; 72 73 .text : { *(.text .text.* .gnu.linkonce.t.*) } 74 PROVIDE(etext = .); 75 .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } 76 .data : { *(.data .data.* .gnu.linkonce.d.*) } 77 .got : { *(.got) } 78 .sdata : { *(.sdata .sdata.* .gnu.linkonce.s.*) } 79 .lit8 : { *(.lit8) } 80 .lita : { *(.lita) } 81 .sdata : { *(.sdata .sdata*) } 82 PROVIDE(edata = .); 83 .sbss : { *(.sbss .sbss.* .gnu.linkonce.sb.* .scommon) } 84 .bss : { *(.bss .bss.* .gnu.linkonce.b.* COMMON) } 85 PROVIDE(_end = .); 86 PROVIDE(end = .); 87 /DISCARD/ : 88 { 89 *(.comment) 90 *(.eh_frame) 91 } 92} 93