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