]>
Commit | Line | Data |
---|---|---|
1c74fab0 ILT |
1 | 2009-12-30 Ian Lance Taylor <[email protected]> |
2 | ||
3 | PR 10916 | |
4 | * symtab.cc (Symbol_table::add_from_relobj): When not exporting | |
5 | symbols from this object, don't change the visibility of an | |
6 | undefined symbol. | |
7 | * testsuite/exclude_libs_test_1.c (lib1_ref): New function. | |
8 | ||
6affe781 ILT |
9 | 2009-12-30 Ian Lance Taylor <[email protected]> |
10 | ||
11 | PR 10861 | |
12 | * script.h (class Version_script_info): Define Language enum. | |
13 | Update declarations. Define Glob, Exact, and Lookup types. Add | |
14 | new fields globals_, locals_, and is_finalized_. | |
15 | * script.cc: Various formatting fixes. | |
16 | (class Parser_closure): Change language_stack_ from a vector of | |
17 | std::string to one of Version_script_info::Language. Adjust all | |
18 | uses accordingly. | |
19 | (class Lazy_demangler): Remove. | |
20 | (struct Version_expression): Change language from std::string to | |
21 | Version_script_info::Language. | |
22 | (Version_script_info::Version_script_info): New function. | |
23 | (Version_script_info::~Version_script_info): Don't call clear. | |
24 | (Version_script_info::finalize): New function. | |
25 | (Version_script_info::build_lookup_tables): New function. | |
26 | (Version_script_info::build_expression_list_lookup): New | |
27 | function. | |
28 | (Version_script_info::get_symbol_version_helper): Rewrite to use | |
29 | lookup tables. | |
30 | (Version_script_info::print_expression_list): Adjust to use | |
31 | Version_script_info::Language. | |
32 | (script_push_lex_into_version_mode): Check that the version script | |
33 | has not been finalized. | |
34 | (version_script_push_lang): Change language string to | |
35 | Version_script_info::Language. | |
36 | * options.cc (Command_line::version_script): New function. | |
37 | * options.h (class General_options): Add finalize_dynamic_list | |
38 | function. Change version_script from declaration to definition. | |
39 | * testsuite/ver_test_4.script: Remove duplicate def of t2_2. | |
40 | * testsuite/version_script.map: Remove duplicate def of foo. | |
41 | * testsuite/Makefile.am (ver_matching_def.so): Depend upon | |
42 | version_script.map. | |
43 | * testsuite/Makefile.in: Rebuild. | |
44 | ||
818bf354 ILT |
45 | 2009-12-30 Ian Lance Taylor <[email protected]> |
46 | ||
47 | PR 10843 | |
48 | * target-reloc.h (relocate_for_relocatable): When copying a reloc, | |
49 | if the input symbol index is 0, make the output symbol index 0. | |
50 | ||
ebcc8304 ILT |
51 | 2009-12-30 Ian Lance Taylor <[email protected]> |
52 | ||
53 | PR 10670 | |
54 | * options.h (class General_options): Add -x/--discard-all. | |
55 | * object.cc (Sized_relobj::do_count_local_symbols): Handle | |
56 | --discard-all. If the local symbol needs a dynamic entry, check | |
57 | that before handling --discard-locals. | |
58 | ||
176fe33f ILT |
59 | 2009-12-30 Ian Lance Taylor <[email protected]> |
60 | ||
bb321bb1 ILT |
61 | PR 10450 |
62 | * output.cc (Output_segment::Output_segment): If PT_TLS, set the | |
63 | flags to PF_R. | |
64 | (Output_segment::add_output_section): Don't change the flags if | |
65 | the type is PT_TLS. | |
66 | ||
176fe33f ILT |
67 | PR 10450 |
68 | * dynobj.cc (Dynobj::create_gnu_hash_table): Add symbols to the | |
69 | GNU hash table if they need a dynamic value. Otherwise, don't add | |
70 | them if they are defined in a dynamic object or are forced local. | |
71 | ||
e8cd95c7 ILT |
72 | 2009-12-29 Ian Lance Taylor <[email protected]> |
73 | ||
1b81fb71 ILT |
74 | PR 10450 |
75 | * layout.cc (Layout::create_dynamic_symtab): Only set entsize of | |
76 | .gnu.hash table for a 32-bit target. | |
77 | ||
8d6d383d ILT |
78 | PR 10450 |
79 | * symtab.h (Symbol::needs_dynsym_entry): A symbol in both a | |
80 | regular and a dynamic object only needs a dynamic symbol table | |
81 | entry if it is externally visible. | |
82 | ||
e785ec03 ILT |
83 | PR 10450 |
84 | * i386.cc (class Target_i386): Initialize global_offset_table_ in | |
85 | constructor. Add global_offset_table_ field. | |
86 | (Target_i386::got_section): Set global_offset_table_. | |
87 | (Target_i386::do_finalize_sections): Set global_offset_table_ | |
88 | size. | |
89 | * x86_64.cc (class Target_x86_64): Initialize global_offset_table_ | |
90 | in constructor. Add global_offset_table_ field. | |
91 | (Target_x86_64::got_section): Set global_offset_table_. | |
92 | (Target_x86_64::do_finalize_sections): Set global_offset_table_ | |
93 | size. | |
94 | ||
1a2dff53 ILT |
95 | * layout.cc (Layout::Layout): Initialize increase_relro_. |
96 | (Layout::get_output_section): Add is_relro, is_last_relro, and | |
97 | is_first_non_relro parameters. Change all callers. | |
98 | (Layout::choose_output_section): Likewise. | |
99 | (Layout::add_output_section_data): Likewise. | |
100 | (Layout::make_output_section): Likewise. | |
101 | (Layout::set_segment_offsets): Clear increase_relro when using a | |
102 | linker script. | |
103 | * layout.h (class Layout): Add increase_relro method. Add | |
104 | increase_relro_ field. Update declarations. | |
105 | * output.cc (Output_section::Output_section): Initialize | |
106 | is_last_relro_ and is_first_non_relro_. | |
107 | (Output_segment::add_output_section): Group relro sections is | |
108 | do_sort is true. Handle is_last_relro and is_first_non_relro. | |
109 | (Output_segment::maximum_alignment): Remove relro handling. | |
110 | (Output_segment::set_section_addresses): Add increase_relro | |
111 | parameter. Change all callers. Add initial alignment to align | |
112 | relro sections on separate page. Remove old relro handling. | |
113 | (Output_segment::set_section_list_addresses): Remove in_relro | |
114 | parameter. Change all callers. | |
115 | (Output_segment::set_offset): Add increase parameter. Change all | |
116 | callers. Remove old relro handling. | |
117 | * output.h (class Output_section): Add new methods: is_last_relro, | |
118 | set_is_last_relro, is_first_non_relro, set_is_first_non_relro. | |
119 | Add is_last_relro_ and is_first_non_relro_ fields. | |
120 | * i386.cc (Target_i386::got_section): Don't call set_is_relro. | |
121 | Create separate .got.plt section. Call increase_relro. | |
122 | * x86_64.cc (Target_x86_64::got_section): Likewise. | |
123 | * testsuite/relro_script_test.t: Add .got.plt. | |
124 | ||
f0ba79e2 ILT |
125 | PR 10450 |
126 | * layout.cc (Layout::Layout): Initialize dynamic_symbol_ field. | |
127 | (Layout::create_initial_dynamic_sections): Set dynamic_symbol_. | |
128 | (Layout::finalize): Call set_dynamic_symbol_size. | |
129 | (Layout::set_dynamic_symbol_size): New function. | |
130 | * layout.h (class Layout): Add dynamic_symbol_ field. Declare | |
131 | set_dynamic_symbol_size. | |
132 | ||
e8cd95c7 ILT |
133 | PR 10450 |
134 | * output.h (class Output_section): Add is_entsize_zero_ field. | |
135 | * output.cc (Output_section::Output_section): Initialize | |
136 | is_entsize_zero_. | |
137 | (Output_section::set_entsize): If two different entsizes are | |
138 | requested, force it to zero. | |
139 | (Output_section::add_input_section): Set flags for .debug_str | |
140 | before updating section flags. Set entsize. | |
141 | (Output_section::update_flags_for_input_section): Set SHF_MERGE | |
142 | and SHF_STRING if all input sections have those flags. | |
143 | ||
3e1b9a8a RÁE |
144 | 2009-12-29 Rafael Espindola <[email protected]> |
145 | ||
146 | * main.cc (main): Fix the sys time reporting. | |
e8cd95c7 ILT |
147 | * workqueue.cc (Workqueue::find_and_run_task): Fix the sys time |
148 | reporting. | |
3e1b9a8a | 149 | |
3dcad376 ST |
150 | 2009-12-29 Sriraman Tallam <[email protected]> |
151 | ||
152 | * options.cc (General_options::parse_version): Allow -v to exit | |
153 | without an error if there is nothing to link. | |
154 | ||
084e2665 ILT |
155 | 2009-12-29 Ian Lance Taylor <[email protected]> |
156 | ||
157 | * configure.ac: Set the MCMODEL_MEDIUM conditional to false if | |
158 | using a version of gcc before 4.1. | |
159 | * configure: Rebuild. | |
160 | ||
250acde3 CD |
161 | 2009-12-28 Chris Demetriou <[email protected]> |
162 | ||
163 | * attributes.cc (Output_attributes_section_data::do_write): Use | |
164 | std::vector::front rather than std::vector::data. | |
165 | ||
99fff23b ILT |
166 | 2009-12-28 Ian Lance Taylor <[email protected]> |
167 | ||
168 | * symtab.h (class Symbol_table): Add enum Defined. | |
169 | * resolve.cc (Symbol_table::should_override): Add defined | |
170 | parameter. Change all callers. Test whether object is NULL | |
171 | before calling a method on it. | |
172 | (Symbol_table::report_resolve_problem): Add defined parameter. | |
173 | Change all callers. | |
174 | (Symbol_table::should_override_with_special): Likewise. | |
175 | * symtab.cc (Symbol_table::define_in_output_data): Add defined | |
176 | parameter. Change all callers. | |
177 | (Symbol_table::do_define_in_output_data): Likewise. | |
178 | (Symbol_table::define_in_output_segment): Likewise. | |
179 | (Symbol_table::do_define_in_output_segment): Likewise. | |
180 | (Symbol_table::define_as_constant): Likewise. | |
181 | (Symbol_table::do_define_as_constant): Likewise. | |
182 | * script.h (class Symbol_assignment): Add is_defsym parameter to | |
183 | constructor; change all callers. | |
184 | * script.cc (Script_options::add_symbol_assignment): Add is_defsym | |
185 | parameter. Change all callers. Add is_defsym_ field. | |
186 | (class Parser_closure): Add parsing_defsym parameter to | |
187 | constructor; change all callers. Add parsing_defsym accessor | |
188 | function. Add parsing_defsym_ field. | |
189 | ||
556bd683 ILT |
190 | 2009-12-28 Ian Lance Taylor <[email protected]> |
191 | ||
192 | * gold.cc (queue_middle_tasks): Fix formatting. | |
fa618ee4 | 193 | * object.cc (Relobj::is_section_name_included): Likewise. |
556bd683 | 194 | |
1782c879 ILT |
195 | 2009-12-23 Ian Lance Taylor <[email protected]> |
196 | ||
197 | * i386.cc (Target_i386::do_calls_non_split): Recognize | |
198 | -fsplit-stack prologue for a function with a static chain. | |
cbc999b9 ILT |
199 | * x86_64.cc (Target_x86_64::do_calls_non_split): Recognize |
200 | -fsplit-stack prologue when using %r11. | |
1782c879 | 201 | |
329ca2b1 ST |
202 | 2009-12-21 Sriraman Tallam <[email protected]> |
203 | ||
204 | * options.cc (General_options::parse_version): Make -v continue and do | |
205 | the link like GNU ld does. | |
206 | ||
d675ff46 RÁE |
207 | 2009-12-17 Rafael Avila de Espindola <[email protected]> |
208 | ||
209 | * Makefile.am (CCFILES): Add timer.cc. | |
210 | (HFILES): Add timer.h. | |
211 | * configure.ac: Check for sysconf and times. | |
212 | * main.cc: include timer.h. | |
213 | (main): Use Timer instead of get_run_time. | |
214 | * timer.cc: New. | |
215 | * timer.h: New. | |
216 | * workqueue.cc: include timer.h. | |
217 | (Workqueue::find_and_run_task): | |
218 | Report user, sys and wall time. | |
219 | * Makefile.in: Regenerate. | |
220 | * config.in: Regenerate. | |
221 | * configure: Regenerate. | |
222 | ||
d6344fb5 DK |
223 | 2009-12-16 Doug Kwan <[email protected]> |
224 | ||
225 | * arm.cc (Arm_relobj::scan_sections_for_stubs): Exclude ICF-eliminated | |
226 | sections. | |
227 | * object.cc (Sized_relobj::do_finalize_local_symbols): Handle | |
228 | relaxed input sections. | |
229 | * output.cc (Output_section::find_relaxed_input_section): Change | |
230 | return type to Output_relaxed_input_section pointer. Adjust code | |
231 | for new type of relaxed_input_section_map_. | |
232 | * output.h (Output_section::find_relaxed_input_section): Change | |
233 | return type to Output_relaxed_input_section pointer. | |
234 | (Output_section::Output_relaxed_input_section_by_input_section_map): | |
235 | New type. | |
236 | (Output_section::relaxed_input_section_map_): Change type to | |
237 | Output_section::Output_relaxed_input_section_by_input_section_map. | |
238 | * symtab.cc (Symbol_table::compute_final_value): Handle relaxed | |
239 | input section. | |
240 | ||
0e0d5469 ILT |
241 | 2009-12-15 Ian Lance Taylor <[email protected]> |
242 | ||
243 | * layout.cc (Layout::create_shstrtab): Only write out after input | |
244 | sections if we are compressing debug sections. | |
245 | ||
0649a889 ILT |
246 | 2009-12-15 Ian Lance Taylor <[email protected]> |
247 | ||
248 | * archive.cc (Archive::add_symbols): Only look up a symbol without | |
249 | a version if there is, in fact, a version. | |
250 | ||
2ea97941 ILT |
251 | 2009-12-14 Ian Lance Taylor <[email protected]> |
252 | ||
253 | Revert -Wshadow changes, all changes from: | |
254 | 2009-12-11 Doug Kwan <[email protected]> | |
255 | 2009-12-11 Nick Clifton <[email protected]> | |
256 | * configure.ac: Remove -Wshadow when setting WARN_CXXFLAGS. | |
257 | ||
b0eec2cc DK |
258 | 2009-12-11 Doug Kwan <[email protected]> |
259 | ||
260 | * arm.cc (Target_arm::do_finalize_sections): Fix build breakage | |
261 | due to -Wshadow. | |
262 | * attributes.cc (Object_attribute::size): Ditto. | |
263 | (Attributes_section_data::size): Ditto. | |
264 | (Attributes_section_data::Attributes_section_data): Ditto. | |
265 | (Output_attributes_section_data::do_write): Ditto. | |
266 | * attributes.h (Object_attribute::set_type): Ditto. | |
267 | * testsuite/tls_test_main.cc (safe_lock, safe_unlock): Ditto. | |
268 | ||
91d6fa6a NC |
269 | 2009-12-11 Nick Clifton <[email protected]> |
270 | ||
271 | * archive.cc: Fix shadowed variable warnings. | |
272 | * arm.cc: Likewise. | |
273 | * compressed_output.cc: Likewise. | |
274 | * compressed_output.h: Likewise. | |
275 | * configure: Likewise. | |
276 | * dwarf_reader.cc: Likewise. | |
277 | * dynobj.cc: Likewise. | |
278 | * dynobj.h: Likewise. | |
279 | * ehframe.cc: Likewise. | |
280 | * ehframe.h: Likewise. | |
281 | * errors.cc: Likewise. | |
282 | * expression.cc: Likewise. | |
283 | * fileread.cc: Likewise. | |
284 | * fileread.h: Likewise. | |
285 | * freebsd.h: Likewise. | |
286 | * i386.cc: Likewise. | |
287 | * icf.cc: Likewise. | |
288 | * incremental.h: Likewise. | |
289 | * layout.cc: Likewise. | |
290 | * layout.h: Likewise. | |
291 | * mapfile.cc: Likewise. | |
292 | * merge.cc: Likewise. | |
293 | * merge.h: Likewise. | |
294 | * object.cc: Likewise. | |
295 | * object.h: Likewise. | |
296 | * options.h: Likewise. | |
297 | * output.cc: Likewise. | |
298 | * output.h: Likewise. | |
299 | * parameters.cc: Likewise. | |
300 | * plugin.cc: Likewise. | |
301 | * powerpc.cc: Likewise. | |
302 | * reduced_debug_output.cc: Likewise. | |
303 | * reduced_debug_output.h: Likewise. | |
304 | * reloc.cc: Likewise. | |
305 | * reloc.h: Likewise. | |
306 | * resolve.cc: Likewise. | |
307 | * script-sections.cc: Likewise. | |
308 | * script.cc: Likewise. | |
309 | * script.h: Likewise. | |
310 | * sparc.cc: Likewise. | |
311 | * symtab.cc: Likewise. | |
312 | * symtab.h: Likewise. | |
313 | * target-select.cc: Likewise. | |
314 | * target-select.h: Likewise. | |
315 | * token.h: Likewise. | |
316 | * workqueue.cc: Likewise. | |
317 | * workqueue.h: Likewise. | |
318 | * x86_64.cc: Likewise. | |
319 | ||
a0351a69 DK |
320 | 2009-12-10 Doug Kwan <[email protected]> |
321 | ||
322 | * arm.cc (attributes.h): New include. | |
323 | (Arm_relobj::Arm_relobj): Initialize attributes_section_data_. | |
324 | (Arm_relobj::~Arm_relobj): Delete object pointed by | |
325 | attributes_section_data_. | |
326 | (Arm_relobj::attributes_section_data): New method definition. | |
327 | (Arm_relobj::attributes_section_data_): New data member declaration. | |
328 | (Arm_dynobj::Arm_dynobj): Initialize attributes_section_data_. | |
329 | (Arm_dynobj::~Arm_dynobj): Delete object pointed by | |
330 | attributes_section_data_. | |
331 | (Arm_dynobj::attributes_section_data): New method definition. | |
332 | (Arm_dynobj::attributes_section_data_): New data member declaration. | |
333 | (Target_arm::Target_arm): Initialize attributes_section_data_. Change | |
334 | initialization value of may_use_blx_ to false. | |
335 | (Target_arm::using_thumb2, Target_arm::using_thumb_only, | |
336 | Target_arm::may_use_arm_nop, Target_arm::may_use_thumb2_nop): Use | |
337 | object attributes to compute results instead of hard-coding. | |
338 | (Target_arm::do_attribute_arg_type, Target_arm::do_attributes_order, | |
339 | Target_arm::get_secondary_compatible_arch, | |
340 | Target_arm::set_secondary_compatible_arch | |
341 | Target_arm::tag_cpu_arch_combine, Target_arm::aeabi_enum_name, | |
342 | Target_arm::tag_cpu_name_value, Target_arm::merge_object_attributes): | |
343 | New method declarations. | |
344 | (Target_arm::get_aeabi_object_attribute): New method definition. | |
345 | (Target_arm::attributes_section_data_): New data member declaration. | |
346 | (read_arm_attributes_section): New template definition. | |
347 | (Arm_relobj::do_read_symbols): Read attributes section if it exists. | |
348 | (Arm_dynobj::do_read_symbols): Ditto. | |
349 | (Target_arm::do_finalize_sections): Merge attributes sections from | |
350 | input. Check for BLX use after attributes section merging. | |
351 | Fix __exidx_start and __exidx_end visibility. Create an | |
352 | .ARM.attributes section if necessary. | |
353 | (Target_arm::get_secondary_compatible_arch, | |
354 | Target_arm::set_secondary_compatible_arch, | |
355 | Target_arm::tag_cpu_arch_combine, Target_arm::aeabi_enum_name, | |
356 | Target_arm::tag_cpu_name_value, Target_arm::merge_object_attributes, | |
357 | Target_arm::do_attribute_arg_type, Target_arm::do_attributes_order): | |
358 | New method definitions. | |
359 | ||
b59befec ILT |
360 | 2009-12-09 Ian Lance Taylor <[email protected]> |
361 | ||
362 | * plugin.cc (Plugin::load): Don't cast from void* to a function | |
363 | pointer. | |
364 | ||
1276bc89 ILT |
365 | 2009-12-09 Ian Lance Taylor <[email protected]> |
366 | ||
367 | * dynobj.cc (Sized_dynobj::do_read_symbols): Clear version | |
368 | information fields. | |
369 | ||
2f2de248 L |
370 | 2009-12-09 H.J. Lu <[email protected]> |
371 | ||
372 | * testsuite/Makefile.am (two_file_shared_1_pic_2_test_DEPENDENCIES): | |
373 | Replace two_file_shared_1.so with two_file_shared_2.so. | |
374 | * testsuite/Makefile.in: Regenerated. | |
375 | ||
4f787271 DK |
376 | 2009-12-08 Doug Kwan <[email protected]> |
377 | ||
378 | * Makefile.am (CCFILES): Add attributes.cc and int_encoding.cc. | |
379 | (HFILES): Add attributes.h and int_encoding.h. | |
380 | * Makefile.in: Regenerate. | |
381 | * dwarf_reader.cc (read_unsigned_LEB_128, read_signed_LEB_128): Move | |
382 | function definitions to int_encoding.cc | |
383 | * dwarf_reader.h (read_unsigned_LEB_128, read_signed_LEB_128): Move | |
384 | prototypes to int_encoding.h | |
385 | * reduced_debug_output.cc (int_encoding.h): New include. | |
386 | (write_unsigned_LEB_128, get_length_as_unsigned_LEB_128): Move | |
387 | function definitions to int_encoding.cc | |
388 | (insert_into_vector, read_from_pointer): Move template definitions to | |
389 | int_encoding.h | |
390 | * attributes.cc: New file. | |
391 | * attributes.h: New file. | |
392 | * int_encoding.cc: New file. | |
393 | * int_encoding.h: New file. | |
394 | ||
20b52f1a RÁE |
395 | 2009-12-07 Rafael Avila de Espindola <[email protected]> |
396 | ||
397 | PR gold/11055 | |
398 | * incremental-dump.cc (dump_incremental_inputs): New. | |
399 | (main): Use dump_incremental_inputs. | |
400 | ||
53d7974c L |
401 | 2009-12-07 H.J. Lu <[email protected]> |
402 | ||
403 | PR gold/10893 | |
404 | * i386.cc (Target_i386::Scan::globa): Use is_func instead of | |
405 | checking elfcpp::STT_FUNC. | |
406 | (Target_i386::Relocate::relocate): Likewise. | |
407 | * x86_64.cc (Target_x86_64::Scan::global): Likewise. | |
408 | ||
409 | * symtab.cc (Symbol_table::sized_write_symbol): Turn IFUNC | |
410 | symbols from shared libraries into normal FUNC symbols. | |
411 | ||
412 | * symtab.h (Symbol): Add is_func and use it. | |
413 | ||
05a352e6 DK |
414 | 2009-12-05 Doug Kwan <[email protected]> |
415 | ||
416 | * arm.cc (Target_arm::arm_info): Initialize new fields | |
417 | attributes_section and attributes_vendor. | |
418 | * i386.cc (Target_i386::i386_info): Same. | |
419 | * object.cc (Sized_relobj::do_layout): Skip attribute section. | |
420 | * gold/powerpc.cc (Target_powerpc::powerpc_info): Initialize new | |
421 | fields attributes_section and attributes_vendor. | |
53d7974c | 422 | * sparc.cc (Target_sparc::sparc_info): Same. |
05a352e6 DK |
423 | * target.h (Target::attributes_section, Target::attributes_vendor, |
424 | Target::is_attributes_section, Target::attribute_arg_type, | |
425 | Target::attributes_order): New method definitions. | |
426 | (Target::Target_info::attributes_section, | |
427 | Target::Target_info::attributes_vendor): New fields. | |
428 | (Target::do_attribute_arg_type, Target::do_attributes_order): New | |
429 | virtual method definitions. | |
430 | * x86_64.cc (Target_x86_64::x86_64_info): Initialize new fields | |
431 | attributes_section and attributes_vendor. | |
432 | * testsuite/testfile.cc (Target_test::test_target_info): Same. | |
433 | ||
f4e5969c DK |
434 | 2009-12-05 Doug Kwan <[email protected]> |
435 | ||
436 | * arm.cc: Update comments about interworking and stub generation. | |
437 | (Target_arm::Relocate::reloc_is_non_pic): Update list of relocations | |
438 | considered as non-PIC. | |
439 | (Arm_relocate_functions::base_abs): Fix formatting. | |
440 | (Arm_relocate_functions::got_prel): Fix comment. Change interface | |
441 | of function to use GOT entry address instead of offset. | |
442 | (Target_arm::Scan::global): Issue an error if a symbol would need a | |
443 | PLT does not get one because it is untyped. Remove code to create | |
444 | dynamic symbols for relative branches. | |
445 | (Target_arm::Relocate::relocate: Use 0 instead of false since function | |
446 | takes unsigned integer instead of boolean. | |
447 | ||
1abce4a6 L |
448 | 2009-12-05 H.J. Lu <[email protected]> |
449 | ||
450 | * testsuite/Makefile.am (constructor_test_LDADD): New. Empty. | |
451 | (two_file_test_LDADD): Likewise. | |
452 | (common_test_1_LDADD): Likewise. | |
453 | (exception_test_LDADD) Likewise. | |
454 | (weak_test_LDADD): Likewise. | |
455 | (many_sections_test_LDADD): Likewise. | |
456 | (initpri1_LDADD): Likewise. | |
457 | (script_test_1_LDADD): Likewise. | |
458 | (script_test_2_LDADD): Likewise. | |
459 | (justsyms_LDADD): Likewise. | |
460 | (binary_test_LDADD): Likewise. | |
461 | (large_LDADD): Likewise. | |
462 | * testsuite/Makefile.in: Regenerated. | |
463 | ||
adcf2816 | 464 | 2009-12-04 H.J. Lu <[email protected]> |
1abce4a6 | 465 | |
adcf2816 L |
466 | * resolve.cc (symbol_to_bits): Treat STB_GNU_UNIQUE as STB_GLOBAL. |
467 | (Symbol_table::override_with_special): Likewise. | |
468 | (Symbol_table::add_from_object): Likewise. | |
469 | ||
28e67f5d RÁE |
470 | 2009-12-04 Rafael Avila de Espindola <[email protected]> |
471 | ||
472 | * incremental.cc (Incremental_inputs::sized_create_inputs_section_data): | |
473 | Don't set the data_offset twice. | |
474 | ||
ae10a101 RÁE |
475 | 2009-12-04 Rafael Avila de Espindola <[email protected]> |
476 | ||
477 | * testsuite/Makefile.in: Regenerate. | |
478 | ||
f59f41f3 DK |
479 | 2009-12-03 Doug Kwan <[email protected]> |
480 | ||
481 | * arm.cc: Remove comment about missing .ARM.exidx section symbols. | |
482 | (Target_arm::do_finalize_sections): Add parameter for symbol table | |
483 | pointer. Add __exidx_start and __exidx_end symbols as appropriate. | |
484 | * i386.cc (Target_i386::do_finalize_sections): Add an additional | |
485 | parameter for symbol table pointer. | |
486 | * layout.cc (Layout::finalize): Call Target::finalize_sections with | |
487 | an additional parameter for a pointer to symbol table. | |
488 | * powerpc.cc (Target_powerpc::do_finalize_sections): Add an additional | |
489 | parameter for a symbol table pointer. | |
490 | * sparc.cc (Target_sparc::do_finalize_sections): Ditto. | |
491 | * target.h (Target::finalize_sections, Target::do_finalize_sections): | |
492 | Ditto. | |
493 | * x86_64.cc (Target_x86_64::do_finalize_sections): Add an additional | |
494 | parameter for a symbol table pointer. | |
495 | ||
ca55d848 RÁE |
496 | 2009-12-03 Rafael Avila de Espindola <[email protected]> |
497 | ||
498 | * incremental.cc (Incremental_inputs_header) | |
499 | (Incremental_inputs_header_write, Incremental_inputs_entry) | |
500 | (Incremental_inputs_entry_write): Move ... | |
501 | * incremental.h (Incremental_inputs_header) | |
502 | (Incremental_inputs_header_write, Incremental_inputs_entry) | |
503 | (Incremental_inputs_entry_write): here. | |
504 | ||
3aec4f9c RÁE |
505 | 2009-12-02 Rafael Avila de Espindola <[email protected]> |
506 | ||
507 | * incremental.cc (make_sized_incremental_binary): Set the target. | |
508 | Error if it is incompatible. | |
509 | * output.h (Output_file): Add filename method. | |
510 | ||
9c0ae74d RÁE |
511 | 2009-12-02 Rafael Avila de Espindola <[email protected]> |
512 | ||
513 | * incremental.cc (Incremental_inputs_entry): Remove unused argument | |
514 | from the get_* methods. | |
515 | ||
a45500ae RÁE |
516 | 2009-12-02 Rafael Avila de Espindola <[email protected]> |
517 | ||
518 | * incremental-dump.cc (main): Check that the offeset of a script is 0. | |
519 | * incremental.cc (Incremental_inputs::sized_create_inputs_section_data): | |
520 | Write 0 for the data_offset of scripts. | |
521 | ||
325e6408 RÁE |
522 | 2009-12-02 Rafael Avila de Espindola <[email protected]> |
523 | ||
524 | * testsuite/Makefile.am: Add the incremental_test.sh test. | |
525 | * testsuite/incremental_test.sh: New. | |
526 | * testsuite/incremental_test_1.c: New. | |
527 | * testsuite/incremental_test_2.c: New. | |
528 | ||
954c3e2e RÁE |
529 | 2009-12-01 Rafael Avila de Espindola <[email protected]> |
530 | ||
531 | * incremental-dump.cc (main): Fix typos. | |
532 | ||
f8086623 RÁE |
533 | 2009-11-27 Rafael Avila de Espindola <[email protected]> |
534 | ||
535 | PR gold/11025 | |
536 | * incremental-dump.cc (main): Use llu to print 64 bit values. | |
537 | ||
3b0dd6ac L |
538 | 2009-11-26 Per Øyvind Karlsen <[email protected]> |
539 | H.J. Lu <[email protected]> | |
540 | ||
541 | * Makefile.am (incremental_dump_DEPENDENCIES): Add $(THREADSLIB) | |
542 | $(LIBDL). | |
543 | (incremental_dump_LDADD): Likewise. | |
544 | * Makefile.in: Regenerated. | |
545 | ||
a6d1ef57 DK |
546 | 2009-11-25 Doug Kwan <[email protected]> |
547 | ||
548 | Revert: | |
549 | ||
550 | 2009-11-25 Doug Kwan <[email protected]> | |
551 | ||
552 | * arm.cc (Target_arm::Target_arm): Move method definition | |
553 | outside of class definition. Add code to handle | |
554 | --target1-rel, --target1-abs and --target2= options. | |
555 | (Target_arm::get_reloc_reloc_type): Change method to be | |
556 | non-static and const. | |
557 | (Target_arm::target1_is_rel_, Target_arm::target2_reloc_): | |
558 | New data member declaration. | |
559 | (Target_arm::Scan::local, Target_arm::Scan::global, | |
560 | Target_arm::Relocate::relocate, | |
561 | Target_arm::Relocatable_size_for_reloc::get_size_for_reloc): | |
562 | Adjust call to Target_arm::get_real_reloc_type. | |
563 | (Target_arm::get_real_reloc_type): Use command line options | |
564 | to determine real types of R_ARM_TARGET1 and R_ARM_TARGET2. | |
565 | * options.h (--target1-rel, --target1-abs, --target2): New | |
566 | ARM-only options. | |
567 | ||
50aeb7d4 DK |
568 | 2009-11-25 Doug Kwan <[email protected]> |
569 | ||
570 | * arm.cc (Target_arm::Target_arm): Move method definition outside of | |
571 | class definition. Add code to handle --target1-rel, --target1-abs | |
572 | and --target2= options. | |
573 | (Target_arm::get_reloc_reloc_type): Change method to be non-static | |
574 | and const. | |
575 | (Target_arm::target1_is_rel_, Target_arm::target2_reloc_): New data | |
576 | member declaration. | |
577 | (Target_arm::Scan::local, Target_arm::Scan::global, | |
578 | Target_arm::Relocate::relocate, | |
579 | Target_arm::Relocatable_size_for_reloc::get_size_for_reloc): Adjust | |
580 | call to Target_arm::get_real_reloc_type. | |
581 | (Target_arm::get_real_reloc_type): Use command line options to | |
582 | determine real types of R_ARM_TARGET1 and R_ARM_TARGET2. | |
583 | * options.h (--target1-rel, --target1-abs, --target2): New ARM-only | |
584 | options. | |
585 | ||
51938283 DK |
586 | 2009-11-25 Doug Kwan <[email protected]> |
587 | ||
588 | * arm.cc (Target_arm::may_use_thumb2_nop): New method definition. | |
589 | (Arm_relocate_functions::thumb_branch_common): New metod declaration. | |
590 | (Arm_relocate_functions::abs12, Arm_relocate_functions::abs16): Fix | |
591 | formatting. | |
592 | (Arm_relocate_functions::thm_call): Replace body with a call to | |
593 | Arm_relocate_functions::thumb_branch_common. | |
594 | (Arm_relocate_functions::thm_jump24, | |
595 | Arm_relocate_functions::thm_xpc22): New method definitions. | |
596 | (Arm_relocate_functions::thumb_branch_common): New method definition. | |
597 | (Reloc_stub::stbu_type_for_reloc): Fix incorrect uses of bit-wise-or | |
598 | operator. | |
599 | (Target_arm::Relocate::relocate): Adjust call to thm_call. | |
600 | Add code to handle R_ARM_THM_XPC22 and R_ARM_THM_JUMP24. | |
601 | ||
e2b8f3c4 RÁE |
602 | 2009-11-24 Rafael Avila de Espindola <[email protected]> |
603 | ||
604 | * Makefile.am: Build incremental-dump | |
605 | * Makefile.in: Regenerate. | |
606 | * incremental-dump.cc: New. | |
607 | * incremental.cc (Incremental_inputs_header_data, | |
608 | Incremental_inputs_entry_data): Move to incremental.h | |
609 | * incremental.h: (Incremental_inputs_header_data, | |
610 | Incremental_inputs_entry_data): Move from incremental.cc | |
611 | ||
bcba9aec RÁE |
612 | 2009-11-24 Rafael Avila de Espindola <[email protected]> |
613 | ||
614 | * incremental.cc (Incremental_inputs_header, | |
615 | Incremental_inputs_header_write, Incremental_inputs_entry, | |
616 | Incremental_inputs_entry_write): Add a typedef with the data type. | |
617 | ||
7c3afe08 RÁE |
618 | 2009-11-24 Rafael Avila de Espindola <[email protected]> |
619 | ||
620 | * incremental.cc (Incremental_inputs_header, | |
621 | Incremental_inputs_header_write, Incremental_inputs_entry, | |
622 | Incremental_inputs_entry_write): Update comment about which | |
623 | type has the filed descriptions. | |
624 | ||
d204b6e9 DK |
625 | 2009-11-15 Doug Kwan <[email protected]> |
626 | ||
627 | * arm.cc (Target_arm::may_use_arm_nop): New method definition. | |
628 | (Arm_relocate_functions::arm_branch_common): Change method defintion | |
629 | in class definition to a method declaration and update list of formal | |
630 | parameters. | |
631 | (Arm_relocate_functions::plt32, Arm_relocate_functions::call, | |
632 | Arm_relocation_functions::jump24): Adjust call to | |
633 | Arm_relocate_functions::arm_branch_common. Update list of formal | |
634 | parameters. | |
635 | (Arm_relocate_functions::xpc25): New method definition. | |
636 | (Arm_relocate_functions::arm_branch_common): Move method defintion | |
637 | out from class definition. Use stubs for mode-switching and extending | |
638 | branch ranges. | |
639 | (Target_arm::Relocate::relocate): Handle weakly-undefined symbols | |
640 | specially. Change code to enable use of stubs in ARM branches. | |
641 | ||
43d12afe DK |
642 | 2009-11-10 Doug Kwan <[email protected]> |
643 | ||
644 | * arm.cc (Arm_relobj::do_relocate_sections): Remove options parameter | |
645 | in method declaration. | |
646 | (Target_arm::relocate_stub): New method declaration. | |
647 | (Target_arm::default_target): Change to return a pointer instead of | |
648 | a const reference. | |
649 | (Reloc_stub::stub_type_for_reloc): Adjust for the change in | |
650 | Target_arm::default_target. | |
651 | (Arm_Relobj::do_relocate_sections): Remove options paramater in | |
652 | method definition. | |
653 | (Target_arm::relocate_section): Adjust view. | |
654 | (Target_arm::relocate_stub): New method definition. | |
655 | ||
ac33a407 DK |
656 | 2009-11-10 Doug Kwan <[email protected]> |
657 | ||
658 | * i386.cc (Target_i386::do_calls_non_split): Add a cast to avoid | |
659 | a format warning. | |
660 | * incremental.cc (open_incremental_binary): Initialized local | |
661 | variables to avoid warnings. | |
662 | * object.cc (make_elf_object): Ditto. | |
663 | * x86_64.cc (Target_x86_64::do_calls_non_split): Add a cast to avoid | |
664 | a format warning. | |
665 | ||
88ee28e9 L |
666 | 009-11-09 H.J. Lu <[email protected]> |
667 | ||
668 | PR gold/10930 | |
669 | * testsuite/plugin_test.c: Include "config.h". | |
670 | ||
2daedcd6 DK |
671 | 2009-11-09 Doug Kwan <[email protected]> |
672 | ||
673 | * arm.cc (Target_arm::fake_relnum_for_stubs): New constant. | |
674 | (arm_symbol_value): Remove. | |
675 | (Arm_relocate_functions::arm_branch_common, | |
676 | Arm_relocate_functions::abs8, Arm_relocate_functions::thm_abs5, | |
677 | Arm_relocate_functions::abs12, Arm_relocate_functions::abs16, | |
678 | Arm_relocate_functions::abs32, Arm_relocate_functions::rel32, | |
679 | Arm_relocate_functions::thm_call, Arm_relocate_functions::plt32, | |
680 | Arm_relocate_functions::call, Arm_relocate_functions::jump24, | |
681 | Arm_relocate_functions::prel31, Arm_relocate_functions::mov_abs_nc, | |
682 | Arm_relocate_functions::movt_abs, Arm_relocate_functions::movw_abs_nc, | |
683 | Arm_relocate_functions::thm_mobw_abs_nc, | |
684 | Arm_relocate_functions::thm_mov_abs, | |
685 | Arm_relocate_functions::movw_prel_nc, | |
686 | Arm_relocate_functions::thm_movt_abs, | |
687 | Arm_relocate_functions::movt_prel, | |
688 | Arm_relocate_functions::thm_movw_prel_nc, | |
689 | Arm_relocate_functions::thm_movt_prel): Adjust callers of the above. | |
690 | (Target_arm::Relocate::relocate): Only decompose address into two | |
691 | parts if relocation type uses the thumb-bit and pass the actual | |
692 | bit instead of a flag indicating that the thumb-bit is used. Adjust | |
693 | calls to methods in Arm_relocate_functions for this change. | |
694 | ||
1276bc89 | 695 | 2009-11-08 Ian Lance Taylor <[email protected]> |
3e4afc80 ILT |
696 | |
697 | PR 10925 | |
698 | * reloc.cc: Instantiate | |
699 | Sized_relobj::initialize_input_to_output_maps and | |
700 | Sized_relobj:free_input_to_output_maps. | |
701 | ||
e53ad1b5 ILT |
702 | 2009-11-06 Ian Lance Taylor <[email protected]> |
703 | ||
704 | PR 10876 | |
705 | * defstd.cc (in_segment): Set only_if_ref true for "end". | |
706 | ||
eb44217c DK |
707 | 2009-11-06 Doug Kwan <[email protected]> |
708 | ||
709 | * arm.cc (class Reloc_stub): Correct a comment. | |
710 | (Target_arm::Target_arm): Initialize arm_input_section_map_. | |
711 | (Target_arm::scan_section_for_stubs): New method declaration. | |
712 | (Target_arm::do_make_elf_object, Target_arm::do_make_output_section): | |
713 | Change methods from private to protected. | |
714 | (Target_arm::do_may_relax): New method definition. | |
715 | (Target_arm::do_relax, Target_arm::group_sections, | |
716 | Target_arm::scan_reloc_for_stub, | |
717 | Target_arm::scan_reloc_section_for_stubs): New method declarations. | |
718 | (Target_arm::arm_input_section_map_): New data member declaration. | |
719 | (Target_arm::scan_reloc_for_stub, | |
720 | Target_arm::scan_reloc_section_for_stubs, | |
721 | Target_arm::scan_section_for_stubs, Target_arm::group_sections, | |
722 | Target_arm::do_relax): New method definitions. | |
723 | ||
5d329b7d ILT |
724 | 2009-11-06 Mikolaj Zalewski <[email protected]> |
725 | ||
726 | * configure.ac: Check for (struct stat)::st_mtim | |
727 | * fileread.cc (File_read::get_mtime): Use st_mtim if available. | |
728 | * config.in: Regenerate. | |
729 | * configure: Regenerate. | |
730 | ||
96a0d71b ILT |
731 | 2009-11-05 Ian Lance Taylor <[email protected]> |
732 | ||
733 | PR 10910 | |
734 | * output.cc (Output_segment::add_output_section): Add missing | |
735 | return statement. | |
736 | ||
594c8e5e ILT |
737 | 2009-11-04 Ian Lance Taylor <[email protected]> |
738 | ||
739 | PR 10880 | |
740 | * object.h (class Object): Add is_needed and set_is_needed | |
741 | methods. Add is_needed_ field. Make bool fields into bitfields. | |
742 | * symtab.cc (Symbol_table::set_dynsym_indexes): If a symbol is | |
743 | defined in a dynamic object and referenced by a regular object, | |
744 | set is_needed for the dynamic object. | |
745 | * layout.cc (Layout::finish_dynamic_section): Don't add DT_NEEDED | |
746 | if the file is marked with as_needed and it is not needed. | |
747 | ||
22b127cc ILT |
748 | 2009-11-04 Ian Lance Taylor <[email protected]> |
749 | ||
750 | PR 10887 | |
751 | * arm.cc (Target_arm::do_finalize_sections): Don't add dynamic | |
752 | tags if data is discarded by linker script. | |
753 | * i386.cc (Target_i386::do_finalize_sections): Likewise. | |
754 | * powerpc.cc (Target_powerpc::do_finalize_sections): Likewise. | |
755 | * sparc.cc (Target_sparc::do_finalize_sections): Likewise. | |
756 | * x86_64.cc (Target_x86_64::do_finalize_sections): Likewise. | |
757 | ||
f5c870d2 ILT |
758 | 2009-11-04 Ian Lance Taylor <[email protected]> |
759 | ||
760 | * layout.cc (Layout::get_output_section): Add is_interp and | |
761 | is_dynamic_linker_section parameters. Change all callers. | |
762 | (Layout::choose_output_section): Likewise. | |
763 | (Layout::make_output_section): Likewise. | |
764 | (Layout::add_output_section_data): Add is_dynamic_linker_section | |
765 | parameter. Change all callers. | |
766 | * layout.h (class Layout): Update declarations. | |
767 | * output.h (class Output_section): Add is_interp, set_is_interp, | |
768 | is_dynamic_linker_section, set_is_dynamic_linker_section methods. | |
769 | Add is_interp_, is_dynamic_linker_section_ fields. Change | |
770 | generate_code_fills_at_write_ to a bitfield. | |
771 | * output.cc (Output_section::Output_sections): Initialize new | |
772 | fields. | |
773 | (Output_segment::add_output_section): Add do_sort parameter. | |
774 | Change all callers. | |
775 | ||
1ae4d23b ILT |
776 | 2009-11-03 Ian Lance Taylor <[email protected]> |
777 | ||
778 | PR 10860 | |
779 | * options.h (class General_options): Add --warn-common. | |
780 | * resolve.cc (Symbol_table::resolve): Handle --warn-common when | |
781 | merging two common symbols. | |
782 | (Symbol_table::should_override): Handle --warn-common when merging | |
783 | a common symbol with a defined symbol. Use report_resolve_problem | |
784 | for multiple definitions. | |
785 | (Symbol_table::report_resolve_problem): New function. | |
786 | * symtab.h (class Symbol_table): Declare report_resolve_problem. | |
787 | ||
55da9579 DK |
788 | 2009-11-03 Doug Kwan <[email protected]> |
789 | ||
790 | * arm.cc (Target_arm::Target_arm): Initialize stub_tables_ and | |
791 | stub_factory_. | |
792 | (Target_arm::stub_factory): New method definition. | |
793 | (Target_arm::new_arm_input_section, | |
794 | Target_arm::find_arm_input_section, Target_arm::new_stub_table, | |
795 | Target_arm::reloc_uses_thumb_bit): New method declarations. | |
796 | (Target_arm::Stub_table_list, Target_arm::Arm_input_section_map): | |
797 | New type definitions. | |
798 | (Target_arm::stub_tables_, Target_arm::stub_factory_): New data | |
799 | member declarations. | |
800 | (Target_arm::reloc_uses_thumb_bit, Target_arm::new_arm_input_section, | |
801 | Target_arm::find_arm_input_section, Target_arm::new_stub_table): | |
802 | New method definitions. | |
803 | ||
37a9ac43 ILT |
804 | 2009-11-03 Ian Lance Taylor <[email protected]> |
805 | ||
806 | * options.h (class General_options): Add --warn_constructors. | |
807 | ||
b3d6a3d4 ILT |
808 | 2009-11-03 Ian Lance Taylor <[email protected]> |
809 | ||
810 | PR 10893 | |
811 | * defstd.cc (in_section): Add entries for __rel_iplt_start, | |
812 | __rel_iplt_end, __rela_iplt_start, __rela_iplt_end, and __stack. | |
813 | ||
934b01dd ILT |
814 | 2009-11-03 Ian Lance Taylor <[email protected]> |
815 | ||
816 | PR 10895 | |
817 | * po/Make-in ($(srcdir)/$(PACKAGE).pot): Pass -C and | |
818 | --msgid-bugs-address. | |
819 | (install-pdf): New target. | |
820 | (install-data_yes): Look up one directory to find mkinstalldirs. | |
821 | ||
03c1939b L |
822 | 2009-11-03 H.J. Lu <[email protected]> |
823 | ||
824 | * po/Make-in (.po.gmo): Don't generate .gmo files in source | |
825 | tree. | |
826 | ||
ebd95253 DK |
827 | 2009-10-30 Doug Kwan <[email protected]> |
828 | ||
829 | * arm.cc (Stub_addend_reader): Fix bug in previouls check-in. | |
830 | ||
e9bbb538 DK |
831 | 2009-10-30 Doug Kwan <[email protected]> |
832 | ||
833 | * arm.cc (Stub_addend_reader): New struct template definition | |
834 | and partial specializations. | |
835 | (Stub_addend_reader::operator()): New method definition for a | |
836 | partially specialized template. | |
837 | ||
d5b40221 DK |
838 | 2009-10-30 Doug Kwan <[email protected]> |
839 | ||
840 | * arm.cc (Arm_relobj::processor_specific_flags): New method | |
841 | definition. | |
842 | (Arm_relobj::do_read_symbols): New method declaration. | |
843 | (Arm_relobj::processor_specific_flags_): New data member declaration. | |
844 | (Arm_dynobj): New class definition. | |
845 | (Target_arm::do_finalize_sections): Add input_objects parameter. | |
846 | (Target_arm::do_adjust_elf_header): New method declaration. | |
847 | (Target_arm::are_eabi_versions_compatible, | |
848 | (Target_arm::merge_processor_specific_flags): New method declaration. | |
849 | (Target_arm::do_make_elf_object): New overloaded method definitions | |
850 | and declaration. | |
851 | (Arm_relobj::do_read_symbols): New method definition. | |
852 | (Arm_dynobj::do_read_symbols): Ditto. | |
853 | (Target_arm::do_finalize_sections): Add input_objects parameters. | |
854 | Merge processor-specific flags from all input objects. | |
855 | (Target_arm::are_eabi_versions_compatible, | |
856 | Target_arm::merge_processor_specific_flags, | |
857 | Target_arm::do_adjust_elf_header, Target_arm::do_make_elf_object): | |
858 | New method definitions. | |
859 | * i386.cc (Target_i386::do_finalize_sections): Add unnamed | |
860 | Input_objects pointer type parameter. | |
861 | * layout.cc (Layout::finalize): Pass input objects to target's. | |
862 | finalize_sections function. | |
863 | * output.cc (Output_file_header::do_sized_write): Set ELF file | |
864 | header's processor-specific flags. | |
865 | * powerpc.cc (Target_powerpc::do_finalize_sections): Add unnamed | |
866 | Input_objects pointer type parameter. | |
867 | * sparc.cc (Target_sparc::do_finalize_sections): Same. | |
868 | * target.h (Input_objects): New forward class declaration. | |
869 | (Target::processor_specific_flags, | |
870 | Target::are_processor_specific_flags_sect): New method definitions. | |
871 | (Target::finalize_sections): Add input_objects parameter. | |
872 | (Target::Target): Initialize processor_specific_flags_ and | |
873 | are_processor_specific_flags_set_. | |
874 | (Target::do_finalize_sections): Add unnamed Input_objects pointer type | |
875 | parameter. | |
876 | (Target::set_processor_specific_flags): New method definition. | |
877 | (Target::processor_specific_flags_, | |
878 | Target::are_processor_specific_flags_set_): New data member | |
879 | declarations. | |
880 | * x86_64.cc (Target_x86_64::do_finalize_sections): Add unnamed | |
881 | Input_objects pointer type parameter. | |
882 | ||
ebabffbd DK |
883 | 2009-10-30 Doug Kwan <[email protected]> |
884 | ||
885 | * arm.cc: Use Arm_address instead of elfcpp::Elf_types<32>::Elf_Addr. | |
886 | ||
ad0f2072 ILT |
887 | 2009-10-28 Ian Lance Taylor <[email protected]> |
888 | ||
889 | * object.h (class Relobj): Drop options parameter from | |
890 | gc_process_relocs, scan_relocs, relocate, do_gc_process_relocs, | |
891 | do_scan_relocs, do_relocate. Change all callers. | |
892 | (class Sized_relobj): Drop options parameters from | |
893 | do_gc_process_relocs, do_scan_relocs, do_relocate, | |
894 | do_relocate_sections, relocate_sections, emit_relocs_scan, | |
895 | emit_relocs_scan_reltype. Change all callers. | |
896 | (struct Relocate_info): Remove options field and all references to | |
897 | it. | |
898 | * reloc.h (class Read_relocs): Remove options constructor | |
899 | parameter and options_ field. Change all callers. | |
900 | (class Gc_process_relocs, class Scan_relocs): Likewise. | |
901 | (class Relocate_task): Likewise. | |
902 | * target-reloc.h (scan_relocs): Remove options parameter. Change | |
903 | all callers. | |
904 | (scan_relocatable_relocs): Likewise. | |
905 | * target.h (class Sized_target): Remove options parameter from | |
906 | gc_process_relocs, scan_relocs, scan_relocatable_relocs. Change | |
907 | all callers. | |
908 | * gc.h (gc_process_relocs): Remove options parameter. Change all | |
909 | callers. | |
910 | * arm.cc: Update functions to remove options parameters. | |
911 | * i386.cc: Likewise. | |
912 | * powerpc.cc: Likewise. | |
913 | * sparc.cc: Likewise. | |
914 | * x86_64.cc: Likewise. | |
915 | * testsuite/testfile.cc: Likewise. | |
916 | ||
8ffa3667 DK |
917 | 2009-10-28 Doug Kwan <[email protected]> |
918 | ||
919 | * arm.cc (Arm_relobj): New class definition. | |
920 | (Arm_relobj::scan_sections_for_stubs, | |
921 | Arm_relobj::do_count_local_symbols, Arm_relobj::do_relocate_sections): | |
922 | New method definitions. | |
923 | ||
40f36857 CC |
924 | 2009-10-28 Cary Coutant <[email protected]> |
925 | ||
926 | * plugin.h (Plugin::Plugin): Initialize cleanup_done_. | |
927 | (Plugin::cleanup_done_): New member. | |
928 | (Plugin_manager::Plugin_manager): Remove cleanup_done_. | |
929 | (Plugin_manager::cleanup_done_): Remove. | |
930 | (Plugin_manager::add_input_file): Edit error message. | |
931 | * plugin.cc (Plugin::cleanup): Test and set cleanup_done_. | |
932 | (Plugin_manager::cleanup): Remove use of cleanup_done_. | |
933 | ||
2c849493 ILT |
934 | 2009-10-27 Mikolaj Zalewski <[email protected]> |
935 | ||
936 | * fileread.cc: (File_read::View::~View): Use the new | |
937 | data_ownership_ filed. | |
938 | (File_read::~File_read): Dispose the new whole_file_view_. | |
939 | (File_read::open): Mmap the whole file if needed. | |
940 | (File_read::open): Use whole_file_view_ instead of contents_. | |
941 | (File_read::find_view): Use whole_file_view_ if applicable. | |
942 | (File_read::do_read): Use whole_file_view_ instead of contents_. | |
943 | (File_read::make_view): Use whole_file_view_ instead of contents_, | |
944 | update File_read::View::View call. | |
945 | (File_read::find_or_make_view): Update File_read::View::View | |
946 | call. | |
947 | * fileread.h: (File_read::File_read): Initialize whole_file_view_, | |
948 | remove contents_ | |
949 | (File_read::View::Data_ownership): New enum. | |
950 | (File_read::View::View): Replace bool mapped_ with Data_ownership | |
951 | argument. | |
952 | (File_read::View::mapped_): Remove (replaced by data_ownership_). | |
953 | (File_read::View::data_ownership_): New field. | |
954 | (File_read::contents_): Remove (replaced by whole_file_view_). | |
955 | (File_read::whole_file_view_): New field. | |
956 | * options.h (class General_options): Add --keep-files-mapped. | |
957 | ||
24998053 CC |
958 | 2009-10-27 Cary Coutant <[email protected]> |
959 | ||
960 | * symtab.cc (add_from_pluginobj): Pass correct value for is_ordinary. | |
961 | * testsuite/Makefile.am (plugin_test_5): New test case. | |
962 | * testsuite/Makefile.in: Regenerate. | |
963 | ||
72adc4fa DK |
964 | 2009-10-25 Doug Kwan <[email protected]> |
965 | ||
966 | * object.h (Sized_relobj::View_size, Sized_relobj::Views): Change | |
967 | from private to protected to allow access by child class. | |
968 | (Sized_relobj::do_relocate_sections): New method declaration. | |
969 | (Sized_relobj::relocate_sections): Virtualize. | |
970 | * reloc.cc (Sized_relobj::do_relocate_sections): Rename from | |
971 | Sized_relobj::relocate_sections. Instantiate template explicitly | |
972 | for different target sizes and endianity. | |
973 | ||
07f508a2 DK |
974 | 2009-10-24 Doug Kwan <[email protected]> |
975 | ||
976 | * arm.cc (Arm_output_section, Arm_relobj): Forward class declarations. | |
977 | (Arm_input_section::as_arm_input_section): New method. | |
978 | (Arm_output_section): New class definition. | |
979 | (Arm_output_section::create_stub_group, | |
980 | Arm_output_section::group_sections): New method definitions. | |
981 | ||
10ad9fe5 DK |
982 | 2009-10-22 Doug Kwan <[email protected]> |
983 | ||
984 | * arm.cc (Arm_input_section): New class definition. | |
985 | (Arm_input_section::init, Arm_input_section:do_write, | |
986 | Arm_input_section::set_final_data_size, | |
987 | Arm_input_section::do_reset_address_and_file_offset): New method | |
988 | definitions. | |
989 | ||
56ee5e00 DK |
990 | 2009-10-21 Doug Kwan <[email protected]> |
991 | ||
992 | * arm.cc (Stub_table, Arm_input_section): New forward class | |
993 | declarations. | |
994 | (Stub_table): New class defintion. | |
995 | (Stub_table::add_reloc_stub, Stub_table::relocate_stubs | |
996 | Stub_table::do_reset_address_and_file_offset, Stub_table::do_write): | |
997 | New method definition. | |
998 | ||
b569affa DK |
999 | 2009-10-21 Doug Kwan <[email protected]> |
1000 | ||
1001 | * arm.cc: Update copyright comments. | |
1002 | (Target_arm): New forward class template declaration. | |
1003 | (Arm_address): New type. | |
1004 | (ARM_MAX_FWD_BRANCH_OFFSET, ARM_MAX_BWD_BRANCH_OFFSET, | |
1005 | THM_MAX_FWD_BRANCH_OFFSET, THM_MAX_BWD_BRANCH_OFFSET, | |
1006 | THM2_MAX_FWD_BRANCH_OFFSET, THM2_MAX_BWD_BRANCH_OFFSET): New | |
1007 | constants. | |
1008 | (Insn_template): Same. | |
1009 | (DEF_STUBS): New macro. | |
1010 | (Stub_type): New enum type. | |
1011 | (Stub_template): New class definition. | |
1012 | (Stub): Same. | |
1013 | (Reloc_stub): Same. | |
1014 | (Stub_factory): Same. | |
1015 | (Target_arm::Target_arm): Initialize may_use_blx_ and | |
1016 | should_force_pic_veneer_. | |
1017 | (Target_arm::may_use_blx, Target_arm::set_may_use_blx, | |
1018 | Target_arm::should_force_pic_veneer, | |
1019 | Target_arm::set_should_force_pic_veneer, Target_arm::using_thumb2, | |
1020 | Target_arm::using_thumb_only, Target_arm:;default_target): New | |
1021 | method defintions. | |
1022 | (Target_arm::may_use_blx_, Target_arm::should_force_pic_veneer_): | |
1023 | New data member declarations. | |
1024 | (Insn_template::size, Insn_template::alignment): New method defintions. | |
1025 | (Stub_template::Stub_template): New method definition. | |
1026 | (Reloc_stub::Key::name, Reloc_stub::stub_type_for_reloc, | |
1027 | Reloc_stub::do_fixed_endian_write, Reloc_stub::do_write): Same. | |
1028 | (Stub_factory::Stub_factory): New method definition. | |
1029 | * gold.h (string_hash): New template. | |
1030 | * output.h (Input_section_specifier::hash_value): Use | |
1031 | gold::string_hash. | |
1032 | (Input_section_specifier::string_hash): Remove. | |
1033 | * stringpool.cc (Stringpool_template::string_hash): Use | |
1034 | gold::string_hash. | |
1035 | ||
6c172549 DK |
1036 | 2009-10-20 Doug Kwan <[email protected]> |
1037 | ||
1038 | * object.cc (Sized_relobj::do_finalize_local_symbols): Handle section | |
1039 | symbols of relaxed input sections. | |
1040 | * output.h (Output_section::find_relaxed_input_section): Make | |
1041 | method public. | |
1042 | ||
c5617f2f DK |
1043 | 2009-10-16 Doug Kwan <[email protected]> |
1044 | ||
1045 | * dynobj.cc (Versions::Versions): Initialize version_script_. | |
1046 | Only insert base version symbol definition for a shared object | |
1047 | if version script defines any version versions. | |
1048 | (Versions::define_base_version): New method definition. | |
1049 | (Versions::add_def): Check that base version is not needed. | |
1050 | (Versions::add_need): Define base version lazily. | |
1051 | * dynobj.h (Versions::define_base_version): New method declaration. | |
1052 | (Versions::needs_base_version_): New data member declaration. | |
1053 | * testsuite/Makefile.am (check_SCRIPTS): Add no_version_test.sh | |
1054 | (check_DATA): Add no_version_test.stdout. | |
1055 | (libno_version_test.so, no_version_test.o no_version_test.stdout): | |
1056 | New make rules. | |
1057 | * testsuite/Makefile.in: Regenerate. | |
1058 | * testsuite/no_version_test.c: New file. | |
1059 | * testsuite/no_version_test.sh: Ditto. | |
1060 | ||
3c12dcdb DK |
1061 | 2009-10-16 Doug Kwan <[email protected]> |
1062 | ||
1063 | * expression.cc (class Segment_start_expression): New class definition. | |
1064 | (Segment_start_expression::value): New method definition. | |
1065 | (script_exp_function_segment_start): Return a new | |
1066 | Segment_start_expression. | |
1067 | * gold/script-c.h (script_saw_segment_start_expression): New function | |
1068 | prototype. | |
1069 | * script-sections.cc (Script_sections::Script_sections): Initialize | |
1070 | SAW_SEGMENT_START_EXPRESSION_ to false. | |
1071 | (Script_sections::set_section_addresses): Use -Ttext, -Tdata | |
1072 | and -Tbbs options to specify section addresses if given in | |
1073 | command line and no SEGMENT_START expression is seen in a script. | |
1074 | * script-sections.h (Script_sections::saw_segment_start_expression, | |
1075 | Script_sections::set_saw_segment_start_expression): New method | |
1076 | definition. | |
1077 | (Script_sections::saw_segment_start_expression_): New data member | |
1078 | declaration. | |
1079 | * script.cc (script_saw_segment_start_expression): New function. | |
1080 | * yyscript.y (SEGMENT_START): Call script_saw_segment_start_expression. | |
1081 | * testsuite/Makefile.am (check_SCRIPTS): Add script_test_6.sh, | |
1082 | script_test_7.sh and script_test_8.sh. | |
1083 | (check_DATA): Add script_test_6.stdout, script_test_7.stdout and | |
1084 | script_test_8.stdout. | |
1085 | (MOSTLYCLEANFILES): Add script_test_6, script_test_7 and script_test_8. | |
1086 | (script_test_6, script_test_6.stdout, script_test_7, | |
1087 | script_test_7.stdout, script_test_8, script_test_8.stdout): New rules. | |
1088 | * Makefile.in: Regenerate. | |
1089 | * testsuite/script_test_6.sh: New file. | |
1090 | * testsuite/script_test_6.t: Same. | |
1091 | * testsuite/script_test_7.sh: Same. | |
1092 | * testsuite/script_test_7.t: Same. | |
1093 | * testsuite/script_test_8.sh: Same. | |
1094 | ||
64b1ae37 DK |
1095 | 2009-10-16 Doug Kwan <[email protected]> |
1096 | ||
1097 | * output.cc (Output_segment::set_section_list_address): Cast | |
1098 | expressions to unsigned long long type to avoid format warnings. | |
1099 | ||
661be1e2 ILT |
1100 | 2009-10-15 Ian Lance Taylor <[email protected]> |
1101 | ||
12edd763 | 1102 | * script.cc (Script_options::add_symbol_assignment): Always add a |
b3d6a3d4 | 1103 | dot assignment to script_sections_. |
12edd763 ILT |
1104 | * script-sections.cc (Script_sections::add_dot_assignment): |
1105 | Initialize if necessary. | |
1106 | ||
68b6574b ILT |
1107 | * layout.cc (Layout::relaxation_loop_body): Don't crash if we see |
1108 | program headers with no load segment if there is a linker script. | |
1109 | ||
661be1e2 ILT |
1110 | * layout.cc (Layout::set_segment_offsets): Align the file offset |
1111 | to the segment aligment for -N or -n with no load segment. | |
1112 | * output.cc (Output_segment::add_output_section): Don't crash if | |
1113 | the first section is a TLS section. | |
1114 | (Output_segment::set_section_list_addresses): Print an error | |
1115 | message if the address moves backward in a linker script. | |
1116 | * script-sections.cc | |
1117 | (Output_section_element_input::set_section_addresses): Don't | |
1118 | increase *dot_value for a SHF_TLS/SHT_NOBITS section. | |
1119 | (Orphan_output_section::set_section_addresses): Likewise. | |
1120 | ||
f15f61a7 DK |
1121 | 2009-10-15 Doug Kwan <[email protected]> |
1122 | ||
1123 | * layout.cc (Layout::finish_dynamic_section): Generate tags | |
1124 | DT_FINI_ARRAY, DT_FINI_ARRAYSZ, DT_INIT_ARRAY, DT_INIT_ARRAYSZ, | |
1125 | DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ as needed. If -Bsymbolic is | |
1126 | used, add DT_SYMBOLIC and set DF_SYMBOLIC in DT_FLAGS. | |
1127 | ||
82bb573a ILT |
1128 | 2009-10-14 Ian Lance Taylor <[email protected]> |
1129 | ||
1130 | * object.h (class Relocate_info): Add reloc_shdr and data_shdr | |
1131 | fields. | |
1132 | * object.cc (Sized_relobj::relocate_sections): Set reloc_shdr and | |
1133 | data_shdr fields of relinfo. | |
1134 | * i386.cc (class Target_i386::Relocate): Remove ldo_addrs_ field. | |
1135 | (Target_i386::Relocate::relocate_tls): Don't call fix_up_ldo. For | |
1136 | R_386_TLS_LDO_32, adjust based on section flags. | |
1137 | (Target_i386::Relocate::fix_up_ldo): Remove. | |
1138 | ||
374ad285 ILT |
1139 | 2009-10-13 Ian Lance Taylor <[email protected]> |
1140 | ||
1141 | Add support for -pie. | |
1142 | * options.h (class General_options): Add -pie and | |
1143 | --pic-executable. | |
1144 | (General_options::output_is_position_independent): Test -pie. | |
1145 | (General_options::output_is_executable): Return true if not shared | |
1146 | and not relocatable. | |
1147 | (General_options::output_is_pie): Remove. | |
1148 | * options.cc (General_options::finalize): Reject incompatible uses | |
1149 | of -pie. | |
1150 | * gold.cc (queue_middle_tasks): A -pie link is not static. | |
1151 | * symtab.h (Symbol::needs_plt_entry): Return false if -pie. | |
1152 | * symtab.cc (Symbol::final_value_is_known): Return false if | |
1153 | output_is_position_independent. | |
1154 | * layout.cc (Layout::set_segment_offsets): Start at address 0 if | |
1155 | output_is_position_independent. | |
1156 | * output.cc (Output_file_header::do_sized_write): Use ET_DYN if | |
1157 | output_is_position_independent. | |
1158 | * i386.cc (Output_data_plt_i386::do_write): Use the PIC PLT if | |
1159 | output_is_position_independent. | |
1160 | * testsuite/Makefile.am (check_PROGRAMS): Add basic_pie_test and | |
1161 | two_file_pie_test. | |
1162 | (basic_pie_test.o, basic_pie_test): New targets. | |
1163 | (two_file_test_1_pie.o, two_file_test_1b_pie.o): New targets. | |
1164 | (two_file_test_2_pie.o, two_file_test_main_pie.o): New targets. | |
1165 | (two_file_pie_test): New target. | |
1166 | * testsuite/Makefile.in: Rebuild. | |
1167 | * README: Remove note saying that -pie is not supported. | |
1168 | ||
c6585162 ILT |
1169 | 2009-10-13 Bernhard Reutner-Fischer <[email protected]> |
1170 | ||
1171 | * options.h (class General_options): Add -init and -fini. | |
1172 | * layout.cc (Layout::finish_dynamic_section): Emit | |
1173 | given init and fini functions. | |
1174 | ||
032ce4e9 ST |
1175 | 2009-10-13 Sriraman Tallam <[email protected]> |
1176 | ||
1177 | * gc.h (gc_process_relocs): Check if icf is enabled using new | |
1178 | function. | |
1179 | * gold.cc (queue_initial_tasks): Likewise. | |
1180 | (queue_middle_tasks): Likewise. | |
1181 | * object.cc (do_layout): Likewise. | |
1182 | * symtab.cc (is_section_folded): Likewise. | |
1183 | * main.cc (main): Likewise. | |
1184 | * reloc.cc (Read_relocs::run): Likewise. | |
1185 | (Sized_relobj::do_scan_relocs): Likewise. | |
1186 | * icf.cc (is_function_ctor_or_dtor): New function. | |
1187 | (Icf::find_identical_sections): Check if function is ctor or dtor when | |
1188 | safe icf is chosen. | |
1189 | * options.h (General_options::icf): Change option to be an enum. | |
1190 | (Icf_status): New enum. | |
1191 | (icf_enabled): New method. | |
1192 | (icf_safe_folding): New method. | |
1193 | (set_icf_status): New method. | |
1194 | (icf_status_): New variable. | |
1195 | * (options.cc) (General_options::finalize): Set icf_status_. | |
1196 | * testsuite/Makefile.am: Add commands to build icf_safe_test. Modify | |
1197 | icf_test and icf_keep_unique_test to use the --icf enum flag. | |
1198 | * testsuite/icf_safe_test.sh: New file. | |
1199 | * testsuite/icf_safe_test.cc: New file. | |
1200 | ||
f345227a ST |
1201 | 2009-10-12 Sriraman Tallam <[email protected]> |
1202 | ||
1203 | * symtab.h: Check for GOLD_SYMTAB_H before header includes. Remove | |
1204 | includes to gc.h and icf.h. | |
1205 | * arm.cc: Include gc.h. | |
1206 | * gold.cc: Likewise. | |
1207 | * i386.cc: Likewise. | |
1208 | * powerpc.cc: Likewise. | |
1209 | * sparc.cc: Likewise. | |
1210 | * x86_64.cc: Likewise. | |
1211 | * gc.h: Include icf.h. | |
1212 | ||
1c7814ed ILT |
1213 | 2009-10-11 Ian Lance Taylor <[email protected]> |
1214 | ||
1215 | * plugin.cc: Include "gold.h" before other header files. | |
1216 | ||
ae3b5189 CD |
1217 | 2009-10-10 Chris Demetriou <[email protected]> |
1218 | ||
1219 | * options.h (Input_file_argument::Input_file_type): New enum. | |
1220 | (Input_file_argument::is_lib_): Replace with... | |
1221 | (Input_file_argument::type_): New member. | |
1222 | (Input_file_argument::Input_file_argument): Take Input_file_type | |
1223 | 'type' rather than boolean 'is_lib' as second argument. | |
1224 | (Input_file_argument::is_lib): Use type_. | |
1225 | (Input_file_argument::is_searched_file): New function. | |
1226 | (Input_file_argument::may_need_search): Handle is_searched_file. | |
1227 | * options.cc (General_options::parse_library): Support -l:filename. | |
1228 | (General_options::parse_just_symbols): Update for Input_file_argument | |
1229 | changes. | |
1230 | (Command_line::process): Likewise. | |
1231 | * archive.cc (Archive::get_file_and_offset): Likewise. | |
1232 | * plugin.cc (Plugin_manager::release_input_file): Likewise. | |
1233 | * script.cc (read_script_file, script_add_file): Likewise. | |
1234 | * fileread.cc (Input_file::Input_file): Likewise. | |
1235 | (Input_file::will_search_for): Handle is_searched_file. | |
1236 | (Input_file::open): Likewise. | |
1237 | * readsyms.cc (Read_symbols::get_name): Likewise. | |
1238 | * testsuite/Makefile.am (searched_file_test): New test. | |
1239 | * testsuite/Makefile.in: Regenerate. | |
1240 | * testsuite/searched_file_test.cc: New file. | |
1241 | * testsuite/searched_file_test_lib.cc: New file. | |
1242 | ||
f3048a1d ILT |
1243 | 2009-10-09 Andrew Pinski <[email protected]> |
1244 | Ian Lance Taylor <[email protected]> | |
1245 | ||
1246 | * descriptor.cc: Include <cstdio> and "binary-io.h". | |
1247 | (Descriptors::open): Open the files in binary mode always. | |
1248 | * script.cc (Lex::get_token): Treat \r as whitespace. | |
1249 | ||
d4780e57 ILT |
1250 | 2009-10-09 Ian Lance Taylor <[email protected]> |
1251 | ||
1252 | * testsuite/retain_symbols_file_test.sh: Don't test for __tcf_0. | |
1253 | ||
d9a893b8 ILT |
1254 | 2009-10-09 Andrew Pinski <[email protected]> |
1255 | Ian Lance Taylor <[email protected]> | |
1256 | ||
1257 | * configure.ac: Check for readv function also. | |
1258 | * fileread.cc (readv): Define if not HAVE_READV. | |
1259 | * fileread.h (File_read:: max_readv_entries): Set to 1 if readv | |
1260 | does not exist. | |
1261 | * config.in: Regenerate. | |
1262 | * configure: Regenerate. | |
1263 | ||
c0a62865 DK |
1264 | 2009-10-09 Doug Kwan <[email protected]> |
1265 | ||
1266 | * layout.cc (Layout::make_output_section): Call target hook to make | |
1267 | ordinary output section. | |
1268 | (Layout::finalize): Adjust parameter list of call the | |
1269 | Target::may_relax(). | |
1270 | * layout.h (class Layout::section_list): New method. | |
1271 | * merge.h (Output_merge_base::entsize): Change visibility to public. | |
1272 | (Output_merge_base::is_string, Output_merge_base::do_is_string): | |
1273 | New methods. | |
1274 | (Output_merge_string::do_is_string): New method. | |
1275 | * object.cc (Sized_relobj::do_setup): renamed from | |
1276 | Sized_relobj::set_up. | |
1277 | * object.h (Sized_relobj::adjust_shndx, | |
1278 | Sized_relobj::initializ_input_to_output_maps, | |
1279 | Sized_relobj::free_input_to_output_maps): Change visibilities to | |
1280 | protected. | |
1281 | (Sized_relobj::setup): Virtualize. | |
1282 | (Sized_relobj::do_setup): New method declaration. | |
1283 | (Sized_relobj::invalidate_section_offset, | |
1284 | Sized_relobj::do_invalidate_section_offset): New method decfinitions. | |
1285 | (Sized_relobj::elf_file, Sized_relobj::local_values): New methods. | |
1286 | * options.cc (parse_int): New function. | |
1287 | * options.h (parse_int): New declaration. | |
1288 | (DEFINE_int): New macro. | |
1289 | (stub_group_size): New option. | |
1290 | * output.cc (Output_section::Output_section): Initialize memebers | |
1291 | merge_section_map_, merge_section_by_properties_map_, | |
1292 | relaxed_input_section_map_, is_relaxed_input_section_map_valid_. | |
1293 | (Output_section::add_input_section): Handled deferred code-fill | |
1294 | generation and remove an old comment. | |
1295 | (Output_section::add_relaxed_input_section): New method definition. | |
1296 | (Output_section::add_merge_input_section): Use merge section by | |
1297 | properties map to speed to search. Update merge section maps | |
1298 | as appropriate. | |
1299 | (Output_section::build_relaxation_map): New method definition. | |
1300 | (Output_section::convert_input_sections_in_list_to_relaxed_sections): | |
1301 | Same. | |
1302 | (Output_section::relax_input_section): Renamed to | |
1303 | Output_section::convert_input_sections_to_relaxed_sections and change | |
1304 | interface to take a vector of pointers to relaxed sections. | |
1305 | (Output_section::find_merge_section, | |
1306 | Output_section::find_relaxed_input_section): New method definitions. | |
1307 | (Output_section::is_input_address_mapped, | |
1308 | Output_section::output_offset, Output_section::output_address): | |
1309 | Use output section data maps to speed up searching. | |
1310 | (Output_section::find_starting_output_address): Add comments. | |
1311 | (Output_section::do_write, | |
1312 | Output_section::write_to_postprocessing_buffer): Do code-fill | |
1313 | generation as appropriate. | |
1314 | (Output_section::get_input_sections): Invalidate relaxed input section | |
1315 | map. | |
1316 | (Output_section::restore_states): Adjust type of checkpoint . | |
1317 | Invalidate relaxed input section map. | |
1318 | * output.h (Output_merge_base): New class declaration. | |
1319 | (Input_section_specifier): New class defintion. | |
1320 | (class Output_relaxed_input_section) Change base class to | |
1321 | Output_section_data_build. | |
1322 | (Output_relaxed_input_section::Output_relaxed_input_section): Adjust | |
1323 | base class initializer. | |
1324 | (Output_section::add_relaxed_input_section): New method declaration. | |
1325 | (Output_section::Input_section): Change visibility to protected. | |
1326 | (Output_section::Input_section::relobj, | |
1327 | Output_section::Input_section::shndx): Handle relaxed input sections. | |
1328 | Output_section::input_sections) Change visibility to protected. Also | |
1329 | define overload to return a non-const pointer. | |
1330 | (Output_section::Merge_section_properties): New class defintion. | |
1331 | (Output_section::Merge_section_by_properties_map, | |
1332 | Output_section::Output_section_data_by_input_section_map, | |
1333 | Output_section::Relaxation_map): New types. | |
1334 | (Output_section::relax_input_section): Rename method to | |
1335 | Output_section::convert_input_sections_to_relaxed_sections and change | |
1336 | interface to take a vector of relaxed section pointers. | |
1337 | (Output_section::find_merge_section, | |
1338 | Output_section::find_relaxed_input_section, | |
1339 | Output_section::build_relaxation_map, | |
1340 | Output_section::convert_input_sections_in_list_to_relaxed_sections): | |
1341 | New method declarations. | |
1342 | (Output_section::merge_section_map_ | |
1343 | Output_section::merge_section_by_properties_map_, | |
1344 | Output_section::relaxed_input_section_map_, | |
1345 | Output_section::is_relaxed_input_section_map_valid_, | |
1346 | Output_section::generate_code_fills_at_write_): New data members. | |
1347 | * script-sections.cc | |
1348 | (Output_section_element_input::set_section_addresses): Call | |
1349 | current_data_size and addralign methods of relaxed input sections. | |
1350 | (Orphan_output_section::set_section_addresses): Call current_data_size | |
1351 | and addralign methods of relaxed input sections. | |
1352 | * symtab.cc (Symbol_table::compute_final_value): Extract template | |
1353 | from the body of Symbol_table::sized_finalize_symbol. | |
1354 | (Symbol_table::sized_finalized_symbol): Call | |
1355 | Symbol_table::compute_final_value. | |
1356 | * symtab.h (Symbol_table::Compute_final_value_status): New enum type. | |
1357 | (Symbol_table::compute_final_value): New templated method declaration. | |
1358 | * target.cc (Target::do_make_output_section): New method defintion. | |
1359 | * target.h (Target::make_output_section): New method declaration. | |
1360 | (Target::relax): Add more parameters for input objects, symbol table | |
1361 | and layout. Adjust call to do_relax. | |
1362 | (Target::do_make_output_section): New method declaration. | |
1363 | (Target::do_relax): Add parameters for input objects, symbol table | |
1364 | and layout. | |
1365 | ||
d446d6c4 ILT |
1366 | 2009-10-09 Andrew Pinski <[email protected]> |
1367 | ||
1368 | * pread.c: Include stdio.h. | |
1369 | ||
bc06c745 ILT |
1370 | 2009-10-09 Andrew Pinski <[email protected]> |
1371 | ||
1372 | * plugin.cc: Don't include dlfcn.h when ENABLE_PLUGINS is not | |
1373 | defined. | |
1374 | ||
75aea3d0 ILT |
1375 | 2009-10-09 Andrew Pinski <[email protected]> |
1376 | ||
1377 | * dwarf_reader.cc (Sized_dwarf_line_info::Sized_dwarf_line_info): | |
1378 | Change read_shndx type to unsigned int. | |
1379 | (Sized_dwarf_line_info::read_lines): Change shndx type to unsigned | |
1380 | int. | |
1381 | (Sized_dwarf_line_info::read_line_mappings): Likewise. | |
1382 | * dwarf_reader.h (Sized_dwarf_line_info::Sized_dwarf_line_info): | |
1383 | Change read_shndx type to unsigned int. | |
1384 | (Sized_dwarf_line_info::read_lines): Change shndx type to unsigned | |
1385 | int. | |
1386 | (Sized_dwarf_line_info::read_line_mappings): Likewise. | |
1387 | * layout.cc (Layout::create_symtab_sections): Cast the result of | |
1388 | local_symcount * symsize to off_t in the gold_assert. | |
1389 | ||
be8fcb75 ILT |
1390 | 2009-10-09 Viktor Kutuzov <[email protected]> |
1391 | ||
1392 | * arm.cc (Target_arm::relocate::reloc_is_non_pic): Return true for | |
1393 | R_ARM_THM_ABS5, R_ARM_ABS8, R_ARM_ABS12, R_ARM_ABS16, | |
1394 | R_ARM_BASE_ABS. | |
1395 | (Arm_relocate_functions::abs8): Remove has_thumb_bit parameter. | |
1396 | (Arm_relocate_functions::thm_abs5): New function. | |
1397 | (Arm_relocate_functions::abs12): New function. | |
1398 | (Arm_relocate_functions::abs16): New function. | |
1399 | (Arm_relocate_functions::base_abs): New function. | |
1400 | (Scan::check_non_pic): Handle R_ARM_ABS32_NOI. | |
1401 | (Scan::local): Remove special handling of R_ARM_ABS8. Handle | |
1402 | R_ARM_ABS32_NOI, R_ARM_THM_ABS5, R_ARM_ABS12, R_ARM_ABS16, and | |
1403 | R_ARM_BASE_ABS. | |
1404 | (Scan::global): Likewise. | |
1405 | (Relocate::relocate): Handle R_ARM_ABS12, R_ARM_ABS16, | |
1406 | R_ARM_ABS32_NOI, R_ARM_THM_ABS5, and R_ARM_BASE_ABS. | |
1407 | (Relocatable_size_for_reloc::get_size_for_reloc): Handle | |
1408 | R_ARM_ABS16, R_ARM_THM_ABS5, R_ARM_ABS32_NOI, R_ARM_ABS12, and | |
1409 | R_ARM_BASE_ABS. | |
1410 | ||
c2a122b6 ILT |
1411 | 2009-10-09 Viktor Kutuzov <[email protected]> |
1412 | ||
1413 | * arm.cc (Arm_relocate_functions::movw_prel_nc): New function. | |
1414 | (Arm_relocate_functions::movt_prel): New function. | |
1415 | (Arm_relocate_functions::thm_movw_prel_nc): New function. | |
1416 | (Arm_relocate_functions::thm_movt_prel): New function. | |
1417 | (Scan::local): Handle R_ARM_MOVW_PREL_NC, R_ARM_MOVT_PREL, | |
1418 | R_ARM_THM_MOVW_PREL_NC, and R_ARM_THM_MOVT_PREL. | |
1419 | (Scan::global, Relocate::relocate): Likewise. | |
1420 | (Relocatable_size_for_reloc::get_size_for_reloc): Likewise. | |
1421 | ||
c4aa1e2d ILT |
1422 | 2009-10-09 Mikolaj Zalewski <[email protected]> |
1423 | ||
1424 | * gold.cc: (queue_initial_tasks): Pass incremental_inputs to | |
1425 | Incremental_checker. | |
1426 | * incremental.cc: (INCREMENTAL_LINK_VERSION): Change type to | |
1427 | unsigned int. | |
1428 | (class Incremental_inputs_header): New class. | |
1429 | (Incremental_inputs_header_writer): Edit comment. | |
1430 | (Incremental_inputs_entry): New class. | |
1431 | (Incremental_inputs_entry_writer): Edit comment. | |
1432 | (Sized_incremental_binary::do_find_incremental_inputs_section): | |
1433 | Add *strtab_shndx parameter, fill it. | |
1434 | (Sized_incremental_binary::do_check_inputs): New method. | |
1435 | (Incremental_checker::can_incrementally_link_output_file): Use | |
1436 | Sized_incremental_binary::check_inputs. | |
1437 | (Incremental_inputs::report_command_line): Save command line in | |
1438 | command_line_. | |
1439 | * incremental.h: | |
1440 | (Incremental_binary::find_incremental_inputs_section): New | |
1441 | method. | |
1442 | (Incremental_binary::do_find_incremental_inputs_section): Add | |
1443 | strtab_shndx parameter. | |
1444 | (Incremental_binary::do_check_inputs): New pure virtual method. | |
1445 | (Sized_incremental_binary::do_check_inputs): Declare. | |
1446 | (Incremental_checker::Incremental_checker): Add incremental_inputs | |
1447 | parameter, use it to initialize incremental_inputs_. | |
1448 | (Incremental_checker::incremental_inputs_): New field. | |
1449 | (Incremental_checker::command_line): New method. | |
1450 | (Incremental_checker::inputs): New method. | |
1451 | (Incremental_checker::command_line_): New field. | |
1452 | ||
c549a694 ILT |
1453 | 2009-10-09 Mikolaj Zalewski <[email protected]> |
1454 | ||
1455 | * incremental.cc: Include <cstdarg> and "target-select.h". | |
1456 | (vexplain_no_incremental): New function. | |
1457 | (explain_no_incremental): New function. | |
1458 | (Incremental_binary::error): New method. | |
1459 | (Sized_incremental_binary::do_find_incremental_inputs_section): New | |
1460 | method. | |
1461 | (make_sized_incremental_binary): New function. | |
1462 | (open_incremental_binary): New function. | |
1463 | (can_incrementally_link_file): Add checks if output is ELF and has | |
1464 | inputs section. | |
1465 | * incremental.h: Include "elfcpp_file.h" and "output.h". | |
1466 | (Incremental_binary): New class. | |
1467 | (Sized_incremental_binary): New class. | |
1468 | (open_incremental_binary): Declare. | |
1469 | * object.cc (is_elf_object): Use | |
1470 | elfcpp::Elf_recognizer::is_elf_file. | |
1471 | (make_elf_object): Use elfcpp::Elf_recognizer::is_valid_header. | |
1472 | * output.h (Output_file::filesize): New method. | |
1473 | ||
fd3c5f0b ILT |
1474 | 2009-10-07 Viktor Kutuzov <[email protected]> |
1475 | ||
1476 | * arm.cc (Arm_relocate_functions::extract_arm_movw_movt_addend): | |
1477 | New function. | |
1478 | (Arm_relocate_functions::insert_val_arm_movw_movt): New function. | |
1479 | (Arm_relocate_functions::extract_thumb_movw_movt_addend): New | |
1480 | function. | |
1481 | (Arm_relocate_functions::insert_val_thumb_movw_movt): New | |
1482 | function. | |
1483 | (Arm_relocate_functions::movw_abs_nc): New function. | |
1484 | (Arm_relocate_functions::movt_abs): New function. | |
1485 | (Arm_relocate_functions::thm_movw_abs_nc): New function. | |
1486 | (Arm_relocate_functions::thm_movt_abs): New function. | |
1487 | (Scan::local): Handle R_ARM_MOVW_ABS_NC, R_ARM_MOVT_ABS, | |
1488 | R_ARM_THM_MOVW_ABS_NC, R_ARM_THM_MOVT_ABS. | |
1489 | (Scan::global): Likewise. | |
1490 | (Relocate::relocate): Likewise. | |
1491 | (Relocatable_size_for_reloc::get_size_for_reloc): Likewise. | |
1492 | ||
7f5309a5 ILT |
1493 | 2009-10-07 Viktor Kutuzov <[email protected]> |
1494 | ||
1495 | * arm.cc (Arm_relocate_functions::got_prel) New function. | |
1496 | (Scan::local, Scan::global): Handle R_ARM_GOT_PREL. | |
1497 | (Relocate::relocate): Likewise. | |
1498 | (Relocatable_size_for_reloc::get_size_for_reloc): Likewise. | |
1499 | ||
364c7fa5 ILT |
1500 | 2009-10-06 Ian Lance Taylor <[email protected]> |
1501 | ||
1502 | * options.h (class General_options): Define | |
1503 | split_stack_adjust_size parameter. | |
1504 | * object.h (class Object): Add uses_split_stack_ and | |
1505 | has_no_split_stack_ fields. Add uses_split_stack and | |
1506 | has_no_split_stack accessor functions. Declare | |
1507 | handle_split_stack_section. | |
1508 | (class Reloc_symbol_changes): Define. | |
1509 | (class Sized_relobj): Define Function_offsets. Declare | |
1510 | split_stack_adjust, split_stack_adjust_reltype, and | |
1511 | find_functions. | |
1512 | * object.cc (Object::handle_split_stack_section): New function. | |
1513 | (Sized_relobj::do_layout): Call handle_split_stack_section. | |
1514 | * dynobj.cc (Sized_dynobj::do_layout): Call | |
1515 | handle_split_stack_section. | |
1516 | * reloc.cc (Sized_relobj::relocate_sections): Call | |
1517 | split_stack_adjust for executable sections in split_stack | |
1518 | objects. Pass reloc_map to relocate_section. | |
1519 | (Sized_relobj::split_stack_adjust): New function. | |
1520 | (Sized_relobj::split_stack_adjust_reltype): New function. | |
1521 | (Sized_relobj::find_functions): New function. | |
1522 | * target-reloc.h: Include "object.h". | |
1523 | (relocate_section): Add reloc_symbol_changes parameter. Change | |
1524 | all callers. | |
1525 | * target.h (class Target): Add calls_non_split method. Declare | |
1526 | do_calls_non_split virtual method. Declare match_view and | |
1527 | set_view_to_nop. | |
1528 | * target.cc: Include "elfcpp.h". | |
1529 | (Target::do_calls_non_split): New function. | |
1530 | (Target::match_view): New function. | |
1531 | (Target::set_view_to_nop): New function. | |
1532 | * gold.cc (queue_middle_tasks): Give an error if mixing | |
1533 | split-stack and non-split-stack objects with -r. | |
1534 | * i386.cc (Target_i386::relocate_section): Add | |
1535 | reloc_symbol_changes parameter. | |
1536 | (Target_i386::do_calls_non_split): New function. | |
1537 | * x86_64.cc (Target_x86_64::relocate_section): Add | |
1538 | reloc_symbol_changes parameter. | |
1539 | (Target_x86_64::do_calls_non_split): New function. | |
1540 | * arm.cc (Target_arm::relocate_section): Add reloc_symbol_changes | |
1541 | parameter. | |
1542 | * powerpc.cc (Target_powerpc::relocate_section): Add | |
1543 | reloc_symbol_changes parameter. | |
1544 | * sparc.cc (Target_sparc::relocate_section): Add | |
1545 | reloc_symbol_changes parameter. | |
1546 | * configure.ac: Call AM_CONDITIONAL for the default target. | |
1547 | * configure: Rebuild. | |
1548 | * testsuite/Makefile.am (TEST_AS): New variable. | |
1549 | (check_SCRIPTS): Add split_i386.sh and split_x86_64.sh. | |
1550 | (check_DATA): Add split_i386 and split_x86_64 files. | |
1551 | (SPLIT_DEFSYMS): Define. | |
1552 | (split_i386_[1234n].o): New targets. | |
1553 | (split_i386_[124]): New targets. | |
1554 | (split_i386_[1234r].stdout): New targets. | |
1555 | (split_x86_64_[1234n].o): New targets. | |
1556 | (split_x86_64_[124]): New targets. | |
1557 | (split_x86_64_[1234r].stdout): New targets. | |
1558 | (MOSTLYCLEANFILES): Add new executables. | |
1559 | * testsuite/split_i386.sh: New file. | |
1560 | * testsuite/split_x86_64.sh: New file. | |
1561 | * testsuite/split_i386_1.s: New file. | |
1562 | * testsuite/split_i386_2.s: New file. | |
1563 | * testsuite/split_i386_3.s: New file. | |
1564 | * testsuite/split_i386_4.s: New file. | |
1565 | * testsuite/split_i386_n.s: New file. | |
1566 | * testsuite/split_x86_64_1.s: New file. | |
1567 | * testsuite/split_x86_64_2.s: New file. | |
1568 | * testsuite/split_x86_64_3.s: New file. | |
1569 | * testsuite/split_x86_64_4.s: New file. | |
1570 | * testsuite/split_x86_64_n.s: New file. | |
1571 | * testsuite/testfile.cc (Target_test): Update relocation_section | |
1572 | function. | |
1573 | * testsuite/Makefile.in: Rebuild. | |
1574 | ||
e8a9fcda ILT |
1575 | 2009-10-06 Ian Lance Taylor <[email protected]> |
1576 | ||
1577 | * i386.cc (class Target_i386::Relocate): Add ldo_addrs_ field. | |
1578 | (Target_i386::Relocate::relocate_tls): Call fix_up_ldo before | |
1579 | changing local_dynamic_type_ from LOCAL_DYNAMIC_NONE. When | |
1580 | handling R_386_TLS_LDO_32, if local_dynamic_type_ is NONE, push | |
1581 | the address on ldo_addrs_. | |
1582 | (Target_i386::Relocate::fix_up_ldo): New function. | |
1583 | ||
e99daf92 ILT |
1584 | 2009-10-06 Rafael Espindola <[email protected]> |
1585 | ||
1586 | * plugin.cc (add_input_library): New. | |
1587 | (Plugin::load): Add add_input_library to tv. | |
1588 | (Plugin_manager::add_input_file): Add the is_lib argument. | |
1589 | (add_input_file): Update call to Plugin_manager::add_input_file. | |
1590 | (add_input_library): New. | |
1591 | * plugin.h (Plugin_manager::add_input_file): Add the is_lib argument. | |
1592 | ||
966d4097 DK |
1593 | 2009-09-30 Doug Kwan <[email protected]> |
1594 | ||
1595 | * arm.cc (Target_arm::may_need_copy_reloc): Check for THUMB function | |
1596 | symbol and call Symbol::may_need_copy_reloc to determine if | |
1597 | a copy reloc is needed. | |
1598 | * copy-relocs.cc (Copy_relocs::need_copy_reloc): Return false if -z | |
1599 | nocopyreloc is given in command line. | |
1600 | (Copy_relocs::emit_copy_reloc): Assert that -z nocopyreloc is not | |
1601 | given in command line. | |
1602 | * i386.cc (Target_i386::may_need_copy_reloc): Remove. | |
1603 | (Target_i386::Scan::global): Use Symbol::may_need_copy_reloc instead | |
1604 | of the removed Target_i386::may_need_copy_reloc. | |
1605 | * options.h (copyreloc): New option with default value false. | |
1606 | * powerpc.cc (Target_powerpc::may_need_copy_reloc): Remove. | |
1607 | (Target_powerpc::Scan::global): Use Symbol::may_need_copy_reloc | |
1608 | instead of the removed Target_powerpc::may_need_copy_reloc. | |
1609 | * sparc.cc (Target_powerpc::may_need_copy_reloc): Remove. | |
1610 | (Target_sparc::Scan::global): Use Symbol::may_need_copy_reloc | |
1611 | instead of the removed Target_sparc::may_need_copy_reloc. | |
1612 | * symtab.h (Symbol::may_need_copy_reloc): New method definition. | |
1613 | * x86_64.cc (Target_powerpc::may_need_copy_reloc): Remove. | |
1614 | (Target_x86_64::Scan::global): Use Symbol::may_need_copy_reloc | |
1615 | instead of the removed Target_x86_64::may_need_copy_reloc. | |
1616 | ||
029ba973 ILT |
1617 | 2009-09-30 Ian Lance Taylor <[email protected]> |
1618 | ||
1619 | * object.h (class Object): Remove target_ field, and target, | |
1620 | sized_target, and set_target methods. | |
1621 | (Object::sized_target): Remove. | |
1622 | (class Sized_relobj): Update declarations. Remove sized_target. | |
1623 | * object.cc (Sized_relobj::setup): Remove target parameter. | |
1624 | Change all callers. | |
1625 | (Input_objects::add_object): Don't do anything with the target. | |
1626 | (make_elf_sized_object): Add punconfigured parameter. Change all | |
1627 | callers. Set or test parameter target. | |
1628 | * dynobj.cc (Sized_dynobj::target): Remove target parameter. | |
1629 | Change all callers. | |
1630 | * parameters.cc (Parameters::set_target): Change parameter type to | |
1631 | be non-const. | |
1632 | (Parameters::default_target): Remove. | |
1633 | (set_parameters_target): Change parameter type to be non-const. | |
1634 | (parameters_force_valid_target): New function. | |
1635 | (parameters_clear_target): New function. | |
1636 | * parameters.h (class Parameters): Update declarations. Remove | |
1637 | default_target method. Add sized_target and clear_target | |
1638 | methods. Change target_ to be non-const. | |
1639 | (set_parameters_target): Update declaration. | |
1640 | (parameters_force_valid_target): Declare. | |
1641 | (parameters_clear_target): Declare. | |
1642 | * readsyms.cc (Read_symbols::do_read_symbols): Pass punconfigured | |
1643 | as NULL if we aren't searching. | |
1644 | (Add_symbols::run): Don't check for compatible target. | |
1645 | * fileread.cc (Input_file::open_binary): Call | |
1646 | parameters_force_valid_target. | |
1647 | * gold.cc (queue_middle_tasks): Likewise. | |
1648 | * plugin.cc (make_sized_plugin_object): Likewise. Don't call | |
1649 | set_target on object. | |
1650 | * dynobj.h (class Sized_dynobj): Update declarations. | |
1651 | * archive.cc (Archive::get_elf_object_for_member): Return NULL if | |
1652 | make_elf_object returns NULL. | |
1653 | (Archive::include_member): Don't check whether object target is | |
1654 | compatible. | |
1655 | * output.cc (Output_section::add_input_section): Get target from | |
1656 | parameters. | |
1657 | (Output_section::relax_input_section): Likewise. | |
1658 | * reloc.cc (Sized_relobj::do_gc_process_relocs): Get target from | |
1659 | parameters. | |
1660 | (Sized_relobj::do_scan_relocs): Likewise. | |
1661 | (Sized_relobj::relocate_sections): Likewise. | |
1662 | * resolve.cc (Symbol_table::resolve): Likewise. | |
1663 | * symtab.cc (Symbol_table::wrap_symbol): Likewise. Remove object | |
1664 | parameter. Change all callers. | |
1665 | (Symbol_table::add_from_object): Get target from parameters. | |
1666 | (Symbol_table::add_from_relobj): Don't check object target. | |
1667 | (Symbol_table::add_from_dynobj): Likewise. | |
1668 | (Symbol_table::define_special_symbol): Get target from | |
1669 | parameters. | |
1670 | * symtab.h (class Symbol_table): Update declaration. | |
1671 | * testsuite/binary_unittest.cc (gold_testsuite): Remove target | |
1672 | parameter. Change all callers. Clear parameter target. | |
1673 | (Binary_test): Test target here. | |
1674 | * testsuite/object_unittest.cc (gold_testsuite): Remove | |
1675 | target_test_pointer parameter. Change all callers. | |
1676 | (Object_test): Test target here. | |
1677 | ||
a6a22b83 ILT |
1678 | 2009-09-26 Ian Lance Taylor <[email protected]> |
1679 | ||
1680 | * testsuite/initpri1.c: Don't try to use constructor priorities if | |
1681 | compiling with gcc before 4.3. | |
1682 | ||
6a8f49fe ILT |
1683 | 2009-09-22 Mikolaj Zalewski <[email protected]> |
1684 | ||
1685 | * testsuite/retain_symbols_file_test.sh (check_present): Change | |
1686 | output file name to retain_symbols_file_test.stdout. | |
1687 | (check_absent): Likewise. | |
1688 | ||
8c604651 CS |
1689 | 2009-09-18 Craig Silverstein <[email protected]> |
1690 | ||
1691 | * object.cc (Sized_relobj::do_count): Test should_retain_symbol map. | |
1692 | * options.cc: Include <cerrno> and <fstream>. | |
1693 | (General_options::finalize): Parse -retain-symbols-file tag. | |
1694 | * options.h: New flag. | |
1695 | (General_options): New method should_retain_symbol, new | |
1696 | variable symbols_to_retain. | |
1697 | * symtab.cc (Symbol_table::sized_finalize_symbol): Test | |
1698 | should_retain_symbol map. | |
1699 | * testsuite/Makefile.am (retain_symbols_file_test): New test. | |
1700 | * testsuite/Makefile.in: Regenerate. | |
1701 | * testsuite/retain_symbols_file_test.sh: New file. | |
1702 | ||
ca58b19f NC |
1703 | 2009-09-18 Nick Clifton <[email protected]> |
1704 | ||
1705 | * po/es.po: Updated Spanish translation. | |
1706 | ||
20e6d0d6 DK |
1707 | 2009-09-17 Doug Kwan <[email protected]> |
1708 | ||
1709 | * debug.h (DEBUG_RELAXATION): New constant. | |
1710 | (DEBUG_ALL): Add DEBUG_RELAXATION. | |
1711 | (debug_string_to_enum): Add relaxation debug option. | |
1712 | * layout.cc | |
1713 | (Layout::Relaxation_debug_check::check_output_data_for_reset_values, | |
1714 | Layout::Relaxation_debug_check::read_sections, | |
1715 | Layout::Relaxation_debug_check::read_sections): New method definitions. | |
1716 | (Layout::Layout): Initialize data members | |
1717 | record_output_section_data_from_scrips_, | |
1718 | script_output_section_data_list_ and relaxation_debug_check_. | |
1719 | (Layout::save_segments, Layout::restore_segments, | |
1720 | Layout::clean_up_after_relaxation, Layout::prepare_for_relaxation, | |
1721 | Layout::relaxation_loop_body): New method definitions. | |
1722 | (Layout::finalize): Support relaxation. Move section layout code to | |
1723 | Layout::relaxation_loop_body. | |
1724 | (Layout::set_asection_address_from_script): Move code for orphan | |
1725 | section placement out. | |
1726 | (Layout::place_orphan_sections_in_script): New method definition. | |
1727 | * layout.h (Output_segment_headers, Output_file_header): | |
1728 | New forward class declarations. | |
1729 | (Layout::~Layout): Define. | |
1730 | (Layout::new_output_section_data_from_script): New method definition. | |
1731 | (Layout::place_orphan_sections_in_script): New method declaration. | |
1732 | (Layout::Segment_states): New type declaration. | |
1733 | (Layout::save_segments, Layout::restore_segments, | |
1734 | Layout::clean_up_after_relaxation, Layout::prepare_for_relaxation, | |
1735 | Layout::relaxation_loop_body): New method declarations. | |
1736 | (Layout::Output_section_data_list): New type declaration. | |
1737 | (Layout::Relaxation_debug_check): New class definition. | |
1738 | (Layout::record_output_section_data_from_script_, | |
1739 | Layout::script_output_section_data_list_, Layout::segment_states_, | |
1740 | Layout::relaxation_debug_check_): New data members. | |
1741 | * output.cc: (Output_section_headers::do_size): New method definition. | |
1742 | (Output_section_headers::Output_section_headers): Move size | |
1743 | computation to Output_section_headers::do_size. | |
1744 | (Output_segment_headers::do_size): New method definition. | |
1745 | (Output_file_header::Output_file_header): Move size computation to | |
1746 | Output_file_header::do_size and call it. | |
1747 | (Output_file_header::do_size): New method definition. | |
1748 | (Output_data_group::Output_data_group): Adjust call to | |
1749 | Output_section_data. | |
1750 | (Output_data_dynamic::set_final_data_size): Add DT_NULL tag only once. | |
1751 | (Output_symtab_xindex::do_write): Add array bound check. | |
1752 | (Output_section::Input_section::print_to_mapfile): Handle | |
1753 | RELAXED_INPUT_SECTION_CODE. | |
1754 | (Output_section::Output_section): Initialize data member checkpoint_. | |
1755 | (Output_section::~Output_section): Delete checkpoint object pointed | |
1756 | by checkpoint_. | |
1757 | (Output_section::add_input_section): Always add an Input_section if | |
1758 | relaxing. | |
1759 | (Output_section::add_merge_input_section): Add assert. | |
1760 | (Output_section::relax_input_section): New method definition. | |
1761 | (Output_section::set_final_data_size): Set load address to zero for | |
1762 | an unallocated section. | |
1763 | (Output_section::do_address_and_file_offset_have_reset_values): | |
1764 | New method definition. | |
1765 | (Output_section::Input_section_sort_enty::Input_section_sort_enty): | |
1766 | Handle relaxed input section. | |
1767 | (Output_section::sort_attached_input_sections): Checkpoint input | |
1768 | section list lazily. | |
1769 | (Output_section::get_input_sections): Change type of input_sections to | |
1770 | list of Simple_input_section pointers. Checkpoint input section list | |
1771 | lazily. Also handle relaxed input sections. | |
1772 | (Output_section::add_input_section_for_script): Take a reference to | |
1773 | a Simple_input_section object instead of Relobj pointer and section | |
1774 | index as parameter. Handle relaxed input sections. | |
1775 | (Output_section::save_states, Output_section::restore_states): New | |
1776 | method definitions. | |
1777 | * output.h (Output_data::Output_data): Initialize is_data_size_fixed_. | |
1778 | (Output_data::is_data_size_fixed): New method definition. | |
1779 | (Output_data::reset_addresss_and_file_offset): Do not reset data size | |
1780 | if it is fixed. | |
1781 | (Output_data::address_and_file_offset_have_reset_values): New method | |
1782 | definition. | |
1783 | (Output_data::do_address_and_file_offset_have_reset_values): New method | |
1784 | definition. | |
1785 | (Output_data::set_data_size): Check that data size is not fixed. | |
1786 | (Output_data::fix_data_size): New method definition. | |
1787 | (Output_data::is_data_size_fixed_): New data member. | |
1788 | (Output_section_headers::set_final_data_size): New method definition. | |
1789 | (Output_section_headers::do_size): New method declaration. | |
1790 | (Output_segment_headers::set_final_data_size): New method definition. | |
1791 | (Output_segment_headers::do_size): New method declaration. | |
1792 | (Output_file_header::set_final_data_size)::New method definition. | |
1793 | (Output_file_header::do_size)::New method declaration. | |
1794 | (Output_section_data::Output_section_data): Add new parameter | |
1795 | is_data_size_fixed and use it to fix data size. | |
1796 | (Output_data_const::Output_data_const): Adjust call to base class | |
1797 | constructor and fix data size. | |
1798 | (Output_data_const_buffer::Output_data_const_buffer): Adjust call to | |
1799 | base class constructor and fix data size. | |
1800 | (Output_data_fixed_space::Output_data_fixed_space): Adjust call to | |
1801 | base class constructor and fix data size. | |
1802 | (Output_data_zero_fill::Output_data_zero_fill): Adjust call to base | |
1803 | class constructor and fix data size. | |
1804 | (Output_data_group::set_final_data_size): New method definition. | |
1805 | (Output_data_dynamic::Dynamic_entry::tag): New method definition. | |
1806 | (Output_symtab_xindex::Output_symtab_xindex): Adjust call to base | |
1807 | class constructor and fix data size. | |
1808 | (Output_relaxed_input_section): New class definition. | |
1809 | (Output_section::Simple_input_section): New class definition. | |
1810 | (Output_section::get_input_sections): Adjust parameter list. | |
1811 | (Output_section::add_input_section_for_script): Same. | |
1812 | (Output_section::save_states, Output_section::restore_states, | |
1813 | Output_section::do_address_and_file_offset_have_reset_values, | |
1814 | (Output_section::Input_section::Input_section): Handle | |
1815 | RELAXED_INPUT_SECTION_CODE. Add new overload for | |
1816 | Output_relaxed_input_section. | |
1817 | (Output_section::Input_section::is_input_section, | |
1818 | Output_section::Input_section::set_output_section): Handle relaxed | |
1819 | input section. | |
1820 | (Output_section::Input_section::is_relaxed_input_section, | |
1821 | Output_section::Input_section::output_section_data, | |
1822 | Output_section::Input_section::relaxed_input_section): New method | |
1823 | definitions. | |
1824 | (Output_section::Input_section::RELAXED_INPUT_SECTION_CODE): New enum | |
1825 | value. | |
1826 | (Output_section::Input_section::u1_): Update comments. | |
1827 | (Output_section::Input_section::u2_): Add new union member poris. | |
1828 | (Output_section::Checkpoint_output_section): New classs definition. | |
1829 | (Output_section::relax_input_section): New method declaration. | |
1830 | (Output_section::checkpoint_): New data member. | |
1831 | (Output_segment): Update comments. | |
1832 | (Output_segment::Output_segment): Un-privatize copy constructor. | |
1833 | (Output_segment::operator=): Un-privatize. | |
1834 | * script-sections.cc (Output_section_element::Input_section_list): | |
1835 | Change element type to Output_section::Simple_input_section. | |
1836 | (Output_section_element_dot_assignment::set_section_addresses): | |
1837 | Register output section data for relaxation clean up. | |
1838 | (Output_data_exression::Output_data_expression): Adjust call to base | |
1839 | constructor to fix data size. | |
1840 | (Output_section_element_data::set_section_addresses): Register | |
1841 | Output_data_expression object for relaxation clean up. | |
1842 | (struct Input_section_info): Replace Relobj pointer and section index | |
1843 | pair with Output_section::Simple_input_section and Convert struct to a | |
1844 | class. | |
1845 | (Input_section_sorter::operator()): Adjust access to | |
1846 | Input_section_info data member to use accessors. | |
1847 | (Output_section_element_input::set_section_addresses): Use layout | |
1848 | parameter. Adjust code to use Output_section::Simple_input_section | |
1849 | and Input_secction_info classes. Register filler for relaxation | |
1850 | clean up. | |
1851 | (Orphan_output_section::set_section_addresses): Replace Relobj pointer | |
1852 | and section index pair with Output_section::Simple_input_section | |
1853 | class. Adjust code accordingly. | |
1854 | (Phdrs_element::release_segment): New method definition. | |
1855 | (Script_sections::attach_sections_using_phdrs_clause): Do not modify | |
1856 | segment list. | |
1857 | (Script_sections::release_segments): New method definition. | |
1858 | * gold/script-sections.h (Script_sections::release_segments): New | |
1859 | method declaration. | |
1860 | * gold/target.h (Target::may_relax, Target::relax, | |
1861 | Target::do_may_relax, Target::do_relax): New method definitions. | |
1862 | ||
5e445df6 ILT |
1863 | 2009-09-17 Viktor Kutuzov <[email protected]> |
1864 | ||
1865 | * arm.cc (has_signed_unsigned_overflow): New function. | |
1866 | (Arm_relocate_functions::abs8): New function. | |
1867 | (Target_arm::Scan::local): Handle R_ARM_ABS8. | |
1868 | (Target_arm::Scan::global): Likewise. | |
1869 | (Target_arm::relocate::relocate): Likewise. | |
1870 | (Target_arm::Relocatable_size_for_reloc::get_size_for_reloc): | |
1871 | Likewise. | |
1872 | ||
8c604651 | 1873 | 2009-09-16 Cary Coutant <[email protected]> |
72fef11a CC |
1874 | |
1875 | * testsuite/Makefile.am (MOSTLYCLEANFILES): Add more generated files. | |
1876 | * testsuite/Makefile.in: Regenerate. | |
1877 | ||
1e9cc1c2 NC |
1878 | 2009-09-11 Nick Clifton <[email protected]> |
1879 | ||
1880 | * po/gold.pot: Updated by the Translation project. | |
1881 | ||
6a89f575 CC |
1882 | 2009-09-08 Cary Coutant <[email protected]> |
1883 | ||
1884 | * output.cc (Output_file::open): Add execute permission to empty file. | |
1885 | * testsuite/Makefile.am (permission_test): New test. | |
1886 | * testsuite/Makefile.in: Regenerate. | |
1887 | ||
fdcac5af ILT |
1888 | 2009-09-02 Ian Lance Taylor <[email protected]> |
1889 | ||
1890 | * output.cc (Output_file::resize): Call map_no_anonymous rather | |
1891 | than map. | |
1892 | ||
44453f85 ILT |
1893 | 2009-09-01 Mikolaj Zalewski <[email protected]> |
1894 | ||
1895 | * gold.cc: Include "incremental.h". | |
1896 | (queue_initial_tasks): Call Incremental_checker methods. | |
1897 | * incremental.cc: Include "output.h". | |
1898 | (Incremental_checker::can_incrementally_link_output_file): New | |
1899 | method. | |
1900 | * incremental.h (Incremental_checker): New class. | |
1901 | ||
1902 | * output.cc (Output_file::open_for_modification): New method. | |
1903 | (Output_file::map_anonymous): Changed return type to bool. Record | |
1904 | map in base_ field. | |
1905 | (Output_file::map_no_anonymous): New method, broken out of map. | |
1906 | (Output_file::map): Use map_no_anonymous and map_anonymous. | |
1907 | * output.h (class Output_file): Update declarations. | |
1908 | ||
293c1386 CC |
1909 | 2009-08-24 Cary Coutant <[email protected]> |
1910 | ||
1911 | * options.h (Command_line::Pre_options): New class. | |
1912 | (Command_line::pre_options): New member. | |
1913 | * options.cc (gold::options::ready_to_register): New variable. | |
1914 | (One_option::register_option): Do nothing if not registering options. | |
1915 | Assert if same short option registered twice. | |
1916 | (General_options::General_options): Turn off option registration when | |
1917 | done constructing. | |
1918 | (Command_line::Pre_options::Pre_options): New constructor. | |
1919 | ||
f773f3d2 CC |
1920 | 2009-08-24 Cary Coutant <[email protected]> |
1921 | ||
06a73cfe CC |
1922 | * options.h (General_options::no_keep_memory): Remove incorrect |
1923 | short option. | |
f773f3d2 | 1924 | |
a15af8e2 RW |
1925 | 2009-08-24 Ralf Wildenhues <[email protected]> |
1926 | ||
1927 | * Makefile.am (am__skiplex, am__skipyacc): New. | |
1928 | * Makefile.in: Regenerate. | |
1929 | ||
c462b41b RW |
1930 | 2009-08-22 Ralf Wildenhues <[email protected]> |
1931 | ||
14ec8efd RW |
1932 | * Makefile.am (AM_CPPFLAGS): Renamed from ... |
1933 | (INCLUDES): ... this. | |
1934 | * testsuite/Makefile.am (AUTOMAKE_OPTIONS): Add -Wno-portability. | |
1935 | (AM_CPPFLAGS): Renamed from ... | |
1936 | (INCLUDE): ... this. | |
1937 | * Makefile.in, testsuite/Makefile.in: Regenerate. | |
1938 | ||
81ecdfbb RW |
1939 | * Makefile.in: Regenerate. |
1940 | * aclocal.m4: Likewise. | |
1941 | * config.in: Likewise. | |
1942 | * configure: Likewise. | |
1943 | * testsuite/Makefile.in: Likewise. | |
1944 | ||
c462b41b RW |
1945 | * Makefile.am (AUTOMAKE_OPTIONS): Add foreign. |
1946 | * testsuite/Makefile.am (AUTOMAKE_OPTIONS): Add foreign. | |
1947 | * Makefile.in: Regenerate. | |
1948 | * testsuite/Makefile.in: Regenerate. | |
1949 | ||
2da73f13 CC |
1950 | 2009-08-19 Cary Coutant <[email protected]> |
1951 | ||
1952 | * resolve.cc (Symbol_table::resolve): Don't complain about defined | |
1953 | symbols in shared libraries overridden by hidden or internal symbols | |
1954 | in the main program. | |
1955 | ||
2db70501 CD |
1956 | 2009-08-19 Chris Demetriou <[email protected]> |
1957 | ||
1958 | * testsuite/debug_msg.sh: Match .* rather than ${srcdir} when | |
1959 | checking source file names in error messages. | |
1960 | ||
f733487b DK |
1961 | 2009-08-18 Doug Kwan <[email protected]> |
1962 | ||
1963 | * dynobj.cc (Sized_dynobj::setup): Take a Target object instead of | |
1964 | an elcpp::Ehdr as parameter. Adjust call to set_target. | |
1965 | * dynobj.h (Sized_dynobj::setup): Take a Target object instead of | |
1966 | an elfcpp::Ehdr as parameter. | |
1967 | * object.cc (Object::set_target): Remove the version that looks up | |
1968 | a target and sets it. | |
1969 | (Sized_relobj::setup): Take a Target object instead of | |
1970 | an elfcpp::Ehdr as parameter. Adjust call to set_target. | |
1971 | (make_elf_sized_object): Find target and ask target to | |
1972 | make an ELF object. | |
1973 | * object.h: (Object::set_target): Remove the version that looks up | |
1974 | a target and sets it. | |
1975 | (Sized_relobj::setup): Take a Target object instead of | |
1976 | an elfcpp:Ehdr as parameter. | |
1977 | * target.cc: Include dynobj.h. | |
1978 | (Target::do_make_elf_object_implementation): New. | |
1979 | (Target::do_make_elf_object): New. | |
1980 | * target.h (Target::make_elf_object): New template declaration. | |
1981 | (Target::do_make_elf_object): New method declarations. | |
1982 | (Target::do_make_elf_object_implementation): New template declaration. | |
1983 | ||
cc70f101 ILT |
1984 | 2009-08-14 Ian Lance Taylor <[email protected]> |
1985 | ||
1986 | * gold.h (FUNCTION_NAME): Define. | |
1987 | (gold_unreachable): Use FUNCTION_NAME. | |
1988 | ||
ef5e0cb1 ST |
1989 | 2009-08-12 Sriraman Tallam <[email protected]> |
1990 | ||
1991 | * icf.cc (Icf::find_identical_sections): Issue a warning when a | |
1992 | symbol in the --keep-unique list is not found. | |
1993 | ||
48c187ce ST |
1994 | 2009-08-12 Sriraman Tallam <[email protected]> |
1995 | ||
1996 | * icf.cc (Icf::find_identical_sections): Unfold symbols that have | |
1997 | been maked as --keep-unique. | |
1998 | (Icf::unfold_section): New function. | |
1999 | * icf.h (Icf::unfold_section): New function. | |
2000 | * options.h (General_options::keep_unique): New option. | |
2001 | * testsuite/Makefile.am: Add commands to build icf_keep_unique_test. | |
2002 | * testsuite/Makefile.in: Regenerate. | |
2003 | * testsuite/icf_keep_unique_test.sh: New file. | |
2004 | * testsuite/icf_keep_unique_test.cc: New file. | |
2005 | ||
645afe0c CC |
2006 | 2009-08-12 Cary Coutant <[email protected]> |
2007 | ||
2008 | PR 10471 | |
2009 | * resolve.cc (Symbol_table::resolve): Check for references from | |
2010 | dynamic objects to hidden and internal symbols. | |
2011 | * testsuite/Makefile.am (hidden_test.sh): New test. | |
2012 | * testsuite/Makefile.in: Regenerate. | |
2013 | * testsuite/hidden_test.sh: New script. | |
2014 | * testsuite/hidden_test_1.c: New test source. | |
2015 | * testsuite/hidden_test_main.c: New test source. | |
2016 | ||
11af873f DK |
2017 | 2009-08-11 Doug Kwan <[email protected]> |
2018 | ||
2019 | * arm.cc: Update comments. | |
2020 | (Target_arm::do_finalize_sections): Add a special PT_ARM_EXIDX | |
2021 | segment to locate the .ARM.exidx section if present. | |
2022 | ||
b9f7d72d DK |
2023 | 2009-08-09 Doug Kwan <[email protected]> |
2024 | ||
2025 | * dynobj.h (Sized_dynobj::do_section_entsize): Revert the previous | |
2026 | patch. | |
2027 | ||
ddd3c53c ST |
2028 | 2009-08-07 Sriraman Tallam <[email protected]> |
2029 | * dynobj.h (Sized_dynobj::do_section_entsize): Add return to avoid | |
2030 | compiler warnings. | |
2031 | ||
27721062 ST |
2032 | 2009-08-06 Sriraman Tallam <[email protected]> |
2033 | ||
2034 | * x86_64.cc (Target_x86_64::Relocate::relocate_tls): Check for a | |
2035 | valid tls_segment only for non-debug-section relocations. | |
2036 | * testsuite/Makefile.am: Add gc_tls_test. | |
2037 | * testsuite/Makefile.in: Regenerate. | |
2038 | * testsuite/gc_tls_test.cc: New file. | |
2039 | * testsuite/gc_tls_test.sh: New file. | |
2040 | ||
ef15dade ST |
2041 | 2009-08-05 Sriraman Tallam <[email protected]> |
2042 | ||
2043 | * icf.cc: New file. | |
2044 | * icf.h: New file. | |
2045 | * Makefile.am (CCFILES): Add icf.cc. | |
2046 | (HFILES): Add icf.h | |
2047 | * Makefile.in: Regenerate. | |
2048 | * dynobj.h (Sized_dynobj::do_section_entsize): New function. | |
2049 | * gc.h (gc_process_relocs): Populate lists used by icf to contain | |
2050 | section, symbol and addend information for the relocs. | |
2051 | * gold.cc (queue_middle_tasks): Call identical code folding. | |
2052 | * gold.h: Add defines for multimap. | |
2053 | * layout.cc (Layout::create_symtab_sections): Add symtab as parameter | |
2054 | to the call of finalize_local_symbols. | |
2055 | * main.cc (main): Create object of class Icf. | |
2056 | * object.cc (Sized_relobj::do_layout): Allow this function to be | |
2057 | called twice during icf. | |
2058 | (Sized_relobj::do_finalize_local_symbols): Fold symbols corresponding | |
2059 | to sections marked as identical by icf. | |
2060 | (Sized_relobj::do_section_flags): Get section_flags from Symbols_data | |
2061 | when available. | |
2062 | (Sized_relobj::do_section_entsize): New function. | |
2063 | * object.h (Object::section_entsize): New function. | |
2064 | (Object::do_section_entsize): New pure virtual function. | |
2065 | (Relobj::finalize_local_symbols): Add new parameter. | |
2066 | (Relobj::do_section_entsize): New function. | |
2067 | * options.h (General_options::icf): New option. | |
2068 | (General_options::icf_iterations): New option. | |
2069 | (General_options::print_icf_sections): New option. | |
2070 | * plugin.cc (Sized_pluginobj::do_section_entsize): New function. | |
2071 | * plugin.h (Sized_pluginobj::do_section_entsize): New function. | |
2072 | * reloc.cc (Read_relocs::run): Delay scanning relocs when doing | |
2073 | icf. | |
2074 | * symtab.cc (Symbol_table::is_section_folded): New function. | |
2075 | (Symbol_table::sized_finalize_symbol): Fold symbols corresponding | |
2076 | to sections marked as identical by icf. | |
2077 | * symtab.h (Symbol_table::set_icf): New function. | |
2078 | (Symbol_table::icf): New function. | |
2079 | (Symbol_table::is_section_folded): New function. | |
2080 | (Symbol_table::icf_): New data member. | |
2081 | * target-reloc.h (relocate_section): Ignore sections folded by icf. | |
2082 | * testsuite/Makefile.am: Add commands to build icf_test. | |
2083 | * testsuite/Makefile.in: Regenerate. | |
2084 | * testsuite/icf_test.sh: New file. | |
2085 | * testsuite/icf_test.cc: New file. | |
2086 | ||
c3b65ac4 CD |
2087 | 2009-07-24 Chris Demetriou <[email protected]> |
2088 | ||
2089 | * layout.cc (is_compressible_debug_section): Fix incorrect | |
2090 | comment about compressed section names. | |
2091 | ||
1caf2c51 ILT |
2092 | 2009-07-20 Ian Lance Taylor <[email protected]> |
2093 | ||
2094 | PR 10419 | |
2095 | * x86_64.cc (Target_x86_64::do_code_fill): Correct nop sequences. | |
2096 | ||
1ef4d87f ILT |
2097 | 2009-07-16 Ian Lance Taylor <[email protected]> |
2098 | ||
2099 | PR 10400 | |
2100 | * layout.h: #include <map>. | |
2101 | (class Kept_section): Change from struct to class. Add accessors | |
2102 | and setters. Add section size to Comdat_group mapping. Change | |
2103 | Comdat_group to std::map. Add is_comdat_ field. Add | |
2104 | linkonce_size field in union. | |
2105 | (class Layout): Update declaration of find_or_add_kept_section. | |
2106 | Don't declare find_kept_object. | |
2107 | * layout.cc (Layout::find_or_add_kept_section): Remove candidate | |
2108 | parameter. Add object, shndx, is_comdat, and is_group_name | |
2109 | parameters. Change all callers. Adjust for new Kept_section. | |
2110 | (Layout::find_kept_object): Remove. | |
2111 | * object.cc (Sized_relobj::include_section_group): Update use of | |
2112 | Kept_section. Rename secnum to shndx. Only record | |
2113 | Kept_comdat_section if sections are the same size. | |
2114 | (Sized_relobj::include_linkonce_section): Update use of | |
2115 | Kept_section. Only record Kept_comdat_section if sections are the | |
2116 | same size. Set size of linkonce section. | |
2117 | (Sized_relobj::map_to_kept_section): Update call to | |
2118 | get_kept_comdat_section. | |
2119 | * object.h (class Sized_relobj): Rename fields in | |
2120 | Kept_comdat_section to drop trailing underscores; change object | |
2121 | field to Relobj*. Change Kept_comdat_section_table to store | |
2122 | struct rather than pointer. | |
2123 | (Sized_relobj::set_kept_comdat_section): Remove kept parameter. | |
2124 | Add kept_object and kept_shndx parameters. Change all callers. | |
2125 | (Sized_relobj::get_kept_comdat_section): Change return type to | |
2126 | bool. Add kept_object and kept_shndx parameters. Change all | |
2127 | callers. | |
2128 | * plugin.cc (Pluginobj::include_comdat_group): Update call to | |
2129 | Layout::find_or_add_kept_section. | |
2130 | ||
37c3b7b0 ILT |
2131 | 2009-07-09 Ian Lance Taylor <[email protected]> |
2132 | ||
2133 | * merge.cc (Object_merge_map::initialize_input_to_output_map): | |
2134 | Reserve space in the hash table. | |
2135 | ||
98fa85cb ILT |
2136 | 2009-07-06 Mikolaj Zalewski <[email protected]> |
2137 | ||
2138 | * fileread.cc (File_read::get_mtime): New method. | |
2139 | * fileread.h (Timespec): New structure. | |
2140 | (File_read::get_mtime): New method. | |
2141 | * incremental.cc (Incremental_inputs_entry_data::timestamp_usec): | |
2142 | Renamed from timestamp_nsec. | |
2143 | (Incremental_inputs_entry_write::timestamp_sec): Fix argument to | |
2144 | Elf_Xword. | |
2145 | (Incremental_inputs_entry_write::timestamp_usec): Renamed from | |
2146 | timestamp_nsec. | |
2147 | (Incremental_inputs::report_archive): Save mtime; style fix. | |
2148 | (Incremental_inputs::report_obejct): Save mtime; style fix. | |
2149 | (Incremental_inputs::report_script): Save mtime; style fix. | |
2150 | (Incremental_inputs::finalize_inputs): Style fix. | |
2151 | (Incremental_inputs::finalize): Style fix. | |
2152 | (Incremental_inputs::create_input_section_data): Store inputs | |
2153 | mtime. | |
2154 | * incremental.h (Incremental_inputs::report_script): Add mtime | |
2155 | argument. | |
2156 | (Incremental_inputs::Input_info::Input_info): Intialize only one | |
2157 | union member. | |
2158 | (Incremental_inputs::Input_info::archive): Move to nameless | |
2159 | union. | |
2160 | (Incremental_inputs::Input_info::obejct): Move to nameless union. | |
2161 | (Incremental_inputs::Input_info::script): Move to nameless union. | |
2162 | (Incremental_inputs::mtime): New field. | |
2163 | * script.cc (read_input_script): Pass file mtime to | |
2164 | Incremental_input. | |
2165 | * script.h (Script_info::inputs): Style fix. | |
2166 | ||
c9d70757 ILT |
2167 | 2009-07-01 Ian Lance Taylor <[email protected]> |
2168 | ||
2169 | * freebsd.h (Target_freebsd::do_adjust_elf_header): Use size | |
2170 | instead of 32. | |
2171 | ||
9c547ec3 ILT |
2172 | 2009-06-24 Ian Lance Taylor <[email protected]> |
2173 | ||
2174 | PR 10156 | |
2175 | * layout.cc (Layout::choose_output_section): If we find an | |
2176 | existing section, update the flags. | |
2177 | (Layout::create_notes): New function, broken out of | |
2178 | Layout::finalize. | |
2179 | (Layout::finalize): Don't create note sections. | |
2180 | (Layout::create_note): Don't crash if linker script discards | |
2181 | section. | |
2182 | (Layout::create_gold_note): Likewise. | |
2183 | (Layout::create_build_id): Likewise. Don't set | |
2184 | after_input_sections on the section. | |
2185 | (Layout::create_executable_stack_info): Remove target parameter. | |
2186 | Change caller. | |
2187 | * layout.h (class Layout): Declare create_notes. Update | |
2188 | declaration of create_executable_stack_info. | |
2189 | * gold.cc (queue_middle_tasks): Call create_notes. | |
2190 | * output.cc (Output_section::update_flags_for_input_section): Move | |
2191 | here from output.h. If SHF_ALLOC flag is newly set, mark address | |
2192 | invalid. | |
2193 | * output.h (Output_data::mark_address_invalid): New function. | |
2194 | (class Output_section): Only declare, not define, | |
2195 | update_flags_for_input_section. Remove set_flags. | |
2196 | ||
55458500 ILT |
2197 | 2009-06-24 Ian Lance Taylor <[email protected]> |
2198 | ||
2199 | * script-sections.cc (Output_section_definition:: | |
2200 | set_section_addresses): Rename shadowing local load_address to | |
2201 | laddr. | |
2202 | ||
1307d6cd ILT |
2203 | 2009-06-24 Ian Lance Taylor <[email protected]> |
2204 | ||
2205 | PR 10244 | |
2206 | * reloc.cc (relocate_sections): Skip empty relocation sections. | |
2207 | ||
ec3f783e ILT |
2208 | 2009-06-23 Ian Lance Taylor <[email protected]> |
2209 | ||
2210 | PR 10156 | |
2211 | * layout.cc (Layout::create_note): Use choose_output_section | |
2212 | rather than make_output_section. | |
2213 | ||
459c9f1c ILT |
2214 | 2009-06-23 Ian Lance Taylor <[email protected]> |
2215 | ||
2216 | PR 10237 | |
2217 | * options.cc (General_options::parse_V): Set printed_version_. | |
2218 | (General_options::General_options): Initialize printed_version_. | |
2219 | * options.h (class General_options): Add printed_version_ field. | |
2220 | * gold.cc (queue_initial_tasks): If there are no input files, | |
2221 | don't give a fatal error if we printed the version information. | |
2222 | (queue_middle_tasks): If using -r with a shared object, give a | |
2223 | fatal error rather than an ordinary error. | |
2224 | ||
1518dc8f ILT |
2225 | 2009-06-23 Ian Lance Taylor <[email protected]> |
2226 | ||
2227 | PR 10219 | |
2228 | * layout.cc (Layout::Layout): Initialize have_stabstr_section_. | |
2229 | (Layout::make_output_section): Set have_stabstr_section_ if we see | |
2230 | a .stab*str section. | |
2231 | (Layout::finalize): Call link_stabs_sections. | |
2232 | (Layout::link_stabs_sections): New file. | |
2233 | * layout.h (class Layout): Add have_stabstr_section_ field. | |
2234 | Declare link_stabs_sections. | |
2235 | ||
3d857b98 DK |
2236 | 2009-06-23 Doug Kwan <[email protected]> |
2237 | ||
2238 | * Makefile.am (libgold_a_LIBADD): New. | |
2239 | (ld_new_DEPENDENCIES, ld_new_LDADD): Remove LIBOBJS | |
2240 | * Makefile.in: Regenerate. | |
2241 | * config.in (HAVE_DECL_MEMMEM, HAVE_DECL_STRNDUP): New. | |
2242 | * configure: Regenerate. | |
2243 | * configure.ac (AC_CHECK_DECLS): Add strndup and memmem. | |
2244 | * fileread.cc: Include sys/state.h | |
2245 | * gold.h: Declare memmem and strndup if found missing. | |
2246 | * gold_reloc.h: Include byteswap.h if HAVE_BYTESWAP_H is defined. | |
2247 | ||
0639a6f6 ILT |
2248 | 2009-06-23 Ian Lance Taylor <[email protected]> |
2249 | ||
2250 | * configure.ac: Call AC_CHECK_DECLS using C, not C++. | |
2251 | * configure: Rebuild. | |
2252 | ||
8d63875c ILT |
2253 | 2009-06-23 Ian Lance Taylor <[email protected]> |
2254 | ||
2255 | PR 10147 | |
2256 | * object.cc (Object::section_contents): Don't try to get a view if | |
2257 | the section has length zero. | |
2258 | (Object::handle_gnu_warning_section): If the section is empty, use | |
2259 | the name of the section as the warning. | |
2260 | ||
f7c8a183 ILT |
2261 | 2009-06-23 Ian Lance Taylor <[email protected]> |
2262 | ||
2263 | PR 10133 | |
2264 | * stringpool.h (class Stringpool_template): Add optimize_ field. | |
2265 | (Stringpool_template::set_optimize): New function. | |
2266 | * stringpool.cc (Stringpool_template::Stringpool_template): | |
2267 | Initialize optimize_ field. | |
2268 | (Stringpool_template::set_string_offsets): Test local optimize | |
2269 | fild rather than parameter. | |
2270 | * layout.cc (Layout::Layout): Call set_optimize on the section | |
2271 | name stringpool. | |
2272 | ||
e6a307ba ILT |
2273 | 2009-06-22 Ian Lance Taylor <[email protected]> |
2274 | ||
2275 | PR 10030 | |
2276 | * yyscript.y: Parse TARGET. | |
2277 | * script.cc (script_set_target): New function. | |
2278 | * script-c.h (script_set_target): Declare. | |
2279 | * options.cc (General_options::string_to_object_format): Rename | |
2280 | from string_to_object_format in anonymous namespace. Change | |
2281 | callers. | |
2282 | * options.h (class General_options): Declare | |
2283 | string_to_object_format. | |
2284 | ||
3ee173de ILT |
2285 | 2009-06-22 Ian Lance Taylor <[email protected]> |
2286 | ||
2287 | * script-sections.cc (Script_sections::create_segments): Don't put | |
2288 | program headers in a PT_LOAD segment if -n or -N. | |
2289 | ||
2290 | 2009-06-22 Ian Lance Taylor <[email protected]> | |
e1c74d60 ILT |
2291 | |
2292 | PR 10141 | |
2293 | * options.h (class General_options): Add -z lazy and -z now. Sort | |
2294 | -z options into alphabetical order. | |
2295 | * layout.cc (Layout::finish_dynamic_section): Handle -z now. | |
2296 | ||
cd6739a1 | 2297 | 2009-06-21 Ian Lance Taylor <[email protected]> |
8a5e3e08 ILT |
2298 | |
2299 | * layout.cc (Layout::make_output_section): Call | |
2300 | Target::new_output_section. | |
2301 | (Layout::attach_allocated_section_to_segment): Put large section | |
2302 | sections in a separate load segment with the large segment flag | |
2303 | set. | |
2304 | (Layout::segment_precedes): Sort large data segments after other | |
2305 | load segments. | |
2306 | (align_file_offset): New static function. | |
2307 | (Layout::set_segment_offsets): Use align_file_offset. | |
2308 | * output.h (class Output_section): Add is_small_section_ and | |
2309 | is_large_section_ fields. | |
2310 | (Output_section::is_small_section): New function. | |
2311 | (Output_section::set_is_small_section): New function. | |
2312 | (Output_section::is_large_section): New function. | |
2313 | (Output_section::set_is_large_section): New function. | |
2314 | (Output_section::is_large_data_section): New function. | |
2315 | (class Output_segment): Add is_large_data_segment_ field. | |
2316 | (Output_segment::is_large_data_segment): New function. | |
2317 | (Output_segment::set_is_large_data_segment): New function. | |
2318 | * output.cc (Output_section::Output_section): Initialize new | |
2319 | fields. | |
2320 | (Output_segment::Output_segment): Likewise. | |
2321 | (Output_segment::add_output_section): Add assertion that large | |
2322 | data sections always go in large data segments. Force small data | |
2323 | sections to the end of the list of data sections. Force small BSS | |
2324 | sections to the start of the list of BSS sections. For large BSS | |
2325 | sections to the end of the list of BSS sections. | |
2326 | * symtab.h (class Symbol): Declare is_common_shndx. | |
2327 | (Symbol::is_defined): Check Symbol::is_common_shndx. | |
2328 | (Symbol::is_common): Likewise. | |
2329 | (class Symbol_table): Define enum Commons_section_type. Update | |
2330 | declarations. Add small_commons_ and large_commons_ fields. | |
2331 | * symtab.cc (Symbol::is_common_shndx): New function. | |
2332 | (Symbol_table::Symbol_table): Initialize new fields. | |
2333 | (Symbol_table::add_from_object): Put small and large common | |
2334 | symbols in the right list. | |
2335 | (Symbol_table::sized_finalized_symbol): Check | |
2336 | Symbol::is_common_shndx. | |
2337 | (Symbol_table::sized_write_globals): Likewise. | |
2338 | * common.cc (Symbol_table::do_allocate_commons): Allocate new | |
2339 | common symbol lists. Don't call do_allocate_commons_list if the | |
2340 | list is empty. | |
2341 | (Symbol_table::do_allocate_commons_list): Remove is_tls | |
2342 | parameter. Add comons_section_type parameter. Change all | |
2343 | callers. Handle small and large common symbols. | |
2344 | * object.cc (Sized_relobj::do_finalize_local_symbols): Check | |
2345 | Symbol::is_common_shndx. | |
2346 | * resolve.cc (symbol_to_bits): Likewise. | |
2347 | * target.h (Target::small_common_shndx): New function. | |
2348 | (Target::small_common_section_flags): New function. | |
2349 | (Target::large_common_shndx): New function. | |
2350 | (Target::large_common_section_flags): New function. | |
2351 | (Target::new_output_section): New function. | |
2352 | (Target::Target_info): Add small_common_shndx, large_common_shndx, | |
2353 | small_common_section_flags, and large_common_section_flags | |
2354 | fields. | |
2355 | (Target::do_new_output_section): New virtual function. | |
2356 | * arm.cc (Target_arm::arm_info): Initialize new fields. | |
2357 | * i386.cc (Target_i386::i386_info): Likewise. | |
2358 | * powerpc.cc (Target_powerpc::powerpc_info) [all versions]: | |
2359 | Likewise. | |
2360 | * sparc.c (Target_sparc::sparc_info) [all versions]: Likewise. | |
2361 | * x86_64.cc (Target_x86_64::x86_64_info): Likewise. | |
2362 | (Target_x86_64::do_new_output_section): New function. | |
2363 | * configure.ac: Define conditional MCMODEL_MEDIUM. | |
2364 | * testsuite/Makefile.am (check_PROGRAMS): Add large. | |
2365 | (large_SOURCES, large_CFLAGS, large_DEPENDENCIES): Define. | |
2366 | (large_LDFLAGS): Define. | |
2367 | * testsuite/large.c: New file. | |
2368 | * testsuite/testfile.cc (Target_test::test_target_info): | |
2369 | Initialize new fields. | |
2370 | * configure, testsuite/Makefile.in: Rebuild. | |
2371 | ||
bb04269c DK |
2372 | 2009-06-05 Doug Kwan <[email protected]> |
2373 | ||
2374 | * Makefile.am (CCFILES): Add target.cc. | |
2375 | * Makefile.in: Regenerate. | |
2376 | * i386.cc (class Target_i386): Define new virtual method to | |
2377 | override do_is_local_label_name in parent. | |
2378 | * object.cc (Sized_relobj::do_count_local_symbols): Discard | |
2379 | local symbols if --discard-locals or -X is given. | |
2380 | * options.h (class General_options): Declare new options | |
2381 | '--discard-locals' and '-X' for discarding locals. | |
2382 | * target.h (class Target): Define new methods is_local_label_name. | |
2383 | Declare new virtual method do_is_local_label_name. | |
2384 | * target.cc: New file. | |
2385 | * testsuite/Makefile.am (check_PROGRAMS): Add discard_locals_test. | |
2386 | (check_SCRIPTS): Add discard_locals_test.sh. | |
2387 | (check_DATA): Add discard_local_tests.syms. | |
2388 | (discard_locals_test_SOURCES, discard_locals_test_LDFLAGS): Define. | |
2389 | (discard_local_tests.syms, discard_locals_test.o): New make rules. | |
2390 | * testsuite/Makefile.in: Regenerate. | |
2391 | * testsuite/discard_locals_test.c: New file. | |
2392 | * testsuite/discard_locals_test.sh: Same. | |
2393 | ||
805bb01c DK |
2394 | 2009-06-05 Doug Kwan <[email protected]> |
2395 | ||
2396 | * object.cc (Sized_relobj::Sized_relobj): Initialize | |
2397 | discarded_eh_frame_shndx_ to -1U. | |
2398 | (Sized_relobj::do_layout): Record index of a discard .eh_frame | |
2399 | section. | |
2400 | (Sized_relobj::do_count_local_symbols): Skip local symbols in | |
2401 | a discarded .eh_frame section. | |
2402 | (Sized_relobj::do_finalize_local_symbols): Ditto. | |
2403 | * object.h (class Sized_relobj): Declare new member | |
2404 | discarded_eh_frame_shndx_. | |
2405 | * testsuite/Makefile.am (check_PROGRAMS): Add local_labels_test. | |
2406 | (local_labels_test.o, local_labels_test): New rules. | |
2407 | * testsuite/Makefile.in: Regenerate. | |
2408 | ||
1dcd334d DK |
2409 | 2009-06-04 Doug Kwan <[email protected]> |
2410 | ||
2411 | * layout.cc (Layout::section_name_mapping): Add mapping for | |
2412 | special ARM sections. | |
2413 | ||
96d49306 DK |
2414 | 2009-06-03 Doug Kwan <[email protected]> |
2415 | ||
2416 | * arm.cc (utils::sign_extend): Reverse test in gold_assert. | |
2417 | (utils::has_overflow): Same. | |
2418 | ||
dff16297 ILT |
2419 | 2009-06-03 Ian Lance Taylor <[email protected]> |
2420 | ||
2421 | * layout.cc (Layout::section_name_mapping): New array, replacing | |
2422 | Layout::linkonce_mapping. | |
2423 | (Layout::section_name_mapping_count): New variable, replacing | |
2424 | Layout::linkonce_mapping_count. | |
2425 | (Layout::linkonce_output_name): Remove. | |
2426 | (Layout::output_section_name): Rewrite. | |
2427 | * layout.h (class Layout): Rename Linkonce_mapping to | |
2428 | Section_name_mapping, linkonce_mapping to section_name_mapping, | |
2429 | linkonce_mapping_count to section_name_mapping_count. Don't | |
2430 | declare linkonce_output_name. | |
2431 | ||
c121c671 DK |
2432 | 2009-06-03 Doug Kwan <[email protected]> |
2433 | ||
2434 | * gold/arm.cc (namespace utils): New. | |
2435 | (Target_arm::reloc_is_non_pic): Define new method. | |
2436 | (class Arm_relocate_functions): New. | |
2437 | (Target_arm::Relocate::relocate): Handle relocation types used by | |
2438 | Android. | |
2439 | ||
07800fab ILT |
2440 | 2009-06-03 Ian Lance Taylor <[email protected]> |
2441 | ||
2442 | * arm.cc (Target_arm::scan::global): Use || instead of |. | |
2443 | ||
c121c671 DK |
2444 | 2009-06-02 Doug Kwan <[email protected]> |
2445 | ||
2446 | * gold/arm.cc (Target_arm::Scan::Scan): Initialize | |
2447 | issued_non_pic_error_. | |
2448 | (class Target_arm::Scan): Declare new method check_non_pic. | |
2449 | Define new method symbol_needs_plt_entry. | |
2450 | Declare new data member issued_non_pic_error_. | |
2451 | (class Target_arm::Relocate): Declare new method | |
2452 | should_apply_static_reloc. | |
2453 | (Target_arm::may_need_copy_reloc): Handle STT_ARM_TFUNC. | |
2454 | (Target_arm::Scan::check_non_pic): Define new method. | |
2455 | (Target_arm::Scan::local): Handle a small subset of reloc types used | |
2456 | by Android. | |
2457 | (Target_arm::Scan::local): Same. | |
2458 | (Target_arm::Relocate::should_apply_statci_reloc): Define new method. | |
2459 | ||
b19b0c6d ILT |
2460 | 2009-05-31 Mikolaj Zalewski <[email protected]> |
2461 | ||
2462 | * incremental.cc (Incremental_inputs::report_command_line): Filter | |
2463 | out --incremental-* options. | |
2464 | ||
94cdfcff DK |
2465 | 2009-05-29 Doug Kwan <[email protected]> |
2466 | ||
2467 | * gold/arm.cc (Output_data_plt_arm): Forward declaration for new | |
2468 | template class. | |
2469 | (class Target_arm): Update comment. | |
2470 | (Target_arm::Target_arm): Initialize new data members GOT_, | |
2471 | PLT_, GOT_PLT_, REL_DYN_, COPY_RELOCS_ and DYNBSS_. | |
2472 | Declare new methods Target_arm::got_section, Target_arm::make_plt_entry | |
2473 | and Target_arm::rel_dyn_section. | |
2474 | Declare new_enum Target_arm::Got_type. | |
2475 | Declare new data members GOT_, PLT_, GOT_PLT_, REL_DYN_, COPY_RELOCS_ | |
2476 | and DYNBSS_. | |
2477 | Update commments for member do_dynsym_value. | |
2478 | (Target_arm::got_size, Target_arm::plt_section, | |
2479 | Target_arm::may_need_copy_reloc and Target_arm::copy_reloc): Define | |
2480 | new methods inside class defintion. | |
2481 | (Target_arm::got_section): Define new method. | |
2482 | (Target_arm::rel_dyn_section): Same. | |
2483 | (Output_data_plt_arm): New template class. | |
2484 | (Output_data_plt_arm::Output_data_plt_arm): Define constructor. | |
2485 | (Output_data_plt_arm:do_adjust_output_section): Define new method. | |
2486 | (Output_data_plt_arm::add_entry): Same. | |
2487 | (Output_data_plt_arm::first_plt_entry): Define new | |
2488 | static data member for PLT instruction template. | |
2489 | (Output_data_plt_arm::plt_entry): Same. | |
2490 | (Output_data_plt_arm::do_write): Define new method. | |
2491 | (Target_arm::make_plt_entry): Same. | |
2492 | (Target_arm::do_finalize_sections): Same. | |
2493 | (Target_arm::do_dynsym_value): Same. | |
2494 | ||
4a657b0d DK |
2495 | 2009-05-28 Doug Kwan <[email protected]> |
2496 | ||
2497 | * Makefile.am (TARGETSOURCES): Add arm.cc. | |
2498 | (ALL_TARGETOBJECTS): Add arm.$(OBJEXT) | |
2499 | * Makefile.in: Regenerate. | |
2500 | * arm.cc: New file. | |
2501 | * configure.tgt: Add armbe*-*-*, armeb*-*-* and arm*-*-* targets. | |
2502 | ||
e7ae8c36 DK |
2503 | 2009-05-26 Doug Kwan <[email protected]> |
2504 | ||
2505 | * options.cc (General_options::parse_exclude_libs). Fix a comment. | |
2506 | (General_options::check_excluded_libs): Strip off directories in | |
2507 | archive name before matching like GNU ld does. | |
2508 | * testsuite/Makefile.am (MOSTLYCLEANFILES, | |
2509 | exclude_libs_test_DEPENDENCIES): Add alt/libexclude_libs_test_3.a | |
2510 | (exclude_libs_test_LDFLAGS): Add linker option | |
2511 | -Wl,--exclude-libs,libexclude_libs_test_3 | |
2512 | (exclude_libs_test_LADD): Add alt/libexclude_libs_test_3.a as | |
2513 | an explicit archive without using -l. | |
2514 | (alt/libexclude_libs_test_3.a): New make rule. | |
2515 | * testsuite/Makefile.in: Regenerate. | |
2516 | * testsuite/exclude_libs_test.c : Declare lib3_default(). | |
2517 | (main): Call it. | |
2518 | * exclude_libs_test.sh: Add tests for alt/exclude_libs_test_3.a. | |
2519 | * exclude_libs_test_3.c: New file. | |
2520 | ||
f12e7348 NC |
2521 | 2009-05-26 Nick Clifton <[email protected]> |
2522 | ||
2523 | * po/id.po: New Indonesian translation. | |
2524 | * po/gold.pot: Updated template file. | |
2525 | ||
4daadc0d ST |
2526 | 2009-05-22 Sriraman Tallam <[email protected]> |
2527 | ||
2528 | * testsuite/Makefile.am: Add -ffunction-sections to compile | |
2529 | gc_comdat_test files. Add -Wl,--gc-sections to build | |
2530 | gc_comdat_test. | |
2531 | * testsuite/Makefile.in: Regenerate. | |
2532 | * testsuite/gc_comdat_test.sh: Fix the condition around grep. | |
2533 | ||
531813ad ST |
2534 | 2009-05-21 Sriraman Tallam <[email protected]> |
2535 | ||
2536 | * object.cc (Sized_relobj::map_to_kept_section): Return NULL if the | |
2537 | kept comdat section was garbage collected. | |
2538 | * testsuite/Makefile.am: Add test gc_comdat_test.sh. | |
2539 | * testsuite/Makefile.in: Regenerate. | |
2540 | * testsuite/gc_comdat_test.sh: New file. | |
2541 | * testsuite/gc_comdat_test_1.cc: New file. | |
2542 | * testsuite/gc_comdat_test_2.cc: New file. | |
2543 | ||
65514900 CC |
2544 | 2009-05-19 Doug Kwan <[email protected]> |
2545 | ||
2546 | * archive.cc (Archive::Archive): Move constructor from archive.h | |
2547 | to here. Initialize no_export_. | |
2548 | (Archive::get_elf_object_for_member): Set no_export flag of object. | |
2549 | * archive.h (Archive::Archive): Move constructor body to | |
2550 | archive.cc. | |
2551 | (Archive::no_export): New method. | |
2552 | (Archive::no_export_): New field. | |
2553 | * object.h (Object::Object): Initialize no_export_ to false. | |
2554 | (Object::no_export, Object::set_no_export): New methods. | |
2555 | (Object::no_export_): New field. | |
2556 | * options.cc (General_options::parse_exclude_libs): New method. | |
2557 | (General_options::check_excluded_libs) Same. | |
2558 | * options.h (exclude_libs): New option. | |
2559 | (General_options::check_excluded_libs): New method declaration. | |
2560 | (General_options::excluded_libs_): New field. | |
2561 | * symtab.cc (Symbol_table::add_from_relobj): Hide symbols with | |
2562 | default or protected visibility if an object has no-export flag set. | |
2563 | testsuite/Makefile.am (check_PROGRAMS): Add exclude_libs_test. | |
2564 | (check_SCRIPTS): Add exclude_libs_test.sh. | |
2565 | (check_DATA): Add exclude_libs_test.syms. | |
2566 | (MOSTLYCLEANFILES): Add exclude_libs_test.syms, | |
2567 | libexclude_libs_test_1.a and libexclude_libs_test_2.a. | |
2568 | (exclude_libs_test_SOURCES, exclude_libs_test_DEPENDENCIES, | |
2569 | exclude_libs_test_LDFLAGS and exclude_libs_test_LDADD): Define. | |
2570 | (exclude_libs_test.syms, libexclude_libs_test_1.a, | |
2571 | libexclude_libs_test_2.a): New rules. | |
2572 | * testsuite/Makefile.in: Regenerate. | |
2573 | * testsuite/exclude_libs_test.c: New file. | |
2574 | * testsuite/exclude_libs_test.sh: Ditto. | |
2575 | * testsuite/exclude_libs_test_1.c: Ditto. | |
2576 | * testsuite/exclude_libs_test_2.c: Ditto. | |
2577 | ||
1b77ea50 ILT |
2578 | 2009-05-15 Ian Lance Taylor <[email protected]> |
2579 | ||
2580 | * configure.ac: Check for declarations for cases where libiberty.h | |
2581 | checks HAVE_DECL_xxx. | |
2582 | * configure, config.in: Rebuild. | |
2583 | ||
072fe7ce ILT |
2584 | 2009-05-15 Mikolaj Zalewski <[email protected]> |
2585 | ||
2586 | * gold.h (Incremental_argument_list): Remove (invalid) forward | |
2587 | declaration. | |
2588 | * incremental.cc (Incremental_inputs::report_achive): New method. | |
2589 | (Incremental_inputs::report_object): New method. | |
2590 | (Incremental_inputs::report_script): New method. | |
2591 | (Incremental_inputs::finalize_inputs): New method. | |
2592 | (Incremental_inputs::finalize): Call finalize_inputs(). | |
2593 | (Incremental_inputs::sized_create_incremental_inputs_section_data): | |
2594 | Create inputs entries. | |
2595 | * incremental.h (Incremental_input_type): New enum. | |
2596 | (Incremental_inputs::Incremental_input): Initialize new fields. | |
2597 | (Incremental_inputs::report_inputs): New method. | |
2598 | (Incremental_inputs::report_achive): New method. | |
2599 | (Incremental_inputs::report_object): New method. | |
2600 | (Incremental_inputs::report_script): New method. | |
2601 | (Incremental_inputs::finalize_inputs): New method. | |
2602 | (Incremental_inputs::Input_info): New struct. | |
2603 | (Incremental_inputs::Input_info_map): New typedef. | |
2604 | (Incremental_inputs::lock_): New field. | |
2605 | (Incremental_inputs::Inputs_): New field. | |
2606 | (Incremental_inputs::Inputs_map): New field. | |
2607 | * main.cc (main): Call Incremental_input::report_inputs. | |
2608 | * options.h (Input_argument_list): Typedef moved from | |
2609 | Input_arguments. | |
2610 | (Input_file_group::Files): Remove, use ::Input_argument_list. | |
2611 | (Input_file_group::Input_argument_list): Remove, use | |
2612 | ::Input_argument_list. | |
2613 | * plugin.cc (Plugin_manager::add_input_file): Add error in | |
2614 | incremental build. | |
2615 | * read_syms.cc (do_read_syms): Call Incremental_input::report_* | |
2616 | functions. | |
2617 | * script.cc (read_input_script): Call | |
2618 | Incremental_input::report_script. | |
2619 | * script.h (Script_info): New class. | |
2620 | ||
b0481b0b ILT |
2621 | 2009-04-27 Ian Lance Taylor <[email protected]> |
2622 | ||
2623 | * x86_64.cc (do_adjust_output_section): Set entsize to | |
2624 | plt_entry_size. | |
2625 | ||
b22a5a41 | 2626 | 2009-04-23 Elliott Hughes <[email protected]> |
6d1e3092 CD |
2627 | |
2628 | * output.cc (Output_file::close): After short writes, continue | |
2629 | writing from the correct offset in the buffer being written. | |
2630 | ||
40fde488 CD |
2631 | 2009-04-23 Chris Demetriou <[email protected]> |
2632 | ||
2633 | * configure.ac (HAVE_TR1_UNORDERED_MAP_REHASH): New define. | |
2634 | * configure: Regenerate. | |
2635 | * config.in: Regenerate. | |
2636 | * gold.h: Avoid std::tr1::unordered_map and std::tr1::unordered_set | |
2637 | if HAVE_TR1_UNORDERED_MAP_REHASH is not defined. | |
2638 | ||
3ce2c28e ILT |
2639 | 2009-04-21 Mikolaj Zalewski <[email protected]> |
2640 | ||
2641 | * incremental.cc (Incremental_inputs_header_data): Renamed from | |
2642 | Incremental_input_header_data. | |
2643 | (Incremental_inputs_header_data::data_size): New field. | |
2644 | (Incremental_inputs_header_data::put_input_file_count): Renamed | |
2645 | from input_file_count. | |
2646 | (Incremental_inputs_header_data::put_command_line_offset): Renamed | |
2647 | from command_line_offset. | |
2648 | (Incremental_inputs_header_data::put_reserved): Renamed from | |
2649 | put_reserved. | |
2650 | (Incremental_inputs_entry_data): Renamed from | |
2651 | Incremental_input_entry_data. | |
2652 | (Incremental_inputs_entry_data::data_size): New field. | |
2653 | (Incremental_inputs::report_command_line): New method. | |
2654 | (Incremental_inputs::finalize): New method. | |
2655 | (Incremental_inputs::create_incremental_inputs_data): New method. | |
2656 | (Incremental_inputs::sized_create_incremental_inputs_data): New method. | |
2657 | * incremental.h: New file. | |
2658 | * layout.cc (Layout::Layout): Handle new incremental_inputs_. | |
2659 | (Layout::finalize): Create incremental inputs section in | |
2660 | incremental builds. | |
2661 | (Layout::create_incremental_info_sections): New method. | |
2662 | * layout.h (Layout::incremental_inputs): New method. | |
2663 | (Layout::create_incremental_info_sections): New method. | |
2664 | (Layout::incremental_inputs_): New field. | |
2665 | * main.cc (main): Notify Incremental_input of the command line. | |
2666 | ||
e55bde5e ILT |
2667 | 2009-04-01 Ian Lance Taylor <[email protected]> |
2668 | Mikolaj Zalewski <[email protected]> | |
2669 | ||
2670 | * gold.h (reserve_unordered_map): Define, three versions, one for | |
2671 | each version of Unordered_map. | |
2672 | * layout.cc (Layout::Layout): Remove options parameter. Add | |
2673 | number_of_input_files parameter. Don't initialize options_. | |
2674 | Initialize number_of_input_files_ and resized_signatures_. Move | |
2675 | sections_are_attached_. | |
2676 | (Layout::layout_group): Reserve space for group_signatures_. | |
2677 | (Layout::find_or_add_kept_section): Change name parameter to be a | |
2678 | reference. Resize signatures_ map when it gets large enough. | |
2679 | (Layout::layout_eh_frame): Use parameters->options() instead of | |
2680 | this->options_. | |
2681 | (Layout::make_output_section): Likewise. | |
2682 | (Layout::attach_allocated_section_to_segment): Likewise. | |
2683 | (Layout::finalize, Layout::create_executable_stack): Likewise. | |
2684 | (Layout::set_segment_offsets, Layout::create_interp): Likewise. | |
2685 | (Layout::finish_dynamic_section, Layout::write_binary): Likewise. | |
2686 | * layout.h (class Layout): Update declarations. Remove options_ | |
2687 | field. Add number_of_input_files_ and resized_signatures_ | |
2688 | fields. Move sections_are_attached_ field. | |
2689 | * main.cc (main): Pass number of input files to Layout | |
2690 | constructor. Don't pass options. | |
2691 | ||
154b857c ILT |
2692 | 2009-03-30 Ian Lance Taylor <[email protected]> |
2693 | ||
2694 | * ffsll.c (ffsll): Correct implementation. | |
2695 | ||
2f35ab9b ILT |
2696 | 2009-03-27 Ian Lance Taylor <[email protected]> |
2697 | ||
fd03461a ILT |
2698 | * ffsll.c: New file. |
2699 | * configure.ac: Call AC_REPLACE_FUNCS on ffsll. | |
2700 | * gold.h (ffsll): Declare if HAVE_FFSLL is not defined. | |
2701 | * ftruncate.c (ftruncate): Declare before definition. | |
2702 | * mremap.c (mremap): Likewise. | |
2703 | * pread.c (pread): Likewise. | |
2704 | * configure, Makefile.in, config.in: Rebuild. | |
2705 | ||
2f35ab9b ILT |
2706 | * mremap.c: New file. |
2707 | * configure.ac: Call AC_REPLACE_FUNCS on mremap. | |
2708 | * gold.h (MREMAP_MAYMOVE): Define if HAVE_MREMAP is not defined. | |
2709 | (mremap): Declare if HAVE_MREMAP is not defined. | |
2710 | * configure, Makefile.in, config.in: Rebuild. | |
2711 | ||
33aea2fd CC |
2712 | 2009-03-27 Cary Coutant <[email protected]> |
2713 | ||
2714 | * powerpc.cc (Target_powerpc::check_non_pic): Assert that output is | |
2715 | position independent. | |
2716 | * sparc.cc (Target_sparc::check_non_pic): Likewise. | |
2717 | * x86_64.cc (Target_x86_64::check_non_pic): Likewise. | |
2718 | ||
6d479619 CC |
2719 | 2009-03-24 Cary Coutant <[email protected]> |
2720 | ||
2721 | * symtab.h (needs_plt_entry): Check for unsatisfied reference from | |
2722 | an executable. | |
2723 | (needs_dynamic_reloc): Likewise. | |
2724 | ||
afc06bb8 ILT |
2725 | 2009-03-24 Ian Lance Taylor <[email protected]> |
2726 | ||
2727 | * yyscript.y (file_cmd): Recognize EXTERN. | |
2728 | (extern_name_list, extern_name_list_body): New nonterminals. | |
2729 | * script.cc (script_add_extern): Define. | |
2730 | * script-c.h (script_add_extern): Declare. | |
2731 | ||
f6060a4d ILT |
2732 | 2009-03-24 Rafael Avila de Espindola <[email protected]> |
2733 | ||
2734 | * object.cc (is_elf_object): Define. | |
2735 | * object.h (is_elf_object): Declare. | |
2736 | * archive.cc (Archive::get_elf_object_for_member): Call | |
2737 | is_elf_object. | |
33aea2fd | 2738 | * readsyms.cc (Read_symbols::do_read_symbols): Likewise. |
f6060a4d | 2739 | |
26736d8e ILT |
2740 | 2009-03-24 Elliott Hughes <[email protected]> |
2741 | ||
2742 | * output.cc (Output_file::map_anonymous): Define. | |
2743 | (Output_file::map): Use map_anonymous. If the regular mmap fails, | |
2744 | try an anonymous one. Report the size if the mmap fails. | |
2745 | * output.h (class Output_file): Declare map_anonymous. | |
2746 | ||
22fd9730 ILT |
2747 | 2009-03-24 Ian Lance Taylor <[email protected]> |
2748 | ||
2749 | * target-select.cc (instantiate_target): Don't acquire the lock if | |
2750 | the instantiated_target_ field has already been set. | |
2751 | ||
cb010894 ILT |
2752 | 2009-03-23 Ian Lance Taylor <[email protected]> |
2753 | ||
7f055c20 ILT |
2754 | * gold-threads.h (class Initialize_lock): Define. |
2755 | * gold-threads.cc (class Initialize_lock_once): Define. | |
2756 | (initialize_lock_control): New static variable. | |
2757 | (initialize_lock_pointer): New static variable. | |
2758 | (initialize_lock_once): New static function. | |
2759 | (Initialize_lock::Initialize_lock): Define. | |
2760 | (Initialize_lock::initialize): Define. | |
2761 | * target-select.h: Include "gold-threads.h". | |
2762 | (class Target_selector): Add lock_ and initialize_lock_ fields. | |
2763 | Don't define instantiate_target, just declare it. | |
2764 | * target-select.cc (Target_selector::Target_selector): Initialize | |
2765 | new fields. | |
2766 | (Target_selector::instantiate_target): Define. | |
2767 | * descriptors.h: Include "gold-threads.h". | |
2768 | (class Descriptors): Add initialize_lock_ field. | |
2769 | * descriptors.cc (Descriptors::Descriptors): Initialize new | |
2770 | field. | |
2771 | (Descriptors::open): Use initialize_lock_ field | |
2772 | * errors.h (class Errors): Add initialize_lock_ field. | |
2773 | * errors.cc (Errors::Errors): Initialize new field. | |
2774 | (Errors::initialize_lock): Use initialize_lock_ field. | |
2775 | * powerpc.cc (class Target_selector_powerpc): Remove | |
2776 | instantiated_target_ field. In do_recognize call | |
2777 | instantiate_target rather than do_instantiate_target. In | |
2778 | do_instantiate_target just allocate a new target. | |
2779 | * sparc.cc (class Target_selector_sparc): Likewise. | |
2780 | ||
36959681 ILT |
2781 | * freebsd.h: New file. |
2782 | * i386.cc: Include "freebsd.h". | |
2783 | (Target_i386): Derive from Target_freebsd rather than | |
2784 | Sized_target. | |
2785 | (Target_selector_i386): Derive from Target_selector_freebsd rather | |
2786 | than Target_selector. | |
2787 | * x86_64.cc: Include "freebsd.h". | |
2788 | (Target_x86_64): Derive from Target_freebsd rather than | |
2789 | Sized_target. | |
2790 | (Target_selector_x86_64): Derive from Target_selector_freebsd | |
2791 | rather than Target_selector. | |
2792 | * target.h (class Target): Add adjust_elf_header and | |
2793 | do_adjust_elf_header. | |
2794 | * output.cc (Output_file_header:: do_sized_write): Call target | |
2795 | adjust_elf_header routine. | |
2796 | * configure.tgt: Set targ_osabi. | |
2797 | * configure.ac: Define GOLD_DEFAULT_OSABI. | |
2798 | * parameters.cc (Parameters::default_target): Pass | |
2799 | GOLD_DEFAULT_OSABI to select_target. | |
2800 | * target-select.h (class Target_selector): Make instantiate_target | |
2801 | protected rather than private. | |
2802 | * Makefile.am (HFILES): Add freebsd.h. | |
2803 | * configure, Makefile.in, config.in: Rebuild. | |
2804 | ||
cb010894 ILT |
2805 | * merge.cc (do_add_input_section): Correct pend value. Change |
2806 | message about last entry not being null terminated from error to | |
2807 | warning. | |
2808 | ||
0e879927 ILT |
2809 | 2009-03-20 Mikolaj Zalewski <[email protected]> |
2810 | ||
2811 | * incremental.cc: New file. | |
2812 | * Makefile.am (CCFILES): Add incremental.cc. | |
2813 | * Makefile.in: Rebuild. | |
2814 | ||
41105937 PP |
2815 | 2009-03-19 Paul Pluzhnikov <[email protected]> |
2816 | ||
2817 | * layout.cc (Layout::output_section_name): Preserve names | |
2818 | of '.note.' sections. | |
2819 | ||
60439920 ILT |
2820 | 2009-03-19 Ian Lance Taylor <[email protected]> |
2821 | ||
2822 | * descriptors.cc (Descriptors::open): Check that the options are | |
2823 | valid before using them. | |
2824 | ||
0d371ad3 ILT |
2825 | 2009-03-18 Ian Lance Taylor <[email protected]> |
2826 | ||
2827 | * script-sections.h: Include <list>. | |
2828 | (class Script_sections): Change Sections_elements from std::vector | |
2829 | to std::list. Typedef public Elements_iterator. Add | |
2830 | orphan_section_placement_, data_segment_align_start_, and | |
2831 | saw_data_segment_align_ fields. Remove data_segment_align_index_ | |
2832 | field. | |
2833 | * script-sections.cc (class Orphan_section_placement): New class. | |
2834 | (class Sections_element): Add virtual functions is_relro and | |
2835 | orphan_section_init. Remove virtual function place_orphan_here. | |
2836 | (class Output_section_definition): Add is_relro and | |
2837 | orphan_section_init. Remove place_orphan_here. | |
2838 | (class Orphan_output_section): Likewise. | |
2839 | (Script_sections::Script_sections): Update for field changes. | |
2840 | (Script_sections::data_segment_align): Set saw_data_segment_align_ | |
2841 | and data_segment_align_start_, not data_segment_align_index. | |
2842 | (Script_sections::data_segment_relro_end): Check | |
2843 | saw_data_segment_align_. Use data_segment_align_start_ rather | |
2844 | than data_segment_align_index_. | |
2845 | (Script_sections::place_orphan): Rewrite to use | |
2846 | Orphan_section_placement. | |
2847 | ||
9201d894 ILT |
2848 | 2009-03-17 Ian Lance Taylor <[email protected]> |
2849 | ||
9c5b8369 ILT |
2850 | * archive.cc (Archive::add_symbols): Check for a version attached |
2851 | to the symbol name in the archive map. | |
2852 | * testsuite/Makefile.am (check_PROGRAMS): Add ver_test_11. | |
2853 | (ver_test_11_SOURCES, ver_test_11_DEPENDENCIES): Define. | |
2854 | (ver_test_11_LDFLAGS, ver_test_11_LDADD): Define. | |
2855 | (ver_test_11.a): New target. | |
2856 | * testsuite/Makefile.in: Rebuild. | |
2857 | ||
9201d894 ILT |
2858 | * configure.ac: Check for chsize and posix_fallocate. Replace |
2859 | ftruncate. | |
2860 | * ftruncate.c: New file, from gnulib. | |
2861 | * output.cc (posix_fallocate): Define dummy version if not | |
2862 | HAVE_POSIX_FALLOCATE. | |
2863 | (Output_file::map): Call posix_fallocate rather than lseek and | |
2864 | write. | |
2865 | * gold.h (ftruncate): Declare if not HAVE_FTRUNCATE. | |
2866 | * configure, Makefile.in, config.in: Rebuild. | |
2867 | ||
ef4ab7a8 PP |
2868 | 2009-03-17 Paul Pluzhnikov <[email protected]> |
2869 | ||
2870 | * layout.h (Layout::create_note): Add section_name parameter. | |
2871 | * layout.cc (Layout::create_note): Likewise. | |
2872 | (Layout::create_build_id, Layout::create_gold_note): Fix callers. | |
2873 | ||
8c500701 ILT |
2874 | 2009-03-17 Ian Lance Taylor <[email protected]> |
2875 | ||
e85b18e1 ILT |
2876 | * descriptors.cc: Include "options.h". |
2877 | (FD_CLOEXEC, O_CLOEXEC): Define if not defined. | |
2878 | (Descriptors::open): Always use O_CLOEXEC when opening a new | |
2879 | descriptor. If we have a plugin, and O_CLOEXEC was not defined, | |
2880 | then set FD_CLOEXEC. | |
2881 | ||
9efe6174 ILT |
2882 | * sparc.cc (class Target_sparc): Add has_got_section. |
2883 | (Target_sparc::Scan::global): If we see _GLOBAL_OFFSET_TABLE_, | |
2884 | make sure we have a GOT section. | |
2885 | ||
2886 | * sparc.cc (optimize_tls_reloc): Recognize R_SPARC_TLS_IE_ADD. | |
2887 | (Target_sparc::Scan::local): Likewise. | |
2888 | (Target_sparc::Scan::global): Likewise. | |
2889 | (Target_sparc::Relocate::relocate): Likewise. | |
2890 | (Target_sparc::Relocate::relocate_tls): Likewise. | |
2891 | ||
8c500701 ILT |
2892 | * symtab.cc (Symbol_table::define_default_version): New function, |
2893 | broken out of add_from_object. | |
2894 | (Symbol_table::add_from_object): Call define_default_version. | |
2895 | (Symbol_table::define_special_symbol): Add resolve_oldsym | |
2896 | parameter. Change all callers. If the version for a symbol comes | |
2897 | from a version script, resolve it with the symbol with the same | |
2898 | name with no version. Also add the symbol without a version if | |
2899 | appropriate. | |
2900 | (do_define_in_output_data): If resolving with oldsym, don't delete | |
2901 | sym. | |
2902 | (do_define_in_output_segment): Likewise. | |
2903 | (do_define_as_constant): Likewise. | |
2904 | * symtab.h (class Symbol_table): Update declarations. | |
2905 | ||
f1ed28fb ILT |
2906 | 2009-03-13 Ian Lance Taylor <[email protected]> |
2907 | ||
15f8229b ILT |
2908 | * readsyms.cc (Read_symbols::incompatible_warning): New function. |
2909 | (Read_symbols::requeue): New function. | |
2910 | (Read_symbols::do_read_symbols): If make_elf_object fails because | |
2911 | the target type is not configured, and the file was searched for, | |
2912 | issue a warning and retry with the next directory. | |
2913 | (Add_symbols::run): If the file has an incompatible format, and | |
2914 | it was searched for, requeue the Read_symbols task. On error, | |
2915 | release the object. | |
2916 | * readsyms.h (class Read_symbols): Add dirindex_ field. Add | |
2917 | dirindex parameter to constructor. Change all callers. Declare | |
2918 | incompatible_warning and requeue. | |
2919 | (class Add_symbols): Add dirpath_, dirindex_, mapfile_, | |
2920 | input_argument_ and input_group_ fields. Add them to | |
2921 | constructor. Change all callers. | |
2922 | (class Read_script): Add dirindex_ field. Add it to constructor. | |
2923 | Change all callers. | |
2924 | * archive.cc (Archive::setup): Remove input_objects parameter. | |
2925 | Change all callers. | |
2926 | (Archive::get_file_and_offset): Likewise. | |
2927 | (Archive::read_all_symbols): Likewise. | |
2928 | (Archive::read_symbols): Likewise. | |
2929 | (Archive::get_elf_object_for_member): Remove input_objects | |
2930 | parameter. Add punconfigured parameter. Change all callers. | |
2931 | (Archive::add_symbols): Change return type to bool. Check return | |
2932 | value of include_member. | |
2933 | (Archive::include_all_members): Likewise. | |
2934 | (Archive::include_member): Change return type to bool. Return | |
2935 | false if first included object has incompatible target. Set | |
2936 | included_member_ field. | |
2937 | (Add_archive_symbols::run): If add_symbols returns false, requeue | |
2938 | Read_symbols task. | |
2939 | * archive.h (class Archive): Add included_member_ field. | |
2940 | Initialize it in constructor. Add input_file and searched_for | |
2941 | methods. Update declarations. | |
2942 | (class Add_archive_symbols): Add dirpath_, dirindex_, and | |
2943 | input_argument_ fields. Add them to constructor. Change all | |
2944 | callers. | |
2945 | * script.cc: Include "target-select.h". | |
2946 | (class Parser_closure): Add skip_on_incompatible_target_ and | |
2947 | found_incompatible_target_ fields. Add | |
2948 | skip_on_incompatible_target parameter to constructor. Change all | |
2949 | callers. Add methods skip_on_incompatible_target, | |
2950 | clear_skip_on_incompatible_target, found_incompatible_target, and | |
2951 | set_found_incompatible_target. | |
2952 | (read_input_script): Add dirindex parameter. Change all callers. | |
2953 | If parser finds an incompatible target, requeue Read_symbols | |
2954 | task. | |
2955 | (script_set_symbol): Clear skip_on_incompatible_target in | |
2956 | closure. | |
2957 | (script_add_assertion, script_parse_option): Likewise. | |
2958 | (script_start_sections, script_add_phdr): Likewise. | |
2959 | (script_check_output_format): New function. | |
2960 | * script.h (read_input_script): Update declaration. | |
2961 | * script-c.h (script_check_output_format): Declare. | |
2962 | * yyscript.y (file_cmd): Handle OUTPUT_FORMAT. | |
2963 | (ignore_cmd): Remove OUTPUT_FORMAT. | |
2964 | * fileread.cc (Input_file::Input_file): Add explicit this. | |
2965 | (Input_file::will_search_for): New function. | |
2966 | (Input_file::open): Add pindex parameter. Change all callers. | |
2967 | * fileread.h (class Input_file): Add input_file_argument method. | |
2968 | Declare will_search_for. Update declarations. | |
2969 | * object.cc (make_elf_object): Add punconfigured parameter. | |
2970 | Change all callers. | |
2971 | * object.h (class Object): Make input_file public. Add | |
2972 | searched_for method. | |
2973 | (make_elf_object): Update declaration. | |
2974 | * dirsearch.cc (Dirsearch::find): Add pindex parameter. Use it to | |
2975 | restart search. | |
2976 | * dirsearch.h (class Dirsearch): Update declaration. | |
2977 | * options.h (class General_options): Add --warn-search-mismatch. | |
2978 | * parameters.cc (Parameters::is_compatible_target): New function. | |
2979 | * parameters.h (class Parameters): Declare is_compatible_target. | |
2980 | * workqueue.cc (Workqueue::add_blocker): New function. | |
2981 | * workqueue.h (class Workqueue): Declare add_blocker. | |
2982 | ||
f1ed28fb ILT |
2983 | * fileread.cc (Input_file::open): Remove options parameter. |
2984 | Change all callers. | |
2985 | (Input_file::open_binary): Likewise. | |
2986 | * script.cc (read_input_script): Likewise. | |
2987 | * readsyms.h (class Read_symbols): Remove options_ field. Remove | |
2988 | options parameter from constructor. Change all callers. | |
2989 | (class Read_script): Likewise. | |
2990 | * fileread.h (class Input_file): Update declarations. | |
2991 | * script.h (read_input_script): Update declaration. | |
2992 | ||
34dd024a NC |
2993 | 2009-03-10 Nick Clifton <[email protected]> |
2994 | ||
2995 | * po/es.po: New Spanish translation. | |
2996 | ||
6d71b17c CC |
2997 | 2009-03-06 Cary Coutant <[email protected]> |
2998 | ||
2999 | * options.cc (parse_short_option): Keep dash_z from registering itself. | |
3000 | ||
031cdbed ILT |
3001 | 2009-03-03 Ian Lance Taylor <[email protected]> |
3002 | ||
3003 | PR 9918 | |
3004 | * target-reloc.h (relocate_section): Pass output_section to | |
3005 | relocate. | |
3006 | * i386.cc (Target_i386::should_apply_static_reloc): Add | |
3007 | output_section parameter. Change all callers. | |
3008 | (Target_i386::Relocate::relocate): Add output_section parameter. | |
3009 | * x86_64.cc (Target_x86_64::Relocate::relocate): Likewise. | |
3010 | * sparc.cc (Target_sparc::Relocate::relocate): Likewise. | |
3011 | * powerpc.cc (Target_powerpc::Relocate::relocate): Likewise. | |
3012 | * testsuite/two_file_shared.sh: New script. | |
3013 | * testsuite/Makefile.am (check_SCRIPTS): Add two_file_shared.sh. | |
3014 | (check_DATA): Add two_file_shared.dbg. | |
3015 | (two_file_shared.dbg): New target. | |
3016 | * testsuite/Makefile.in: Rebuild. | |
3017 | ||
15d5fa16 ILT |
3018 | 2009-03-01 Ian Lance Taylor <[email protected]> |
3019 | ||
3020 | * configure.ac: Check for byteswap.h. | |
3021 | * configure: Rebuild. | |
3022 | * config.in: Rebuild. | |
3023 | ||
8a4c0b0d ILT |
3024 | 2009-03-01 Mikolaj Zalewski <[email protected]> |
3025 | ||
3026 | * layout.cc (Layout::find_or_add_kept_section): New function. | |
3027 | (Layout::add_comdat): Removed. | |
3028 | * layout.h (struct Kept_section): Move out of class Layout. | |
3029 | Remove trailing underscores from field names. Add group_sections | |
3030 | field. Rename group_ field to is_group. Change all uses. | |
3031 | (class Layout): Declare find_or_add_kept_section, not add_comdat. | |
3032 | * object.cc (Sized_relobj::Sized_relobj): Don't initialize | |
3033 | comdat_groups_ field. | |
3034 | (Sized_relobj::include_section_group): Use | |
3035 | find_or_add_kept_section and Kept_section::group_sections. | |
3036 | (Sized_relobj::include_linkonce_section): Likewise. | |
3037 | * object.cc (class Sized_relobj): Don't define Comdat_group or | |
3038 | Comdat_group_table. Remove find_comdat_group and | |
3039 | add_comdat_group. Remove comdat_groups_ field. | |
3040 | * plugin.cc (include_comdat_group): Use | |
3041 | Layout::find_or_add_kept_section. | |
3042 | ||
b4ecf66b ILT |
3043 | 2009-02-28 Ian Lance Taylor <[email protected]> |
3044 | ||
14359ca0 ILT |
3045 | * README: --gc-sections and map files are now supported. Document |
3046 | some build requirements. | |
3047 | ||
b4ecf66b ILT |
3048 | PR 6992 |
3049 | * symtab.cc (Symbol_table::sized_write_section_symbol): In a | |
3050 | relocatable link set the value of the section symbol to zero. | |
3051 | * object.cc (Sized_relobj::do_finalize_local_symbols): In a | |
3052 | relocatable link don't include the section address in the local | |
3053 | symbol value. | |
3054 | ||
0602e05a ILT |
3055 | 2009-02-27 Ian Lance Taylor <[email protected]> |
3056 | ||
fd9d194f ILT |
3057 | PR 6811 |
3058 | * options.h (class Search_directory): Add is_system_directory. | |
3059 | (class General_options): Declare is_in_system_directory. | |
3060 | * options.cc (get_relative_sysroot): Make static. | |
3061 | (get_default_sysroot): Make static. | |
3062 | (General_optoins::is_in_system_directory): New function. | |
3063 | * fileread.cc (Input_file::is_in_system_directory): New function. | |
3064 | * fileread.h (class Input_file): Declare is_in_system_directory. | |
3065 | * object.h (class Object): Add is_in_system_directory. | |
3066 | (class Input_objects): Remove system_library_directory_ field. | |
3067 | * object.cc (Input_objects::add_object): Don't set | |
3068 | system_library_directory_. | |
3069 | (input_objects::found_in_system_library_directory): Remove. | |
3070 | * symtab.cc (Symbol_table::write_globals): Remove input_objects | |
3071 | parameter. Change all callers. | |
3072 | (Symbol_table::sized_write_globals): Likewise. | |
3073 | (Symbol_table::warn_about_undefined_dynobj_symbol): Likewise. | |
3074 | Call Object::is_in_system_directory. | |
3075 | * symtab.h (class Symbol_table): Update declarations. | |
3076 | ||
61edd21f ILT |
3077 | PR 5990 |
3078 | * descriptors.h (Open_descriptor): Add is_on_stack field. | |
3079 | * descriptors.cc (Descriptors::open): If the descriptor is on the | |
3080 | top of the stack, remove it. Initialize is_on_stack field. | |
3081 | (Descriptors::release): Only add pod to stack if it is not on the | |
3082 | stack already. | |
3083 | (Descriptors::close_some_descriptor): Clear stack_next and | |
3084 | is_on_stack fields. | |
3085 | ||
e29e076a ILT |
3086 | PR 7091 |
3087 | * output.cc (Output_section::find_starting_output_address): Rename | |
3088 | from starting_output_address; add PADDR parameter; change return | |
3089 | type. | |
3090 | * output.h (class Output_section): Declare | |
3091 | find_starting_output_address instead of starting_output_address. | |
3092 | * object.cc (Sized_relobj::do_finalize_local_symbols): Handle a | |
3093 | section symbol for which we can't find a merge section. | |
3094 | ||
0602e05a ILT |
3095 | PR 9836 |
3096 | * symtab.cc (Symbol_table::add_from_object): If the visibility is | |
3097 | hidden or internal, force the symbol to be local. | |
3098 | * resolve.cc (Symbol::override_visibility): Define. | |
3099 | (Symbol::override_base): Use override_visibility. | |
3100 | (Symbol_table::resolve): Likewise. | |
3101 | (Symbol::override_base_with_special): Likewise. | |
3102 | (Symbol_table::override_with_special): If the visibility is hidden | |
3103 | or internal, force the symbol to be local. | |
3104 | * symtab.h (class Symbol): Add set_visibility and | |
3105 | override_visibility. | |
3106 | * testsuite/ver_test_1.sh: New file. | |
3107 | * testsuite/Makefile.am (check_SCRIPTS): Add ver_test_1.sh. | |
3108 | (check_DATA): Add ver_test_1.syms. | |
3109 | (ver_test_1.syms): New target. | |
3110 | * testsuite/Makefile.in: Rebuild. | |
3111 | ||
401a9a73 CC |
3112 | 2009-02-25 Cary Coutant <[email protected]> |
3113 | ||
3114 | * layout.cc (Layout::choose_output_section): Don't rename sections | |
3115 | when using a linker script that has a SECTIONS clause. | |
3116 | * Makefile.in: Regenerate. | |
3117 | ||
3118 | * testsuite/Makefile.am (script_test_5.sh): New test case. | |
3119 | * testsuite/Makefile.in: Regenerate. | |
3120 | * testsuite/script_test_5.cc: New file. | |
3121 | * testsuite/script_test_5.sh: New file. | |
3122 | * testsuite/script_test_5.t: New file. | |
3123 | ||
f488e4b0 CC |
3124 | 2009-02-13 Rafael Avila de Espindola <[email protected]> |
3125 | ||
3126 | * archive.cc (Archive::include_member): Update calls to add_symbols. | |
3127 | * dynobj.cc (Sized_dynobj<size, big_endian>::make_version_map): Add | |
3128 | the Layout argument. | |
3129 | * dynobj.h (do_add_symbols): Add the Layout argument. | |
3130 | * object.cc (Sized_relobj<size, big_endian>::do_add_symbols): Add the | |
3131 | Layout argument. | |
3132 | * object.h (Object::add_symbols): Add the Layout argument. | |
3133 | (Object::do_add_symbols): Add the Layout argument. | |
3134 | (Sized_relobj::do_add_symbols): Add the Layout argument. | |
3135 | * plugin.cc (Sized_pluginobj<size, big_endian>::do_add_symbols): | |
3136 | Unify the two versions. | |
3137 | (Add_plugin_symbols): Remove. | |
3138 | * plugin.h (Pluginobj::add_symbols, Pluginobj::do_add_symbols): Remove. | |
3139 | (Sized_pluginobj::do_add_symbols): Unify the two versions. | |
3140 | (Add_plugin_symbols): Remove. | |
3141 | * readsyms.cc (Read_symbols::do_read_symbols): Update call to | |
3142 | Add_symbols. Use Add_symbols instead of Add_plugin_symbols. | |
3143 | (Add_symbols::run): Make it work with Pulginobj. | |
3144 | ||
89dd1680 ILT |
3145 | 2009-02-06 Ian Lance Taylor <[email protected]> |
3146 | ||
3147 | * object.cc (Sized_relobj::do_layout): Make info message start | |
3148 | with lower case letter. | |
3149 | ||
266d0a74 ILT |
3150 | 2009-02-06 Mikolaj Zalewski <[email protected]> |
3151 | ||
602b464e ILT |
3152 | * binary.cc: Fix file comment. |
3153 | ||
266d0a74 ILT |
3154 | * options.h (enum Incremental_disposition): Define. |
3155 | (class General_options): Add new options: --incremental, | |
3156 | --incremental_changed, --incremental_unchanged, | |
3157 | --incremental_unknown. Add incremental_disposition_ and | |
3158 | implicit_incremental_ fields. | |
3159 | (General_options::incremental_disposition): New function. | |
3160 | (class Position_dependent_options): Add incremental_disposition | |
3161 | option. | |
3162 | (Position_dependent_options::copy_from_options): Set incremental | |
3163 | dispositions. | |
3164 | * options.cc (General_options::parse_incremental_changed): New | |
3165 | function. | |
3166 | (General_options::parse_incremental_unchanged): New function. | |
3167 | (General_options::parse_incremental_unknown): New function. | |
3168 | (General_options::General_options): Initialize new fields | |
3169 | incremental_disposition_ and implicit_incremental_. | |
3170 | (General_options::finalize): Check for uasge of --incremental-* | |
3171 | without --incremental. | |
3172 | ||
f073bbf7 CD |
3173 | 2009-02-06 Chris Demetriou <[email protected]> |
3174 | ||
3175 | * gold.h (gold_undefined_symbol): Change to take only a Symbol | |
3176 | pointer and to report location as the file name associated with | |
3177 | the symbol. | |
3178 | (gold_undefined_symbol_at_location): New function to replace the | |
3179 | old gold_undefined_symbol functionality. | |
3180 | * target-reloc.h (relocate_section): Update to use | |
3181 | gold_undefined_symbol_at_location. | |
3182 | * symtab.cc (Symbol_table::warn_about_undefined_dynobj_symbol): | |
3183 | Call gold_undefined_symbol function rather than gold_error. | |
3184 | * errors.h (Errors::undefined_symbol): Take location as a | |
3185 | string, rather than calculating it from a relocation. | |
3186 | * errors.cc (Errors::fatal): Print "fatal error:" before the | |
3187 | formatted message. | |
3188 | (Errors::error, Errors::error_at_location): Print "error: " | |
3189 | before the formatted message. | |
3190 | (Errors::undefined_symbol): Take location as a string, rather | |
3191 | than calculating it from a relocation. | |
3192 | (gold_undefined_symbol_at_location): New function akin to | |
3193 | old gold_undefined_symbol, calculates location from relocation. | |
3194 | (gold_undefined_symbol): Change to take only a Symbol pointer | |
3195 | and to report location as the file name associated with the symbol. | |
3196 | * testsuite/debug_msg.sh: Update for changed error messages. | |
3197 | * testsuite/undef_symbol.sh: Likewise. | |
3198 | ||
8e94a90c ILT |
3199 | 2009-02-04 Duncan Sands <[email protected]> |
3200 | ||
3201 | PR 9812 | |
3202 | * reduced_debug_output.h | |
3203 | (Output_reduced_debug_abbrev_section::failed): Use format for | |
3204 | gold_warning. | |
3205 | (Output_reduced_debug_info_section::faild): Likewise. | |
3206 | ||
88a0e15b ILT |
3207 | 2009-01-31 Mikolaj Zalewski <[email protected]> |
3208 | ||
3209 | * script.cc (Lazy_demangler): New class. | |
3210 | (Version_script_info::get_symbol_version_helper): Demangle a | |
3211 | symbol only once. | |
3212 | ||
5efc7cd2 CC |
3213 | 2009-01-29 Cary Coutant <[email protected]> |
3214 | ||
3215 | * i386.cc (Target_i386::Relocate::relocate): Recognize non-PIC calls | |
3216 | to __tls_get_addr. | |
3217 | * x86_64.cc (Target_x86_64::Relocate::relocate): Likewise. | |
3218 | ||
e0ebcf42 ILT |
3219 | 2009-01-28 Ian Lance Taylor <[email protected]> |
3220 | ||
5efc7cd2 | 3221 | * version.cc (version_string): Bump to 1.9. |
75fe7426 | 3222 | |
e0ebcf42 ILT |
3223 | * gold.h: Include <cstring> and <stdint.h>. |
3224 | * version.cc: Include <cstdio>. | |
3225 | * object.cc (Sized_relobj::do_layout): Initialize gc_sd to avoid a | |
3226 | warning. | |
3227 | * reduced_debug_output.cc (insert_into_vector): Rename from | |
3228 | Insert_into_vector; change all callers. Use Swap_unaligned to | |
3229 | avoid aliasing issue; remove union since it is unnecessary. | |
3230 | ||
8e2813be | 3231 | 2009-01-27 Sriraman Tallam <[email protected]> |
6d03d481 ST |
3232 | |
3233 | * Makefile.am (CCFILES): Add gc.cc. | |
3234 | (HFILES): Add gc.h. | |
3235 | * Makefile.in: Regenerate. | |
3236 | * gold.cc (Gc_runner): New class. | |
3237 | (queue_initial_tasks): Call garbage collection related tasks | |
3238 | when corresponding options are invoked. | |
3239 | (queue_middle_gc_tasks): New function. | |
3240 | (queue_middle_tasks): Reorder tasks to allow relocs to be read and | |
3241 | processed early before laying out sections during garbage collection. | |
3242 | * gold.h (queue_middle_gc_tasks): New function. | |
3243 | (is_prefix_of): Move from "layout.cc". | |
3244 | * i386.cc (Target_i386::gc_process_relocs): New function. | |
3245 | * layout.cc (is_prefix_of): Remove. Move to "gold.h" | |
3246 | * main.cc (main): Create object of class "Garbage_collection". | |
3247 | * object.cc (Relobj::copy_symbols_data): New function. | |
3248 | (Relobj::is_section_name_included): New function. | |
3249 | (Sized_relobj::do_layout): Allow this function to be called twice | |
3250 | during garbage collection and defer layout of section during the | |
3251 | first call. | |
3252 | * object.h (Relobj::get_symbols_data): New function. | |
3253 | (Relobj::is_section_name_included): New function. | |
3254 | (Relobj::copy_symbols_data): New function. | |
3255 | (Relobj::set_symbols_data): New function. | |
3256 | (Relobj::get_relocs_data): New function. | |
3257 | (Relobj::set_relocs_data): New function. | |
3258 | (Relobj::is_output_section_offset_invalid): New pure virtual function. | |
3259 | (Relobj::gc_process_relocs): New function. | |
3260 | (Relobj::do_gc_process_relocs): New pure virtual function. | |
3261 | (Relobj::sd_): New data member. | |
3262 | (Sized_relobj::is_output_section_offset_invalid): New function. | |
3263 | (Sized_relobj::do_gc_process_relocs): New function. | |
3264 | * options.h (General_options::gc_sections): Modify to not be a no-op. | |
3265 | (General_options::print_gc_sections): New option. | |
3266 | * plugin.cc (Plugin_finish::run): Remove function call to | |
3267 | Plugin_manager::layout_deferred_objects. Move it to "gold.cc". | |
3268 | * powerpc.cc (Target_powerpc::gc_process_relocs): New function. | |
3269 | * reloc.cc (Read_relocs::run): Add task to process relocs and | |
3270 | determine unreferenced sections when doing garbage collection. | |
3271 | (Gc_process_relocs): New class. | |
3272 | (Sized_relobj::do_gc_process_relocs): New function. | |
3273 | (Sized_relobj::do_scan_relocs): Don't try to scan the relocs for | |
3274 | sections that are garbage collected. | |
3275 | * reloc.h (Gc_process_relocs): New class. | |
3276 | * sparc.cc (Target_sparc::gc_process_relocs): New function. | |
3277 | * symtab.cc (Symbol::should_add_dynsym_entry): Do not add entries for | |
3278 | symbols whose corresponding sections are garbage collected. | |
3279 | (Symbol_table::Symbol_table): Add new parameter for the garbage | |
3280 | collection object. | |
3281 | (Symbol_table::gc_mark_undef_symbols): New function. | |
3282 | (Symbol_table::gc_mark_symbol_for_shlib): New function. | |
3283 | (Symbol_table::gc_mark_dyn_syms): New function. | |
3284 | (Symbol_table::resolve): Do not treat symbols seen in dynamic objects | |
3285 | as garbage. | |
3286 | (Symbol_table::add_from_object): Likewise. | |
3287 | (Symbol_table::add_from_relobj): When building shared objects, do not | |
3288 | treat externally visible symbols as garbage. | |
3289 | (Symbol_table::sized_finalize_symbol): Do not check dynamic symbol | |
3290 | table information for static and relocatable links. | |
3291 | * symtab.h (Symbol_table::set_gc): New function. | |
3292 | (Symbol_table::gc): New function. | |
3293 | (Symbol_table::gc_mark_undef_symbols): New function. | |
3294 | (Symbol_table::gc_mark_symbol_for_shlib): New function. | |
3295 | (Symbol_table::gc_mark_dyn_syms): New function. | |
3296 | (Symbol_table::gc_): New data member. | |
3297 | * target.h (Sized_target::gc_process_relocs): New pure virtual | |
3298 | function. | |
3299 | * x86_64.cc (Target_x86_64::gc_process_relocs): New function. | |
3300 | * testsuite/testfile.cc (Target_test::gc_process_relocs): New function. | |
3301 | ||
3b293544 CF |
3302 | 2009-01-20 Chris Faylor <[email protected]> |
3303 | ||
3304 | * options.h (General_options::gc_sections): Define as a no-op for now. | |
3305 | (General_options::no_keep_memory): Ditto. | |
3306 | (General_options::Bshareable): Define. | |
3307 | * options.cc (General_options::finalize): Honor -Bshareable. | |
3308 | ||
83d22aa8 AS |
3309 | 2009-01-20 Andreas Schwab <[email protected]> |
3310 | ||
3311 | * powerpc.cc (Powerpc_relocate_functions::rel16_ha): Don't try to | |
3312 | read the value in the contents, since we don't use it. Use the | |
3313 | template endianness when writing. | |
3314 | (Relocate::relocate): Use it for R_PPC_REL16_HA. | |
3315 | ||
cd536b21 AS |
3316 | 2009-01-19 Andreas Schwab <[email protected]> |
3317 | ||
3318 | * configure.tgt (powerpc64-*): Fix targ_obj. | |
3319 | ||
99e9a495 ILT |
3320 | 2009-01-15 Ian Lance Taylor <[email protected]> |
3321 | ||
3322 | * object.cc (Sized_relobj::write_local_symbols): Don't write out | |
3323 | local symbols when stripping all symbols. | |
3324 | ||
bbbfea06 CC |
3325 | 2009-01-14 Cary Coutant <[email protected]> |
3326 | ||
99e9a495 | 3327 | * output.cc (Output_reloc): Add explicit instantiations. |
bbbfea06 | 3328 | |
0f7c0701 CC |
3329 | 2009-01-14 Cary Coutant <[email protected]> |
3330 | ||
3331 | * archive.cc (Archive::get_elf_object_for_member): Remove call | |
3332 | to File_read::claim_for_plugin. | |
3333 | * descriptors.cc (Descriptors::open): Remove reference to | |
3334 | is_claimed. | |
3335 | (Descriptors::claim_for_plugin): Remove. | |
3336 | * descriptors.h (Descriptors::claim_for_plugin): Remove. | |
3337 | (Descriptors::is_claimed): Remove. | |
3338 | (claim_descriptor_for_plugin): Remove. | |
3339 | * fileread.cc (File_read::claim_for_plugin): Remove. | |
3340 | * fileread.h (File_read::claim_for_plugin): Remove. | |
3341 | (File_read::descriptor): Reopen descriptor if necessary. | |
3342 | * plugin.cc (Plugin::load): Add two new APIs to transfer vector. | |
3343 | (Plugin_manager::all_symbols_read): Add task parameter. Change | |
3344 | all callers. | |
3345 | (Plugin_manager::get_input_file): New function. | |
3346 | (Plugin_manager::release_input_file): New function. | |
3347 | (Pluginobj::Pluginobj): Add filesize parameter and initialize | |
3348 | corresponding data member. | |
3349 | (Sized_pluginobj::Sized_pluginobj): Add filesize parameter | |
3350 | and pass to base constructor. Change all callers. | |
3351 | (get_input_file, release_input_file): New functions. | |
3352 | (make_sized_plugin_object): Add filesize parameter. Change all callers. | |
3353 | * plugin.h (Plugin_manager::Plugin_manager): Initialize task_ member. | |
3354 | (Plugin_manager::all_symbols_read): Add task parameter. | |
3355 | (Plugin_manager::get_input_file): New function. | |
3356 | (Plugin_manager::release_input_file): New function. | |
3357 | (Plugin_manager::task_): New data member. | |
3358 | (Pluginobj::Pluginobj): Add filesize parameter. | |
3359 | (Pluginobj::filename): New function. | |
3360 | (Pluginobj::descriptor): New function. | |
3361 | (Pluginobj::filesize): New function. | |
3362 | (Pluginobj::filesize_): New data member. | |
3363 | (Sized_pluginobj::Sized_pluginobj): Add filesize parameter. | |
3364 | * readsyms.cc (Read_symbols::do_read_symbols): Remove call to | |
3365 | File_read::claim_for_plugin; use Object::unlock to unlock the file. | |
3366 | ||
3367 | * testsuite/Makefile.am (plugin_test_4): New test case for plugins | |
3368 | with archive libraries. | |
3369 | * testsuite/Makefile.in: Regenerate. | |
3370 | * testsuite/plugin_test.c (struct sym_info): New type. | |
3371 | (get_input_file, release_input_file): New static variables. | |
3372 | (onload): Capture new transfer vector entries. | |
3373 | (claim_file_hook): Stop reading at end of file according to filesize. | |
3374 | Factor out parsing of readelf output into separate function. | |
3375 | (all_symbols_read_hook): Exercise get_input_file and release_input_file | |
3376 | APIs and get the source file name from the symbol table. Convert | |
3377 | source file name to corresponding object file name. Print info | |
3378 | message when adding new input files. | |
3379 | (parse_readelf_line): New function. | |
3380 | * testsuite/plugin_test_1.sh: Add checks for new info messages. | |
3381 | * testsuite/plugin_test_2.sh: Likewise. | |
3382 | * testsuite/plugin_test_3.sh: Likewise. | |
3383 | * testsuite/plugin_test_4.sh: New test case. | |
3384 | ||
62a6d109 ILT |
3385 | 2009-01-07 Ian Lance Taylor <[email protected]> |
3386 | ||
3387 | * version.cc (version_string): Bump to 1.8. | |
3388 | ||
483620e8 CC |
3389 | 2008-12-23 Cary Coutant <[email protected]> |
3390 | ||
3391 | * gold.cc (gold_exit): Call plugin cleanup handlers on exit. | |
3392 | * plugin.cc (Plugin_manager::finish): Rename as | |
3393 | layout_deferred_objects. Move cleanup to separate function. | |
3394 | (Plugin_manager::cleanup): New function. | |
3395 | (Plugin_finish::run): Call layout_deferred_objects and cleanup | |
3396 | separately. | |
3397 | * plugin.h (Plugin_manager::finish): Rename as | |
3398 | layout_deferred_objects. | |
3399 | (Plugin_manager::cleanup): New function. | |
3400 | (Plugin_manager::cleanup_done): New field. | |
3401 | ||
d66a9eb3 CC |
3402 | 2008-12-23 Cary Coutant <[email protected]> |
3403 | ||
3404 | * plugin.cc (is_visible_from_outside): New function. | |
3405 | (Pluginobj::get_symbol_resolution_info): Call is_visible_from_outside | |
3406 | so we don't return "IR only" status for exported symbols or -r links. | |
3407 | ||
3408 | * testsuite/Makefile.am (plugin_test_3): New test case. | |
3409 | * testsuite/Makefile.in: Regenerate. | |
3410 | * testsuite/plugin_test_3.sh: New file. | |
3411 | ||
5995b570 CC |
3412 | 2008-12-22 Cary Coutant <[email protected]> |
3413 | ||
3414 | * object.cc (Sized_relobj::layout_section): New function. | |
3415 | (Sized_relobj::do_layout): Defer layout of input sections until after | |
3416 | plugin has provided replacement files. | |
3417 | (Sized_relobj::do_layout_deferred_sections): New function. | |
3418 | * object.h (Relobj::set_section_offset): Remove virtual keyword. | |
3419 | (Relobj::layout_deferred_sections): New function. | |
3420 | (Relobj::do_layout_deferred_sections): New function. | |
3421 | (Sized_relobj::do_layout_deferred_sections): New function. | |
3422 | (Sized_relobj::layout_section): New function. | |
3423 | (Sized_relobj::Deferred_layout): New structure. | |
3424 | (Sized_relobj::deferred_layout_): New field. | |
3425 | * plugin.cc (Plugin_manager::finish): Renamed, was cleanup. | |
3426 | Change all callers. Layout deferred sections. | |
3427 | (class Plugin_finish): Renamed, was Plugin_cleanup. Change all | |
3428 | references. | |
3429 | (Plugin_hook::run): Move code from do_plugin_hook inline. | |
3430 | (Plugin_hook::do_plugin_hook): Remove. | |
3431 | * plugin.h (Plugin_manager::Plugin_manager): Add missing initializers. | |
3432 | (Plugin_manager::finish): Renamed, was cleanup. | |
3433 | (Plugin_manager::should_defer_layout): New function. | |
3434 | (Plugin_manager::add_deferred_layout_object): New function. | |
3435 | (Plugin_manager::Deferred_layout_list): New type. | |
3436 | (Plugin_manager::deferred_layout_objects_): New field. | |
3437 | (Plugin_hook::do_plugin_hook): Remove. | |
3438 | ||
ee769c88 ILT |
3439 | 2008-12-17 Ian Lance Taylor <[email protected]> |
3440 | ||
3441 | * options.h (class General_options): Add --no case for | |
3442 | --export-dynamic. | |
3443 | ||
abc8dcba CC |
3444 | 2008-12-16 Cary Coutant <[email protected]> |
3445 | ||
3446 | * plugin.cc (Plugin::load): Move LDPT_MESSAGE to front of transfer | |
3447 | vector. | |
3448 | (Plugin_manager::claim_file): Create plugin object even if | |
3449 | plugin did not call the add_symbols callback. | |
3450 | (Plugin_obj::get_symbol_resolution_info): Guard against plugin | |
3451 | asking for more symbols than were added. | |
3452 | * testsuite/Makefile.am (plugin_test_1): Add test case with | |
3453 | no global symbols. | |
3454 | (empty.syms): New target. | |
3455 | * testsuite/Makefile.in: Regenerate. | |
3456 | * testsuite/plugin_test.c (claim_file_hook): Add new debug | |
3457 | message. Don't call add_symbols if no globals. | |
3458 | (all_symbols_read_hook): Don't provide replacement for empty | |
3459 | claimed file. | |
3460 | ||
b0074644 ILT |
3461 | 2008-12-12 Ian Lance Taylor <[email protected]> |
3462 | ||
68943102 ILT |
3463 | * target-reloc.h (Default_scan_relocatable_relocs): Only discard |
3464 | r_type == 0 for a local symbol with r_sym == 0. | |
3465 | (scan_relocatable_relocs): Pass r_sym to | |
3466 | local_non_section_strategy. | |
3467 | * reloc.cc (Emit_relocs_strategy::local_non_section_strategy): Add | |
3468 | r_sym parameter. | |
3469 | ||
b0074644 ILT |
3470 | * configure.ac: Update test for TLS descriptors: they are |
3471 | supported as of glibc 2.9. | |
3472 | * configure: Rebuild. | |
3473 | ||
c2508178 ILT |
3474 | 2008-12-11 Ian Lance Taylor <[email protected]> |
3475 | ||
3476 | PR 7091 | |
3477 | * target-reloc.h (Default_scan_relocatable_relocs): For each | |
3478 | function, map r_type == 0 to RELOC_DISCARD. | |
3479 | ||
2756a258 CC |
3480 | 2008-12-10 Cary Coutant <[email protected]> |
3481 | ||
3482 | * layout.cc (Layout::add_comdat): Allow COMDAT group from a replacement | |
3483 | object to override a kept COMDAT group from a plugin object. | |
3484 | ||
bb6f53d3 ILT |
3485 | 2008-12-09 Ian Lance Taylor <[email protected]> |
3486 | ||
fbc558e1 ILT |
3487 | PR 7088 |
3488 | * yyscript.y (file_cmd): Handle INPUT. | |
3489 | ||
bb6f53d3 ILT |
3490 | * testsuite/initpri1.c: Change all declarations to be full |
3491 | prototypes by adding void, to avoid compiler warnings. | |
3492 | ||
4674ecfc CC |
3493 | 2008-12-05 Rafael Avila de Espindola <[email protected]> |
3494 | ||
3495 | * options.cc (General_options::parse_plugin_opt): New. | |
3496 | (General_options::add_plugin): The argument now is just the filename. | |
3497 | (General_options::add_plugin_option): New. | |
3498 | * options.h (plugin_opt): New. | |
3499 | (add_plugin): Change argument name. | |
3500 | (add_plugin_option): New. | |
3501 | * plugin.cc (Plugin::load): Don't parse the plugin option. | |
3502 | * plugin.h (Plugin::Plugin): Rename argument. Init filename_. | |
3503 | (Plugin::add_option): New. | |
3504 | (Plugin::args_): Change type. | |
3505 | (Plugin::filename_): New. | |
3506 | (Plugin_manager::add_plugin_option): New. | |
3507 | * testsuite/Makefile.am (plugin_test_1): Use new syntax. | |
3508 | * testsuite/Makefile.in: Regenerate. | |
3509 | ||
fd06b4aa CC |
3510 | 2008-12-05 Cary Coutant <[email protected]> |
3511 | ||
3512 | * layout.cc (Layout::include_section): Check for SHF_EXCLUDE. | |
3513 | Handle --strip-lto-sections option. | |
3514 | * options.h (strip_lto_sections): New option. | |
3515 | ||
6c52134c CC |
3516 | 2008-12-01 Cary Coutant <[email protected]> |
3517 | ||
3518 | * plugin.cc (ld_plugin_message): Change format parameter to const. | |
3519 | Fix mismatch between new[] and delete. | |
3520 | ||
a45248e0 CC |
3521 | 2008-11-14 Cary Coutant <[email protected]> |
3522 | ||
3523 | * reloc.cc (Sized_relobj::do_read_relocs): Use constant invalid_address | |
3524 | instead of -1U. | |
3525 | ||
c82fbeee CS |
3526 | 2008-11-05 Craig Silverstein <[email protected]> |
3527 | ||
3528 | * options.cc (General_options::parse_dynamic_list): New function. | |
3529 | * options.h (General_options): New flags dynamic_list, | |
3530 | dynamic_list_data, dynamic_list_cpp_new, and | |
3531 | dynamic_list_cpp_typeinfo. New variable dynamic_list_. | |
3532 | (General_options::in_dynamic_list): New function. | |
3533 | * script.cc (Lex::Mode): New enum DYNAMIC_LIST. | |
3534 | (Lex::can_start_name): Add support for DYNAMIC_LIST mode. | |
3535 | (Lex::can_continue_name): Likewise. | |
3536 | (yylex): Likewise. | |
3537 | (read_script_file): New parameter script_options. | |
3538 | (read_dynamic_list): New function. | |
3539 | (Script_options::define_dynamic_list): New function. | |
3540 | (dynamic_list_keyword_parsecodes): New variable. | |
3541 | (dynamic_list_keywords): New variable. | |
3542 | * script.h (Script_options::define_dynamic_list): New function | |
3543 | prototype. | |
3544 | (read_dynamic_list): New function prototype. | |
3545 | * symtab.cc (strprefix): New macro. | |
3546 | (Symbol::should_add_dynsym_entry): Support dynamic_list, | |
3547 | dynamic_list_data, dynamic_list_cpp_new, and | |
3548 | dynamic_list_cpp_typeinfo. | |
3549 | * yyscript.y (PARSING_DYNAMIC_LIST): New token. | |
3550 | (dynamic_list_expr): New rule. | |
3551 | (dynamic_list_nodes): Likewise. | |
3552 | (dynamic_list_node): Likewise. | |
3553 | * testsuite/Makefile.am (dynamic_list): New test. | |
3554 | * testsuite/Makefile.in: Regenerated. | |
3555 | * testsuite/dynamic_list.t: New file. | |
3556 | * testsuite/dynamic_list.sh: New file. | |
3557 | ||
e0bb29a5 CS |
3558 | 2008-11-05 Craig Silverstein <[email protected]> |
3559 | ||
3560 | * testsuite/tls_test_c.c: Add prototype for t11 and t11_last. | |
3561 | * testsuite/tls_test_c.c (t11): Add explicit "void" to prototype. | |
3562 | (t11_last): Likewise. | |
3563 | * testsuite/ver_test_6.c (main): Likewise. | |
3564 | ||
4e1e25e0 CC |
3565 | 2008-10-07 Cary Coutant <[email protected]> |
3566 | ||
3567 | * options.c (General_options::finalize): Add check for -static and | |
3568 | -shared. | |
3569 | * gold.cc (queue_middle_tasks): Assert that list of dynamic objects | |
3570 | is not empty. | |
3571 | ||
92f03fcb CC |
3572 | 2008-10-02 Cary Coutant <[email protected]> |
3573 | ||
3574 | * plugin.cc (make_sized_plugin_object): Fix conditional | |
3575 | compilation to work when not all targets are enabled. | |
3576 | ||
fbd8a257 CC |
3577 | 2008-09-29 Cary Coutant <[email protected]> |
3578 | ||
3579 | * archive.cc (Archive::get_file_and_offset): Use filename instead | |
3580 | of name to get library path. | |
3581 | (Archive::include_member): Unlock external member of a thin archive. | |
3582 | ||
3583 | * testsuite/Makefile.am (TEST_AR): New variable. | |
3584 | (thin_archive_test_1): New test. | |
3585 | (thin_archive_test_2): New test. | |
81636b3f CC |
3586 | * testsuite/Makefile.in: Regenerate. |
3587 | * testsuite/thin_archive_main.cc: New file. | |
3588 | * testsuite/thin_archive_test_1.cc: New file. | |
3589 | * testsuite/thin_archive_test_2.cc: New file. | |
3590 | * testsuite/thin_archive_test_3.cc: New file. | |
3591 | * testsuite/thin_archive_test_4.cc: New file. | |
fbd8a257 | 3592 | |
eff45813 CC |
3593 | 2008-09-29 Cary Coutant <[email protected]> |
3594 | ||
3595 | * mapfile.cc (Mapfile::print_input_section): Change -1U to -1ULL. | |
3596 | * object.cc (Sized_relobj::do_layout): Use constant invalid_address | |
3597 | instead of -1U. | |
3598 | (Sized_relobj::do_finalize_local_symbols): Likewise. | |
3599 | (Sized_relobj::map_to_kept_section): Likewise. | |
3600 | * object.h (Sized_relobj::invalid_address): New constant. | |
3601 | (Sized_relobj::do_output_section_offset): Check for invalid_address | |
3602 | and return -1ULL. | |
3603 | * output.cc (Output_reloc::local_section_offset): Use constant | |
3604 | invalid_address instead of -1U. | |
3605 | (Output_reloc::get_address): Likewise. | |
3606 | (Output_section::output_address): Change -1U to -1ULL. | |
3607 | * output.h (Output_reloc::invalid_address): New constant. | |
3608 | * reloc.cc (Sized_relobj::write_sections): Use constant | |
3609 | invalid_address instead of -1U. | |
3610 | (Sized_relobj::relocate_sections): Likewise. | |
3611 | * symtab.cc (Symbol_table::sized_finalize_symbol): Handle symbol | |
3612 | values for merge sections. | |
3613 | * target-reloc.h (relocate_for_relocatable): Use constant | |
3614 | invalid_address instead of -1U. | |
3615 | ||
89fc3421 CC |
3616 | 2008-09-19 Cary Coutant <[email protected]> |
3617 | ||
3618 | Add plugin functionality for link-time optimization (LTO). | |
3619 | * configure.ac (plugins): Add --enable-plugins option. | |
3620 | * configure: Regenerate. | |
3621 | * config.in: Regenerate. | |
3622 | * Makefile.am (LIBDL): New variable. | |
3623 | (CCFILES): Add plugin.cc. | |
3624 | (HFILES): Add plugin.h. | |
3625 | (ldadd_var): Add LIBDL. | |
3626 | * Makefile.in: Regenerate. | |
3627 | ||
3628 | * archive.cc: Include "plugin.h". | |
3629 | (Archive::setup): Don't preread archive symbols when using a plugin. | |
3630 | (Archive::get_file_and_offset): Add memsize parameter. Change callers. | |
3631 | (Archive::get_elf_object_for_member): Call plugin hooks for claiming | |
3632 | files. | |
3633 | (Archive::include_member): Add symbols from plugin objects. | |
3634 | * archive.h (Archive::get_file_and_offset): Add memsize parameter. | |
3635 | * descriptors.cc (Descriptors::open): Check for file descriptors | |
3636 | abandoned by plugins. | |
3637 | (Descriptors::claim_for_plugin): New function. | |
3638 | * descriptors.h (Descriptors::claim_for_plugin): New function. | |
3639 | (Open_descriptor::is_claimed): New field. | |
3640 | (claim_descriptor_for_plugin): New function. | |
3641 | * fileread.cc (File_read::claim_for_plugin): New function. | |
3642 | * fileread.h (File_read::claim_for_plugin): New function. | |
3643 | (File_read::descriptor): New function. | |
3644 | * gold.cc: Include "plugin.h". | |
3645 | (queue_initial_tasks): Add task to call plugin hooks for generating | |
3646 | new object files. | |
3647 | * main.cc: Include "plugin.h". | |
3648 | (main): Load plugin libraries. | |
3649 | * object.h (Pluginobj): Declare. | |
3650 | (Object::pluginobj): New function. | |
3651 | (Object::do_pluginobj): New function. | |
3652 | (Object::set_target): New function. | |
3653 | * options.cc: Include "plugin.h". | |
3654 | (General_options::parse_plugin): New function. | |
3655 | (General_options::General_options): Initialize plugins_ field. | |
3656 | (General_options::add_plugin): New function. | |
3657 | * options.h (Plugin_manager): Declare. | |
3658 | (General_options): Add --plugin option. | |
3659 | (General_options::has_plugins): New function. | |
3660 | (General_options::plugins): New function. | |
3661 | (General_options::add_plugin): New function. | |
3662 | (General_options::plugins_): New field. | |
3663 | * plugin.cc: New file. | |
3664 | * plugin.h: New file. | |
3665 | * readsyms.cc: Include "plugin.h". | |
3666 | (Read_symbols::do_read_symbols): Check for archive before checking | |
3667 | for ELF file. Call plugin hooks to claim files. | |
3668 | * resolve.cc (Symbol_table::resolve): Record when symbol is referenced | |
3669 | from a real object file; force override when processing replacement | |
3670 | files. | |
3671 | * symtab.cc (Symbol::init_fields): Initialize in_real_elf_ field. | |
3672 | (Symbol::init_base_object): Likewise. | |
3673 | (Symbol::init_base_output_data): Likewise. | |
3674 | (Symbol::init_base_output_segment): Likewise. | |
3675 | (Symbol::init_base_constant): Likewise. | |
3676 | (Symbol::init_base_undefined): Likewise. | |
3677 | (Symbol::output_section): Assert that object is not a plugin. | |
3678 | (Symbol_table::add_from_pluginobj): New function. | |
3679 | (Symbol_table::sized_finalize_symbol): Treat symbols from plugins as | |
3680 | undefined. | |
3681 | (Symbol_table::sized_write_globals): Likewise. | |
3682 | (Symbol_table::add_from_pluginobj): Instantiate template. | |
3683 | * symtab.h (Sized_pluginobj): Declare. | |
3684 | (Symbol::in_real_elf): New function. | |
3685 | (Symbol::set_in_real_elf): New function. | |
3686 | (Symbol::in_real_elf_): New field. | |
3687 | (Symbol_table::add_from_pluginobj): New function. | |
3688 | ||
3689 | * testsuite/Makefile.am (AM_CFLAGS): New variable. | |
3690 | (LIBDL): New variable. | |
3691 | (LDADD): Add LIBDL. | |
3692 | (check_PROGRAMS): Add plugin_test_1 and plugin_test_2. | |
3693 | (check_SCRIPTS): Add plugin_test_1.sh and plugin_test_2.sh. | |
3694 | (check_DATA): Add plugin_test_1.err and plugin_test_2.err. | |
3695 | (MOSTLYCLEANFILES): Likewise. | |
3696 | * testsuite/Makefile.in: Regenerate. | |
3697 | * testsuite/plugin_test.c: New file. | |
3698 | * testsuite/plugin_test_1.sh: New file. | |
3699 | * testsuite/plugin_test_2.sh: New file. | |
3700 | ||
de31bda5 ILT |
3701 | 2008-09-16 Ian Lance Taylor <[email protected]> |
3702 | ||
9c2d0ef9 ILT |
3703 | * target-reloc.h (relocate_section): Check whether a symbol is |
3704 | defined by the ABI before reporting an undefined symbol error. | |
3705 | * target.h (Target::is_defined_by_abi): Make parameter const. | |
3706 | (Target::do_is_defined_by_abi): Likewise. | |
3707 | * i386.cc (Target_i386::do_is_defined_by_abi): Likewise. | |
3708 | * powerpc.cc (Target_powerpc::do_is_defined_by_abi): Likewise. | |
3709 | * sparc.cc (Target_sparc::do_is_defined_by_abi): Likewise. | |
3710 | * x86_64.cc (Target_x86_64::do_is_defined_by_abi): Likewise. | |
3711 | * testsuite/Makefile.am (tls_test_shared.so): Add -Wl,-z,defs. | |
3712 | * testsuite/Makefile.in: Rebuild. | |
3713 | ||
de31bda5 ILT |
3714 | * fileread.cc (make_view): Add casts to avoid warning. |
3715 | ||
9fa33bee AO |
3716 | 2008-09-16 Alexandre Oliva <[email protected]> |
3717 | ||
3718 | * i386.cc (Target_i386::define_tls_base_symbol): Update comments. | |
3719 | * x86_64.cc (Target_x86_64::define_tls_base_symbol): Likewise. | |
3720 | ||
183fd0e3 AO |
3721 | 2008-09-16 Alexandre Oliva <[email protected]> |
3722 | ||
3723 | * options.h (General_options::output_is_executable): New. | |
3724 | (General_options::output_is_pie): New. | |
3725 | * i386.cc (Target_i386::define_tls_base_symbol): Use SEGMENT_START | |
3726 | for shared libraries. | |
3727 | * x86_64.cc (Target_x86_64::define_tls_base_symbol): Likewise. | |
3728 | ||
7be8330a CD |
3729 | 2008-09-11 Chris Demetriou <[email protected]> |
3730 | ||
3731 | * options.h (origin): New -z option. | |
3732 | * layout.cc (Layout:finish_dynamic_section): If "-z origin" | |
3733 | is specified, set DF_ORIGIN in DT_FLAGS and set DF_1_ORIGIN | |
3734 | in DT_FLAGS_1. | |
3735 | ||
a9caad02 CC |
3736 | 2008-09-05 Cary Coutant <[email protected]> |
3737 | ||
3738 | * fileread.cc (File_read::make_view): Add check for attempt to map | |
3739 | beyond end of file. | |
3740 | ||
ae6dce4d CC |
3741 | 2008-09-05 Cary Coutant <[email protected]> |
3742 | ||
3743 | * symtab.cc (Symbol_table::add_from_dynobj): Fix typos in | |
3744 | explicit instantiations. | |
3745 | ||
d7ab2a47 KVH |
3746 | 2008-08-28 Kris Van Hees <[email protected]> |
3747 | ||
3748 | PR gold/6858 | |
3749 | * options.cc (General_options::finalize): Allow undefined symbols | |
3750 | in shlibs if linking -shared. | |
3751 | ||
3752 | PR gold/6859 | |
3753 | * symtab.cc (Symbol::init_base_undefined): Mark explicitly undefined | |
3754 | symbols as not needing a dynsym entry. | |
3755 | ||
1e52a9c1 CS |
3756 | 2008-08-20 Craig Silverstein <[email protected]> |
3757 | ||
3758 | * fileread.cc (File_read::open): Do not lock the file unless it | |
3759 | was successfully opened. | |
3760 | ||
d85c80a3 CC |
3761 | 2008-08-14 Cary Coutant <[email protected]> |
3762 | ||
3763 | * x86_64.cc (Target_x86_64::Relocate::relocat_tls): | |
3764 | Use addend for DTPOFF32, DTPOFF64, and TPOFF32 relocs. | |
3765 | * testsuite/tls_test.cc (struct int128): 128-bit struct | |
3766 | for testing TLS relocs with non-zero addend. | |
3767 | (v12): New TLS variable. | |
3768 | (t12): New test. | |
3769 | (t_last): Add check for v12. | |
3770 | * testsuite/tls_test.h (t12): New function. | |
3771 | * testsuite/tls_test_main.cc (thread_routine): Call new test. | |
3772 | ||
2d924fd9 ILT |
3773 | 2008-08-13 Ian Lance Taylor <[email protected]> |
3774 | ||
3775 | * layout.cc (Layout::attach_allocated_section_to_segment): Don't | |
3776 | set tls_segment_ or relro_segment_. | |
3777 | (Layout::make_output_segment): Set tls_segment_ and relro_segment_ | |
3778 | when appropriate. | |
3779 | * output.h (Output_section::clear_is_relro): New function. | |
3780 | * output.cc (Output_segment::add_output_section): Handle SHF_TLS | |
3781 | sections specially even when output_data_ is empty. | |
3782 | (Output_segment::maximum_alignment): When first section is relro, | |
3783 | only force alignment for PT_LOAD segments. | |
3784 | * script.cc (script_data_segment_align): New function. | |
3785 | (script_data_segment_relro_end): New function. | |
3786 | * script-c.h (script_data_segment_align): Declare. | |
3787 | (script_data_segment_relro_end): Declare. | |
3788 | * script-sections.h (class Script_sections): Declare | |
3789 | data_segment_align and data_segment_relro_end. Add fields | |
3790 | segment_align_index_ and saw_relro_end_. | |
3791 | * script-sections.cc (class Sections_element): Add set_is_relro | |
3792 | virtual function. Add new bool* parameter to place_orphan_here. | |
3793 | Add get_output_section virtual function. | |
3794 | (class Output_section_definition): Add set_is_relro. Add new | |
3795 | bool* parameter to place_orphan_here. Add get_output_section. | |
3796 | Add is_relro_ field. | |
3797 | (Output_section_definition::Output_section_definition): Initialize | |
3798 | evaluated_address_, evaluated_load_address, evaluated_addralign_, | |
3799 | and is_relro_ fields. | |
3800 | (Output_section_definition::place_orphan_here): Add is_relro | |
3801 | parameter. | |
3802 | (Output_section_definition::set_section_addresses): Set relro for | |
3803 | output section. | |
3804 | (Output_section_definition::alternate_constraint): Likewise. | |
3805 | (class Orphan_output_section): Add new bool* parameter to | |
3806 | place_orphan_here. Add get_output_section. | |
3807 | (Orphan_output_section::place_orphan_here): Add is_relro | |
3808 | parameter. | |
3809 | (Script_sections::Script_sections): Initialize | |
3810 | data_segment_align_index_ and saw_relro_end_. | |
3811 | (Script_sections::data_segment_align): New function. | |
3812 | (Script_sections::data_segment_relro_end): New function. | |
3813 | (Script_sections::place_orphan): Set or clear is_relro. | |
3814 | (Script_sections::set_section_addresses): Force alignment of first | |
3815 | TLS section. | |
3816 | * yyscript.y (exp): Call script_data_segment_align and | |
3817 | script_data_segment_relro_end. | |
3818 | * testsuite/relro_script_test.t: New file. | |
3819 | * testsuite/relro_test.cc (using_script): Declare. | |
3820 | (t1, t2): Test using_script. | |
3821 | * testsuite/Makefile.am (check_PROGRAMS): Add relro_script_test. | |
3822 | (relro_script_test_SOURCES): Define. | |
3823 | (relro_script_test_DEPENDENCIES): Define. | |
3824 | (relro_script_test_LDFLAGS): Define. | |
3825 | (relro_script_test_LDADD): Define. | |
3826 | (relro_script_test.so): New target. | |
3827 | * testsuite/Makefile.in: Rebuild. | |
3828 | ||
f827c9a9 CC |
3829 | 2008-08-06 Cary Coutant <[email protected]> |
3830 | ||
3831 | * archive.cc (Archive::total_archives, Archive::total_members) | |
3832 | (Archive::total_members_loaded): New variables. | |
3833 | (Archive::setup): Add parameter. Add option to preread | |
3834 | archive symbols. | |
3835 | (Archive::read_armap): Add counter. | |
3836 | (Archive::get_file_and_offset): New function. | |
3837 | (Archive::get_elf_object_for_member): New function. | |
3838 | (Archive::read_all_symbols): New function. | |
3839 | (Archive::read_symbols): New function. | |
3840 | (Archive::add_symbols): Add counters. | |
3841 | (Archive::include_all_members): Use armap to find members if it's | |
3842 | already built. | |
3843 | (Archive::include_member): Skip reading symbols if already read. | |
3844 | Factored code into Archive::get_file_and_offset and | |
3845 | Archive::get_elf_object_for_member. Changed call to | |
3846 | Mapfile::report_include_archive_member. | |
3847 | (Archive::print_stats): New function. | |
3848 | * archive.h: Declare Object and Read_symbols_data classes. | |
3849 | (Archive::Archive): Add initializers for new members. | |
3850 | (Archive::setup): Add parameter. | |
3851 | (Archive::print_stats): New function. | |
3852 | (Archive::total_archives, Archive::total_members) | |
3853 | (Archive::total_members_loaded): New variables. | |
3854 | (Archive::get_file_and_offset): New function. | |
3855 | (Archive::get_elf_object_for_member): New function. | |
3856 | (Archive::read_all_symbols): New function. | |
3857 | (Archive::read_symbols): New function. | |
3858 | (Archive::Archive_member): New class. | |
3859 | (Archive::members_): New member. | |
3860 | (Archive::num_members_): New member. | |
3861 | * main.cc: Include archive.h. | |
3862 | (main): Call Archive::print_stats. | |
3863 | * mapfile.cc (Mapfile::report_include_archive_member): Delete | |
3864 | archive parameter; member_name is now the fully-decorated name. | |
3865 | * mapfile.h (Mapfile::report_include_archive_member): Likewise. | |
3866 | * options.h: (General_options): Add --preread-archive-symbols option. | |
3867 | * readsyms.cc (Read_symbols::do_read_symbols): Change call to | |
3868 | Archive::setup. | |
3869 | ||
de4c45bd ILT |
3870 | 2008-08-04 Ian Lance Taylor <[email protected]> |
3871 | ||
3872 | * symtab.h (Symbol::use_plt_offset): New function. | |
3873 | * i386.cc (Relocate::relocate): Call Symbol::use_plt_offset. | |
3874 | * powerpc.cc (Relocate::relocate): Likewise. | |
3875 | * sparc.cc (Relocate::relocate): Likewise. | |
3876 | * x86_64.cc (Relocate::relocate): Likewise. | |
3877 | * testsuite/weak_plt.sh: New test. | |
3878 | * testsuite/weak_plt_main.cc: New test. | |
3879 | * testsuite/weak_plt_shared.cc: New test. | |
3880 | * testsuite/Makefile.am (check_SCRIPTS): Add weak_plt.sh. | |
3881 | (check_PROGRAMS): Add weak_plt. | |
3882 | (check_DATA): Add weak_plt_shared.so. | |
3883 | (weak_plt_main_pic.o, weak_plt): New targets. | |
3884 | (weak_plt_shared_pic.o, weak_plt_shared.so): New targets. | |
3885 | * testsuite/Makefile.in: Rebuild. | |
3886 | ||
3887 | * testsuite/Makefile.am (weak_alias_test_1.so): Depend upon | |
3888 | gcctestdir/ld. | |
3889 | (weak_alias_test_2.so, weak_alias_test_4.so): Likewise. | |
3890 | * testsuite/Makefile.in: Rebuild. | |
3891 | ||
323ee3f4 AM |
3892 | 2008-08-04 Alan Modra <[email protected]> |
3893 | ||
3894 | * Makefile.am (POTFILES.in): Set LC_ALL=C. | |
3895 | * Makefile.in: Regenerate. | |
3896 | * po/POTFILES.in: Regenerate. | |
3897 | ||
7c07ecec ILT |
3898 | 2008-07-29 Ian Lance Taylor <[email protected]> |
3899 | ||
3900 | * script.cc (Script_options::finalize_symbols): Finalize SECTIONS | |
3901 | symbols before other symbols. | |
3902 | * testsuite/script_test_2.cc (test_addr): Declare. | |
3903 | (test_addr_alias): Declare. | |
3904 | (main): Check that test_addr and test_addr_alias have the right | |
cd536b21 | 3905 | values. |
7c07ecec ILT |
3906 | * testsuite/script_test_2.t: Define test_addr_alias and |
3907 | test_addr. | |
3908 | ||
5778530e ILT |
3909 | 2008-07-24 Ian Lance Taylor <[email protected]> |
3910 | ||
2a00e4fb ILT |
3911 | PR 5990 |
3912 | * descriptors.cc: New file. | |
3913 | * descriptors.h: New file. | |
3914 | * gold-threads.h (class Hold_optional_lock): New class. | |
3915 | * fileread.cc: Include "descriptors.h". | |
3916 | (File_read::~File_read): Release descriptor rather than closing | |
3917 | it. | |
3918 | (File_read::open) [file]: Call open_descriptor rather than open. | |
3919 | Set is_descriptor_opened_. | |
3920 | (File_read::open) [memory]: Assert that descriptor is not open. | |
3921 | (File_read::reopen_descriptor): New function. | |
3922 | (File_read::release): Release descriptor. | |
3923 | (File_read::do_read): Make non-const. Reopen descriptor. | |
3924 | (File_read::read): Make non-const. | |
3925 | (File_read::make_view): Reopen descriptor. | |
3926 | (File_read::do_readv): Likewise. | |
3927 | * fileread.h (class File_read): Add is_descriptor_opened_ field. | |
3928 | Update declarations. | |
3929 | * layout.cc: Include "descriptors.h". | |
3930 | (Layout::create_build_id): Use open_descriptor rather than open. | |
3931 | * output.cc: Include "descriptors.h". | |
3932 | (Output_file::open): Use open_descriptor rather than open. | |
3933 | * archive.cc (Archive::const_iterator): Change Archive to be | |
3934 | non-const. | |
3935 | (Archive::begin, Archive::end): Make non-const. | |
3936 | (Archive::count_members): Likewise. | |
3937 | * archive.h (class Archive): Update declarations. | |
3938 | * object.h (Object::read): Make non-const. | |
3939 | * Makefile.am (CCFILES): Add descriptors.cc. | |
3940 | (HFILES): Add descriptors.h. | |
3941 | * Makefile.in: Rebuild. | |
3942 | ||
801647d1 ILT |
3943 | PR 6716 |
3944 | * gold.h: Always include <clocale>. Add Solaris workarounds | |
3945 | following code in binutils/sysdep.h. | |
3946 | ||
5edd166e ILT |
3947 | PR 6048 |
3948 | * ehframe.cc (Eh_frame::add_ehframe_input_section): Check whether | |
3949 | this->eh_frame_hdr_ is NULL before using it. | |
3950 | ||
c89ad728 ILT |
3951 | * dynobj.cc (Versions::Versions): Update comment. |
3952 | ||
aa86f06b ILT |
3953 | * dynobj.cc (Versions::Versions): If there is an soname, use it as |
3954 | the base version name. | |
3955 | ||
5778530e ILT |
3956 | * stringpool.cc (Stringpool_template::add_with_length): Set key to |
3957 | array size plus one. | |
3958 | (Stringpool_template::set_string_offsets): Subtract one from key | |
3959 | before using it as an array index. | |
3960 | (Stringpool_template::get_offset_with_length): Likewise. | |
3961 | (Stringpool_template::write_to_buffer): Likewise. | |
3962 | * stringpool.h (Stringpool_template::get_offset_from_key): | |
3963 | Likewise. | |
3964 | ||
057ead22 ILT |
3965 | 2008-07-23 Ian Lance Taylor <[email protected]> |
3966 | ||
7f649c59 ILT |
3967 | PR 6658 |
3968 | * object.h (Merged_symbol_value::value): Do our best to handle a | |
3969 | negative addend. | |
3970 | ||
057ead22 ILT |
3971 | PR 6647 |
3972 | * script.cc (Version_script_info::get_versions): Don't add empty | |
3973 | version tag to return value. | |
3974 | (Version_script_info::get_symbol_version_helper): Change return | |
3975 | type to bool. Add pversion parameter. Change all callers. | |
3976 | (script_register_vers_node): Don't require a non-NULL tag. | |
3977 | * script.h (class Version_script_info): Update declarations. | |
3978 | (Version_script_info::get_symbol_version): Change return type to | |
3979 | bool. Add version parameter. Change all callers. | |
3980 | * symtab.cc (Sized_symbol::add_from_relobj): Rework version | |
3981 | handling. Handle an empty version from a version script. | |
3982 | (Symbol_table::define_special_symbol): Likewise. | |
3983 | * testsuite/ver_test_10.script: New file. | |
3984 | * testsuite/ver_test_10.sh: New file. | |
3985 | * testsuite/Makefile.am (check_SCRIPTS): Add ver_test_10.sh. | |
3986 | (check_DATA): Add ver_test_10.syms. | |
3987 | (ver_test_10.syms, ver_test_10.so): New target. | |
3988 | * testsuite/Makefile.in: Rebuild. | |
3989 | ||
58e54ac2 CD |
3990 | 2008-07-23 Simon Baldwin <[email protected]> |
3991 | ||
3992 | * symtab.cc (Symbol_table::sized_write_symbol): Only set st_size | |
3993 | to zero for undefined symbols from dynamic libraries. | |
3994 | ||
95d14cd3 ILT |
3995 | 2008-07-23 Ian Lance Taylor <[email protected]> |
3996 | ||
3997 | * symtab.cc (Symbol_table::resolve): Remove version parameter. | |
3998 | Change all callers. | |
3999 | * symtab.h (class Symbol_table): Update declaration. | |
4000 | * testsuite/ver_test_9.cc: New file. | |
4001 | * testsuite/Makefile.am (check_PROGRAMS): Add ver_test_9. | |
4002 | (ver_test_9_SOURCES, ver_test_9_DEPENDENCIES): Define. | |
4003 | (ver_test_9_LDFLAGS, ver_test_9_LDADD): Define. | |
4004 | (ver_test_9.so, ver_test_9.o): New targets. | |
4005 | * testsuite/Makefile.in: Rebuild. | |
4006 | ||
92de84a6 ILT |
4007 | 2008-07-22 Ian Lance Taylor <[email protected]> |
4008 | ||
34810851 ILT |
4009 | * options.h (class General_options): Define --check-sections. |
4010 | * layout.cc (Layout::set_segment_offsets): Handle | |
4011 | --check-sections. | |
4012 | ||
af6156ef ILT |
4013 | * options.h (class General_options): Define -n/--nmagic and |
4014 | -N/--omagic. | |
4015 | * options.cc (General_options::finalize): For -n/--nmagic or | |
4016 | -N/--omagic, set -static. | |
4017 | * layout.cc (Layout::attach_allocated_section_to_segment): If | |
4018 | -N/--omagic, don't put read-only and read-write sections in | |
4019 | different segments. | |
4020 | (Layout::find_first_load_seg): If -N/--omagic, don't insist on | |
4021 | finding a read-only segment. | |
4022 | (Layout::set_segment_offsets): If -N/--omagic or -n/--nmagic, | |
4023 | don't set the minimum segment alignment to the common page size, | |
4024 | and don't set the file offset to the address modulo the page size. | |
4025 | * script-sections.cc (Script_sections::create_segments): If | |
4026 | -n/--omagic, don't put read-only and read-write sections in | |
4027 | different segments. | |
4028 | ||
92de84a6 ILT |
4029 | * cref.cc: New file. |
4030 | * cref.h: New file. | |
4031 | * options.h (class General_options): Add --print-symbol-counts. | |
4032 | * main.cc (main): Issue defined symbol report if requested. | |
4033 | * archive.cc (Archive::interpret_header): Make into a const member | |
4034 | function. | |
4035 | (Archive::add_symbols): Call Input_objects::archive_start and | |
4036 | archive_stop. | |
4037 | (Archive::const_iterator): Define new class. | |
4038 | (Archive::begin, Archive::end): New functions. | |
4039 | (Archive::include_all_members): Rewrite to use iterator. | |
4040 | (Archive::count_members): New function. | |
4041 | * archive.h (class Archive): Update declarations. | |
4042 | (Archive::filename): New function. | |
4043 | * object.cc: Include "cref.h". | |
4044 | (Sized_relobj::Sized_relobj): Initialize defined_count_. | |
4045 | (Sized_relobj::do_get_global_symbol_counts): New function. | |
4046 | (Input_objects::add_object): Add object to cross-referencer. | |
4047 | (Input_objects::archive_start): New function. | |
4048 | (Input_objects::archive_stop): New function. | |
4049 | (Input_objects::print_symbol_counts): New function. | |
4050 | * object.h: Declare Cref and Archive. | |
4051 | (Object::get_global_symbol_counts): New function. | |
4052 | (Object::do_get_global_symbol_counts): New pure virtual function. | |
4053 | (class Sized_relobj): Add defined_count_ field. Update | |
4054 | declarations. | |
4055 | (class Input_objects): Add cref_ field. Update constructor. | |
4056 | Update declarations. | |
4057 | * dynobj.cc (Sized_dynobj::Sized_dynobj): Initialize symbols_ and | |
4058 | defined_count_. | |
4059 | (Sized_dynobj::do_add_symbols): Allocate symbols_ if printing | |
4060 | symbol counts. | |
4061 | (Sized_dynobj::do_get_global_symbol_counts): New function. | |
4062 | * dynobj.h (class Sized_dynobj): Add fields symbols_ and | |
4063 | defined_count_. Update declarations. Define Symbols typedef. | |
4064 | * symtab.cc (Symbol_table::add_from_relobj): Add defined | |
4065 | parameter. Change all callers. | |
4066 | (Symbol_table::add_from_dynobj): Add sympointers and defined | |
4067 | parameters. Change all callers. | |
4068 | * symtab.h (class Symbol_table): Update declarations. | |
4069 | * Makefile.am (CCFILES): Add cref.cc. | |
4070 | (HFILES): Add cref.h. | |
4071 | * Makefile.in: Rebuild. | |
4072 | ||
3f7c5e1d CD |
4073 | 2008-07-22 Simon Baldwin <[email protected]> |
4074 | ||
4075 | * symtab.cc (Symbol_table::sized_write_symbol): Set symbol size | |
4076 | to zero when writing undefined symbols. | |
4077 | ||
e0b64032 ILT |
4078 | 2008-07-22 Ian Lance Taylor <[email protected]> |
4079 | ||
4080 | * output.cc (Output_section::add_input_section): Don't try to | |
4081 | merge empty merge sections. | |
4082 | ||
096b02cf CS |
4083 | 2008-07-21 Craig Silverstein <[email protected]> |
4084 | ||
4085 | * symtab.cc (Symbol_table::warn_about_undefined_dynobj_symbol): | |
4086 | Include symbol version in error message. | |
cd536b21 | 4087 | |
1d1f116d CD |
4088 | 2008-07-20 Chris Demetriou <[email protected]> |
4089 | ||
cd536b21 | 4090 | * configure.ac (gold_cv_c_random_seed): New configured variable. |
1d1f116d CD |
4091 | (RANDOM_SEED_CFLAGS): New substituted variable. |
4092 | * Makefile.am (AM_CFLAGS, AM_CXXFLAGS): Add $(RANDOM_SEED_CFLAGS). | |
4093 | * configure: Rebuild. | |
4094 | * Makefile.in: Likewise. | |
4095 | * testsuite/Makefile.in: Likewise. | |
4096 | ||
a18f591e ILT |
4097 | 2008-07-18 Ian Lance Taylor <[email protected]> |
4098 | ||
4099 | * symtab.cc (Symbol_table::add_from_object): Rewrite the case | |
4100 | where we see NAME/NULL and NAME/VERSION as separate symbols. | |
4101 | * testsuite/ver_test_main.cc (main): Call t4. | |
4102 | (t4, t4_2a): Define. | |
4103 | * testsuite/ver_test_2.cc (t4_2): Define. | |
4104 | * testsuite/ver_test_2.script: Put t4_2a in VER2. | |
4105 | * testsuite/ver_test_4.cc (t4_2a): Define. | |
4106 | * testsuite/ver_test_4.script: Put t4_2a in VER2. | |
4107 | * testsuite/ver_test.h (t4, t4_2, t4_2a): Declare. | |
4108 | ||
c6e3f6ed ILT |
4109 | 2008-07-17 Ian Lance Taylor <[email protected]> |
4110 | ||
4111 | * dynobj.cc (Versions::add_def): If we give an error about a | |
4112 | missing version, go ahead and create the version anyhow. | |
4113 | ||
ef9beddf ILT |
4114 | 2008-07-10 Ian Lance Taylor <[email protected]> |
4115 | ||
4116 | Handle output sections with more than 0x7fffffff bytes. | |
4117 | * object.h (class Relobj): Change map_to_output_ to | |
4118 | output_sections_, and just keep a section pointer. Change all | |
4119 | uses. Move comdat group support to Sized_relobj. | |
4120 | (Relobj::is_section_specially_mapped): Remove. | |
4121 | (Relobj::output_section): Remove poff parameter. Change all | |
4122 | callers. | |
4123 | (Relobj::output_section_offset): New function. | |
4124 | (Relobj::set_section_offset): Rewrite. | |
4125 | (Relobj::map_to_output): Remove. | |
4126 | (Relobj::output_sections): New function. | |
4127 | (Relobj::do_output_section_offset): New pure virtual function. | |
4128 | (Relobj::do_set_section_offset): Likewise. | |
4129 | (class Sized_relobj): Add section_offsets_ field. Add comdat | |
4130 | group support from Relobj. Update declarations. | |
4131 | (Sized_relobj::get_output_section_offset): New function. | |
4132 | (Sized_relobj::do_output_section_offset): New function. | |
4133 | (Sized_relobj::do_set_section_offset): New function. | |
4134 | * object.cc (Relobj::output_section_address): Remove. | |
4135 | (Sized_relobj::Sized_relobj): Initialize new fields. | |
4136 | (Sized_relobj::include_section_group): Cast find_kept_object to | |
4137 | Sized_relobj. | |
4138 | (Sized_relobj::include_linkonce_section): Likewise. | |
4139 | (Sized_relobj::do_layout): Use separate arrays for output section | |
4140 | and output offset. | |
4141 | (Sized_relobj::do_count_local_symbols): Change map_to_output to | |
4142 | output_sections. | |
4143 | (Sized_relobj::do_finalize_local_symbols): Change map_to_output to | |
4144 | output_sections and section_offsets. | |
4145 | (Sized_relobj::write_local_symbols): Likewise. | |
4146 | (map_to_kept_section): Compute output address directly. | |
4147 | * reloc.cc (Sized_relobj::do_read_relocs): Change map_to_output to | |
4148 | output_sections and section_offsets. | |
4149 | (Sized_relobj::write_sections): Likewise. | |
4150 | (Sized_relobj::relocate_sections): Likewise. | |
4151 | * symtab.cc (sized_finalize_symbol): Use output_section_offset. | |
4152 | * output.h (class Output_reloc): Update declarations. Change | |
4153 | u2_.relobj to Sized_relobj*. | |
4154 | (class Output_data_reloc): Change add functions to use | |
4155 | Sized_relobj*. | |
4156 | * output.cc (Output_reloc::Output_reloc): Change relobj to | |
4157 | Sized_relobj*. | |
4158 | (Output_reloc::local_section_offset): Change return type to | |
4159 | Elf_Addr. Use get_output_section_offset. | |
4160 | (Output_reloc::get_address): Likewise. | |
4161 | (Output_section::is_input_address_mapped): Don't call | |
4162 | is_section_specially_mapped. | |
4163 | (Output_section::output_offset): Likewise. | |
4164 | (Output_section::output_address): Likewise. | |
4165 | (Output_section::starting_output_address): Likewise. | |
4166 | * copy-relocs.cc (Copy_relocs::copy_reloc): Change object | |
4167 | parameter to Sized_relobj*. | |
4168 | (Copy_relocs::need_copy_reloc): Likewise. | |
4169 | (Copy_relocs::save): Likewise. | |
4170 | * copy-relocs.h (class Copy_relocs): Update declarations. | |
4171 | (class Copy_relocs::Copy_reloc_entry): Change constructor to use | |
4172 | Sized_relobj*. Change relobj_ field to Sized_relobj*. | |
4173 | * target-reloc.h (relocate_for_relocatable): Change | |
4174 | offset_in_output_section type to Elf_Addr. Change code that uses | |
4175 | it as well. | |
4176 | * layout.cc (Layout::layout): Always set *off. | |
4177 | * mapfile.cc (Mapfile::print_input_section): Use | |
4178 | output_section_offset. | |
4179 | * i386.cc (Target_i386::copy_reloc): Change object parameter to | |
4180 | Sized_relobj*. | |
4181 | * powerpc.cc (Target_powerpc::copy_reloc): Likewise. | |
4182 | * sparc.cc (Target_sparc::copy_reloc): Likewise. | |
4183 | * x86_64.cc (Target_x86_64::copy_reloc): Likewise. | |
4184 | ||
5cb66f97 ILT |
4185 | 2008-07-03 Ian Lance Taylor <[email protected]> |
4186 | ||
4187 | * layout.cc (Layout::include_section): Do not discard unrecognized | |
4188 | SHT_STRTAB sections. | |
4189 | ||
afe47622 CS |
4190 | 2008-06-30 Craig Silverstein <[email protected]> |
4191 | ||
4192 | * script.cc (Lex::can_continue_name): Make '?' allowable in | |
4193 | version-script names. | |
4194 | * testsuite/version_script.map: Change glob pattern to use '?' | |
4195 | ||
5adf9721 ILT |
4196 | 2008-06-30 Manish Singh <[email protected]> |
4197 | ||
4198 | PR 6585 | |
4199 | * symtab.cc (Symbol_table::add_undefined_symbols_from_command_line): | |
4200 | Correct typo. | |
4201 | ||
e6fde208 ILT |
4202 | 2008-06-30 Ian Lance Taylor <[email protected]> |
4203 | ||
4204 | PR 6660 | |
4205 | PR 6682 | |
4206 | * powerpc.cc (Powerpc_relocate_functions::addr16_ha) [both | |
4207 | versions]: Don't try to read the value in the contents, since we | |
4208 | don't use it. Use the template endianness when writing. | |
4209 | ||
3f2e6a2d CC |
4210 | 2008-06-25 Cary Coutant <[email protected]> |
4211 | ||
4212 | * fileread.cc (File_read::make_view): Assert on zero-length view. | |
4213 | * object.cc (Sized_relobj::do_read_symbols): Don't try to read | |
4214 | symbol table when there are no symbols to read. | |
4215 | ||
c43d3a48 CS |
4216 | 2008-06-23 Craig Silverstein <[email protected]> |
4217 | ||
4218 | * version.cc (version_string): Bump to 1.7 | |
4219 | ||
5f494ea0 CS |
4220 | 2008-06-18 Craig Silverstein <[email protected]> |
4221 | ||
4222 | * powerpc.cc (Powerpc_relocate_functions::addr16_ha): cast | |
4223 | constant 0xFFFF to type Valtype. | |
4224 | (Powerpc_relocate_functions::rel16_ha): Likewise. | |
4225 | ||
c42e122e ILT |
4226 | 2008-06-17 Ian Lance Taylor <[email protected]> |
4227 | ||
f34787f8 ILT |
4228 | * output.h (Output_section::Input_section): Initialize p2align_ to |
4229 | zero for Output_section_data constructors. | |
4230 | (Output_section::Input_section::addralign): If not an input | |
4231 | section, return the alignment of the Output_section_data. | |
4232 | * testsuite/copy_test.cc: New file. | |
4233 | * testsuite/copy_test_1.cc: New file. | |
4234 | * testsuite/copy_test_2.cc: New file. | |
4235 | * testsuite/Makefile.am (check_PROGRAMS): Add copy_test. | |
4236 | (copy_test_SOURCES, copy_test_DEPENDENCIES): New variables. | |
4237 | (copy_test_LDFLAGS, copy_test_LDADD): New variables. | |
4238 | (copy_test_1_pic.o, copy_test_1.so): New targets. | |
4239 | (copy_test_2_pic.o, copy_test_2.so): New targets. | |
4240 | * testsuite/Makefile.in: Rebuild. | |
4241 | ||
c42e122e ILT |
4242 | * script-sections.cc (Script_sections::place_orphan): Initialize |
4243 | local variable exact. | |
4244 | ||
ce3ac18a DE |
4245 | 2008-06-13 David Edelsohn <[email protected]> |
4246 | ||
4247 | * powerpc.cc (Output_data_plt_powerpc::do_write): 8 + 4 = 0xC. | |
4248 | ||
42cacb20 DE |
4249 | 2008-06-12 David Edelsohn <[email protected]> |
4250 | David S. Miller <[email protected]> | |
4251 | ||
4252 | * powerpc.cc: New file. | |
4253 | * Makefile.am (TARGETSOURCES): Add powerpc.cc | |
4254 | (ALL_TARGETOBJS): Add powerpc.$(OBJEXT) | |
4255 | * configure.tgt: Add entries for powerpc-* and powerpc64-*. | |
4256 | * Makefile.in: Rebuild. | |
4257 | ||
7b308235 ILT |
4258 | 2008-06-09 Ian Lance Taylor <[email protected]> |
4259 | ||
4260 | * testsuite/relro_test.cc: Include <cstdio>, <cstdlib>, and | |
4261 | <exception>. | |
4262 | (throwing, orig_terminate): New static variables. | |
4263 | (terminate_handler): New static function. | |
4264 | (t2): Set terminate handler. | |
4265 | ||
f0b886e3 ILT |
4266 | 2008-06-05 Kris Van Hees <[email protected]> |
4267 | ||
4268 | PR 6584 | |
cd536b21 | 4269 | * binary.cc (Binary_to_elf::sized_convert): Fix .data |
f0b886e3 ILT |
4270 | alignment. |
4271 | ||
3e90f135 CC |
4272 | 2008-05-30 Cary Coutant <[email protected]> |
4273 | ||
4274 | * archive.cc (Archive::include_all_members) Correct to step | |
4275 | over symbol table and extended name table in thin archives. | |
4276 | ||
e09ad04a ILT |
4277 | 2008-05-29 Kris Van Hees <[email protected]> |
4278 | ||
4279 | PR 6407 | |
4280 | * target-reloc.h (relocate_for_relocatable): Fix new_offset | |
4281 | calculation. | |
4282 | ||
62b01cb5 ILT |
4283 | 2008-05-28 Caleb Howe <[email protected]> |
4284 | ||
4285 | * reduced_debug_output.cc: New file. | |
4286 | * reduced_debug_output.h: New file. | |
92de84a6 | 4287 | * options.h (class General_options): Add --strip-debug-non-line. |
62b01cb5 ILT |
4288 | * options.cc (General_options::finalize): Add strip_debug_non_line |
4289 | to the strip heirarchy. | |
4290 | * layout.h (class Layout): Add debug_abbrev_ and debug_info_ | |
4291 | fields. | |
4292 | * layout.cc: Include "reduced_debug_output.h". | |
4293 | (Layout::Layout): Initialize new fields. | |
4294 | (line_only_debug_sections): New static array. | |
4295 | (is_lines_only_debug_sections): New static inline function. | |
4296 | (Layout::include_section): Handle --strip-debug-non-line. | |
4297 | (Layout::make_output_section): If --strip-debug-non-line, build | |
4298 | new output sections for .debug_abbrev and .debug_info. | |
4299 | * dwarf_reader.cc (read_unsigned_LEB_128): Move to namespace | |
4300 | gold. Warn about possible overflow. | |
4301 | (read_signed_LEB_128): Likewise. | |
4302 | * dwarf_reader.h: (read_unsigned_LEB_128): Declare. | |
4303 | (read_signed_LEB_128): Declare. | |
4304 | * Makefile.am (CCFILES): Add reduced_debug_output.cc. | |
4305 | (HFILES): Add reduced_debug_output.h. | |
4306 | * Makefile.in: Rebuild. | |
4307 | ||
7d9e3d98 ILT |
4308 | 2008-05-21 Ian Lance Taylor <[email protected]> |
4309 | ||
4310 | * mapfile.cc: New file. | |
4311 | * mapfile.h: New file. | |
4312 | * options.h (class General_options): Add -M/--print-map and -Map. | |
4313 | * options.cc (General_options::finalize): Make -M equivalent to | |
4314 | -Map -. | |
4315 | * main.cc: Include <cstdio> and "mapfile.h". | |
4316 | (main): Open mapfile if requested. | |
4317 | * gold.cc (class Middle_runner): Add mapfile_ field. Update | |
4318 | constructor. Change caller. | |
4319 | (queue_initial_tasks): Add mapfile parameter. Change caller. | |
4320 | (queue_middle_tasks): Likewise. | |
4321 | * gold.h (queue_initial_tasks, queue_middle_tasks): Update | |
4322 | declarations. | |
4323 | * archive.cc: Include "mapfile.h". | |
4324 | (Archive::add_symbols): Add mapfile parameter. Change all | |
4325 | callers. Pass mapfile, symbol, and reason to include_member. | |
4326 | (Archive::include_all_members): Add mapfile parameter. Change all | |
4327 | callers. | |
4328 | (Archive::include_member): Add mapfile, sym, and why parameters. | |
4329 | Change all callers. Report inclusion to map file. | |
4330 | * archive.h: Include "fileread.h". | |
4331 | (class Archive): Update declarations. | |
4332 | (Archive::file): New const method. | |
4333 | (class Add_archive_symbols): Add mapfile_ field. Update | |
4334 | constructor. Change all callers. | |
4335 | * readsyms.h (class Read_symbols): Likewise. | |
4336 | (class Finish_group): Likewise. | |
4337 | (class Read_script): Likewise. | |
4338 | * common.cc: Include "mapfile.h". | |
4339 | (Symbol_table::allocate_commons): Add mapfile parameter. Change | |
4340 | all callers. | |
4341 | (Symbol_table::do_allocate_commons): Likewise. | |
4342 | (Symbol_table::do_allocate_commons_list): Likewise. Report common | |
4343 | symbol allocation to mapfile. | |
4344 | * common.h (class Allocate_commons_task): Add mapfile_ field. | |
4345 | Update constructor. Change all callers. | |
4346 | * symtab.h (class Symbol_table): Update declarations. | |
4347 | * layout.cc: Include "mapfile.h". | |
4348 | (Layout_task_runner::run): Print information to mapfile. | |
4349 | (Layout::create_gold_note): Change Output_data_fixed_space to | |
4350 | Output_data_zero_fill. | |
4351 | (Layout::create_build_id): Likewise. | |
4352 | (Layout::print_to_mapfile): New function. | |
4353 | * layout.h (class Layout_task_runner): Add mapfile_ field. Update | |
4354 | constructor. Change caller. | |
4355 | (class Layout): Declare print_to_mapfile. | |
4356 | * output.cc (Output_section::Input_section::print_to_mapfile): New | |
4357 | function. | |
4358 | (Output_section::add_input_section): If producing a map, always | |
4359 | add to input_sections_ list. | |
4360 | (Output_section::do_print_to_mapfile): New function. | |
4361 | (Output_segment::print_sections_to_mapfile): New function. | |
4362 | (Output_segment::print_section_list_to_mapfile): New function. | |
4363 | * output.h: Include "mapfile.h". | |
4364 | (Output_data::print_to_mapfile): New function. | |
4365 | (Output_data::do_print_to_mapfile): New virtual function. | |
4366 | (Output_segment_headers::do_print_to_mapfile): New function. | |
4367 | (Output_file_header::do_print_to_mapfile): New function. | |
4368 | (Output_data_const::do_print_to_mapfile): New function. | |
4369 | (class Output_data_const_buffer): Add map_name_ field. Update | |
4370 | constructor. Change all callers. Add do_print_to_mapfile | |
4371 | function. | |
4372 | (class Output_data_fixed_space): Likewise. | |
4373 | (class Output_data_space): Likewise. | |
4374 | (class Output_data_zero_fill): New class. | |
4375 | (Output_data_strtab::do_print_to_mapfile): New function. | |
4376 | (Output_data_reloc_base::do_print_to_mapfile): New function. | |
4377 | (Output_relocatable_relocs::do_print_to_mapfile): New function. | |
4378 | (Output_data_group::do_print_to_mapfile): New function. | |
4379 | (Output_data_got::do_print_to_mapfile): New function. | |
4380 | (Output_data_dynamic::do_print_to_mapfile): New function. | |
4381 | (Output_symtab_xindex::do_print_to_mapfile): New function. | |
4382 | (class Output_section): Declare do_print_to_mapflie. Declare | |
4383 | print_to_mapfile in Input_section. | |
4384 | (class Output_segment): Declare new functions. | |
4385 | * object.h (Sized_relobj::symbol_count): New function. | |
4386 | * script-sections.cc | |
4387 | (Output_section_element_dot_assignment::set_section_addresses): | |
4388 | Change Output_data_fixed_space to Output_data_zero_fill. | |
4389 | (Output_data_expression::do_print_to_mapfile): New function. | |
4390 | * script.cc (read_input_script): Add mapfile parameter. Change | |
4391 | all callers. | |
4392 | * script.h (read_input_script): Update declaration. | |
4393 | * ehframe.h (Eh_frame_hdr::do_print_to_mapfile): New function. | |
4394 | (Eh_frame::do_print_to_mapfile): New function. | |
4395 | * merge.h (Output_merge_data::do_print_to_mapfile): New function. | |
4396 | (Output_merge_string::do_print_to_mapfile): New function. | |
4397 | * i386.cc (Output_data_plt_i386::do_print_to_mapfile): New | |
4398 | function. | |
4399 | * sparc.cc (Output_data_plt_sparc::do_print_to_mapfile): New | |
4400 | function. | |
4401 | * x86_64.cc (Output_data_plt_x86_64::do_print_to_mapfile): New | |
4402 | function. | |
4403 | * Makefile.am (CCFILES): Add mapfile.cc. | |
4404 | (HFILES): Add mapfile.h. | |
4405 | * Makefile.in: Rebuild. | |
4406 | ||
9f1d377b ILT |
4407 | 2008-05-19 Ian Lance Taylor <[email protected]> |
4408 | ||
4409 | * options.h (class General_options): Add -z relro. | |
4410 | * layout.cc (Layout::Layout): Initialize relro_segment_. | |
4411 | (Layout::add_output_section_data): Return the output section. | |
4412 | (Layout::make_output_section): Rcognize relro sections and mark | |
4413 | them appropriately. | |
4414 | (Layout::attach_allocated_section_to_segment): Put relro sections | |
4415 | in a PT_GNU_RELRO segment. | |
4416 | (Layout::create_initial_dynamic_sections): Mark the .dynamic | |
4417 | section as relro. | |
4418 | (Layout::segment_precedes): Sort PT_GNU_RELRO segments after | |
4419 | PT_TLS segments. | |
4420 | (Layout::linkonce_mapping): Map d.rel.ro.local to | |
4421 | .data.rel.ro.local. | |
4422 | (Layout::output_section_name): Us .data.rel.ro.local for any | |
4423 | section which begins with that. | |
4424 | * layout.h (class Layout): Update add_output_section_data | |
4425 | declaration. Add relro_segment_ field. | |
4426 | * output.cc (Output_section::Output_section): Initialize is_relro_ | |
4427 | and is_relro_local_ fields. | |
4428 | (Output_segment::add_output_section): Group relro sections. | |
4429 | (Output_segment::is_first_section_relro): New function. | |
4430 | (Output_segment::maximum_alignment): If there is a relro section, | |
4431 | align the segment to the common page size. | |
4432 | (Output_segment::set_section_addresses): Track whether we are | |
4433 | looking at relro sections. If the last section is a relro | |
4434 | section, align to the common page size. | |
4435 | (Output_segment::set_section_list_addresses): Add in_relro | |
4436 | parameter. Change all callers. Align to the page size when | |
4437 | moving from relro to non-relro section. | |
4438 | (Output_segment::set_offset): Align memsz of a PT_GNU_RELRO | |
4439 | segment. | |
4440 | * output.h (class Output_section): Add is_relro_ and | |
4441 | is_relro_local_ fields. | |
4442 | (Output_section::is_relro): New function. | |
4443 | (Output_section::set_is_relro): New function. | |
4444 | (Output_section::is_relro_local): New function. | |
4445 | (Output_section::set_is_relro_local): New function. | |
4446 | (class Output_segment): Update declarations. | |
4447 | * i386.cc (Target_i386::got_section): Mark .got section as relro. | |
4448 | * sparc.cc (Target_sparc::got_section): Likewise. | |
4449 | * x86_64.cc (Target_x86_64::got_section): Likewise. | |
4450 | * testsuite/relro_test_main.cc: New file. | |
4451 | * testsuite/relro_test.cc: New file. | |
4452 | * testsuite/Makefile.am (check_PROGRAMS): Add relro_test. | |
4453 | (relro_test_SOURCES, relro_test_DEPENDENCIES): New variables. | |
4454 | (relro_test_LDFLAGS, relro_test_LDADD): New variables. | |
4455 | (relro_test.so, relro_test_pic.o): New targets. | |
4456 | * testsuite/Makefile.in: Rebuild. | |
4457 | ||
a984ee1d ILT |
4458 | 2008-05-16 Ian Lance Taylor <[email protected]> |
4459 | ||
01676dcd ILT |
4460 | * output.cc (Output_segment::add_output_section): Remove front |
4461 | parameter. | |
4462 | * output.h (class Output_segment): Remove | |
4463 | add_initial_output_section and overloaded add_output_section. | |
4464 | Update declaration of remaining add_output_section. | |
4465 | * layout.cc (Layout::create_interp): Call add_output_section | |
4466 | rather than add_initial_output_section. | |
4467 | (Layout::finish_dynamic_section): Likewise. | |
4468 | ||
497897f9 ILT |
4469 | * i386.cc (Target_i386::Relocate::relocate_tls): Set dynamic type |
4470 | for TLS_GOTDESC and TLS_DESC_CALL. Only optimize TLS_LDO_32 if we | |
4471 | know the dynamic type. | |
4472 | * x86_64.cc (Target_x86_64::Relocate): Add saw_tls_block_reloc_ | |
4473 | field. Initialize it in constructor. | |
4474 | (Target_x86_64::Relocate::relocate_tls): Record that we saw a TLS | |
4475 | block reloc for TLSGD, GOTPC32_TLSDESC, TLSDESC_CALL, and TLSLD. | |
4476 | Only optimize DTPOFF32 and DTPOFF64 if we have seen a TLS block | |
4477 | reloc. | |
4478 | ||
a984ee1d ILT |
4479 | * output.cc (Output_reloc::get_address): Change return type to |
4480 | Elf_Addr. | |
4481 | * output.h (class Output_reloc): Update get_address declaration. | |
4482 | * x86_64.cc (Output_data_plt_x86_64::do_write): Use 64-bit types | |
4483 | for section addresses. | |
4484 | ||
55ba0940 ILT |
4485 | 2008-05-09 Ian Lance Taylor <[email protected]> |
4486 | ||
4487 | PR 6493 | |
4488 | * gold.cc (gold_nomem): Use return value of write. | |
4489 | ||
75517b77 ILT |
4490 | 2008-05-08 Ian Lance Taylor <[email protected]> |
4491 | ||
4492 | * symtab.c (Symbol::init_base_output_data): Add version | |
4493 | parameter. Change all callers. | |
4494 | (Symbol::init_base_output_segment): Likewise. | |
4495 | (Symbol::init_base_constant): Likewise. | |
4496 | (Symbol::init_base_undefined): Likewise. | |
4497 | (Sized_symbol::init_output_data): Likewise. | |
4498 | (Sized_symbol::init_output_segment): Likewise. | |
4499 | (Sized_symbol::init_constant): Likewise. | |
4500 | (Sized_symbol::init_undefined): Likewise. | |
4501 | (Symbol_table::do_define_in_output_data): If the new symbol has a | |
4502 | version, mark it as the default. | |
4503 | (Symbol_table::do_define_in_output_segment): Likewise. | |
4504 | (Symbol_table::do_define_as_constant): Likewise. | |
4505 | * symtab.h (class Symbol): Update declarations. | |
4506 | (class Sized_symbol): Likewise. | |
4507 | * resolve.cc (Symbol::override_version): New function. | |
c42e122e | 4508 | (Symbol::override_base): Call override_version. |
75517b77 ILT |
4509 | (Symbol::override_base_with_special): Likewise. |
4510 | * testsuite/ver_script_8.script: New file. | |
4511 | * testsuite/Makefile.am (check_PROGRAMS): Add ver_test_8. | |
4512 | (ver_test_8_SOURCES, ver_test_8_DEPENDENCIES): Define. | |
4513 | (ver_test_8_LDFLAGS, ver_test_8_LDADD): Define. | |
4514 | (ver_test_8_1.so, ver_test_8_2.so): New targets. | |
4515 | ||
f1f70eae ILT |
4516 | 2008-05-06 Ian Lance Taylor <[email protected]> |
4517 | ||
f3e9c5c5 ILT |
4518 | PR 6049 |
4519 | * options.h (DEFINE_set): Add VARNAME_begin and VARNAME_end | |
4520 | functions. | |
4521 | (class General_options): Remove existing --undefined, and add | |
4522 | --no-undefined instead. Add new --undefined as synonym for -u. | |
4523 | * archive.cc (Archive::add_symbols): Check whether symbol was | |
4524 | named with -u. | |
4525 | * gold.cc (queue_middle_tasks): Add -u symbols to symbol table. | |
4526 | * symtab.h (class Symbol): Rename CONSTANT to IS_CONSTANT; change | |
4527 | all uses. Add IS_UNDEFINED. Update declarations to split | |
4528 | different versions of init_base. Declare init_base_undefined. | |
4529 | (Symbol::is_defined): Handle IS_UNDEFINED. | |
4530 | (Symbol::is_undefined): Likewise. | |
4531 | (Symbol::is_weak_undefined): Call is_undefined. | |
4532 | (Symbol::is_absolute): Handle IS_CONSTANT. | |
4533 | (class Sized_symbol): Update declarations to split different | |
4534 | versions of init. Declare init_undefined. | |
4535 | (class Symbol_table): Declare new functions. | |
4536 | * symtab.cc (Symbol::init_base_object): Rename from init_base. | |
4537 | Change all callers. | |
4538 | (Symbol::init_base_output_data): Likewise. | |
4539 | (Symbol::init_base_output_segment): Likewise. | |
4540 | (Symbol::init_base_constant): Likewise. | |
4541 | (Symbol::init_base_undefined): New function. | |
4542 | (Sized_symbol::init_object): Rename from init. Change all | |
4543 | callers. | |
4544 | (Sized_symbol::init_output_data): Likewise. | |
4545 | (Sized_symbol::init_output_segment): Likewise. | |
4546 | (Sized_symbol::init_constant): Likewise. | |
4547 | (Sized_symbol::init_undefined): New function. | |
4548 | (Symbol_table::add_undefined_symbols_from_command_line): New | |
4549 | function. | |
4550 | (Symbol_table::do_add_undefined_symbols_from_command_line): New | |
4551 | function. | |
4552 | (Symbol::final_value_is_known): Handle IS_UNDEFINED. | |
4553 | (Symbol::output_section): Likewise. | |
4554 | (Symbol::set_output_section): Likewise. | |
4555 | (Symbol_table::sized_finalize_symbol): Likewise. | |
4556 | (Symbol_table::sized_write_globals): Likewise. | |
4557 | * resolve.cc (Symbol_table::should_override): Likewise. | |
4558 | (Symbol::override_base_with_special): Likewise. | |
4559 | ||
8bdcdf2c ILT |
4560 | * symtab.cc (Symbol_table::add_from_dynobj): If we see a protected |
4561 | symbol, change it to have default visibility. | |
4562 | * testsuite/protected_1.cc: New file. | |
4563 | * testsuite/protected_2.cc: New file. | |
4564 | * testsuite/protected_3.cc: New file. | |
4565 | * testsuite/protected_main_1.cc: New file. | |
4566 | * testsuite/protected_main_2.cc: New file. | |
4567 | * testsuite/protected_main_3.cc: New file. | |
4568 | * testsuite/Makefile.am (check_PROGRAMS): Add protected_1. | |
4569 | (protected_1_SOURCES, protected_1_DEPENDENCIES): Define. | |
4570 | (protected_1_LDFLAGS, protected_1_LDADD): Define. | |
4571 | (protected_1.so): New target. | |
4572 | (protected_1_pic.o, protected_2_pic.o): New targets. | |
4573 | (protected_3_pic.o): New target. | |
4574 | (check_PROGRAMS): Add protected_2. | |
4575 | (protected_2_SOURCES, protected_2_DEPENDENCIES): Define. | |
4576 | (protected_2_LDFLAGS, protected_2_LDADD): Define. | |
4577 | * testsuite/Makefile.in: Rebuild. | |
4578 | ||
2b706932 ILT |
4579 | * options.h (DEFINE_var): Add set_user_set_##varname__. |
4580 | (DEFINE_bool_alias): New macro. | |
4581 | (class General_options): Define -Bstatic using DEFINE_bool_alias | |
4582 | rather than DEFINE_special. Add --undefined as an alias for -z | |
4583 | defs. | |
4584 | * options.cc (General_options::parse_Bstatic): Remove. | |
4585 | ||
d82a5bcc ILT |
4586 | * options.h (class General_options): Add --fatal-warnings. |
4587 | * main.cc (main): Implement --fatal-warnings. | |
4588 | * errors.h (Errors::warning_count): New function. | |
4589 | ||
f1f70eae ILT |
4590 | * options.h (class General_options): Add -Bsymbolic-functions. |
4591 | * symtab.h (Symbol::is_preemptible): Check for | |
4592 | -Bsymbolic-functions. | |
4593 | ||
8825ac63 ILT |
4594 | 2008-05-05 Ian Lance Taylor <[email protected]> |
4595 | ||
d98bc257 ILT |
4596 | * options.h (DEFINE_bool): For DASH_Z, create the negative option |
4597 | as noVARNAME rather than no-VARNAME. | |
4598 | (class General_options): Add option -z combreloc. | |
4599 | * output.h (class Output_reloc) [SHT_REL]: Declare compare and | |
4600 | get_address. | |
4601 | (Output_reloc::sort_before) [SHT_REL]: New function. | |
4602 | (Output_reloc::sort_before) [SHT_RELA]: New function. | |
4603 | (class Output_data_reloc_base): Add sort_relocs_ field. Define | |
4604 | Sort_relocs_comparison. | |
4605 | (Output_data_reloc_base::Output_data_reloc_base): Add sort_relocs | |
4606 | parameter. Change all callers. | |
4607 | (Output_data_reloc::Output_data_reloc) [both versions]: Add | |
4608 | sort_relocs parameter. Change all callers. | |
4609 | * output.cc (Output_reloc::get_address): New function, broken out | |
4610 | of write_rel. | |
4611 | (Output_reloc::write_rel): Call it. | |
4612 | (Output_reloc::compare): New function. | |
4613 | (Output_data_reloc_base::do_write): Optionally sort relocs. | |
4614 | ||
60b2b4e7 ILT |
4615 | * configure.ac: If targ_extra_obj is set, link it in. |
4616 | * configure.tgt: Initialize all variables. | |
4617 | (x86_64*): Set targ_extra_obj and targ_extra_size. | |
4618 | * configure: Rebuild. | |
4619 | ||
8825ac63 ILT |
4620 | * object.cc (Sized_relobj::include_section_group): Adjust section |
4621 | indexes read from group data. Build vector to pass to | |
4622 | layout_group. | |
4623 | * layout.cc (Layout::layout_group): Add flags and shndxes | |
4624 | parameters. Remove contents parameter. Change caller. Update | |
4625 | explicit instantiations. | |
4626 | * layout.h (class Layout): Update layout_group declaration. | |
4627 | * output.cc (Output_data_group::Output_data_group): Add flags and | |
4628 | input_shndxes parameters. Remove contents parameter. Change | |
4629 | caller. | |
4630 | (Output_data_group::do_write): Change input_sections_ to | |
4631 | input_shndxes_. | |
4632 | * output.h (class Output_data_group): Update constructor | |
4633 | declaration. Rename input_sections_ to input_shndxes_. | |
4634 | * testsuite/many_sections_test.cc: Add template. | |
4635 | ||
e94cf127 CC |
4636 | 2008-04-30 Cary Coutant <[email protected]> |
4637 | ||
4418b2d5 CC |
4638 | * target-reloc.h (relocate_section): Fix dead-pointer bug. |
4639 | ||
e94cf127 CC |
4640 | * layout.cc (Layout::include_section): Refactored check for debug |
4641 | info section. | |
4642 | (Layout::add_comdat): Add new parameters. Change type | |
4643 | of signature parameter. Add object and shndx to signatures table. | |
4644 | (Layout::find_kept_object): New function. | |
4645 | * layout.h: Include <cstring>. | |
4646 | (Layout::is_debug_info_section): New function. | |
4647 | (Layout::add_comdat): Add new parameters. | |
4648 | (Layout::find_kept_object): New function. | |
4649 | (Layout::Kept_section): New struct. | |
4650 | (Layout::Signatures): Change type of map range. | |
4651 | * object.cc (Relobj::output_section_address): New function. | |
4652 | (Sized_relobj::include_section_group): Add new parameters. Change | |
4653 | calls to Layout::add_comdat. Change to build table of kept comdat | |
4654 | groups and table mapping discarded sections to kept sections. | |
4655 | (Sized_relobj::include_linkonce_section): Likewise. Add new parameter. | |
4656 | (Sized_relobj::do_layout): Change calls to include_section_group and | |
4657 | include_linkonce_section. | |
4658 | (Sized_relobj::do_finalize_local_symbols): Do not set local symbol | |
4659 | value to zero when section is discarded. | |
4660 | (Sized_relobj::map_to_kept_section): New function. | |
4661 | * object.h (Relobj::output_section_address): New function. | |
4662 | (Relobj::Comdat_group): New type. | |
4663 | (Relobj::find_comdat_group): New function. | |
4664 | (Relobj::Comdat_group_table): New type. | |
4665 | (Relobj::Kept_comdat_section): New type. | |
4666 | (Relobj::Kept_comdat_section_table): New type. | |
4667 | (Relobj::add_comdat_group): New function. | |
4668 | (Relobj::set_kept_comdat_section): New function. | |
4669 | (Relobj::get_kept_comdat_section): New function. | |
4670 | (Relobj::comdat_groups_): New field. | |
4671 | (Relobj::kept_comdat_sections_): New field. | |
4672 | (Symbol_value::input_value): Update comment. | |
4673 | (Sized_relobj::map_to_kept_section) New function. | |
4674 | (Sized_relobj::include_linkonce_section): Add new parameter. | |
4675 | * target-reloc.h (Comdat_behavior): New type. | |
4676 | (get_comdat_behavior): New function. | |
4677 | (relocate_section): Add code to map a discarded section to the | |
4678 | corresponding kept section when applying a relocation. | |
4679 | ||
e4e5049b CS |
4680 | 2008-04-30 Craig Silverstein <[email protected]> |
4681 | ||
4682 | * dwarf_reader.cc (next_generation_count): New static var. | |
4683 | (Addr2line_cache_entry): New struct. | |
4684 | (addr2line_cache): New static var. | |
4685 | (Dwarf_line_info::one_addr2line): Added caching. | |
4686 | (Dwarf_line_info::clear_addr2line_cache): New function. | |
4687 | * dwarf_reader.h (Dwarf_line_info::one_addr2line): Add | |
4688 | cache-size parameter. | |
4689 | (Dwarf_line_info::one_addr2line_cache): New function. | |
4690 | * symtab.cc (Symbol_table::detect_odr_violations): Pass | |
4691 | new cache-size argument to one_addr2line(), and clear cache. | |
4692 | ||
d09e9154 CC |
4693 | 2008-04-28 Cary Coutant <[email protected]> |
4694 | ||
4695 | * i386.cc (Relocate::relocate): Fix typos for R_386_PC16 and | |
4696 | R_386_PC8 relocations. | |
4697 | ||
7ef73768 ILT |
4698 | 2008-04-23 Ian Lance Taylor <[email protected]> |
4699 | ||
55438702 ILT |
4700 | * object.cc (Sized_relobj::include_section_group): Check for |
4701 | invalid section group. | |
4702 | ||
c165fb93 ILT |
4703 | * object.cc (make_elf_object): Correct test for 64-bit ELF file |
4704 | header size. | |
4705 | ||
7ef73768 ILT |
4706 | * readsyms.cc (Read_symbols::do_read_symbols): Use get_view rather |
4707 | than read for file header. | |
4708 | * archive.cc (Archive::include_member): Likewise. | |
4709 | ||
6194aaab L |
4710 | 2008-04-23 Paolo Bonzini <[email protected]> |
4711 | ||
4712 | * aclocal.m4: Regenerate. | |
4713 | * configure: Regenerate. | |
4714 | ||
d491d34e ILT |
4715 | 2008-04-19 Ian Lance Taylor <[email protected]> |
4716 | ||
5ea2bac6 ILT |
4717 | * version.cc (version_string): Bump to 1.6. |
4718 | ||
7bc3e21a ILT |
4719 | * testsuite/Makefile.am (many_sections_r_test): New target. |
4720 | (many_sections_r_test_SOURCES): Remove. | |
4721 | (many_sections_r_test_DEPENDENCIES): Remove. | |
4722 | (many_sections_r_test_LDFLAGS): Remove. | |
4723 | (many_sections_r_test_LDADD): Remove. | |
4724 | ||
7fcd3aa9 ILT |
4725 | * object.cc (Sized_relobj::do_add_symbols): Always pass |
4726 | local_symbol_count_ to add_from_relobj. | |
4727 | ||
4c94d6ae ILT |
4728 | * testsuite/Makefile.am (many_sections_check.h): Only check one in |
4729 | every thousand variables. | |
4730 | * testsuite/Makefile.in: Rebuild. | |
4731 | ||
d491d34e ILT |
4732 | * object.cc (Xindex::initialize_symtab_xindex): New function. |
4733 | (Xindex::read_symtab_xindex): New function. | |
4734 | (Xindex::sym_xindex_to_shndx): New function. | |
4735 | (Sized_relobj::find_symtab): Pick up SHT_SYMTAB_SHNDX section if | |
4736 | available. | |
4737 | (Sized_relobj::do_initialize_xindex): New function. | |
4738 | (Sized_relobj::do_read_symbols): Adjust section links. | |
4739 | (Sized_relobj::symbol_section_and_value): Add is_ordinary | |
4740 | parameter. Change all callers. | |
4741 | (Sized_relobj::include_section_group): Adjust section links and | |
4742 | symbol section indexes. | |
4743 | (Sized_relobj::do_layout): Adjust section links. | |
4744 | (Sized_relobj::do_count_local_symbols): Adjust section links and | |
4745 | symbol section indexes. | |
4746 | (Sized_relobj::do_finalize_local_symbols): Distinguish between | |
4747 | ordinary and special symbols. | |
4748 | (Sized_relobj::write_local_symbols): Add symtab_xindex and | |
4749 | dynsym_xindex parameters. Change all callers. Adjust section | |
4750 | links. Use SHN_XINDEX when needed. | |
4751 | (Sized_relobj::get_symbol_location_info): Adjust section links. | |
4752 | Don't get fooled by special symbols. | |
4753 | * object.h (class Xindex): Define. | |
4754 | (class Object): Add xindex_ parameter. Declare virtual functoin | |
4755 | do_initialize_xindex. | |
4756 | (Object::adjust_sym_shndx): New function. | |
4757 | (Object::set_xindex): New protected function. | |
4758 | (class Symbol_value): Add is_ordinary_shndx_ field. | |
4759 | (Symbol_value::Symbol_value): Initialize is_ordinary_shndx_. | |
4760 | (Symbol_value::value): Assert ordinary section. | |
4761 | (Symbol_value::initialize_input_to_output_map): Likewise. | |
4762 | (Symbol_value::set_input_shndx): Add is_ordinary parameter. | |
4763 | Change all callers. | |
4764 | (Symbol_value::input_shndx): Add is_ordinary parameter. Change | |
4765 | all callers. | |
4766 | (class Sized_relobj): Update declarations. | |
4767 | (Sized_relobj::local_symbol_input_shndx): Add is_ordinary | |
4768 | parameter. Change all callers. | |
4769 | (Sized_relobj::adjust_shndx): New function. | |
4770 | * dynobj.cc (Sized_dynobj::Sized_dynobj): Initialize dynsym_shndx_ | |
4771 | field. | |
4772 | (Sized_dynobj::find_dynsym_sections): Remove pdynsym_shndx | |
4773 | parameter. Change all callers. Pick up SHT_DYNSYM_SHNDX section | |
4774 | for SHT_DYNSYM section if available. Set dynsym_shndx_ field. | |
4775 | (Sized_dynobj::read_dynsym_section): Adjust section links. | |
4776 | (Sized_dynobj::read_dynamic): Likewise. | |
4777 | (Sized_dynobj::do_read_symbols): Use dynsym_shndx_ field. Adjust | |
4778 | section links. | |
4779 | (Sized_dynobj::do_initialize_xindex): New function. | |
4780 | * dynobj.h (class Sized_dynobj): Add dynsym_shndx_ field. Declare | |
4781 | do_initialize_xindex. | |
4782 | (Sized_dynobj::adjust_shndx): New function. | |
4783 | * layout.cc (Layout::Layout): Initialize symtab_xindex_ and | |
4784 | dynsym_xindex_ fields. | |
4785 | (Layout::finalize): Add a call to set_section_indexes before | |
4786 | creating the symtab sections. | |
4787 | (Layout::set_section_indexes): Don't do anything if the section | |
4788 | already has a section index. | |
4789 | (Layout::create_symtab_sections): Add shnum parameter. Change | |
4790 | caller. Create .symtab_shndx section if needed. | |
4791 | (Layout::create_shdrs): Add shstrtab_section parameter. Change | |
4792 | caller. | |
4793 | (Layout::allocated_output_section_count): New function. | |
4794 | (Layout::create_dynamic_symtab): Create .dynsym_shndx section if | |
4795 | needed. | |
4796 | * layout.h (class Layout): Add symtab_xindex_ and dynsym_xindex_ | |
4797 | fields. Update declarations. | |
4798 | (Layout::symtab_xindex): New function. | |
4799 | (Layout::dynsym_xindex): New function. | |
4800 | (class Write_symbols_task): Add layout_ field. | |
4801 | (Write_symbols_task::Write_symbols_task): Add layout parameter. | |
4802 | Change caller. | |
4803 | * output.cc (Output_section_headers::Output_section_headers): Add | |
4804 | shstrtab_section parameter. Change all callers. | |
4805 | (Output_section_headers::do_sized_write): Store overflow values | |
4806 | for section count and section string table section index in | |
4807 | section header zero. | |
4808 | (Output_file_header::do_sized_write): Check for overflow of | |
4809 | section count and section string table section index. | |
4810 | (Output_symtab_xindex::do_write): New function. | |
4811 | (Output_symtab_xindex::endian_do_write): New function. | |
4812 | * output.h (class Output_section_headers): Add shstrtab_section_. | |
4813 | Update declarations. | |
4814 | (class Output_symtab_xindex): Define. | |
4815 | (Output_section::has_out_shndx): New function. | |
4816 | * symtab.cc (Symbol::init_fields): Initialize is_ordinary_shndx_ | |
4817 | field. | |
4818 | (Symbol::init_base): Add st_shndx and is_ordinary parameters. | |
4819 | Change all callers. | |
4820 | (Sized_symbol::init): Likewise. | |
4821 | (Symbol::output_section): Check for ordinary symbol. | |
4822 | (Symbol_table::add_from_object): Remove orig_sym parameter. Add | |
4823 | st_shndx, is_ordinary, and orig_st_shndx parameters. Change all | |
4824 | callers. | |
4825 | (Symbol_table::add_from_relobj): Add symndx_offset parameter. | |
4826 | Change all callers. Simplify handling of symbols from sections | |
4827 | not included in the link. | |
4828 | (Symbol_table::add_from_dynobj): Handle ordinary symbol | |
4829 | distinction. | |
4830 | (Weak_alias_sorter::operator()): Assert that symbols are | |
4831 | ordinary. | |
4832 | (Symbol_table::sized_finalize_symbol): Handle ordinary symbol | |
4833 | distinction. | |
4834 | (Symbol_table::write_globals): Add symtab_xindex and dynsym_xindex | |
4835 | parameters. Change all callers. | |
4836 | (Symbol_table::sized_write_globals): Likewise. Handle ordinary | |
4837 | symbol distinction. Use SHN_XINDEX when needed. | |
4838 | (Symbol_table::write_section_symbol): Add symtab_xindex | |
4839 | parameter. Change all callers. | |
4840 | (Symbol_table::sized_write_section_symbol): Likewise. Use | |
4841 | SHN_XINDEX when needed. | |
4842 | * symtab.h (class Symbol): Add is_ordinary_shndx_ field. Update | |
4843 | declarations. | |
4844 | (Symbol::shndx): Add is_ordinary parameter. Change all callers. | |
4845 | (Symbol::is_defined): Check is_ordinary. | |
4846 | (Symbol::is_undefined, Symbol::is_weak_undefined): Likewise. | |
4847 | (Symbol::is_absolute, Symbol::is_common): Likewise. | |
4848 | (class Sized_symbol): Update declarations. | |
4849 | (class Symbol_table): Update declarations. | |
4850 | * resolve.cc (Symbol::override_base): Add st_shndx and is_ordinary | |
4851 | parameters. Change all callers. | |
4852 | (Sized_symbol::override): Likewise. | |
4853 | (Symbol_table::override): Likewise. | |
4854 | (symbol_to_bits): Add is_ordinary parameter. Change all callers. | |
4855 | (Symbol_table::resolve): Remove orig_sym parameter. Add st_shndx, | |
4856 | is_ordinary, and orig_st_shndx parameters. Change all callers. | |
4857 | * copy-relocs.cc (Copy_relocs::emit_copy_reloc): Require symbol | |
4858 | to be in an ordinary section. | |
4859 | * dwarf_reader.cc (Sized_dwarf_line_info::symbol_section): Add | |
4860 | object and is_ordinary parameters. Change all callers. | |
4861 | (Sized_dwarf_line_info::read_relocs): Add object parameter. | |
4862 | Change all callers. Don't add undefined or non-ordinary symbols | |
4863 | to reloc_map_. | |
4864 | (Sized_dwarf_line_info::read_line_mappings): Add object parameter. | |
4865 | Change all callers. | |
4866 | * dwarf_reader.h (class Sized_dwarf_line_info): Update | |
4867 | declarations. | |
4868 | * ehframe.cc (Eh_frame::read_fde): Check for ordinary symbol. | |
4869 | * reloc.cc (Sized_relobj::do_read_relocs): Adjust section links. | |
4870 | (Sized_relobj::relocate_sections): Likewise. | |
4871 | * target-reloc.h (scan_relocs): Adjust section symbol index. | |
4872 | (scan_relocatable_relocs): Likewise. | |
4873 | * i386.cc (Scan::local): Check for ordinary symbols. | |
4874 | * sparc.cc (Scan::local): Likewise. | |
4875 | * x86_64.cc (Scan::local): Likewise. | |
4876 | * testsuite/binary_unittest.cc (Sized_binary_test): Update calls | |
4877 | to symbol_section_and_value. | |
4878 | * testsuite/many_sections_test.cc: New file. | |
4879 | * testsuite/Makefile.am (BUILT_SOURCES): Define. | |
4880 | (check_PROGRAMS): Add many_sections_test. | |
4881 | (many_sections_test_SOURCES): Define. | |
4882 | (many_sections_test_DEPENDENCIES): Define. | |
4883 | (many_sections_test_LDFLAGS): Define. | |
4884 | (BUILT_SOURCES): Add many_sections_define.h. | |
4885 | (many_sections_define.h): New target. | |
4886 | (BUILT_SOURCES): Add many_sections_check.h. | |
4887 | (many_sections_check.h): New target. | |
4888 | (check_PROGRAMS): Add many_sections_r_test. | |
4889 | (many_sections_r_test_SOURCES): Define. | |
4890 | (many_sections_r_test_DEPENDENCIES): Define. | |
4891 | (many_sections_r_test_LDFLAGS): Define. | |
4892 | (many_sections_r_test_LDADD): Define. | |
4893 | (many_sections_r_test.o): New target. | |
4894 | * testsuite/Makefile.in: Rebuild. | |
4895 | ||
c5818ff1 CC |
4896 | 2008-04-17 Cary Coutant <[email protected]> |
4897 | ||
4898 | * errors.cc (Errors::info): New function. | |
4899 | (gold_info): New function. | |
4900 | * errors.h (Errors::info): New function. | |
4901 | * gold.h (gold_info): New function. | |
4902 | * object.cc (Input_objects::add_object): Print trace output. | |
4903 | * options.cc (options::parse_set): New function. | |
4904 | (General_options::parse_wrap): Deleted. | |
4905 | (General_options::General_options): Deleted initializer. | |
4906 | * options.h (options::String_set): New typedef. | |
4907 | (options::parse_set): New function. | |
4908 | (DEFINE_set): New macro. | |
4909 | (General_options::wrap): Changed to use DEFINE_set. Changed | |
4910 | callers of any_wrap_symbols and is_wrap_symbol. | |
4911 | (General_options::trace, General_options::trace_symbol): | |
4912 | New options. | |
4913 | (General_options::any_wrap_symbols, General_options::is_wrap_symbol) | |
4914 | (General_options::wrap_symbols_): Deleted. | |
4915 | * symtab.cc (Symbol_table::add_from_object): Print trace output. | |
4916 | ||
b5be4a7c DM |
4917 | 2008-04-17 David S. Miller <[email protected]> |
4918 | ||
4919 | * options.cc (General_options::parse_V): New function. | |
4920 | * options.h: Add entries for -V and -Qy. | |
4921 | ||
155a0dd7 ILT |
4922 | 2008-04-17 Ian Lance Taylor <[email protected]> |
4923 | ||
4924 | * common.cc (Symbol_table::allocate_commons): Remove options | |
4925 | parameter. Change caller. | |
4926 | (Symbol_table::do_allocate_commons): Remove options parameter. | |
4927 | Change caller. Just call do_allocate_commons_list twice. | |
4928 | (Symbol_table::do_allocate_commons_list): New function, broken out | |
4929 | of do_allocate_commons. | |
4930 | * common.h (class Allocate_commons_task): Remove options_ field. | |
4931 | Update constructor. | |
4932 | * symtab.cc (Symbol_table::Symbol_table): Initialize | |
4933 | tls_commons_. | |
4934 | (Symbol_table::add_from_object): Put TLS common symbols on | |
4935 | tls_commons_ list. | |
4936 | (Symbol_table::sized_finalize_symbol): Handle STT_TLS symbols | |
4937 | which are IN_OUTPUT_DATA. | |
4938 | * symtab.h (class Symbol_table): Add tls_commons_ field. Update | |
4939 | allocate_commons and do_allocate_commons declarations. Declare | |
4940 | do_allocate_commons_list. | |
4941 | * gold.cc (queue_middle_tasks): Update creation of | |
4942 | Allocate_commons_task to not pass options. | |
4943 | * testsuite/Makefile.am (INCLUDES): Add -I.. . | |
4944 | (TLS_TEST_C_FLAGS): New variable. | |
4945 | (tls_test_c_pic.o): New target. | |
4946 | (tls_test_shared.so): Link in tls_test_c_pic.o. | |
4947 | (tls_test_c_pic_ie.o): New target. | |
4948 | (tls_test_ie_shared.so): Link in tls_test_c_pic_ie.o. | |
4949 | (tls_test_DEPENDENCIES, tls_test_LDADD): Add tls_test_c.o. | |
4950 | (tls_test_c.o): New target. | |
4951 | (tls_pic_test_DEPENDENCIES): Add tls_test_c_pic.o. | |
4952 | (tls_pic_test_LDADD): Likewise. | |
4953 | (tls_shared_gd_to_ie_test_DEPENDENCIES): Add tls_test_c_pic.o. | |
4954 | (tls_shared_gd_to_ie_test_LDADD): Likewise. | |
4955 | (tls_test_c_gnu2.o): New target. | |
4956 | (tls_shared_gnu2_gd_to_ie_test_DEPENDENCIES): Add | |
4957 | tls_test_c_gnu2.o. | |
4958 | (tls_shared_gnu2_gd_to_ie_test_LDADD): Likewise. | |
4959 | (tls_test_gnu2_shared.so): Link in tls_test_c_gnu2.o. | |
4960 | (tls_test_shared_nonpic.so): Link in tls_test_c.o. | |
4961 | * testsuite/tls_test.cc: Include "config.h". | |
4962 | (t_last): Call t11_last. | |
4963 | * testsuite/tls_test.h (t11, t11_last): Declare. | |
4964 | * testsuite/tls_test_c.c: New file. | |
4965 | * testsuite/tls_test_main.cc (thread_routine): Call t11. | |
4966 | * configure.ac: Check for OpenMP support. | |
4967 | * configure, config.in, Makefile.in: Rebuild. | |
4968 | * testsuite/Makefile.in: Rebuild. | |
4969 | ||
edfbb029 CC |
4970 | 2008-04-16 Cary Coutant <[email protected]> |
4971 | ||
4972 | * i386.cc (Target_i386::define_tls_base_symbol): New function. | |
4973 | (Target_i386::tls_base_symbol_defined_): New field. | |
4974 | (Target_i386::Scan::local): Define _TLS_MODULE_BASE_ symbol. | |
4975 | (Target_i386::Scan::global): Likewise. | |
4976 | * symtab.cc (sized_finalize_symbol): Add check for TLS symbol. | |
4977 | * x86_64.cc (Target_x86_64::define_tls_base_symbol): New function. | |
4978 | (Target_x86_64::tls_base_symbol_defined_): New field. | |
4979 | (Target_x86_64::Scan::local): Define _TLS_MODULE_BASE_ symbol. | |
4980 | (Target_x86_64::Scan::global): Likewise. | |
4981 | ||
f3c69fca CC |
4982 | 2008-04-16 Cary Coutant <[email protected]> |
4983 | ||
4984 | * symtab.h (Symbol::is_strong_undefined): Removed unused function. | |
4985 | (Symbol::needs_plt_entry): Allow weak undefined symbols. | |
4986 | (Symbol::needs_dynamic_reloc): Allow weak undefined symbols when | |
4987 | building shared libraries. | |
4988 | * testsuite/Makefile.am (weak_undef_nonpic_test): New target. | |
4989 | (weak_undef_file1_nonpic.o, weak_undef_file2_nonpic.o) | |
4990 | (weak_undef_lib_nonpic.so, alt/weak_undef_lib_nonpic.so): New targets. | |
4991 | * testsuite/Makefile.in: Rebuild. | |
4992 | * testsuite/weak_undef.h: New file. | |
4993 | * testsuite/weak_undef_file1.cc: Add extra test cases. | |
4994 | * testsuite/weak_undef_file2.cc: Likewise. | |
4995 | * testsuite/weak_undef_test.cc: Likewise. | |
4996 | ||
7c414435 DM |
4997 | 2008-04-16 David S. Miller <[email protected]> |
4998 | ||
32b769e1 DM |
4999 | * sparc.cc (Target_sparc::Scan): Change from struct to class. |
5000 | Add issued_non_pic_error_ field. Declare check_non_pic. | |
5001 | (Target_sparc::Scan::check_non_pic): New function. | |
5002 | (Target_sparc::Scan::local): Call check_non_pic as appropriate. | |
5003 | (Target_sparc::Scan::global): Likewise. | |
5004 | ||
11936fb1 DM |
5005 | * configure.ac (FN_PTRS_IN_SO_WITHOUT_PIC): Add sparc64. |
5006 | * configure: Rebuild. | |
5007 | ||
7c414435 DM |
5008 | * options.h (DEFINE_enable): New macro. |
5009 | (new_dtags): New enable option. | |
5010 | (initfirst, interpose, loadfltr, nodefaultlib, | |
5011 | nodelete, nodlopen, nodump): New -z options. | |
5012 | * layout.cc (Layout:finish_dynamic_section): If new | |
5013 | dtags enabled, emit DT_RUNPATH. Also, emit a | |
5014 | DT_FLAGS_1 containing any specified -z flags. | |
5015 | ||
85c7bf8b ILT |
5016 | 2008-04-16 Ian Lance Taylor <[email protected]> |
5017 | ||
12c0daef ILT |
5018 | * copy-relocs.cc: New file. |
5019 | * copy-relocs.h: New file. | |
5020 | * reloc.cc: Remove Copy_relocs code. | |
5021 | * reloc.h: Likewise. | |
5022 | * reloc-types.h (struct Reloc_types) [both versions]: Add | |
5023 | get_reloc_addend_noerror. | |
5024 | * output.h (class Output_data_reloc<elfcpp::SHT_REL>): Add | |
5025 | variants of add_global which take an addend which must be zero. | |
5026 | * i386.cc: Include "copy-relocs.h". | |
5027 | (class Target_i386): Change type of copy_relocs_ to variable, | |
5028 | update initializer. | |
5029 | (Target_i386::copy_reloc): Rewrite to pass to Copy_relocs class. | |
5030 | Change all callers. | |
5031 | (Target_i386::do_finalize_sections): Change handling of | |
5032 | copy_relocs_. | |
5033 | * sparc.cc: Include "copy-relocs.h". | |
5034 | (class Target_sparc): Change type of copy_relocs_ to variable, | |
5035 | update initializer. | |
5036 | (Target_sparc::copy_reloc): Rewrite to pass to Copy_relocs class. | |
5037 | Change all callers. | |
5038 | (Target_sparc::do_finalize_sections): Change handling of | |
5039 | copy_relocs_. | |
5040 | * x86_64.cc: Include "copy-relocs.h". | |
5041 | (class Target_x86_64): Change type of copy_relocs_ to variable, | |
5042 | update initializer. | |
5043 | (Target_x86_64::copy_reloc): Rewrite to pass to Copy_relocs | |
5044 | class. Change all callers. | |
5045 | (Target_x86_64::do_finalize_sections): Change handling of | |
5046 | copy_relocs_. | |
5047 | * Makefile.am (CCFILES): Add copy-relocs.cc. | |
5048 | (HFILES): Add copy-relocs.h. | |
5049 | ||
4f4995b6 ILT |
5050 | * Makefile.in, aclocal.m4, testsuite/Makefile.in: Rebuild. |
5051 | ||
85c7bf8b ILT |
5052 | * testsuite/script_test_4.sh: Permit leading zeroes. |
5053 | ||
4f2a9edd ILT |
5054 | 2008-04-15 Ian Lance Taylor <[email protected]> |
5055 | ||
e6188289 ILT |
5056 | * script-sections.cc (Script_sections::create_segments): Use |
5057 | header_size_adjustment even when there is enough room for the | |
5058 | headers. | |
5059 | * testsuite/script_test_4.sh: New file. | |
5060 | * testsuite/script_test_4.t: New file. | |
5061 | * testsuite/Makefile.am (check_SCRIPTS): Add script_test_4.sh. | |
5062 | (check_DATA): Add script_test_4.stdout. | |
5063 | (MOSTLYCLEANFILES): Likewise. | |
5064 | (script_test_4): New target. | |
5065 | (script_test_4.stdout): New target. | |
5066 | * testsuite/Makefile.in: Rebuild. | |
5067 | ||
4f2a9edd ILT |
5068 | * sparc.cc: Add definitions for Output_data_plt_sparc class |
5069 | constants. | |
5070 | ||
f5314dd5 DM |
5071 | 2008-04-14 David S. Miller <[email protected]> |
5072 | ||
5073 | * sparc.cc: New file. | |
5074 | * Makefile.am (TARGETSOURCES): Add sparc.cc | |
5075 | (ALL_TARGETOBJS): Add sparc.$(OBJEXT) | |
5076 | * configure.tgt: Document targ_extra_size and | |
5077 | targ_extra_big_endian. Add entries for sparc-* and | |
5078 | sparc64-*. | |
5079 | * configure.ac: Handle targ_extra_size and | |
5080 | targ_extra_big_endian. | |
5081 | * Makefile.in: Rebuild. | |
5082 | * configure: Likewise. | |
5083 | * po/POTFILES.in: Likewise. | |
5084 | * po/gold.pot: Likewise. | |
5085 | ||
154e0e9a ILT |
5086 | 2008-04-14 Ian Lance Taylor <[email protected]> |
5087 | ||
5088 | * layout.cc (Layout::Layout): Initialize sections_are_attached_. | |
5089 | (Layout::get_output_section): Ignore SHF_WRITE and SHF_EXECINSTR | |
5090 | in the name/type/flags to section mapping. Don't call | |
5091 | allocate_output_section. | |
5092 | (Layout::choose_output_section): Change parameter from adjust_name | |
5093 | to is_input_section. Don't permit input sections after sections | |
5094 | are attached to segments. Don't call allocate_output_section. | |
5095 | (Layout::layout_eh_frame): Call update_flags_for_input_section, | |
5096 | not write_enable_output_section. | |
5097 | (Layout::make_output_section): Don't push to | |
5098 | unattached_section_list_ nor call attach_to_segment. Call | |
5099 | attach_section_to_segment if sections are attached. | |
5100 | (Layout::attach_sections_to_segments): New function. | |
5101 | (Layout::attach_section_to_segment): New function. | |
5102 | (Layout::attach_allocated_section_to_segment): Rename from | |
5103 | attach_to_segment. Remove flags parameter. | |
5104 | (Layout::allocate_output_section): Remove function. | |
5105 | (Layout::write_enable_output_section): Remove function. | |
5106 | * layout.h (class Layout): Update for above changes. Add new | |
5107 | field sections_are_attached_. | |
5108 | * output.h (Output_section::update_flags_for_input_section): New | |
5109 | function. | |
5110 | * output.cc (Output_section::add_input_section): Call | |
5111 | update_flags_for_input_section. | |
5112 | * gold.cc (queue_middle_tasks): Call attach_sections_to_segments. | |
5113 | ||
009a67a2 CC |
5114 | 2008-04-11 Cary Coutant <[email protected]> |
5115 | ||
5116 | * i386.cc (Target_i386::got_mod_index_entry): Restore code previously | |
5117 | thought unnecessary. | |
5118 | * x86_64.cc (Target_x86_64::got_mod_index_entry): Likewise. | |
5119 | ||
759b1a24 ILT |
5120 | 2008-04-11 Ian Lance Taylor <[email protected]> |
5121 | ||
5122 | * output.h (class Output_section_data): Remove inline definition | |
5123 | of set_addralign. | |
5124 | * output.cc (Output_section_data::set_addralign): New function. | |
5125 | ||
c2b45e22 CC |
5126 | 2008-04-11 Cary Coutant <[email protected]> |
5127 | ||
5128 | Add support for TLS descriptors for i386 and x86_64. | |
5129 | * i386.cc (Target_i386::Relocate::tls_desc_gd_to_ie): New function. | |
5130 | (Target_i386::Relocate::tls_desc_gd_to_le): New function. | |
5131 | (Target_i386::Got_type): Add GOT_TYPE_TLS_NOFFSET and | |
5132 | GOT_TYPE_TLS_DESC. | |
5133 | (Target_i386::got_mod_index_entry): Remove unnecessary code. | |
5134 | (Target_i386::Scan::local): Implement R_386_TLS_GOTDESC and | |
5135 | R_386_TLS_DESC_CALL relocations. Fix problem with initial-exec | |
5136 | relocations. | |
5137 | (Target_i386::Scan::global): Fix problem with GD-to-IE relaxation. | |
5138 | Implement R_386_TLS_GOTDESC and R_386_TLS_DESC_CALL relocations; | |
5139 | Fix problem with initial-exec relocations. | |
5140 | (Target_i386::Relocate::relocate_tls): Likewise. | |
5141 | (Target_i386::Relocate::tls_gd_to_ie): Fix problem with GD-to-IE | |
5142 | relaxation. | |
5143 | * output.cc (Output_data_dynamic::Dynamic_entry::write): Add | |
5144 | support for section-plus-offset dynamic table entries. | |
5145 | * output.h (Output_data_dynamic::add_section_plus_offset): New function. | |
5146 | (Output_data_dynamic::Dynamic_entry): Add support for | |
5147 | section-plus-offset dynamic table entries. | |
5148 | (Output_data_dynamic::Classification): Likewise. | |
5149 | (Output_data_dynamic::classification_): Renamed offset_. | |
5150 | * x86_64.cc (Target_x86_64::Relocate::tls_desc_gd_to_ie): New function. | |
5151 | (Target_x86_64::Relocate::tls_desc_gd_to_le): New function. | |
5152 | (Target_x86_64::make_plt_section): New function. | |
5153 | (Target_x86_64::reserve_tlsdesc_entries): New function. | |
5154 | (Output_data_plt_x86_64::Output_data_plt_x86_64): Add new parameter. | |
5155 | (Output_data_plt_x86_64::reserve_tlsdesc_entry): New function. | |
5156 | (Output_data_plt_x86_64::has_tlsdesc_entry): New function. | |
5157 | (Output_data_plt_x86_64::get_tlsdesc_got_offset): New function. | |
5158 | (Output_data_plt_x86_64::get_tlsdesc_plt_offset): New function. | |
5159 | (Output_data_plt_x86_64::tlsdesc_plt_entry): New field. | |
5160 | (Output_data_plt_x86_64::set_final_data_size): Move out of line; | |
5161 | add extra PLT entry for TLS descriptors. | |
5162 | (Output_data_plt_x86_64::got_): New field. | |
5163 | (Output_data_plt_x86_64::tlsdesc_got_offset_): New field. | |
5164 | (Output_data_plt_x86_64::Output_data_plt_x86_64): Initialize new | |
5165 | fields. | |
5166 | (Output_data_plt_x86_64::do_write): Write extra PLT entry for TLS | |
5167 | descriptors. | |
5168 | (Target_x86_64::make_plt_entry): Factor out make_plt_section. | |
5169 | (Target_x86_64::got_mod_index_entry): Remove unnecessary code. | |
5170 | (Target_x86_64::Scan::local): Implement R_386_TLS_GOTDESC and | |
5171 | R_386_TLS_DESC_CALL relocations. | |
5172 | (Target_x86_64::Scan::global): Likewise. | |
5173 | (Target_x86_64::do_finalize_sections): Add dynamic table entries | |
5174 | for TLS descriptors. | |
5175 | (Relocate::relocate_tls): Fix problem with GD-to-IE relaxation. | |
5176 | Implement R_386_TLS_GOTDESC and R_386_TLS_DESC_CALL relocations. | |
5177 | (Target_x86_64::Relocate::tls_gd_to_ie): Fix problem with | |
5178 | GD-to-IE relaxation. | |
5179 | * configure.ac: Export new conditional variables TLS_GNU2_DIALECT | |
5180 | and TLS_DESCRIPTORS. | |
5181 | * Makefile.in: Rebuild. | |
5182 | * configure: Rebuild. | |
5183 | * testsuite/Makefile.am (tls_shared_gd_to_ie_test): New target. | |
5184 | (tls_test_shared2.so): New target. | |
5185 | (tls_shared_gd_to_ie_test_SOURCES): New variable. | |
5186 | (tls_shared_gd_to_ie_test_DEPENDENCIES): New variable. | |
5187 | (tls_shared_gd_to_ie_test_LDFLAGS): New variable. | |
5188 | (tls_shared_gd_to_ie_test_LDADD): New variable. | |
5189 | (tls_shared_gnu2_gd_to_ie_test): New target. | |
5190 | (tls_test_gnu2.o, tls_test_file2_gnu2.o, tls_test_gnu2_shared2.so): | |
5191 | New targets. | |
5192 | (tls_shared_gnu2_gd_to_ie_test_SOURCES): New variable. | |
5193 | (ls_shared_gnu2_gd_to_ie_test_DEPENDENCIES): New variable. | |
5194 | (tls_shared_gnu2_gd_to_ie_test_LDFLAGS): New variable. | |
5195 | (tls_shared_gnu2_gd_to_ie_test_LDADD): New variable. | |
5196 | (tls_shared_gnu2_test): New target. | |
5197 | (tls_test_gnu2_shared.so): New target. | |
5198 | (tls_shared_gnu2_test_SOURCES): New variable. | |
5199 | (tls_shared_gnu2_test_DEPENDENCIES): New variable. | |
5200 | (tls_shared_gnu2_test_LDFLAGS): New variable. | |
5201 | (tls_shared_gnu2_test_LDADD): New variable. | |
5202 | * testsuite/Makefile.in: Rebuild. | |
5203 | * testsuite/Makefile. | |
5204 | ||
83bfb6b7 ILT |
5205 | 2008-04-11 Ian Lance Taylor <[email protected]> |
5206 | ||
5207 | * testsuite/Makefile.am (justsyms_2r.o): Add dependency on | |
5208 | justsyms.t. | |
5209 | * testsuite/Makefile.in: Rebuild. | |
5210 | ||
5211 | * testsuite/script_test_2a.cc (script_test_string_a): Make 8 bytes | |
5212 | long. | |
5213 | * testsuite/script_test_2.cc (main): Adjust test. | |
5214 | ||
706e1f5e ILT |
5215 | 2008-04-11 David S. Miller <[email protected]> |
5216 | Ian Lance Taylor <[email protected]> | |
5217 | ||
5218 | * options.h (General_options): Add entries for '-Y' and | |
5219 | '-relax'. | |
5220 | * options.cc (General_options:finalize): If -Y was used, add those | |
5221 | entries to the library path instead of the default "/lib" and | |
5222 | "/usr/lib". | |
5223 | ||
7c98e6bb DM |
5224 | 2008-04-11 David S. Miller <[email protected]> |
5225 | ||
5226 | * testsuite/justsyms.t: Start at 0x100. | |
5227 | * testsuite/justsyms_1.cc: Adjust justsyms_string assertion. | |
83bfb6b7 ILT |
5228 | * testsuite/script_test_2b.cc (script_test_string_b): Make 8 bytes |
5229 | long. | |
5230 | * testsuite/script_test_2.cc: Adjust string and section length | |
5231 | checks. | |
7c98e6bb | 5232 | |
99a37bfd ILT |
5233 | 2008-04-09 Ian Lance Taylor <[email protected]> |
5234 | ||
2cefc357 ILT |
5235 | PR gold/5996 |
5236 | * script-sections.cc (Sections_element::allocate_to_segment): Add | |
5237 | orphan parameter. | |
5238 | (Output_section_definition::allocate_to_segment): Likewise. | |
5239 | (Orphan_output_section::allocate_to_segment): Likewise. | |
5240 | (Script_sections::attach_sections_using_phdrs_clause): Don't | |
5241 | propagate non-PT_LOAD segments to orphan sections. | |
5242 | * testsuite/Makefile.am (script_test_3.stdout): Generate using | |
5243 | readelf rather than objdump. | |
5244 | * testsuite/script_test_3.sh: Adjust accordingly. Test that | |
5245 | .interp section and PT_INTERP segment are the same size. | |
5246 | * testsuite/Makefile.in: Rebuild. | |
5247 | ||
99a37bfd ILT |
5248 | * symtab.cc (Symbol_table::add_from_dynobj): Only look for weak |
5249 | aliases for symbols defined in the same object. | |
5250 | * testsuite/Makefile.am (check_PROGRAMS): Add weak_alias_test. | |
5251 | (weak_alias_test_SOURCES): New variable. | |
5252 | (weak_alias_test_DEPENDENCIES): New variable. | |
5253 | (weak_alias_test_LDFLAGS): New variable. | |
5254 | (weak_alias_test_LDADD): New variable. | |
5255 | (weak_alias_test_1_pic.o, weak_alias_test_1.so): New targets. | |
5256 | (weak_alias_test_2_pic.o, weak_alias_test_2.so): New targets. | |
5257 | (weak_alias_test_3.o): New target. | |
5258 | (weak_alias_test_4_pic.o, weak_alias_test_4.so): New targets. | |
5259 | * testsuite/weak_alias_test_main.cc: New file. | |
5260 | * testsuite/weak_alias_test_1.cc: New file. | |
5261 | * testsuite/weak_alias_test_2.cc: New file. | |
5262 | * testsuite/weak_alias_test_3.cc: New file. | |
5263 | ||
780e49c5 ILT |
5264 | 2008-04-08 Ian Lance Taylor <[email protected]> |
5265 | ||
cdb0b8f5 ILT |
5266 | * options.h (class General_options): Add --noinhibit-exec option. |
5267 | * main.cc (main): Check --noinhibit-exec. | |
5268 | ||
0864d551 ILT |
5269 | * options.h (class General_options): Define --wrap as a special |
5270 | option. Add wrap_symbols_ field. | |
5271 | (General_options::any_wrap_symbols): New function. | |
5272 | (General_options::is_wrap_symbol): New function. | |
5273 | * options.cc (General_options::parse_wrap): New function. | |
5274 | (General_options::General_options): Initialize wrap_symbols_. | |
5275 | * symtab.cc (Symbol_table::wrap_symbol): New function. | |
5276 | (Symbol_table::add_from_object): Handle --wrap. | |
5277 | * symtab.h (class Symbol_table): Declare wrap_symbol. | |
5278 | * target.h (Target::wrap_char): New function. | |
5279 | (Target::Target_info): Add wrap_char field. | |
5280 | * i386.cc (Target_i386::i386_info): Initialize wrap_char. | |
5281 | * x86_64.cc (Target_x86_64::x86_64_info): Likewise. | |
5282 | * testsuite/testfile.cc (Target_test::test_target_info): | |
5283 | Likewise. | |
5284 | ||
789aa6de ILT |
5285 | * errors.cc (Errors::undefined_symbol): Mention symbol version if |
5286 | there is one. | |
5287 | ||
2c38906f ILT |
5288 | * layout.h (class Layout): Add added_eh_frame_data_ field. |
5289 | * layout.cc (Layout::Layout): Initialize new field. | |
5290 | (Layout::layout_eh_frame): Don't add eh_frame_data_ to .eh_frame | |
5291 | output section until we find a section we merged successfully. | |
5292 | * object.cc (Sized_relobj::check_eh_frame_flags): Don't require | |
5293 | that the size be non-zero. | |
5294 | ||
780e49c5 ILT |
5295 | * merge.cc (Object_merge_map::get_output_offset): Remove inline |
5296 | qualifier. | |
5297 | ||
7fcd0256 ILT |
5298 | 2008-04-08 Craig Silverstein <[email protected]> |
5299 | ||
5300 | * configure.ac: Export new conditional variable HAVE_ZLIB. | |
5301 | * testsuite/Makefile.am (flagstest_o_specialfile): Condition | |
5302 | on HAVE_ZLIB. | |
5303 | (flagstest_o_specialfile_and_compress_debug_sections): Likewise. | |
5304 | * configure, Makefile.in, testsuite/Makefile.in: Rebuild. | |
5305 | ||
6835af53 ILT |
5306 | 2008-04-07 Ian Lance Taylor <[email protected]> |
5307 | ||
e24f324c ILT |
5308 | * version.cc (version_string): Set to "1.5". |
5309 | ||
a036edd8 ILT |
5310 | * x86_64.cc (Target_x86_64::Scan): Change from struct to class. |
5311 | Add issued_non_pic_error_ field. Declare check_non_pic. | |
5312 | (Target_x86_64::Scan::check_non_pic): New function. | |
5313 | (Target_x86_64::Scan::local): Call check_non_pic as appropriate. | |
5314 | (Target_x86_64::Scan::global): Likewise. | |
5315 | ||
624f8810 ILT |
5316 | * output.cc (Output_reloc<SHT_REL>::local_section_offset): Add |
5317 | addend parameter. Change caller. Handle merge sections. | |
5318 | (Output_reloc<SHT_REL>::symbol_value): Change parameter type from | |
5319 | Address to Addend. Don't add in the result of | |
5320 | local_section_offset, pass down the addend and use the returned | |
5321 | value. | |
5322 | * output.h (class Output_reloc<SHT_REL>): Add Addend typedef. | |
5323 | Update declarations of local_section_offset and symbol_value. | |
5324 | * testsuite/two_file_test_1.cc (t18): New function. | |
5325 | * testsuite/two_file_test_2.cc (f18): New function. | |
5326 | * testsuite/two_file_test_main.cc (main): Call t18. | |
5327 | * testsuite/two_file_test.h (t18, f18): Declare. | |
5328 | ||
6835af53 ILT |
5329 | * configure.ac: Don't test for objdump, c++filt, or readelf. |
5330 | * testsuite/Makefile.am: Remove READELF and OBJDUMP_AND_CPPFILT | |
5331 | conditionals. | |
5332 | (TEST_READELF): New variable. | |
5333 | (TEST_OBJDUMP, TEST_CXXFILT, TEST_STRIP): New variables. | |
5334 | (check_PROGRAMS): Add two_file_strip_test. | |
5335 | (two_file_strip_test): New target. | |
5336 | (check_PROGRAMS): Add two_file_same_shared_strip_test. | |
5337 | (two_file_same_shared_strip_test_SOURCES): New variable. | |
5338 | (two_file_same_shared_strip_test_DEPENDENCIES): New variable. | |
5339 | (two_file_same_shared_strip_test_LDFLAGS): New variable. | |
5340 | (two_file_same_shared_strip_test_LDADD): New variable. | |
5341 | (two_file_shared_strip.so): New target. | |
5342 | (ver_test_2.syms, ver_test_4.syms): Use TEST_READELF. | |
5343 | (ver_test_5.syms, ver_test_7.syms): Likewise. | |
5344 | (ver_matching_test.stdout): Use TEST_OBJDUMP and TEST_CXXFILT. | |
5345 | (strip_test_3.stdout): Use TEST_OBJDUMP. | |
5346 | * configure, Makefile.in, testsuite/Makefile.in: Rebuild. | |
5347 | ||
86925eef CC |
5348 | 2008-04-04 Cary Coutant <[email protected]> |
5349 | ||
5350 | * symtab.h (Symbol::is_weak_undefined): New function. | |
5351 | (Symbol::is_strong_undefined): New function. | |
5352 | (Symbol::is_absolute): New function. | |
5353 | (Symbol::needs_plt_entry): Exclude weak undefined symbols. | |
5354 | (Symbol::needs_dynamic_reloc): Exclude weak undefined and | |
5355 | absolute symbols. | |
5356 | * testsuite/Makefile.am (check_PROGRAMS): Add weak_undef_test. | |
5357 | (weak_undef_test): New target. | |
5358 | * testsuite/Makefile.in: Rebuild. | |
5359 | * testsuite/weak_undef_file1.cc: New file. | |
5360 | * testsuite/weak_undef_file2.cc: New file. | |
5361 | * testsuite/weak_undef_test.cc: New file. | |
5362 | ||
126f3ece ILT |
5363 | 2008-04-03 Craig Silverstein <[email protected]> |
5364 | ||
5365 | * compressed_output.h (class Output_compressed_section): Use | |
5366 | unsigned buffer. | |
5367 | * compressed_output.cc (zlib_compress): Use unsigned buffers, | |
5368 | add zlib header. | |
5369 | (zlib_compressed_suffix): Removed. | |
5370 | (Output_compressed_section::set_final_data_size): Use unsigned | |
5371 | buffers. | |
5372 | * testsuite/Makefile.am (flagstest_compress_debug_sections): | |
5373 | Fix linker invocation. | |
5374 | (flagstest_o_specialfile_and_compress_debug_sections): | |
5375 | Likewise. | |
5376 | * testsuite/Makefile.in: Regenerated. | |
5377 | ||
deae2a14 DM |
5378 | 2008-04-02 David S. Miller <[email protected]> |
5379 | ||
5380 | * dwarf_reader.cc (Sized_dwarf_line_info::read_header_prolog, | |
5381 | Sized_dwarf_line_info::process_one_opcode): Use Swap_unaligned. | |
5382 | ||
70752818 ILT |
5383 | 2008-04-02 Craig Silverstein <[email protected]> |
5384 | ||
5385 | * TODO: New file. | |
5386 | ||
39d0cb0e ILT |
5387 | 2008-04-02 Ian Lance Taylor <[email protected]> |
5388 | ||
5389 | * fileread.cc (File_read::find_view): Add byteshift and vshifted | |
5390 | parameters. Update for new key type to views_. Change all | |
5391 | callers. | |
5392 | (File_read::read): Adjust for byteshift in returned view. | |
5393 | (File_read::add_view): New function, broken out of | |
5394 | find_and_make_view. | |
5395 | (File_read::make_view): New function, broken out of | |
5396 | find_and_make_view. | |
5397 | (File_read::find_or_make_view): Add offset and aligned | |
5398 | parameters. Rewrite accordingly. Change all callers. | |
5399 | (File_read::get_view): Add offset and aligned parameters. Adjust | |
5400 | for byteshift in return value. | |
5401 | (File_read::get_lasting_view): Likewise. | |
5402 | * fileread.h (class File_read): Update declarations. | |
5403 | (class File_read::View): Add byteshift_ field. Add byteshift to | |
5404 | constructor. Add byteshift method. | |
5405 | * archive.h (Archive::clear_uncached_views): New function. | |
5406 | (Archive::get_view): Add aligned parameter. Change all callers. | |
5407 | * object.h (Object::get_view): Add aligned parameter. Change all | |
5408 | callers. | |
5409 | (Object::get_lasting_view): Likewise. | |
5410 | ||
5411 | * fileread.cc (File_read::release): Don't call clear_views if | |
5412 | there are multiple objects. | |
5413 | * fileread.h (File_read::clear_uncached_views): New function. | |
5414 | * archive.cc (Add_archive_symbols::run): Call clear_uncached_views | |
5415 | on the archive. | |
5416 | ||
a1207466 CC |
5417 | 2008-03-31 Cary Coutant <[email protected]> |
5418 | ||
5419 | Add thin archive support. | |
5420 | * archive.cc (Archive::armagt): New const. | |
5421 | (Archive::setup): Remove task parameter and calls to unlock. | |
5422 | (Archive::unlock_nested_archives): New function. | |
5423 | (Archive::read_header): Add nested_off parameter. Change | |
5424 | all callers. | |
5425 | (Archive::interpret_header): Likewise. | |
5426 | (Archive::include_all_members): Change to handle thin | |
5427 | archives. | |
5428 | (Archive::include_member): Likewise. | |
5429 | * archive.h (Archive::Archive): Add new parameters and | |
5430 | initializers. | |
5431 | (Archive::armagt): New const. | |
5432 | (Archive::setup): Remove task parameter. | |
5433 | (Archive::unlock_nested_archives): New function. | |
5434 | (Archive::read_header): Add nested_off parameter. | |
5435 | (Archive::interpret_header): Likewise. | |
5436 | (Archive::Nested_archive_table): New typedef. | |
5437 | (Archive::is_thin_archive_): New field. | |
5438 | (Archive::nested_archives_): New field. | |
5439 | (Archive::options_): New field. | |
5440 | (Archive::dirpath_): New field. | |
5441 | (Archive::task_): New field. | |
5442 | * readsyms.cc (Read_symbols::do_read_symbols): Add check | |
5443 | for thin archives. Pass additional parameters to | |
5444 | Archive::Archive. Unlock the archive file after calling | |
5445 | Archive::setup. | |
cd536b21 | 5446 | |
479f6503 ILT |
5447 | 2008-03-29 Ian Lance Taylor <[email protected]> |
5448 | ||
686c8caf ILT |
5449 | * symtab.cc (Symbol_table::do_define_as_constant): Don't force a |
5450 | version symbol to be local. | |
5451 | * testsuite/ver_test_4.sh: New file. | |
5452 | * testsuite/Makefile.am (check_SCRIPTS): Add ver_test_4.sh. | |
5453 | (check_DATA): Add ver_test_4.syms. | |
5454 | (ver_test_4.syms): New target. | |
5455 | * testsuite/Makefile.in: Rebuild. | |
5456 | ||
ab794b6b ILT |
5457 | * output.cc |
5458 | (Output_section::Input_section_sort_entry::has_priority): New | |
5459 | function. | |
5460 | (Output_section::Input_section_sort_entry::match_file_name): New | |
5461 | function. | |
5462 | (Output_section::Input_section_sort_entry::match_section_name): | |
5463 | Remove. | |
5464 | (Output_section::Input_section_sort_entry::match_section_name_prefix): | |
5465 | Remove. | |
5466 | (Output_section::Input_section_sort_entry::match_section_file): | |
5467 | Remove. | |
5468 | (Output_section::Input_section_sort_compare::operator()): Rewrite | |
5469 | using new Input_section_sort_entry functions. Sort crtbegin and | |
5470 | crtend first. Sort sections with no priority before sections with | |
5471 | a priority. | |
5472 | * testsuite/initpri1.c (d3): Check j != 4. | |
5473 | (cd5): New constructor/destructor function. | |
5474 | (main): Check j != 2. | |
5475 | ||
479f6503 ILT |
5476 | * symtab.cc (Symbol_table::add_from_object): If we don't use the |
5477 | new symbol when resolving, don't call set_is_default. | |
5478 | * testsuite/ver_test_7.cc: New file. | |
5479 | * testsuite/ver_test_7.sh: New file. | |
5480 | * testsuite/Makefile.am (ver_test_7.so): New target. | |
5481 | (ver_test_7.o): New target. | |
5482 | (check_SCRIPTS): Add ver_test_7.sh. | |
5483 | (check_DATA): Add ver_test_7.syms. | |
5484 | (ver_test_7.syms): New target. | |
5485 | ||
2fd32231 ILT |
5486 | 2008-03-28 Ian Lance Taylor <[email protected]> |
5487 | ||
5488 | * layout.cc (Layout::layout): If we see an input section with a | |
5489 | name that needs sorting, set the must_sort flag for the output | |
5490 | section. | |
5491 | (Layout::make_output_section): If the name of the output section | |
5492 | indicates that it might require sorting, set the may_sort flag. | |
5493 | * output.h (Output_section::may_sort_attached_input_sections): New | |
5494 | function. | |
5495 | (Output_section::set_may_sort_attached_input_sections): New | |
5496 | function. | |
5497 | (Output_section::must_sort_attached_input_sections): New | |
5498 | function. | |
5499 | (Output_section::set_must_sort_attached_input_sections): New | |
5500 | function. | |
5501 | (class Output_section): Declare Input_section_sort_entry. Define | |
5502 | Input_section_sort_compare. Declare | |
5503 | sort_attached_input_sections. Add new fields: | |
5504 | may_sort_attached_input_sections_, | |
5505 | must_sort_attached_input_sections_, | |
5506 | attached_input_sections_are_sorted_. | |
5507 | * output.cc (Output_section::Output_section): Initialize new | |
5508 | fields. | |
5509 | (Output_section::add_input_section): Add an entry to | |
5510 | input_sections_ if may_sort or must_sort are true. | |
5511 | (Output_section::set_final_data_size): Call | |
5512 | sort_attached_input_sections if necessary. | |
5513 | (Output_section::Input_section_sort_entry): Define new class. | |
5514 | (Output_section::Input_section_sort_compare::operator()): New | |
5515 | function. | |
5516 | (Output_section::sort_attached_input_sections): New function. | |
5517 | * configure.ac: Check whether the compiler supports constructor | |
5518 | priorities. Define a CONSTRUCTOR_PRIORITY automake conditional. | |
5519 | * testsuite/initpri1.c: New file. | |
5520 | * testsuite/Makefile.am (check_PROGRAMS): Add initpri1 if | |
5521 | CONSTRUCTOR_PRIORITY. | |
5522 | (initpri1_SOURCES, initpri1_DEPENDENCIES): New variables. | |
5523 | (initpri1_LDFLAGS): New variable. | |
5524 | * configure, Makefile.in, testsuite/Makefile.in: Rebuild. | |
5525 | ||
18e6b24e ILT |
5526 | 2008-03-27 Ian Lance Taylor <[email protected]> |
5527 | ||
49bdd526 ILT |
5528 | * common.cc (Sort_commons::operator): Correct sorting algorithm. |
5529 | * testsuite/common_test_1.c: New file. | |
5530 | * testsuite/Makefile.am (check_PROGRAMS): Add common_test_1. | |
5531 | (common_test_1_SOURCES): New variable. | |
5532 | (common_test_1_DEPENDENCIES): New variable. | |
5533 | (common_test_1_LDFLAGS): New variable. | |
5534 | ||
18e6b24e ILT |
5535 | * symtab.cc (Symbol_table::add_from_object): Handle saw_undefined_ |
5536 | and commons_ correctly when NAME/VERSION does not override | |
5537 | NAME/NULL. | |
5538 | * testsuite/ver_test_6.c: New file. | |
5539 | * testsuite/Makefile.am (check_PROGRAMS): Add ver_test_6 | |
5540 | (ver_test_6_SOURCES, ver_test_6_DEPENDENCIES): New variables. | |
5541 | (ver_test_6_LDFLAGS, ver_test_6_LDADD): New variables. | |
5542 | ||
04bf7072 ILT |
5543 | 2008-03-26 Ian Lance Taylor <[email protected]> |
5544 | ||
5871526f ILT |
5545 | * symtab.cc (Symbol_table::add_from_relobj): Don't set the version |
5546 | of an undefined symbol from a version script. | |
5547 | * testsuite/Makefile.am (ver_test_5.so): New target. | |
5548 | (ver_test_5.o): New target. | |
5549 | (check_SCRIPTS): Add ver_test_5.sh. | |
5550 | (check_DATA): Add ver_test_5.syms. | |
5551 | (ver_test_5.syms): New target. | |
5552 | * testsuite/ver_test_5.cc: New file. | |
5553 | * testsuite/ver_test_5.script: New file. | |
5554 | * testsuite/ver_test_5.sh: New file. | |
5555 | * Makefile.in, testsuite/Makefile.in: Rebuild. | |
5556 | ||
04bf7072 ILT |
5557 | PR gold/5986 |
5558 | Fix problems building gold with gcc 4.3.0. | |
5559 | * gold.h (TEMPLATE_ATTRIBUTE_PRINTF_4): Define. | |
5560 | (gold_error_at_location, gold_warning_at_location): Use it. | |
5561 | * configure.ac: Check whether we can compile and use a template | |
5562 | function with a printf attribute. | |
5563 | * x86_64.cc (Target_x86_64::do_code_fill): Swap out a 32-bit value | |
5564 | when jumping over bytes. | |
5565 | * object.cc: Instantiate Object::read_section_data. | |
5566 | * debug.h: Include <cstring> | |
5567 | * dwarf_reader.cc: Include <algorithm> | |
5568 | * main.cc: Include <cstring>. | |
5569 | * options.cc: Include <cstring>. | |
5570 | * output.cc: Include <cstring>. | |
5571 | * script.cc: Include <cstring>. | |
5572 | * script.h: Include <string>. | |
5573 | * symtab.cc: Include <cstring> and <algorithm>. | |
5574 | * target-select.cc: Include <cstring>. | |
5575 | * version.cc: Include <string>. | |
5576 | * testsuite/testmain.cc: Include <cstdlib>. | |
5577 | * configure, config.in: Rebuild. | |
5578 | ||
874c5b28 ILT |
5579 | 2008-03-25 Ian Lance Taylor <[email protected]> |
5580 | ||
819d6c3a ILT |
5581 | * options.cc: Include "../bfd/bfdver.h". |
5582 | (options::help): Print bug reporting address. | |
5583 | ||
f4b2c6f5 ILT |
5584 | * version.cc (print_version): Adjust output for current value of |
5585 | BFD_VERSION_STRING. | |
5586 | ||
5587 | * NEWS: New file. | |
5588 | ||
e96caa79 ILT |
5589 | * options.cc (options::help): Print list of supported targets. |
5590 | * target-select.h: Include <vector>. | |
5591 | (class Target_selector): Make machine_, size_, and is_big_endian_ | |
5592 | fields const. Add bfd_name_ and instantiated_target_ fields. | |
5593 | (Target_selector::Target_selector): Add bfd_name parameter. | |
5594 | (Target_selector::recognize): Make non-virtual, call | |
5595 | do_recognize. | |
5596 | (Target_selector::recognize_by_name): Make non-virtual, call | |
5597 | do_recognize_by_name. | |
5598 | (Target_selector::supported_names): New function. | |
5599 | (Target_selector::bfd_name): New function. | |
5600 | (Target_selector::do_instantiate_target): New pure virtual | |
5601 | function. | |
5602 | (Target_selector::do_recognize): New virtual function. | |
5603 | (Target_selector::do_recognize_by_name): New virtual function. | |
5604 | (Target_selector::instantiate_target): New private function. | |
5605 | (supported_target_names): Declare. | |
5606 | * target-select.cc (Target_selector::Target_selector): Update for | |
5607 | new parameter and fields. | |
5608 | (select_target_by_name): Check that the name matches before | |
5609 | calling recognize_by_name. | |
5610 | (supported_target_names): New function. | |
5611 | * i386.cc (class Target_selector_i386): Update Target_selector | |
5612 | constructor call. Remove recognize and recognize_by_name. Add | |
5613 | do_instantiate_target. | |
5614 | * x86_64.cc (class Target_selector_x86_64): Likewise. | |
5615 | * testsuite/testfile.cc (class Target_selector_test): Update for | |
5616 | changes to Target_selector. | |
5617 | ||
874c5b28 ILT |
5618 | * README: Rewrite, with some notes on unsupported features. |
5619 | ||
0a65a3a7 CC |
5620 | 2008-03-24 Cary Coutant <[email protected]> |
5621 | ||
5622 | * i386.cc (Target_i386::Got_type): New enum declaration. | |
5623 | (Target_i386::Scan::local): Updated callers of Output_data_got | |
5624 | member functions. | |
5625 | (Target_i386::Scan::global): Likewise. | |
5626 | (Target_i386::Relocate::relocate): Likewise. | |
5627 | (Target_i386::Relocate::relocate_tls): Likewise. | |
5628 | * object.h (Got_offset_list): New class. | |
5629 | (Sized_relobj::local_has_got_offset): Added got_type parameter. | |
5630 | (Sized_relobj::local_got_offset): Likewise. | |
5631 | (Sized_relobj::set_local_got_offset): Likewise. | |
5632 | (Sized_relobj::local_has_tls_got_offset): Removed. | |
5633 | (Sized_relobj::local_tls_got_offset): Removed. | |
5634 | (Sized_relobj::set_local_tls_got_offset): Removed. | |
5635 | (Sized_relobj::Local_got_offsets): Changed to store a list of offsets. | |
5636 | * output.cc (Output_data_got::add_global): Added got_type parameter. | |
5637 | (Output_data_got::add_global_with_rel): Likewise. | |
5638 | (Output_data_got::add_global_with_rela): Likewise. | |
5639 | (Output_data_got::add_global_pair_with_rel): New function. | |
5640 | (Output_data_got::add_global_pair_with_rela): New function. | |
5641 | (Output_data_got::add_local): Added got_type parameter. | |
5642 | (Output_data_got::add_local_with_rel): Likewise. | |
5643 | (Output_data_got::add_local_with_rela): Likewise. | |
5644 | (Output_data_got::add_local_pair_with_rel): New function. | |
5645 | (Output_data_got::add_local_pair_with_rela): New function. | |
5646 | (Output_data_got::add_global_tls): Removed. | |
5647 | (Output_data_got::add_global_tls_with_rel): Removed. | |
5648 | (Output_data_got::add_global_tls_with_rela): Removed. | |
5649 | (Output_data_got::add_local_tls): Removed. | |
5650 | (Output_data_got::add_local_tls_with_rel): Removed. | |
5651 | (Output_data_got::add_local_tls_with_rela): Removed. | |
5652 | * output.h (Output_data_got::add_global): Added got_type parameter. | |
5653 | (Output_data_got::add_global_with_rel): Likewise. | |
5654 | (Output_data_got::add_global_with_rela): Likewise. | |
5655 | (Output_data_got::add_global_pair_with_rel): New function. | |
5656 | (Output_data_got::add_global_pair_with_rela): New function. | |
5657 | (Output_data_got::add_local): Added got_type parameter. | |
5658 | (Output_data_got::add_local_with_rel): Likewise. | |
5659 | (Output_data_got::add_local_with_rela): Likewise. | |
5660 | (Output_data_got::add_local_pair_with_rel): New function. | |
5661 | (Output_data_got::add_local_pair_with_rela): New function. | |
5662 | (Output_data_got::add_global_tls): Removed. | |
5663 | (Output_data_got::add_global_tls_with_rel): Removed. | |
5664 | (Output_data_got::add_global_tls_with_rela): Removed. | |
5665 | (Output_data_got::add_local_tls): Removed. | |
5666 | (Output_data_got::add_local_tls_with_rel): Removed. | |
5667 | (Output_data_got::add_local_tls_with_rela): Removed. | |
5668 | * resolve.cc (Symbol::override_base_with_special): Removed | |
5669 | reference to has_got_offset_ field. | |
5670 | * symtab.cc (Symbol::init_fields): Replaced initialization | |
5671 | of got_offset_ with got_offsets_. Removed initialization | |
5672 | of has_got_offset_ | |
53fcba31 | 5673 | * symtab.h (Symbol::has_got_offset): Aded got_type parameter. |
0a65a3a7 CC |
5674 | (Symbol::got_offset): Likewise. |
5675 | (Symbol::set_got_offset): Likewise. | |
5676 | (Symbol::has_tls_got_offset): Removed. | |
5677 | (Symbol::tls_got_offset): Removed. | |
5678 | (Symbol::set_tls_got_offset): Removed. | |
5679 | (Symbol::got_offset_): Removed. | |
5680 | (Symbol::tls_mod_got_offset_): Removed. | |
5681 | (Symbol::tls_pair_got_offset_): Removed. | |
5682 | (Symbol::got_offsets_): New field. | |
5683 | (Symbol::has_got_offset): Removed. | |
5684 | (Symbol::has_tls_mod_got_offset): Removed. | |
5685 | (Symbol::has_tls_pair_got_offset): Removed. | |
5686 | * x86_64.cc (Target_x86_64::Got_type): New enum declaration. | |
5687 | (Target_x86_64::Scan::local): Updated callers of Output_data_got | |
5688 | member functions. | |
5689 | (Target_x86_64::Scan::global): Likewise. | |
5690 | (Target_x86_64::Relocate::relocate): Likewise. | |
5691 | (Target_x86_64::Relocate::relocate_tls): Likewise. | |
5692 | ||
bd52eafb BE |
5693 | 2008-03-25 Ben Elliston <[email protected]> |
5694 | ||
5695 | * yyscript.y: Fix spelling error in comment. | |
5696 | ||
8b105e34 ILT |
5697 | 2008-03-24 Ian Lance Taylor <[email protected]> |
5698 | ||
8ed814a9 ILT |
5699 | * options.h (class General_options): Define build_id option. |
5700 | * layout.h (class Layout): Declare write_build_id, create_note, | |
5701 | create_build_id. Add build_id_note_ member. | |
5702 | * layout.cc: Include <cerrno>, <fcntl.h>, <unistd.h>, | |
5703 | "libiberty.h", "md5.h", "sha1.h". | |
5704 | (Layout::Layout): Initialize eh_frame_data_, | |
5705 | eh_frame_hdr_section_, and build_id_note_. | |
5706 | (Layout::finalize): Call create_build_id. | |
5707 | (Layout::create_note): New function, broken out of | |
5708 | Layout::create_gold_note. | |
5709 | (Layout::create_gold_note): Call create_note. | |
5710 | (Layout::create_build_id): New function. | |
5711 | (Layout::write_build_id): New function. | |
5712 | (Close_task_runner::run): Call write_build_id. | |
5713 | ||
8b105e34 ILT |
5714 | * x86_64.cc: Correct license to GPLv3. |
5715 | ||
086a1841 ILT |
5716 | 2008-03-23 Ian Lance Taylor <[email protected]> |
5717 | ||
5718 | * options.cc: Include "demangle.h". | |
5719 | (parse_optional_string): New function. | |
5720 | (parse_long_option): Handle takes_optional_argument. | |
5721 | (parse_short_option): Update dash_z initializer. Handle | |
5722 | takes_optional_argument. | |
5723 | (General_options::General_options): Initialize do_demangle_. | |
5724 | (General_options::finalize): Set do_demangle_. Handle demangling | |
5725 | style. | |
5726 | * options.h (parse_optional_string): Declare. | |
5727 | (struct One_option): Add optional_arg field. Update constructor. | |
5728 | Update call constructor calls. Add takes_optional_argument | |
5729 | function. | |
5730 | (DEFINE_var): Add optional_arg__ parameter. Change all callers. | |
5731 | (DEFINE_optional_string): Define. | |
5732 | (General_options::demangle): Change from DEFINE_bool to | |
5733 | DEFINE_optional_string. | |
5734 | (General_options::no_demangle): New function. | |
5735 | (General_options::do_demangle): New function. | |
5736 | (General_options::set_do_demangle): New function. | |
5737 | (General_options::execstack_status_): Move definition to end of | |
5738 | class definition. | |
5739 | (General_options::static_): Likewise. | |
5740 | (General_options::do_demangle_): New field. | |
5741 | * object.cc (big_endian>::get_symbol_location_info): Call | |
5742 | Options::do_demangle, not Options::demangle. | |
5743 | * symtab.cc (demangle): Likewise. | |
5744 | ||
cbb93e63 ILT |
5745 | 2008-03-22 Ian Lance Taylor <[email protected]> |
5746 | ||
5747 | * gold.h: Include <cstddef> and <sys/types.h> | |
5748 | * options.h: Include <cstring>. | |
5749 | ||
ec531623 ILT |
5750 | 2008-03-21 Ian Lance Taylor <[email protected]> |
5751 | ||
5752 | * Added source code to GNU binutils. |