OLD | NEW |
1 // defstd.cc -- define standard symbols for gold. | 1 // defstd.cc -- define standard symbols for gold. |
2 | 2 |
3 // Copyright 2006, 2007 Free Software Foundation, Inc. | 3 // Copyright 2006, 2007 Free Software Foundation, Inc. |
4 // Written by Ian Lance Taylor <iant@google.com>. | 4 // Written by Ian Lance Taylor <iant@google.com>. |
5 | 5 |
6 // This file is part of gold. | 6 // This file is part of gold. |
7 | 7 |
8 // This program is free software; you can redistribute it and/or modify | 8 // This program is free software; you can redistribute it and/or modify |
9 // it under the terms of the GNU General Public License as published by | 9 // it under the terms of the GNU General Public License as published by |
10 // the Free Software Foundation; either version 3 of the License, or | 10 // the Free Software Foundation; either version 3 of the License, or |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 "__fini_array_end", // name | 100 "__fini_array_end", // name |
101 ".fini_array", // output_section | 101 ".fini_array", // output_section |
102 0, // value | 102 0, // value |
103 0, // size | 103 0, // size |
104 elfcpp::STT_NOTYPE, // type | 104 elfcpp::STT_NOTYPE, // type |
105 elfcpp::STB_GLOBAL, // binding | 105 elfcpp::STB_GLOBAL, // binding |
106 elfcpp::STV_HIDDEN, // visibility | 106 elfcpp::STV_HIDDEN, // visibility |
107 0, // nonvis | 107 0, // nonvis |
108 true, // offset_is_from_end | 108 true, // offset_is_from_end |
109 true // only_if_ref | 109 true // only_if_ref |
110 } | 110 }, |
| 111 { |
| 112 "__rel_iplt_start",»» // name |
| 113 ".rel.iplt",» » // output_section |
| 114 0,» » » » // value |
| 115 0,» » » » // size |
| 116 elfcpp::STT_NOTYPE,»» // type |
| 117 elfcpp::STB_GLOBAL,»» // binding |
| 118 elfcpp::STV_HIDDEN,»» // visibility |
| 119 0,» » » » // nonvis |
| 120 false,» » » // offset_is_from_end |
| 121 true» » » // only_if_ref |
| 122 }, |
| 123 { |
| 124 "__rel_iplt_end",» » // name |
| 125 ".rel.iplt",» » // output_section |
| 126 0,» » » » // value |
| 127 0,» » » » // size |
| 128 elfcpp::STT_NOTYPE,»» // type |
| 129 elfcpp::STB_GLOBAL,»» // binding |
| 130 elfcpp::STV_HIDDEN,»» // visibility |
| 131 0,» » » » // nonvis |
| 132 true,» » » // offset_is_from_end |
| 133 true» » » // only_if_ref |
| 134 }, |
| 135 { |
| 136 "__rela_iplt_start",» // name |
| 137 ".rela.iplt",» » // output_section |
| 138 0,» » » » // value |
| 139 0,» » » » // size |
| 140 elfcpp::STT_NOTYPE,»» // type |
| 141 elfcpp::STB_GLOBAL,»» // binding |
| 142 elfcpp::STV_HIDDEN,»» // visibility |
| 143 0,» » » » // nonvis |
| 144 false,» » » // offset_is_from_end |
| 145 true» » » // only_if_ref |
| 146 }, |
| 147 { |
| 148 "__rela_iplt_end",» » // name |
| 149 ".rela.iplt",» » // output_section |
| 150 0,» » » » // value |
| 151 0,» » » » // size |
| 152 elfcpp::STT_NOTYPE,»» // type |
| 153 elfcpp::STB_GLOBAL,»» // binding |
| 154 elfcpp::STV_HIDDEN,»» // visibility |
| 155 0,» » » » // nonvis |
| 156 true,» » » // offset_is_from_end |
| 157 true» » » // only_if_ref |
| 158 }, |
| 159 { |
| 160 "__stack",» » » // name |
| 161 ".stack",» » » // output_section |
| 162 0,» » » » // value |
| 163 0,» » » » // size |
| 164 elfcpp::STT_NOTYPE,»» // type |
| 165 elfcpp::STB_GLOBAL,»» // binding |
| 166 elfcpp::STV_DEFAULT,» // visibility |
| 167 0,» » » » // nonvis |
| 168 false,» » » // offset_is_from_end |
| 169 true» » » // only_if_ref |
| 170 }, |
111 }; | 171 }; |
112 | 172 |
113 const int in_section_count = sizeof in_section / sizeof in_section[0]; | 173 const int in_section_count = sizeof in_section / sizeof in_section[0]; |
114 | 174 |
115 const Define_symbol_in_segment in_segment[] = | 175 const Define_symbol_in_segment in_segment[] = |
116 { | 176 { |
117 { | 177 { |
118 "__executable_start", // name | 178 "__executable_start", // name |
119 elfcpp::PT_LOAD, // segment_type | 179 elfcpp::PT_LOAD, // segment_type |
120 elfcpp::PF(0), // segment_flags_set | 180 elfcpp::PF(0), // segment_flags_set |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 elfcpp::PT_LOAD, // segment_type | 291 elfcpp::PT_LOAD, // segment_type |
232 elfcpp::PF_W, // segment_flags_set | 292 elfcpp::PF_W, // segment_flags_set |
233 elfcpp::PF(0), // segment_flags_clear | 293 elfcpp::PF(0), // segment_flags_clear |
234 0, // value | 294 0, // value |
235 0, // size | 295 0, // size |
236 elfcpp::STT_NOTYPE, // type | 296 elfcpp::STT_NOTYPE, // type |
237 elfcpp::STB_GLOBAL, // binding | 297 elfcpp::STB_GLOBAL, // binding |
238 elfcpp::STV_DEFAULT, // visibility | 298 elfcpp::STV_DEFAULT, // visibility |
239 0, // nonvis | 299 0, // nonvis |
240 Symbol::SEGMENT_END, // offset_from_base | 300 Symbol::SEGMENT_END, // offset_from_base |
241 false» » » // only_if_ref | 301 true» » » // only_if_ref |
242 } | 302 } |
243 }; | 303 }; |
244 | 304 |
245 const int in_segment_count = sizeof in_segment / sizeof in_segment[0]; | 305 const int in_segment_count = sizeof in_segment / sizeof in_segment[0]; |
246 | 306 |
247 } // End anonymous namespace. | 307 } // End anonymous namespace. |
248 | 308 |
249 namespace gold | 309 namespace gold |
250 { | 310 { |
251 | 311 |
252 void | 312 void |
253 define_standard_symbols(Symbol_table* symtab, const Layout* layout) | 313 define_standard_symbols(Symbol_table* symtab, const Layout* layout) |
254 { | 314 { |
255 bool saw_sections_clause = layout->script_options()->saw_sections_clause(); | 315 bool saw_sections_clause = layout->script_options()->saw_sections_clause(); |
256 symtab->define_symbols(layout, in_section_count, in_section, | 316 symtab->define_symbols(layout, in_section_count, in_section, |
257 saw_sections_clause); | 317 saw_sections_clause); |
258 symtab->define_symbols(layout, in_segment_count, in_segment, | 318 symtab->define_symbols(layout, in_segment_count, in_segment, |
259 saw_sections_clause); | 319 saw_sections_clause); |
260 } | 320 } |
261 | 321 |
262 } // End namespace gold. | 322 } // End namespace gold. |
OLD | NEW |