1/* 2 * Copyright (C) 2009 Thomas Chou <thomas@wytron.com.tw> 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program. If not, see <http://www.gnu.org/licenses/>. 16 * 17 */ 18 19#include <asm-generic/vmlinux.lds.h> 20 21OUTPUT_FORMAT("elf32-littlenios2", "elf32-littlenios2", "elf32-littlenios2") 22 23OUTPUT_ARCH(nios) 24ENTRY(_start) /* Defined in head.S */ 25 26SECTIONS 27{ 28 . = (CONFIG_NIOS2_MEM_BASE + CONFIG_NIOS2_BOOT_LINK_OFFSET) | \ 29 CONFIG_NIOS2_KERNEL_REGION_BASE; 30 31 _text = .; 32 .text : { *(.text) } = 0 33 .rodata : { *(.rodata) *(.rodata.*) } 34 _etext = .; 35 36 . = ALIGN(32 / 8); 37 .data : { *(.data) } 38 . = ALIGN(32 / 8); 39 _got = .; 40 .got : { 41 *(.got.plt) 42 *(.igot.plt) 43 *(.got) 44 *(.igot) 45 } 46 _egot = .; 47 _edata = .; 48 49 . = ALIGN(32 / 8); 50 __bss_start = .; 51 .bss : { *(.bss) *(.sbss) } 52 . = ALIGN(32 / 8); 53 _ebss = .; 54 end = . ; 55 _end = . ; 56 57 got_len = (_egot - _got); 58} 59