PR ld/20276: Set non_ir_ref on common symbol
[external/binutils.git] / ld / scripttempl / elf32xc16x.sc
1 # Copyright (C) 2014-2016 Free Software Foundation, Inc.
2
3 # Copying and distribution of this file, with or without modification,
4 # are permitted in any medium without royalty provided the copyright
5 # notice and this notice are preserved.
6
7 cat <<EOF
8 /* Copyright (C) 2014-2016 Free Software Foundation, Inc.
9
10    Copying and distribution of this script, with or without modification,
11    are permitted in any medium without royalty provided the copyright
12    notice and this notice are preserved.  */
13
14 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
15 OUTPUT_ARCH(${ARCH})
16 ${RELOCATING+ENTRY ("_start")}
17 MEMORY
18 {
19         
20         vectarea : o =0x00000, l = 0x0300 
21         
22         introm    : o = 0x00400, l = 0x16000
23         /* The stack starts at the top of main ram.  */
24         
25         dram   : o = 0x8000 , l = 0xffff
26         /* At the very top of the address space is the 8-bit area.  */
27                 
28          ldata  : o =0x4000 ,l = 0x0200
29 }
30
31 SECTIONS
32 {
33 .init :
34         {
35           *(.init)
36         } ${RELOCATING+ >introm}
37  
38 .text :
39         {
40           *(.rodata) 
41           *(.text.*)
42           *(.text)
43                   ${RELOCATING+ _etext = . ; }
44         } ${RELOCATING+ > introm}
45 .data :
46         {
47           *(.data)
48           *(.data.*)
49           
50           ${RELOCATING+ _edata = . ; }
51         } ${RELOCATING+ > dram}
52
53 .bss :
54         {
55           ${RELOCATING+ _bss_start = . ;}
56           *(.bss)
57           *(COMMON)
58           ${RELOCATING+ _end = . ;  }
59         } ${RELOCATING+ > dram}
60
61  .ldata :
62          {
63           *(.ldata)
64          } ${RELOCATING+ > ldata}
65
66   
67   .vects :
68           {
69           *(.vects)
70        } ${RELOCATING+ > vectarea}     
71
72 }
73 EOF