]>
Commit | Line | Data |
---|---|---|
f1f70eae ILT |
1 | 2008-05-06 Ian Lance Taylor <[email protected]> |
2 | ||
d82a5bcc ILT |
3 | * options.h (class General_options): Add --fatal-warnings. |
4 | * main.cc (main): Implement --fatal-warnings. | |
5 | * errors.h (Errors::warning_count): New function. | |
6 | ||
f1f70eae ILT |
7 | * options.h (class General_options): Add -Bsymbolic-functions. |
8 | * symtab.h (Symbol::is_preemptible): Check for | |
9 | -Bsymbolic-functions. | |
10 | ||
8825ac63 ILT |
11 | 2008-05-05 Ian Lance Taylor <[email protected]> |
12 | ||
d98bc257 ILT |
13 | * options.h (DEFINE_bool): For DASH_Z, create the negative option |
14 | as noVARNAME rather than no-VARNAME. | |
15 | (class General_options): Add option -z combreloc. | |
16 | * output.h (class Output_reloc) [SHT_REL]: Declare compare and | |
17 | get_address. | |
18 | (Output_reloc::sort_before) [SHT_REL]: New function. | |
19 | (Output_reloc::sort_before) [SHT_RELA]: New function. | |
20 | (class Output_data_reloc_base): Add sort_relocs_ field. Define | |
21 | Sort_relocs_comparison. | |
22 | (Output_data_reloc_base::Output_data_reloc_base): Add sort_relocs | |
23 | parameter. Change all callers. | |
24 | (Output_data_reloc::Output_data_reloc) [both versions]: Add | |
25 | sort_relocs parameter. Change all callers. | |
26 | * output.cc (Output_reloc::get_address): New function, broken out | |
27 | of write_rel. | |
28 | (Output_reloc::write_rel): Call it. | |
29 | (Output_reloc::compare): New function. | |
30 | (Output_data_reloc_base::do_write): Optionally sort relocs. | |
31 | ||
60b2b4e7 ILT |
32 | * configure.ac: If targ_extra_obj is set, link it in. |
33 | * configure.tgt: Initialize all variables. | |
34 | (x86_64*): Set targ_extra_obj and targ_extra_size. | |
35 | * configure: Rebuild. | |
36 | ||
8825ac63 ILT |
37 | * object.cc (Sized_relobj::include_section_group): Adjust section |
38 | indexes read from group data. Build vector to pass to | |
39 | layout_group. | |
40 | * layout.cc (Layout::layout_group): Add flags and shndxes | |
41 | parameters. Remove contents parameter. Change caller. Update | |
42 | explicit instantiations. | |
43 | * layout.h (class Layout): Update layout_group declaration. | |
44 | * output.cc (Output_data_group::Output_data_group): Add flags and | |
45 | input_shndxes parameters. Remove contents parameter. Change | |
46 | caller. | |
47 | (Output_data_group::do_write): Change input_sections_ to | |
48 | input_shndxes_. | |
49 | * output.h (class Output_data_group): Update constructor | |
50 | declaration. Rename input_sections_ to input_shndxes_. | |
51 | * testsuite/many_sections_test.cc: Add template. | |
52 | ||
e94cf127 CC |
53 | 2008-04-30 Cary Coutant <[email protected]> |
54 | ||
4418b2d5 CC |
55 | * target-reloc.h (relocate_section): Fix dead-pointer bug. |
56 | ||
e94cf127 CC |
57 | * layout.cc (Layout::include_section): Refactored check for debug |
58 | info section. | |
59 | (Layout::add_comdat): Add new parameters. Change type | |
60 | of signature parameter. Add object and shndx to signatures table. | |
61 | (Layout::find_kept_object): New function. | |
62 | * layout.h: Include <cstring>. | |
63 | (Layout::is_debug_info_section): New function. | |
64 | (Layout::add_comdat): Add new parameters. | |
65 | (Layout::find_kept_object): New function. | |
66 | (Layout::Kept_section): New struct. | |
67 | (Layout::Signatures): Change type of map range. | |
68 | * object.cc (Relobj::output_section_address): New function. | |
69 | (Sized_relobj::include_section_group): Add new parameters. Change | |
70 | calls to Layout::add_comdat. Change to build table of kept comdat | |
71 | groups and table mapping discarded sections to kept sections. | |
72 | (Sized_relobj::include_linkonce_section): Likewise. Add new parameter. | |
73 | (Sized_relobj::do_layout): Change calls to include_section_group and | |
74 | include_linkonce_section. | |
75 | (Sized_relobj::do_finalize_local_symbols): Do not set local symbol | |
76 | value to zero when section is discarded. | |
77 | (Sized_relobj::map_to_kept_section): New function. | |
78 | * object.h (Relobj::output_section_address): New function. | |
79 | (Relobj::Comdat_group): New type. | |
80 | (Relobj::find_comdat_group): New function. | |
81 | (Relobj::Comdat_group_table): New type. | |
82 | (Relobj::Kept_comdat_section): New type. | |
83 | (Relobj::Kept_comdat_section_table): New type. | |
84 | (Relobj::add_comdat_group): New function. | |
85 | (Relobj::set_kept_comdat_section): New function. | |
86 | (Relobj::get_kept_comdat_section): New function. | |
87 | (Relobj::comdat_groups_): New field. | |
88 | (Relobj::kept_comdat_sections_): New field. | |
89 | (Symbol_value::input_value): Update comment. | |
90 | (Sized_relobj::map_to_kept_section) New function. | |
91 | (Sized_relobj::include_linkonce_section): Add new parameter. | |
92 | * target-reloc.h (Comdat_behavior): New type. | |
93 | (get_comdat_behavior): New function. | |
94 | (relocate_section): Add code to map a discarded section to the | |
95 | corresponding kept section when applying a relocation. | |
96 | ||
e4e5049b CS |
97 | 2008-04-30 Craig Silverstein <[email protected]> |
98 | ||
99 | * dwarf_reader.cc (next_generation_count): New static var. | |
100 | (Addr2line_cache_entry): New struct. | |
101 | (addr2line_cache): New static var. | |
102 | (Dwarf_line_info::one_addr2line): Added caching. | |
103 | (Dwarf_line_info::clear_addr2line_cache): New function. | |
104 | * dwarf_reader.h (Dwarf_line_info::one_addr2line): Add | |
105 | cache-size parameter. | |
106 | (Dwarf_line_info::one_addr2line_cache): New function. | |
107 | * symtab.cc (Symbol_table::detect_odr_violations): Pass | |
108 | new cache-size argument to one_addr2line(), and clear cache. | |
109 | ||
d09e9154 CC |
110 | 2008-04-28 Cary Coutant <[email protected]> |
111 | ||
112 | * i386.cc (Relocate::relocate): Fix typos for R_386_PC16 and | |
113 | R_386_PC8 relocations. | |
114 | ||
7ef73768 ILT |
115 | 2008-04-23 Ian Lance Taylor <[email protected]> |
116 | ||
55438702 ILT |
117 | * object.cc (Sized_relobj::include_section_group): Check for |
118 | invalid section group. | |
119 | ||
c165fb93 ILT |
120 | * object.cc (make_elf_object): Correct test for 64-bit ELF file |
121 | header size. | |
122 | ||
7ef73768 ILT |
123 | * readsyms.cc (Read_symbols::do_read_symbols): Use get_view rather |
124 | than read for file header. | |
125 | * archive.cc (Archive::include_member): Likewise. | |
126 | ||
6194aaab L |
127 | 2008-04-23 Paolo Bonzini <[email protected]> |
128 | ||
129 | * aclocal.m4: Regenerate. | |
130 | * configure: Regenerate. | |
131 | ||
d491d34e ILT |
132 | 2008-04-19 Ian Lance Taylor <[email protected]> |
133 | ||
5ea2bac6 ILT |
134 | * version.cc (version_string): Bump to 1.6. |
135 | ||
7bc3e21a ILT |
136 | * testsuite/Makefile.am (many_sections_r_test): New target. |
137 | (many_sections_r_test_SOURCES): Remove. | |
138 | (many_sections_r_test_DEPENDENCIES): Remove. | |
139 | (many_sections_r_test_LDFLAGS): Remove. | |
140 | (many_sections_r_test_LDADD): Remove. | |
141 | ||
7fcd3aa9 ILT |
142 | * object.cc (Sized_relobj::do_add_symbols): Always pass |
143 | local_symbol_count_ to add_from_relobj. | |
144 | ||
4c94d6ae ILT |
145 | * testsuite/Makefile.am (many_sections_check.h): Only check one in |
146 | every thousand variables. | |
147 | * testsuite/Makefile.in: Rebuild. | |
148 | ||
d491d34e ILT |
149 | * object.cc (Xindex::initialize_symtab_xindex): New function. |
150 | (Xindex::read_symtab_xindex): New function. | |
151 | (Xindex::sym_xindex_to_shndx): New function. | |
152 | (Sized_relobj::find_symtab): Pick up SHT_SYMTAB_SHNDX section if | |
153 | available. | |
154 | (Sized_relobj::do_initialize_xindex): New function. | |
155 | (Sized_relobj::do_read_symbols): Adjust section links. | |
156 | (Sized_relobj::symbol_section_and_value): Add is_ordinary | |
157 | parameter. Change all callers. | |
158 | (Sized_relobj::include_section_group): Adjust section links and | |
159 | symbol section indexes. | |
160 | (Sized_relobj::do_layout): Adjust section links. | |
161 | (Sized_relobj::do_count_local_symbols): Adjust section links and | |
162 | symbol section indexes. | |
163 | (Sized_relobj::do_finalize_local_symbols): Distinguish between | |
164 | ordinary and special symbols. | |
165 | (Sized_relobj::write_local_symbols): Add symtab_xindex and | |
166 | dynsym_xindex parameters. Change all callers. Adjust section | |
167 | links. Use SHN_XINDEX when needed. | |
168 | (Sized_relobj::get_symbol_location_info): Adjust section links. | |
169 | Don't get fooled by special symbols. | |
170 | * object.h (class Xindex): Define. | |
171 | (class Object): Add xindex_ parameter. Declare virtual functoin | |
172 | do_initialize_xindex. | |
173 | (Object::adjust_sym_shndx): New function. | |
174 | (Object::set_xindex): New protected function. | |
175 | (class Symbol_value): Add is_ordinary_shndx_ field. | |
176 | (Symbol_value::Symbol_value): Initialize is_ordinary_shndx_. | |
177 | (Symbol_value::value): Assert ordinary section. | |
178 | (Symbol_value::initialize_input_to_output_map): Likewise. | |
179 | (Symbol_value::set_input_shndx): Add is_ordinary parameter. | |
180 | Change all callers. | |
181 | (Symbol_value::input_shndx): Add is_ordinary parameter. Change | |
182 | all callers. | |
183 | (class Sized_relobj): Update declarations. | |
184 | (Sized_relobj::local_symbol_input_shndx): Add is_ordinary | |
185 | parameter. Change all callers. | |
186 | (Sized_relobj::adjust_shndx): New function. | |
187 | * dynobj.cc (Sized_dynobj::Sized_dynobj): Initialize dynsym_shndx_ | |
188 | field. | |
189 | (Sized_dynobj::find_dynsym_sections): Remove pdynsym_shndx | |
190 | parameter. Change all callers. Pick up SHT_DYNSYM_SHNDX section | |
191 | for SHT_DYNSYM section if available. Set dynsym_shndx_ field. | |
192 | (Sized_dynobj::read_dynsym_section): Adjust section links. | |
193 | (Sized_dynobj::read_dynamic): Likewise. | |
194 | (Sized_dynobj::do_read_symbols): Use dynsym_shndx_ field. Adjust | |
195 | section links. | |
196 | (Sized_dynobj::do_initialize_xindex): New function. | |
197 | * dynobj.h (class Sized_dynobj): Add dynsym_shndx_ field. Declare | |
198 | do_initialize_xindex. | |
199 | (Sized_dynobj::adjust_shndx): New function. | |
200 | * layout.cc (Layout::Layout): Initialize symtab_xindex_ and | |
201 | dynsym_xindex_ fields. | |
202 | (Layout::finalize): Add a call to set_section_indexes before | |
203 | creating the symtab sections. | |
204 | (Layout::set_section_indexes): Don't do anything if the section | |
205 | already has a section index. | |
206 | (Layout::create_symtab_sections): Add shnum parameter. Change | |
207 | caller. Create .symtab_shndx section if needed. | |
208 | (Layout::create_shdrs): Add shstrtab_section parameter. Change | |
209 | caller. | |
210 | (Layout::allocated_output_section_count): New function. | |
211 | (Layout::create_dynamic_symtab): Create .dynsym_shndx section if | |
212 | needed. | |
213 | * layout.h (class Layout): Add symtab_xindex_ and dynsym_xindex_ | |
214 | fields. Update declarations. | |
215 | (Layout::symtab_xindex): New function. | |
216 | (Layout::dynsym_xindex): New function. | |
217 | (class Write_symbols_task): Add layout_ field. | |
218 | (Write_symbols_task::Write_symbols_task): Add layout parameter. | |
219 | Change caller. | |
220 | * output.cc (Output_section_headers::Output_section_headers): Add | |
221 | shstrtab_section parameter. Change all callers. | |
222 | (Output_section_headers::do_sized_write): Store overflow values | |
223 | for section count and section string table section index in | |
224 | section header zero. | |
225 | (Output_file_header::do_sized_write): Check for overflow of | |
226 | section count and section string table section index. | |
227 | (Output_symtab_xindex::do_write): New function. | |
228 | (Output_symtab_xindex::endian_do_write): New function. | |
229 | * output.h (class Output_section_headers): Add shstrtab_section_. | |
230 | Update declarations. | |
231 | (class Output_symtab_xindex): Define. | |
232 | (Output_section::has_out_shndx): New function. | |
233 | * symtab.cc (Symbol::init_fields): Initialize is_ordinary_shndx_ | |
234 | field. | |
235 | (Symbol::init_base): Add st_shndx and is_ordinary parameters. | |
236 | Change all callers. | |
237 | (Sized_symbol::init): Likewise. | |
238 | (Symbol::output_section): Check for ordinary symbol. | |
239 | (Symbol_table::add_from_object): Remove orig_sym parameter. Add | |
240 | st_shndx, is_ordinary, and orig_st_shndx parameters. Change all | |
241 | callers. | |
242 | (Symbol_table::add_from_relobj): Add symndx_offset parameter. | |
243 | Change all callers. Simplify handling of symbols from sections | |
244 | not included in the link. | |
245 | (Symbol_table::add_from_dynobj): Handle ordinary symbol | |
246 | distinction. | |
247 | (Weak_alias_sorter::operator()): Assert that symbols are | |
248 | ordinary. | |
249 | (Symbol_table::sized_finalize_symbol): Handle ordinary symbol | |
250 | distinction. | |
251 | (Symbol_table::write_globals): Add symtab_xindex and dynsym_xindex | |
252 | parameters. Change all callers. | |
253 | (Symbol_table::sized_write_globals): Likewise. Handle ordinary | |
254 | symbol distinction. Use SHN_XINDEX when needed. | |
255 | (Symbol_table::write_section_symbol): Add symtab_xindex | |
256 | parameter. Change all callers. | |
257 | (Symbol_table::sized_write_section_symbol): Likewise. Use | |
258 | SHN_XINDEX when needed. | |
259 | * symtab.h (class Symbol): Add is_ordinary_shndx_ field. Update | |
260 | declarations. | |
261 | (Symbol::shndx): Add is_ordinary parameter. Change all callers. | |
262 | (Symbol::is_defined): Check is_ordinary. | |
263 | (Symbol::is_undefined, Symbol::is_weak_undefined): Likewise. | |
264 | (Symbol::is_absolute, Symbol::is_common): Likewise. | |
265 | (class Sized_symbol): Update declarations. | |
266 | (class Symbol_table): Update declarations. | |
267 | * resolve.cc (Symbol::override_base): Add st_shndx and is_ordinary | |
268 | parameters. Change all callers. | |
269 | (Sized_symbol::override): Likewise. | |
270 | (Symbol_table::override): Likewise. | |
271 | (symbol_to_bits): Add is_ordinary parameter. Change all callers. | |
272 | (Symbol_table::resolve): Remove orig_sym parameter. Add st_shndx, | |
273 | is_ordinary, and orig_st_shndx parameters. Change all callers. | |
274 | * copy-relocs.cc (Copy_relocs::emit_copy_reloc): Require symbol | |
275 | to be in an ordinary section. | |
276 | * dwarf_reader.cc (Sized_dwarf_line_info::symbol_section): Add | |
277 | object and is_ordinary parameters. Change all callers. | |
278 | (Sized_dwarf_line_info::read_relocs): Add object parameter. | |
279 | Change all callers. Don't add undefined or non-ordinary symbols | |
280 | to reloc_map_. | |
281 | (Sized_dwarf_line_info::read_line_mappings): Add object parameter. | |
282 | Change all callers. | |
283 | * dwarf_reader.h (class Sized_dwarf_line_info): Update | |
284 | declarations. | |
285 | * ehframe.cc (Eh_frame::read_fde): Check for ordinary symbol. | |
286 | * reloc.cc (Sized_relobj::do_read_relocs): Adjust section links. | |
287 | (Sized_relobj::relocate_sections): Likewise. | |
288 | * target-reloc.h (scan_relocs): Adjust section symbol index. | |
289 | (scan_relocatable_relocs): Likewise. | |
290 | * i386.cc (Scan::local): Check for ordinary symbols. | |
291 | * sparc.cc (Scan::local): Likewise. | |
292 | * x86_64.cc (Scan::local): Likewise. | |
293 | * testsuite/binary_unittest.cc (Sized_binary_test): Update calls | |
294 | to symbol_section_and_value. | |
295 | * testsuite/many_sections_test.cc: New file. | |
296 | * testsuite/Makefile.am (BUILT_SOURCES): Define. | |
297 | (check_PROGRAMS): Add many_sections_test. | |
298 | (many_sections_test_SOURCES): Define. | |
299 | (many_sections_test_DEPENDENCIES): Define. | |
300 | (many_sections_test_LDFLAGS): Define. | |
301 | (BUILT_SOURCES): Add many_sections_define.h. | |
302 | (many_sections_define.h): New target. | |
303 | (BUILT_SOURCES): Add many_sections_check.h. | |
304 | (many_sections_check.h): New target. | |
305 | (check_PROGRAMS): Add many_sections_r_test. | |
306 | (many_sections_r_test_SOURCES): Define. | |
307 | (many_sections_r_test_DEPENDENCIES): Define. | |
308 | (many_sections_r_test_LDFLAGS): Define. | |
309 | (many_sections_r_test_LDADD): Define. | |
310 | (many_sections_r_test.o): New target. | |
311 | * testsuite/Makefile.in: Rebuild. | |
312 | ||
c5818ff1 CC |
313 | 2008-04-17 Cary Coutant <[email protected]> |
314 | ||
315 | * errors.cc (Errors::info): New function. | |
316 | (gold_info): New function. | |
317 | * errors.h (Errors::info): New function. | |
318 | * gold.h (gold_info): New function. | |
319 | * object.cc (Input_objects::add_object): Print trace output. | |
320 | * options.cc (options::parse_set): New function. | |
321 | (General_options::parse_wrap): Deleted. | |
322 | (General_options::General_options): Deleted initializer. | |
323 | * options.h (options::String_set): New typedef. | |
324 | (options::parse_set): New function. | |
325 | (DEFINE_set): New macro. | |
326 | (General_options::wrap): Changed to use DEFINE_set. Changed | |
327 | callers of any_wrap_symbols and is_wrap_symbol. | |
328 | (General_options::trace, General_options::trace_symbol): | |
329 | New options. | |
330 | (General_options::any_wrap_symbols, General_options::is_wrap_symbol) | |
331 | (General_options::wrap_symbols_): Deleted. | |
332 | * symtab.cc (Symbol_table::add_from_object): Print trace output. | |
333 | ||
b5be4a7c DM |
334 | 2008-04-17 David S. Miller <[email protected]> |
335 | ||
336 | * options.cc (General_options::parse_V): New function. | |
337 | * options.h: Add entries for -V and -Qy. | |
338 | ||
155a0dd7 ILT |
339 | 2008-04-17 Ian Lance Taylor <[email protected]> |
340 | ||
341 | * common.cc (Symbol_table::allocate_commons): Remove options | |
342 | parameter. Change caller. | |
343 | (Symbol_table::do_allocate_commons): Remove options parameter. | |
344 | Change caller. Just call do_allocate_commons_list twice. | |
345 | (Symbol_table::do_allocate_commons_list): New function, broken out | |
346 | of do_allocate_commons. | |
347 | * common.h (class Allocate_commons_task): Remove options_ field. | |
348 | Update constructor. | |
349 | * symtab.cc (Symbol_table::Symbol_table): Initialize | |
350 | tls_commons_. | |
351 | (Symbol_table::add_from_object): Put TLS common symbols on | |
352 | tls_commons_ list. | |
353 | (Symbol_table::sized_finalize_symbol): Handle STT_TLS symbols | |
354 | which are IN_OUTPUT_DATA. | |
355 | * symtab.h (class Symbol_table): Add tls_commons_ field. Update | |
356 | allocate_commons and do_allocate_commons declarations. Declare | |
357 | do_allocate_commons_list. | |
358 | * gold.cc (queue_middle_tasks): Update creation of | |
359 | Allocate_commons_task to not pass options. | |
360 | * testsuite/Makefile.am (INCLUDES): Add -I.. . | |
361 | (TLS_TEST_C_FLAGS): New variable. | |
362 | (tls_test_c_pic.o): New target. | |
363 | (tls_test_shared.so): Link in tls_test_c_pic.o. | |
364 | (tls_test_c_pic_ie.o): New target. | |
365 | (tls_test_ie_shared.so): Link in tls_test_c_pic_ie.o. | |
366 | (tls_test_DEPENDENCIES, tls_test_LDADD): Add tls_test_c.o. | |
367 | (tls_test_c.o): New target. | |
368 | (tls_pic_test_DEPENDENCIES): Add tls_test_c_pic.o. | |
369 | (tls_pic_test_LDADD): Likewise. | |
370 | (tls_shared_gd_to_ie_test_DEPENDENCIES): Add tls_test_c_pic.o. | |
371 | (tls_shared_gd_to_ie_test_LDADD): Likewise. | |
372 | (tls_test_c_gnu2.o): New target. | |
373 | (tls_shared_gnu2_gd_to_ie_test_DEPENDENCIES): Add | |
374 | tls_test_c_gnu2.o. | |
375 | (tls_shared_gnu2_gd_to_ie_test_LDADD): Likewise. | |
376 | (tls_test_gnu2_shared.so): Link in tls_test_c_gnu2.o. | |
377 | (tls_test_shared_nonpic.so): Link in tls_test_c.o. | |
378 | * testsuite/tls_test.cc: Include "config.h". | |
379 | (t_last): Call t11_last. | |
380 | * testsuite/tls_test.h (t11, t11_last): Declare. | |
381 | * testsuite/tls_test_c.c: New file. | |
382 | * testsuite/tls_test_main.cc (thread_routine): Call t11. | |
383 | * configure.ac: Check for OpenMP support. | |
384 | * configure, config.in, Makefile.in: Rebuild. | |
385 | * testsuite/Makefile.in: Rebuild. | |
386 | ||
edfbb029 CC |
387 | 2008-04-16 Cary Coutant <[email protected]> |
388 | ||
389 | * i386.cc (Target_i386::define_tls_base_symbol): New function. | |
390 | (Target_i386::tls_base_symbol_defined_): New field. | |
391 | (Target_i386::Scan::local): Define _TLS_MODULE_BASE_ symbol. | |
392 | (Target_i386::Scan::global): Likewise. | |
393 | * symtab.cc (sized_finalize_symbol): Add check for TLS symbol. | |
394 | * x86_64.cc (Target_x86_64::define_tls_base_symbol): New function. | |
395 | (Target_x86_64::tls_base_symbol_defined_): New field. | |
396 | (Target_x86_64::Scan::local): Define _TLS_MODULE_BASE_ symbol. | |
397 | (Target_x86_64::Scan::global): Likewise. | |
398 | ||
f3c69fca CC |
399 | 2008-04-16 Cary Coutant <[email protected]> |
400 | ||
401 | * symtab.h (Symbol::is_strong_undefined): Removed unused function. | |
402 | (Symbol::needs_plt_entry): Allow weak undefined symbols. | |
403 | (Symbol::needs_dynamic_reloc): Allow weak undefined symbols when | |
404 | building shared libraries. | |
405 | * testsuite/Makefile.am (weak_undef_nonpic_test): New target. | |
406 | (weak_undef_file1_nonpic.o, weak_undef_file2_nonpic.o) | |
407 | (weak_undef_lib_nonpic.so, alt/weak_undef_lib_nonpic.so): New targets. | |
408 | * testsuite/Makefile.in: Rebuild. | |
409 | * testsuite/weak_undef.h: New file. | |
410 | * testsuite/weak_undef_file1.cc: Add extra test cases. | |
411 | * testsuite/weak_undef_file2.cc: Likewise. | |
412 | * testsuite/weak_undef_test.cc: Likewise. | |
413 | ||
7c414435 DM |
414 | 2008-04-16 David S. Miller <[email protected]> |
415 | ||
32b769e1 DM |
416 | * sparc.cc (Target_sparc::Scan): Change from struct to class. |
417 | Add issued_non_pic_error_ field. Declare check_non_pic. | |
418 | (Target_sparc::Scan::check_non_pic): New function. | |
419 | (Target_sparc::Scan::local): Call check_non_pic as appropriate. | |
420 | (Target_sparc::Scan::global): Likewise. | |
421 | ||
11936fb1 DM |
422 | * configure.ac (FN_PTRS_IN_SO_WITHOUT_PIC): Add sparc64. |
423 | * configure: Rebuild. | |
424 | ||
7c414435 DM |
425 | * options.h (DEFINE_enable): New macro. |
426 | (new_dtags): New enable option. | |
427 | (initfirst, interpose, loadfltr, nodefaultlib, | |
428 | nodelete, nodlopen, nodump): New -z options. | |
429 | * layout.cc (Layout:finish_dynamic_section): If new | |
430 | dtags enabled, emit DT_RUNPATH. Also, emit a | |
431 | DT_FLAGS_1 containing any specified -z flags. | |
432 | ||
85c7bf8b ILT |
433 | 2008-04-16 Ian Lance Taylor <[email protected]> |
434 | ||
12c0daef ILT |
435 | * copy-relocs.cc: New file. |
436 | * copy-relocs.h: New file. | |
437 | * reloc.cc: Remove Copy_relocs code. | |
438 | * reloc.h: Likewise. | |
439 | * reloc-types.h (struct Reloc_types) [both versions]: Add | |
440 | get_reloc_addend_noerror. | |
441 | * output.h (class Output_data_reloc<elfcpp::SHT_REL>): Add | |
442 | variants of add_global which take an addend which must be zero. | |
443 | * i386.cc: Include "copy-relocs.h". | |
444 | (class Target_i386): Change type of copy_relocs_ to variable, | |
445 | update initializer. | |
446 | (Target_i386::copy_reloc): Rewrite to pass to Copy_relocs class. | |
447 | Change all callers. | |
448 | (Target_i386::do_finalize_sections): Change handling of | |
449 | copy_relocs_. | |
450 | * sparc.cc: Include "copy-relocs.h". | |
451 | (class Target_sparc): Change type of copy_relocs_ to variable, | |
452 | update initializer. | |
453 | (Target_sparc::copy_reloc): Rewrite to pass to Copy_relocs class. | |
454 | Change all callers. | |
455 | (Target_sparc::do_finalize_sections): Change handling of | |
456 | copy_relocs_. | |
457 | * x86_64.cc: Include "copy-relocs.h". | |
458 | (class Target_x86_64): Change type of copy_relocs_ to variable, | |
459 | update initializer. | |
460 | (Target_x86_64::copy_reloc): Rewrite to pass to Copy_relocs | |
461 | class. Change all callers. | |
462 | (Target_x86_64::do_finalize_sections): Change handling of | |
463 | copy_relocs_. | |
464 | * Makefile.am (CCFILES): Add copy-relocs.cc. | |
465 | (HFILES): Add copy-relocs.h. | |
466 | ||
4f4995b6 ILT |
467 | * Makefile.in, aclocal.m4, testsuite/Makefile.in: Rebuild. |
468 | ||
85c7bf8b ILT |
469 | * testsuite/script_test_4.sh: Permit leading zeroes. |
470 | ||
4f2a9edd ILT |
471 | 2008-04-15 Ian Lance Taylor <[email protected]> |
472 | ||
e6188289 ILT |
473 | * script-sections.cc (Script_sections::create_segments): Use |
474 | header_size_adjustment even when there is enough room for the | |
475 | headers. | |
476 | * testsuite/script_test_4.sh: New file. | |
477 | * testsuite/script_test_4.t: New file. | |
478 | * testsuite/Makefile.am (check_SCRIPTS): Add script_test_4.sh. | |
479 | (check_DATA): Add script_test_4.stdout. | |
480 | (MOSTLYCLEANFILES): Likewise. | |
481 | (script_test_4): New target. | |
482 | (script_test_4.stdout): New target. | |
483 | * testsuite/Makefile.in: Rebuild. | |
484 | ||
4f2a9edd ILT |
485 | * sparc.cc: Add definitions for Output_data_plt_sparc class |
486 | constants. | |
487 | ||
f5314dd5 DM |
488 | 2008-04-14 David S. Miller <[email protected]> |
489 | ||
490 | * sparc.cc: New file. | |
491 | * Makefile.am (TARGETSOURCES): Add sparc.cc | |
492 | (ALL_TARGETOBJS): Add sparc.$(OBJEXT) | |
493 | * configure.tgt: Document targ_extra_size and | |
494 | targ_extra_big_endian. Add entries for sparc-* and | |
495 | sparc64-*. | |
496 | * configure.ac: Handle targ_extra_size and | |
497 | targ_extra_big_endian. | |
498 | * Makefile.in: Rebuild. | |
499 | * configure: Likewise. | |
500 | * po/POTFILES.in: Likewise. | |
501 | * po/gold.pot: Likewise. | |
502 | ||
154e0e9a ILT |
503 | 2008-04-14 Ian Lance Taylor <[email protected]> |
504 | ||
505 | * layout.cc (Layout::Layout): Initialize sections_are_attached_. | |
506 | (Layout::get_output_section): Ignore SHF_WRITE and SHF_EXECINSTR | |
507 | in the name/type/flags to section mapping. Don't call | |
508 | allocate_output_section. | |
509 | (Layout::choose_output_section): Change parameter from adjust_name | |
510 | to is_input_section. Don't permit input sections after sections | |
511 | are attached to segments. Don't call allocate_output_section. | |
512 | (Layout::layout_eh_frame): Call update_flags_for_input_section, | |
513 | not write_enable_output_section. | |
514 | (Layout::make_output_section): Don't push to | |
515 | unattached_section_list_ nor call attach_to_segment. Call | |
516 | attach_section_to_segment if sections are attached. | |
517 | (Layout::attach_sections_to_segments): New function. | |
518 | (Layout::attach_section_to_segment): New function. | |
519 | (Layout::attach_allocated_section_to_segment): Rename from | |
520 | attach_to_segment. Remove flags parameter. | |
521 | (Layout::allocate_output_section): Remove function. | |
522 | (Layout::write_enable_output_section): Remove function. | |
523 | * layout.h (class Layout): Update for above changes. Add new | |
524 | field sections_are_attached_. | |
525 | * output.h (Output_section::update_flags_for_input_section): New | |
526 | function. | |
527 | * output.cc (Output_section::add_input_section): Call | |
528 | update_flags_for_input_section. | |
529 | * gold.cc (queue_middle_tasks): Call attach_sections_to_segments. | |
530 | ||
009a67a2 CC |
531 | 2008-04-11 Cary Coutant <[email protected]> |
532 | ||
533 | * i386.cc (Target_i386::got_mod_index_entry): Restore code previously | |
534 | thought unnecessary. | |
535 | * x86_64.cc (Target_x86_64::got_mod_index_entry): Likewise. | |
536 | ||
759b1a24 ILT |
537 | 2008-04-11 Ian Lance Taylor <[email protected]> |
538 | ||
539 | * output.h (class Output_section_data): Remove inline definition | |
540 | of set_addralign. | |
541 | * output.cc (Output_section_data::set_addralign): New function. | |
542 | ||
c2b45e22 CC |
543 | 2008-04-11 Cary Coutant <[email protected]> |
544 | ||
545 | Add support for TLS descriptors for i386 and x86_64. | |
546 | * i386.cc (Target_i386::Relocate::tls_desc_gd_to_ie): New function. | |
547 | (Target_i386::Relocate::tls_desc_gd_to_le): New function. | |
548 | (Target_i386::Got_type): Add GOT_TYPE_TLS_NOFFSET and | |
549 | GOT_TYPE_TLS_DESC. | |
550 | (Target_i386::got_mod_index_entry): Remove unnecessary code. | |
551 | (Target_i386::Scan::local): Implement R_386_TLS_GOTDESC and | |
552 | R_386_TLS_DESC_CALL relocations. Fix problem with initial-exec | |
553 | relocations. | |
554 | (Target_i386::Scan::global): Fix problem with GD-to-IE relaxation. | |
555 | Implement R_386_TLS_GOTDESC and R_386_TLS_DESC_CALL relocations; | |
556 | Fix problem with initial-exec relocations. | |
557 | (Target_i386::Relocate::relocate_tls): Likewise. | |
558 | (Target_i386::Relocate::tls_gd_to_ie): Fix problem with GD-to-IE | |
559 | relaxation. | |
560 | * output.cc (Output_data_dynamic::Dynamic_entry::write): Add | |
561 | support for section-plus-offset dynamic table entries. | |
562 | * output.h (Output_data_dynamic::add_section_plus_offset): New function. | |
563 | (Output_data_dynamic::Dynamic_entry): Add support for | |
564 | section-plus-offset dynamic table entries. | |
565 | (Output_data_dynamic::Classification): Likewise. | |
566 | (Output_data_dynamic::classification_): Renamed offset_. | |
567 | * x86_64.cc (Target_x86_64::Relocate::tls_desc_gd_to_ie): New function. | |
568 | (Target_x86_64::Relocate::tls_desc_gd_to_le): New function. | |
569 | (Target_x86_64::make_plt_section): New function. | |
570 | (Target_x86_64::reserve_tlsdesc_entries): New function. | |
571 | (Output_data_plt_x86_64::Output_data_plt_x86_64): Add new parameter. | |
572 | (Output_data_plt_x86_64::reserve_tlsdesc_entry): New function. | |
573 | (Output_data_plt_x86_64::has_tlsdesc_entry): New function. | |
574 | (Output_data_plt_x86_64::get_tlsdesc_got_offset): New function. | |
575 | (Output_data_plt_x86_64::get_tlsdesc_plt_offset): New function. | |
576 | (Output_data_plt_x86_64::tlsdesc_plt_entry): New field. | |
577 | (Output_data_plt_x86_64::set_final_data_size): Move out of line; | |
578 | add extra PLT entry for TLS descriptors. | |
579 | (Output_data_plt_x86_64::got_): New field. | |
580 | (Output_data_plt_x86_64::tlsdesc_got_offset_): New field. | |
581 | (Output_data_plt_x86_64::Output_data_plt_x86_64): Initialize new | |
582 | fields. | |
583 | (Output_data_plt_x86_64::do_write): Write extra PLT entry for TLS | |
584 | descriptors. | |
585 | (Target_x86_64::make_plt_entry): Factor out make_plt_section. | |
586 | (Target_x86_64::got_mod_index_entry): Remove unnecessary code. | |
587 | (Target_x86_64::Scan::local): Implement R_386_TLS_GOTDESC and | |
588 | R_386_TLS_DESC_CALL relocations. | |
589 | (Target_x86_64::Scan::global): Likewise. | |
590 | (Target_x86_64::do_finalize_sections): Add dynamic table entries | |
591 | for TLS descriptors. | |
592 | (Relocate::relocate_tls): Fix problem with GD-to-IE relaxation. | |
593 | Implement R_386_TLS_GOTDESC and R_386_TLS_DESC_CALL relocations. | |
594 | (Target_x86_64::Relocate::tls_gd_to_ie): Fix problem with | |
595 | GD-to-IE relaxation. | |
596 | * configure.ac: Export new conditional variables TLS_GNU2_DIALECT | |
597 | and TLS_DESCRIPTORS. | |
598 | * Makefile.in: Rebuild. | |
599 | * configure: Rebuild. | |
600 | * testsuite/Makefile.am (tls_shared_gd_to_ie_test): New target. | |
601 | (tls_test_shared2.so): New target. | |
602 | (tls_shared_gd_to_ie_test_SOURCES): New variable. | |
603 | (tls_shared_gd_to_ie_test_DEPENDENCIES): New variable. | |
604 | (tls_shared_gd_to_ie_test_LDFLAGS): New variable. | |
605 | (tls_shared_gd_to_ie_test_LDADD): New variable. | |
606 | (tls_shared_gnu2_gd_to_ie_test): New target. | |
607 | (tls_test_gnu2.o, tls_test_file2_gnu2.o, tls_test_gnu2_shared2.so): | |
608 | New targets. | |
609 | (tls_shared_gnu2_gd_to_ie_test_SOURCES): New variable. | |
610 | (ls_shared_gnu2_gd_to_ie_test_DEPENDENCIES): New variable. | |
611 | (tls_shared_gnu2_gd_to_ie_test_LDFLAGS): New variable. | |
612 | (tls_shared_gnu2_gd_to_ie_test_LDADD): New variable. | |
613 | (tls_shared_gnu2_test): New target. | |
614 | (tls_test_gnu2_shared.so): New target. | |
615 | (tls_shared_gnu2_test_SOURCES): New variable. | |
616 | (tls_shared_gnu2_test_DEPENDENCIES): New variable. | |
617 | (tls_shared_gnu2_test_LDFLAGS): New variable. | |
618 | (tls_shared_gnu2_test_LDADD): New variable. | |
619 | * testsuite/Makefile.in: Rebuild. | |
620 | * testsuite/Makefile. | |
621 | ||
83bfb6b7 ILT |
622 | 2008-04-11 Ian Lance Taylor <[email protected]> |
623 | ||
624 | * testsuite/Makefile.am (justsyms_2r.o): Add dependency on | |
625 | justsyms.t. | |
626 | * testsuite/Makefile.in: Rebuild. | |
627 | ||
628 | * testsuite/script_test_2a.cc (script_test_string_a): Make 8 bytes | |
629 | long. | |
630 | * testsuite/script_test_2.cc (main): Adjust test. | |
631 | ||
706e1f5e ILT |
632 | 2008-04-11 David S. Miller <[email protected]> |
633 | Ian Lance Taylor <[email protected]> | |
634 | ||
635 | * options.h (General_options): Add entries for '-Y' and | |
636 | '-relax'. | |
637 | * options.cc (General_options:finalize): If -Y was used, add those | |
638 | entries to the library path instead of the default "/lib" and | |
639 | "/usr/lib". | |
640 | ||
7c98e6bb DM |
641 | 2008-04-11 David S. Miller <[email protected]> |
642 | ||
643 | * testsuite/justsyms.t: Start at 0x100. | |
644 | * testsuite/justsyms_1.cc: Adjust justsyms_string assertion. | |
83bfb6b7 ILT |
645 | * testsuite/script_test_2b.cc (script_test_string_b): Make 8 bytes |
646 | long. | |
647 | * testsuite/script_test_2.cc: Adjust string and section length | |
648 | checks. | |
7c98e6bb | 649 | |
99a37bfd ILT |
650 | 2008-04-09 Ian Lance Taylor <[email protected]> |
651 | ||
2cefc357 ILT |
652 | PR gold/5996 |
653 | * script-sections.cc (Sections_element::allocate_to_segment): Add | |
654 | orphan parameter. | |
655 | (Output_section_definition::allocate_to_segment): Likewise. | |
656 | (Orphan_output_section::allocate_to_segment): Likewise. | |
657 | (Script_sections::attach_sections_using_phdrs_clause): Don't | |
658 | propagate non-PT_LOAD segments to orphan sections. | |
659 | * testsuite/Makefile.am (script_test_3.stdout): Generate using | |
660 | readelf rather than objdump. | |
661 | * testsuite/script_test_3.sh: Adjust accordingly. Test that | |
662 | .interp section and PT_INTERP segment are the same size. | |
663 | * testsuite/Makefile.in: Rebuild. | |
664 | ||
99a37bfd ILT |
665 | * symtab.cc (Symbol_table::add_from_dynobj): Only look for weak |
666 | aliases for symbols defined in the same object. | |
667 | * testsuite/Makefile.am (check_PROGRAMS): Add weak_alias_test. | |
668 | (weak_alias_test_SOURCES): New variable. | |
669 | (weak_alias_test_DEPENDENCIES): New variable. | |
670 | (weak_alias_test_LDFLAGS): New variable. | |
671 | (weak_alias_test_LDADD): New variable. | |
672 | (weak_alias_test_1_pic.o, weak_alias_test_1.so): New targets. | |
673 | (weak_alias_test_2_pic.o, weak_alias_test_2.so): New targets. | |
674 | (weak_alias_test_3.o): New target. | |
675 | (weak_alias_test_4_pic.o, weak_alias_test_4.so): New targets. | |
676 | * testsuite/weak_alias_test_main.cc: New file. | |
677 | * testsuite/weak_alias_test_1.cc: New file. | |
678 | * testsuite/weak_alias_test_2.cc: New file. | |
679 | * testsuite/weak_alias_test_3.cc: New file. | |
680 | ||
780e49c5 ILT |
681 | 2008-04-08 Ian Lance Taylor <[email protected]> |
682 | ||
cdb0b8f5 ILT |
683 | * options.h (class General_options): Add --noinhibit-exec option. |
684 | * main.cc (main): Check --noinhibit-exec. | |
685 | ||
0864d551 ILT |
686 | * options.h (class General_options): Define --wrap as a special |
687 | option. Add wrap_symbols_ field. | |
688 | (General_options::any_wrap_symbols): New function. | |
689 | (General_options::is_wrap_symbol): New function. | |
690 | * options.cc (General_options::parse_wrap): New function. | |
691 | (General_options::General_options): Initialize wrap_symbols_. | |
692 | * symtab.cc (Symbol_table::wrap_symbol): New function. | |
693 | (Symbol_table::add_from_object): Handle --wrap. | |
694 | * symtab.h (class Symbol_table): Declare wrap_symbol. | |
695 | * target.h (Target::wrap_char): New function. | |
696 | (Target::Target_info): Add wrap_char field. | |
697 | * i386.cc (Target_i386::i386_info): Initialize wrap_char. | |
698 | * x86_64.cc (Target_x86_64::x86_64_info): Likewise. | |
699 | * testsuite/testfile.cc (Target_test::test_target_info): | |
700 | Likewise. | |
701 | ||
789aa6de ILT |
702 | * errors.cc (Errors::undefined_symbol): Mention symbol version if |
703 | there is one. | |
704 | ||
2c38906f ILT |
705 | * layout.h (class Layout): Add added_eh_frame_data_ field. |
706 | * layout.cc (Layout::Layout): Initialize new field. | |
707 | (Layout::layout_eh_frame): Don't add eh_frame_data_ to .eh_frame | |
708 | output section until we find a section we merged successfully. | |
709 | * object.cc (Sized_relobj::check_eh_frame_flags): Don't require | |
710 | that the size be non-zero. | |
711 | ||
780e49c5 ILT |
712 | * merge.cc (Object_merge_map::get_output_offset): Remove inline |
713 | qualifier. | |
714 | ||
7fcd0256 ILT |
715 | 2008-04-08 Craig Silverstein <[email protected]> |
716 | ||
717 | * configure.ac: Export new conditional variable HAVE_ZLIB. | |
718 | * testsuite/Makefile.am (flagstest_o_specialfile): Condition | |
719 | on HAVE_ZLIB. | |
720 | (flagstest_o_specialfile_and_compress_debug_sections): Likewise. | |
721 | * configure, Makefile.in, testsuite/Makefile.in: Rebuild. | |
722 | ||
6835af53 ILT |
723 | 2008-04-07 Ian Lance Taylor <[email protected]> |
724 | ||
e24f324c ILT |
725 | * version.cc (version_string): Set to "1.5". |
726 | ||
a036edd8 ILT |
727 | * x86_64.cc (Target_x86_64::Scan): Change from struct to class. |
728 | Add issued_non_pic_error_ field. Declare check_non_pic. | |
729 | (Target_x86_64::Scan::check_non_pic): New function. | |
730 | (Target_x86_64::Scan::local): Call check_non_pic as appropriate. | |
731 | (Target_x86_64::Scan::global): Likewise. | |
732 | ||
624f8810 ILT |
733 | * output.cc (Output_reloc<SHT_REL>::local_section_offset): Add |
734 | addend parameter. Change caller. Handle merge sections. | |
735 | (Output_reloc<SHT_REL>::symbol_value): Change parameter type from | |
736 | Address to Addend. Don't add in the result of | |
737 | local_section_offset, pass down the addend and use the returned | |
738 | value. | |
739 | * output.h (class Output_reloc<SHT_REL>): Add Addend typedef. | |
740 | Update declarations of local_section_offset and symbol_value. | |
741 | * testsuite/two_file_test_1.cc (t18): New function. | |
742 | * testsuite/two_file_test_2.cc (f18): New function. | |
743 | * testsuite/two_file_test_main.cc (main): Call t18. | |
744 | * testsuite/two_file_test.h (t18, f18): Declare. | |
745 | ||
6835af53 ILT |
746 | * configure.ac: Don't test for objdump, c++filt, or readelf. |
747 | * testsuite/Makefile.am: Remove READELF and OBJDUMP_AND_CPPFILT | |
748 | conditionals. | |
749 | (TEST_READELF): New variable. | |
750 | (TEST_OBJDUMP, TEST_CXXFILT, TEST_STRIP): New variables. | |
751 | (check_PROGRAMS): Add two_file_strip_test. | |
752 | (two_file_strip_test): New target. | |
753 | (check_PROGRAMS): Add two_file_same_shared_strip_test. | |
754 | (two_file_same_shared_strip_test_SOURCES): New variable. | |
755 | (two_file_same_shared_strip_test_DEPENDENCIES): New variable. | |
756 | (two_file_same_shared_strip_test_LDFLAGS): New variable. | |
757 | (two_file_same_shared_strip_test_LDADD): New variable. | |
758 | (two_file_shared_strip.so): New target. | |
759 | (ver_test_2.syms, ver_test_4.syms): Use TEST_READELF. | |
760 | (ver_test_5.syms, ver_test_7.syms): Likewise. | |
761 | (ver_matching_test.stdout): Use TEST_OBJDUMP and TEST_CXXFILT. | |
762 | (strip_test_3.stdout): Use TEST_OBJDUMP. | |
763 | * configure, Makefile.in, testsuite/Makefile.in: Rebuild. | |
764 | ||
86925eef CC |
765 | 2008-04-04 Cary Coutant <[email protected]> |
766 | ||
767 | * symtab.h (Symbol::is_weak_undefined): New function. | |
768 | (Symbol::is_strong_undefined): New function. | |
769 | (Symbol::is_absolute): New function. | |
770 | (Symbol::needs_plt_entry): Exclude weak undefined symbols. | |
771 | (Symbol::needs_dynamic_reloc): Exclude weak undefined and | |
772 | absolute symbols. | |
773 | * testsuite/Makefile.am (check_PROGRAMS): Add weak_undef_test. | |
774 | (weak_undef_test): New target. | |
775 | * testsuite/Makefile.in: Rebuild. | |
776 | * testsuite/weak_undef_file1.cc: New file. | |
777 | * testsuite/weak_undef_file2.cc: New file. | |
778 | * testsuite/weak_undef_test.cc: New file. | |
779 | ||
126f3ece ILT |
780 | 2008-04-03 Craig Silverstein <[email protected]> |
781 | ||
782 | * compressed_output.h (class Output_compressed_section): Use | |
783 | unsigned buffer. | |
784 | * compressed_output.cc (zlib_compress): Use unsigned buffers, | |
785 | add zlib header. | |
786 | (zlib_compressed_suffix): Removed. | |
787 | (Output_compressed_section::set_final_data_size): Use unsigned | |
788 | buffers. | |
789 | * testsuite/Makefile.am (flagstest_compress_debug_sections): | |
790 | Fix linker invocation. | |
791 | (flagstest_o_specialfile_and_compress_debug_sections): | |
792 | Likewise. | |
793 | * testsuite/Makefile.in: Regenerated. | |
794 | ||
deae2a14 DM |
795 | 2008-04-02 David S. Miller <[email protected]> |
796 | ||
797 | * dwarf_reader.cc (Sized_dwarf_line_info::read_header_prolog, | |
798 | Sized_dwarf_line_info::process_one_opcode): Use Swap_unaligned. | |
799 | ||
70752818 ILT |
800 | 2008-04-02 Craig Silverstein <[email protected]> |
801 | ||
802 | * TODO: New file. | |
803 | ||
39d0cb0e ILT |
804 | 2008-04-02 Ian Lance Taylor <[email protected]> |
805 | ||
806 | * fileread.cc (File_read::find_view): Add byteshift and vshifted | |
807 | parameters. Update for new key type to views_. Change all | |
808 | callers. | |
809 | (File_read::read): Adjust for byteshift in returned view. | |
810 | (File_read::add_view): New function, broken out of | |
811 | find_and_make_view. | |
812 | (File_read::make_view): New function, broken out of | |
813 | find_and_make_view. | |
814 | (File_read::find_or_make_view): Add offset and aligned | |
815 | parameters. Rewrite accordingly. Change all callers. | |
816 | (File_read::get_view): Add offset and aligned parameters. Adjust | |
817 | for byteshift in return value. | |
818 | (File_read::get_lasting_view): Likewise. | |
819 | * fileread.h (class File_read): Update declarations. | |
820 | (class File_read::View): Add byteshift_ field. Add byteshift to | |
821 | constructor. Add byteshift method. | |
822 | * archive.h (Archive::clear_uncached_views): New function. | |
823 | (Archive::get_view): Add aligned parameter. Change all callers. | |
824 | * object.h (Object::get_view): Add aligned parameter. Change all | |
825 | callers. | |
826 | (Object::get_lasting_view): Likewise. | |
827 | ||
828 | * fileread.cc (File_read::release): Don't call clear_views if | |
829 | there are multiple objects. | |
830 | * fileread.h (File_read::clear_uncached_views): New function. | |
831 | * archive.cc (Add_archive_symbols::run): Call clear_uncached_views | |
832 | on the archive. | |
833 | ||
a1207466 CC |
834 | 2008-03-31 Cary Coutant <[email protected]> |
835 | ||
836 | Add thin archive support. | |
837 | * archive.cc (Archive::armagt): New const. | |
838 | (Archive::setup): Remove task parameter and calls to unlock. | |
839 | (Archive::unlock_nested_archives): New function. | |
840 | (Archive::read_header): Add nested_off parameter. Change | |
841 | all callers. | |
842 | (Archive::interpret_header): Likewise. | |
843 | (Archive::include_all_members): Change to handle thin | |
844 | archives. | |
845 | (Archive::include_member): Likewise. | |
846 | * archive.h (Archive::Archive): Add new parameters and | |
847 | initializers. | |
848 | (Archive::armagt): New const. | |
849 | (Archive::setup): Remove task parameter. | |
850 | (Archive::unlock_nested_archives): New function. | |
851 | (Archive::read_header): Add nested_off parameter. | |
852 | (Archive::interpret_header): Likewise. | |
853 | (Archive::Nested_archive_table): New typedef. | |
854 | (Archive::is_thin_archive_): New field. | |
855 | (Archive::nested_archives_): New field. | |
856 | (Archive::options_): New field. | |
857 | (Archive::dirpath_): New field. | |
858 | (Archive::task_): New field. | |
859 | * readsyms.cc (Read_symbols::do_read_symbols): Add check | |
860 | for thin archives. Pass additional parameters to | |
861 | Archive::Archive. Unlock the archive file after calling | |
862 | Archive::setup. | |
863 | ||
479f6503 ILT |
864 | 2008-03-29 Ian Lance Taylor <[email protected]> |
865 | ||
686c8caf ILT |
866 | * symtab.cc (Symbol_table::do_define_as_constant): Don't force a |
867 | version symbol to be local. | |
868 | * testsuite/ver_test_4.sh: New file. | |
869 | * testsuite/Makefile.am (check_SCRIPTS): Add ver_test_4.sh. | |
870 | (check_DATA): Add ver_test_4.syms. | |
871 | (ver_test_4.syms): New target. | |
872 | * testsuite/Makefile.in: Rebuild. | |
873 | ||
ab794b6b ILT |
874 | * output.cc |
875 | (Output_section::Input_section_sort_entry::has_priority): New | |
876 | function. | |
877 | (Output_section::Input_section_sort_entry::match_file_name): New | |
878 | function. | |
879 | (Output_section::Input_section_sort_entry::match_section_name): | |
880 | Remove. | |
881 | (Output_section::Input_section_sort_entry::match_section_name_prefix): | |
882 | Remove. | |
883 | (Output_section::Input_section_sort_entry::match_section_file): | |
884 | Remove. | |
885 | (Output_section::Input_section_sort_compare::operator()): Rewrite | |
886 | using new Input_section_sort_entry functions. Sort crtbegin and | |
887 | crtend first. Sort sections with no priority before sections with | |
888 | a priority. | |
889 | * testsuite/initpri1.c (d3): Check j != 4. | |
890 | (cd5): New constructor/destructor function. | |
891 | (main): Check j != 2. | |
892 | ||
479f6503 ILT |
893 | * symtab.cc (Symbol_table::add_from_object): If we don't use the |
894 | new symbol when resolving, don't call set_is_default. | |
895 | * testsuite/ver_test_7.cc: New file. | |
896 | * testsuite/ver_test_7.sh: New file. | |
897 | * testsuite/Makefile.am (ver_test_7.so): New target. | |
898 | (ver_test_7.o): New target. | |
899 | (check_SCRIPTS): Add ver_test_7.sh. | |
900 | (check_DATA): Add ver_test_7.syms. | |
901 | (ver_test_7.syms): New target. | |
902 | ||
2fd32231 ILT |
903 | 2008-03-28 Ian Lance Taylor <[email protected]> |
904 | ||
905 | * layout.cc (Layout::layout): If we see an input section with a | |
906 | name that needs sorting, set the must_sort flag for the output | |
907 | section. | |
908 | (Layout::make_output_section): If the name of the output section | |
909 | indicates that it might require sorting, set the may_sort flag. | |
910 | * output.h (Output_section::may_sort_attached_input_sections): New | |
911 | function. | |
912 | (Output_section::set_may_sort_attached_input_sections): New | |
913 | function. | |
914 | (Output_section::must_sort_attached_input_sections): New | |
915 | function. | |
916 | (Output_section::set_must_sort_attached_input_sections): New | |
917 | function. | |
918 | (class Output_section): Declare Input_section_sort_entry. Define | |
919 | Input_section_sort_compare. Declare | |
920 | sort_attached_input_sections. Add new fields: | |
921 | may_sort_attached_input_sections_, | |
922 | must_sort_attached_input_sections_, | |
923 | attached_input_sections_are_sorted_. | |
924 | * output.cc (Output_section::Output_section): Initialize new | |
925 | fields. | |
926 | (Output_section::add_input_section): Add an entry to | |
927 | input_sections_ if may_sort or must_sort are true. | |
928 | (Output_section::set_final_data_size): Call | |
929 | sort_attached_input_sections if necessary. | |
930 | (Output_section::Input_section_sort_entry): Define new class. | |
931 | (Output_section::Input_section_sort_compare::operator()): New | |
932 | function. | |
933 | (Output_section::sort_attached_input_sections): New function. | |
934 | * configure.ac: Check whether the compiler supports constructor | |
935 | priorities. Define a CONSTRUCTOR_PRIORITY automake conditional. | |
936 | * testsuite/initpri1.c: New file. | |
937 | * testsuite/Makefile.am (check_PROGRAMS): Add initpri1 if | |
938 | CONSTRUCTOR_PRIORITY. | |
939 | (initpri1_SOURCES, initpri1_DEPENDENCIES): New variables. | |
940 | (initpri1_LDFLAGS): New variable. | |
941 | * configure, Makefile.in, testsuite/Makefile.in: Rebuild. | |
942 | ||
18e6b24e ILT |
943 | 2008-03-27 Ian Lance Taylor <[email protected]> |
944 | ||
49bdd526 ILT |
945 | * common.cc (Sort_commons::operator): Correct sorting algorithm. |
946 | * testsuite/common_test_1.c: New file. | |
947 | * testsuite/Makefile.am (check_PROGRAMS): Add common_test_1. | |
948 | (common_test_1_SOURCES): New variable. | |
949 | (common_test_1_DEPENDENCIES): New variable. | |
950 | (common_test_1_LDFLAGS): New variable. | |
951 | ||
18e6b24e ILT |
952 | * symtab.cc (Symbol_table::add_from_object): Handle saw_undefined_ |
953 | and commons_ correctly when NAME/VERSION does not override | |
954 | NAME/NULL. | |
955 | * testsuite/ver_test_6.c: New file. | |
956 | * testsuite/Makefile.am (check_PROGRAMS): Add ver_test_6 | |
957 | (ver_test_6_SOURCES, ver_test_6_DEPENDENCIES): New variables. | |
958 | (ver_test_6_LDFLAGS, ver_test_6_LDADD): New variables. | |
959 | ||
04bf7072 ILT |
960 | 2008-03-26 Ian Lance Taylor <[email protected]> |
961 | ||
5871526f ILT |
962 | * symtab.cc (Symbol_table::add_from_relobj): Don't set the version |
963 | of an undefined symbol from a version script. | |
964 | * testsuite/Makefile.am (ver_test_5.so): New target. | |
965 | (ver_test_5.o): New target. | |
966 | (check_SCRIPTS): Add ver_test_5.sh. | |
967 | (check_DATA): Add ver_test_5.syms. | |
968 | (ver_test_5.syms): New target. | |
969 | * testsuite/ver_test_5.cc: New file. | |
970 | * testsuite/ver_test_5.script: New file. | |
971 | * testsuite/ver_test_5.sh: New file. | |
972 | * Makefile.in, testsuite/Makefile.in: Rebuild. | |
973 | ||
04bf7072 ILT |
974 | PR gold/5986 |
975 | Fix problems building gold with gcc 4.3.0. | |
976 | * gold.h (TEMPLATE_ATTRIBUTE_PRINTF_4): Define. | |
977 | (gold_error_at_location, gold_warning_at_location): Use it. | |
978 | * configure.ac: Check whether we can compile and use a template | |
979 | function with a printf attribute. | |
980 | * x86_64.cc (Target_x86_64::do_code_fill): Swap out a 32-bit value | |
981 | when jumping over bytes. | |
982 | * object.cc: Instantiate Object::read_section_data. | |
983 | * debug.h: Include <cstring> | |
984 | * dwarf_reader.cc: Include <algorithm> | |
985 | * main.cc: Include <cstring>. | |
986 | * options.cc: Include <cstring>. | |
987 | * output.cc: Include <cstring>. | |
988 | * script.cc: Include <cstring>. | |
989 | * script.h: Include <string>. | |
990 | * symtab.cc: Include <cstring> and <algorithm>. | |
991 | * target-select.cc: Include <cstring>. | |
992 | * version.cc: Include <string>. | |
993 | * testsuite/testmain.cc: Include <cstdlib>. | |
994 | * configure, config.in: Rebuild. | |
995 | ||
874c5b28 ILT |
996 | 2008-03-25 Ian Lance Taylor <[email protected]> |
997 | ||
819d6c3a ILT |
998 | * options.cc: Include "../bfd/bfdver.h". |
999 | (options::help): Print bug reporting address. | |
1000 | ||
f4b2c6f5 ILT |
1001 | * version.cc (print_version): Adjust output for current value of |
1002 | BFD_VERSION_STRING. | |
1003 | ||
1004 | * NEWS: New file. | |
1005 | ||
e96caa79 ILT |
1006 | * options.cc (options::help): Print list of supported targets. |
1007 | * target-select.h: Include <vector>. | |
1008 | (class Target_selector): Make machine_, size_, and is_big_endian_ | |
1009 | fields const. Add bfd_name_ and instantiated_target_ fields. | |
1010 | (Target_selector::Target_selector): Add bfd_name parameter. | |
1011 | (Target_selector::recognize): Make non-virtual, call | |
1012 | do_recognize. | |
1013 | (Target_selector::recognize_by_name): Make non-virtual, call | |
1014 | do_recognize_by_name. | |
1015 | (Target_selector::supported_names): New function. | |
1016 | (Target_selector::bfd_name): New function. | |
1017 | (Target_selector::do_instantiate_target): New pure virtual | |
1018 | function. | |
1019 | (Target_selector::do_recognize): New virtual function. | |
1020 | (Target_selector::do_recognize_by_name): New virtual function. | |
1021 | (Target_selector::instantiate_target): New private function. | |
1022 | (supported_target_names): Declare. | |
1023 | * target-select.cc (Target_selector::Target_selector): Update for | |
1024 | new parameter and fields. | |
1025 | (select_target_by_name): Check that the name matches before | |
1026 | calling recognize_by_name. | |
1027 | (supported_target_names): New function. | |
1028 | * i386.cc (class Target_selector_i386): Update Target_selector | |
1029 | constructor call. Remove recognize and recognize_by_name. Add | |
1030 | do_instantiate_target. | |
1031 | * x86_64.cc (class Target_selector_x86_64): Likewise. | |
1032 | * testsuite/testfile.cc (class Target_selector_test): Update for | |
1033 | changes to Target_selector. | |
1034 | ||
874c5b28 ILT |
1035 | * README: Rewrite, with some notes on unsupported features. |
1036 | ||
0a65a3a7 CC |
1037 | 2008-03-24 Cary Coutant <[email protected]> |
1038 | ||
1039 | * i386.cc (Target_i386::Got_type): New enum declaration. | |
1040 | (Target_i386::Scan::local): Updated callers of Output_data_got | |
1041 | member functions. | |
1042 | (Target_i386::Scan::global): Likewise. | |
1043 | (Target_i386::Relocate::relocate): Likewise. | |
1044 | (Target_i386::Relocate::relocate_tls): Likewise. | |
1045 | * object.h (Got_offset_list): New class. | |
1046 | (Sized_relobj::local_has_got_offset): Added got_type parameter. | |
1047 | (Sized_relobj::local_got_offset): Likewise. | |
1048 | (Sized_relobj::set_local_got_offset): Likewise. | |
1049 | (Sized_relobj::local_has_tls_got_offset): Removed. | |
1050 | (Sized_relobj::local_tls_got_offset): Removed. | |
1051 | (Sized_relobj::set_local_tls_got_offset): Removed. | |
1052 | (Sized_relobj::Local_got_offsets): Changed to store a list of offsets. | |
1053 | * output.cc (Output_data_got::add_global): Added got_type parameter. | |
1054 | (Output_data_got::add_global_with_rel): Likewise. | |
1055 | (Output_data_got::add_global_with_rela): Likewise. | |
1056 | (Output_data_got::add_global_pair_with_rel): New function. | |
1057 | (Output_data_got::add_global_pair_with_rela): New function. | |
1058 | (Output_data_got::add_local): Added got_type parameter. | |
1059 | (Output_data_got::add_local_with_rel): Likewise. | |
1060 | (Output_data_got::add_local_with_rela): Likewise. | |
1061 | (Output_data_got::add_local_pair_with_rel): New function. | |
1062 | (Output_data_got::add_local_pair_with_rela): New function. | |
1063 | (Output_data_got::add_global_tls): Removed. | |
1064 | (Output_data_got::add_global_tls_with_rel): Removed. | |
1065 | (Output_data_got::add_global_tls_with_rela): Removed. | |
1066 | (Output_data_got::add_local_tls): Removed. | |
1067 | (Output_data_got::add_local_tls_with_rel): Removed. | |
1068 | (Output_data_got::add_local_tls_with_rela): Removed. | |
1069 | * output.h (Output_data_got::add_global): Added got_type parameter. | |
1070 | (Output_data_got::add_global_with_rel): Likewise. | |
1071 | (Output_data_got::add_global_with_rela): Likewise. | |
1072 | (Output_data_got::add_global_pair_with_rel): New function. | |
1073 | (Output_data_got::add_global_pair_with_rela): New function. | |
1074 | (Output_data_got::add_local): Added got_type parameter. | |
1075 | (Output_data_got::add_local_with_rel): Likewise. | |
1076 | (Output_data_got::add_local_with_rela): Likewise. | |
1077 | (Output_data_got::add_local_pair_with_rel): New function. | |
1078 | (Output_data_got::add_local_pair_with_rela): New function. | |
1079 | (Output_data_got::add_global_tls): Removed. | |
1080 | (Output_data_got::add_global_tls_with_rel): Removed. | |
1081 | (Output_data_got::add_global_tls_with_rela): Removed. | |
1082 | (Output_data_got::add_local_tls): Removed. | |
1083 | (Output_data_got::add_local_tls_with_rel): Removed. | |
1084 | (Output_data_got::add_local_tls_with_rela): Removed. | |
1085 | * resolve.cc (Symbol::override_base_with_special): Removed | |
1086 | reference to has_got_offset_ field. | |
1087 | * symtab.cc (Symbol::init_fields): Replaced initialization | |
1088 | of got_offset_ with got_offsets_. Removed initialization | |
1089 | of has_got_offset_ | |
53fcba31 | 1090 | * symtab.h (Symbol::has_got_offset): Aded got_type parameter. |
0a65a3a7 CC |
1091 | (Symbol::got_offset): Likewise. |
1092 | (Symbol::set_got_offset): Likewise. | |
1093 | (Symbol::has_tls_got_offset): Removed. | |
1094 | (Symbol::tls_got_offset): Removed. | |
1095 | (Symbol::set_tls_got_offset): Removed. | |
1096 | (Symbol::got_offset_): Removed. | |
1097 | (Symbol::tls_mod_got_offset_): Removed. | |
1098 | (Symbol::tls_pair_got_offset_): Removed. | |
1099 | (Symbol::got_offsets_): New field. | |
1100 | (Symbol::has_got_offset): Removed. | |
1101 | (Symbol::has_tls_mod_got_offset): Removed. | |
1102 | (Symbol::has_tls_pair_got_offset): Removed. | |
1103 | * x86_64.cc (Target_x86_64::Got_type): New enum declaration. | |
1104 | (Target_x86_64::Scan::local): Updated callers of Output_data_got | |
1105 | member functions. | |
1106 | (Target_x86_64::Scan::global): Likewise. | |
1107 | (Target_x86_64::Relocate::relocate): Likewise. | |
1108 | (Target_x86_64::Relocate::relocate_tls): Likewise. | |
1109 | ||
bd52eafb BE |
1110 | 2008-03-25 Ben Elliston <[email protected]> |
1111 | ||
1112 | * yyscript.y: Fix spelling error in comment. | |
1113 | ||
8b105e34 ILT |
1114 | 2008-03-24 Ian Lance Taylor <[email protected]> |
1115 | ||
8ed814a9 ILT |
1116 | * options.h (class General_options): Define build_id option. |
1117 | * layout.h (class Layout): Declare write_build_id, create_note, | |
1118 | create_build_id. Add build_id_note_ member. | |
1119 | * layout.cc: Include <cerrno>, <fcntl.h>, <unistd.h>, | |
1120 | "libiberty.h", "md5.h", "sha1.h". | |
1121 | (Layout::Layout): Initialize eh_frame_data_, | |
1122 | eh_frame_hdr_section_, and build_id_note_. | |
1123 | (Layout::finalize): Call create_build_id. | |
1124 | (Layout::create_note): New function, broken out of | |
1125 | Layout::create_gold_note. | |
1126 | (Layout::create_gold_note): Call create_note. | |
1127 | (Layout::create_build_id): New function. | |
1128 | (Layout::write_build_id): New function. | |
1129 | (Close_task_runner::run): Call write_build_id. | |
1130 | ||
8b105e34 ILT |
1131 | * x86_64.cc: Correct license to GPLv3. |
1132 | ||
086a1841 ILT |
1133 | 2008-03-23 Ian Lance Taylor <[email protected]> |
1134 | ||
1135 | * options.cc: Include "demangle.h". | |
1136 | (parse_optional_string): New function. | |
1137 | (parse_long_option): Handle takes_optional_argument. | |
1138 | (parse_short_option): Update dash_z initializer. Handle | |
1139 | takes_optional_argument. | |
1140 | (General_options::General_options): Initialize do_demangle_. | |
1141 | (General_options::finalize): Set do_demangle_. Handle demangling | |
1142 | style. | |
1143 | * options.h (parse_optional_string): Declare. | |
1144 | (struct One_option): Add optional_arg field. Update constructor. | |
1145 | Update call constructor calls. Add takes_optional_argument | |
1146 | function. | |
1147 | (DEFINE_var): Add optional_arg__ parameter. Change all callers. | |
1148 | (DEFINE_optional_string): Define. | |
1149 | (General_options::demangle): Change from DEFINE_bool to | |
1150 | DEFINE_optional_string. | |
1151 | (General_options::no_demangle): New function. | |
1152 | (General_options::do_demangle): New function. | |
1153 | (General_options::set_do_demangle): New function. | |
1154 | (General_options::execstack_status_): Move definition to end of | |
1155 | class definition. | |
1156 | (General_options::static_): Likewise. | |
1157 | (General_options::do_demangle_): New field. | |
1158 | * object.cc (big_endian>::get_symbol_location_info): Call | |
1159 | Options::do_demangle, not Options::demangle. | |
1160 | * symtab.cc (demangle): Likewise. | |
1161 | ||
cbb93e63 ILT |
1162 | 2008-03-22 Ian Lance Taylor <[email protected]> |
1163 | ||
1164 | * gold.h: Include <cstddef> and <sys/types.h> | |
1165 | * options.h: Include <cstring>. | |
1166 | ||
ec531623 ILT |
1167 | 2008-03-21 Ian Lance Taylor <[email protected]> |
1168 | ||
1169 | * Added source code to GNU binutils. | |
1170 |