• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2Copyright (c) 2018, The Linux Foundation. All rights reserved.
3
4Redistribution and use in source and binary forms, with or without
5modification, are permitted provided that the following conditions are
6met:
7    * Redistributions of source code must retain the above copyright
8      notice, this list of conditions and the following disclaimer.
9    * Redistributions in binary form must reproduce the above
10      copyright notice, this list of conditions and the following
11      disclaimer in the documentation and/or other materials provided
12      with the distribution.
13    * Neither the name of The Linux Foundation nor the names of its
14      contributors may be used to endorse or promote products derived
15      from this software without specific prior written permission.
16
17THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
18WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
19MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
20ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
21BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
24BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
26OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
27IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28*/
29
30OUTPUT_FORMAT("elf32-littlehexagon", "elf32-littlehexagon",
31	      "elf32-littlehexagon")
32OUTPUT_ARCH(hexagon)
33
34PHDRS {
35phdr1 PT_LOAD;
36phdr2 PT_LOAD;
37dynamic1 PT_DYNAMIC;
38note1 PT_NOTE;
39}
40
41SECTIONS
42{
43
44  /* micro-image version note */
45  .note.qti.uimg.dl.ver : { *(.note.qti.uimg.dl.ver) } : phdr1 : note1
46
47  /* SysV hash section */
48  .hash           :  { *(.hash) } : phdr1
49
50  /* GNU hash section */
51  .gnu.hash       :  { *(.gnu.hash) }
52
53  /* Dynamic Symbol Table section */
54  .dynsym         :  { *(.dynsym) }
55
56  /* Dynamic string table section */
57  .dynstr         :  { *(.dynstr) }
58
59  /* Dynamic relocations for data */
60  .rela.dyn       :  { *(.rela.dyn) }
61
62  /* Dynamic relocations for PLT */
63  .rela.plt       :  { *(.rela.plt) }
64
65  /* Initializer */
66  .init           :
67  {
68    KEEP (*(.init))
69  }
70
71  /* Procedure Linkage table */
72  .plt            :  { *(.plt) }
73
74  /* Text section */
75  .text           :
76  {
77    *(.text*)
78  }
79
80  /* Finalizer section */
81  .fini           :
82  {
83    KEEP (*(.fini))
84  }
85
86  /* Standard symbols for Text */
87  PROVIDE (__etext = .);
88  PROVIDE (_etext = .);
89  PROVIDE (etext = .);
90
91  /* Read Only Data */
92  .rodata         : { *(.rodata*) }
93
94  /* EH Frame Information */
95  .eh_frame_hdr   :  { *(.eh_frame_hdr) }
96  .eh_frame       :  ONLY_IF_RO { KEEP (*(.eh_frame)) }
97
98   /* TLS */
99  .tdata	  :  { *(.tdata*) }
100  .tbss		  :  { *(.tbss*)  }
101
102  /* Constructors and Destructors */
103  .init_array     :  { KEEP (*(.init_array)) }
104  .fini_array     :  { KEEP (*(.fini_array.*)) }
105  .ctors          : { KEEP (*(.ctors)) }
106  .dtors          : { KEEP (*(.dtors)) }
107
108
109  .data.rel.ro    :  { *(.data.rel.ro*) }
110
111  . = ALIGN(4K);
112
113   /* Dynamic Sections */
114  .dynamic        :  { *(.dynamic) } : dynamic1 : phdr2
115
116   /* GOT section */
117  .got            :  { *(.got) }
118
119  /* GOT slots for PLT section  */
120  .got.plt        :  { *(.got.plt) }
121
122  .data           :
123  {
124    *(.data .data.*)
125  }
126  _edata = .; PROVIDE (edata = .);
127
128  /* BSS */
129  __bss_start = .;
130  .bss            :
131  {
132   *(.bss*)
133   *(COMMON)
134  }
135  . = ALIGN (64);
136  _end = .;
137
138  /* Non alloc sections */
139  PROVIDE (end = .);
140  .comment       0 :  { *(.comment) }
141  /* GNU DWARF 1 extensions */
142  .debug_srcinfo  0 :  { *(.debug_srcinfo) }
143  .debug_sfnames  0 :  { *(.debug_sfnames) }
144  /* DWARF 1.1 and DWARF 2 */
145  .debug_aranges  0 :  { *(.debug_aranges) }
146  .debug_pubnames 0 :  { *(.debug_pubnames) }
147  /* DWARF 2 */
148  .debug_info     0 :  { *(.debug_info .gnu.linkonce.wi.*) }
149  .debug_abbrev   0 :  { *(.debug_abbrev) }
150  .debug_line     0 :  { *(.debug_line) }
151  .debug_frame    0 :  { *(.debug_frame) }
152  .debug_str      0 :  { *(.debug_str) }
153  .debug_loc      0 :  { *(.debug_loc) }
154  /* DWARF 3 */
155  .debug_pubtypes 0 :  { *(.debug_pubtypes) }
156  .debug_ranges   0 :  { *(.debug_ranges) }
157}
158