* errors.cc (Errors::undefined_symbol): Mention symbol version if
[deliverable/binutils-gdb.git] / gold / ChangeLog
CommitLineData
780e49c5
ILT
12008-04-08 Ian Lance Taylor <iant@google.com>
2
789aa6de
ILT
3 * errors.cc (Errors::undefined_symbol): Mention symbol version if
4 there is one.
5
2c38906f
ILT
6 * layout.h (class Layout): Add added_eh_frame_data_ field.
7 * layout.cc (Layout::Layout): Initialize new field.
8 (Layout::layout_eh_frame): Don't add eh_frame_data_ to .eh_frame
9 output section until we find a section we merged successfully.
10 * object.cc (Sized_relobj::check_eh_frame_flags): Don't require
11 that the size be non-zero.
12
780e49c5
ILT
13 * merge.cc (Object_merge_map::get_output_offset): Remove inline
14 qualifier.
15
7fcd0256
ILT
162008-04-08 Craig Silverstein <csilvers@google.com>
17
18 * configure.ac: Export new conditional variable HAVE_ZLIB.
19 * testsuite/Makefile.am (flagstest_o_specialfile): Condition
20 on HAVE_ZLIB.
21 (flagstest_o_specialfile_and_compress_debug_sections): Likewise.
22 * configure, Makefile.in, testsuite/Makefile.in: Rebuild.
23
6835af53
ILT
242008-04-07 Ian Lance Taylor <iant@google.com>
25
e24f324c
ILT
26 * version.cc (version_string): Set to "1.5".
27
a036edd8
ILT
28 * x86_64.cc (Target_x86_64::Scan): Change from struct to class.
29 Add issued_non_pic_error_ field. Declare check_non_pic.
30 (Target_x86_64::Scan::check_non_pic): New function.
31 (Target_x86_64::Scan::local): Call check_non_pic as appropriate.
32 (Target_x86_64::Scan::global): Likewise.
33
624f8810
ILT
34 * output.cc (Output_reloc<SHT_REL>::local_section_offset): Add
35 addend parameter. Change caller. Handle merge sections.
36 (Output_reloc<SHT_REL>::symbol_value): Change parameter type from
37 Address to Addend. Don't add in the result of
38 local_section_offset, pass down the addend and use the returned
39 value.
40 * output.h (class Output_reloc<SHT_REL>): Add Addend typedef.
41 Update declarations of local_section_offset and symbol_value.
42 * testsuite/two_file_test_1.cc (t18): New function.
43 * testsuite/two_file_test_2.cc (f18): New function.
44 * testsuite/two_file_test_main.cc (main): Call t18.
45 * testsuite/two_file_test.h (t18, f18): Declare.
46
6835af53
ILT
47 * configure.ac: Don't test for objdump, c++filt, or readelf.
48 * testsuite/Makefile.am: Remove READELF and OBJDUMP_AND_CPPFILT
49 conditionals.
50 (TEST_READELF): New variable.
51 (TEST_OBJDUMP, TEST_CXXFILT, TEST_STRIP): New variables.
52 (check_PROGRAMS): Add two_file_strip_test.
53 (two_file_strip_test): New target.
54 (check_PROGRAMS): Add two_file_same_shared_strip_test.
55 (two_file_same_shared_strip_test_SOURCES): New variable.
56 (two_file_same_shared_strip_test_DEPENDENCIES): New variable.
57 (two_file_same_shared_strip_test_LDFLAGS): New variable.
58 (two_file_same_shared_strip_test_LDADD): New variable.
59 (two_file_shared_strip.so): New target.
60 (ver_test_2.syms, ver_test_4.syms): Use TEST_READELF.
61 (ver_test_5.syms, ver_test_7.syms): Likewise.
62 (ver_matching_test.stdout): Use TEST_OBJDUMP and TEST_CXXFILT.
63 (strip_test_3.stdout): Use TEST_OBJDUMP.
64 * configure, Makefile.in, testsuite/Makefile.in: Rebuild.
65
86925eef
CC
662008-04-04 Cary Coutant <ccoutant@google.com>
67
68 * symtab.h (Symbol::is_weak_undefined): New function.
69 (Symbol::is_strong_undefined): New function.
70 (Symbol::is_absolute): New function.
71 (Symbol::needs_plt_entry): Exclude weak undefined symbols.
72 (Symbol::needs_dynamic_reloc): Exclude weak undefined and
73 absolute symbols.
74 * testsuite/Makefile.am (check_PROGRAMS): Add weak_undef_test.
75 (weak_undef_test): New target.
76 * testsuite/Makefile.in: Rebuild.
77 * testsuite/weak_undef_file1.cc: New file.
78 * testsuite/weak_undef_file2.cc: New file.
79 * testsuite/weak_undef_test.cc: New file.
80
126f3ece
ILT
812008-04-03 Craig Silverstein <csilvers@google.com>
82
83 * compressed_output.h (class Output_compressed_section): Use
84 unsigned buffer.
85 * compressed_output.cc (zlib_compress): Use unsigned buffers,
86 add zlib header.
87 (zlib_compressed_suffix): Removed.
88 (Output_compressed_section::set_final_data_size): Use unsigned
89 buffers.
90 * testsuite/Makefile.am (flagstest_compress_debug_sections):
91 Fix linker invocation.
92 (flagstest_o_specialfile_and_compress_debug_sections):
93 Likewise.
94 * testsuite/Makefile.in: Regenerated.
95
deae2a14
DM
962008-04-02 David S. Miller <davem@davemloft.net>
97
98 * dwarf_reader.cc (Sized_dwarf_line_info::read_header_prolog,
99 Sized_dwarf_line_info::process_one_opcode): Use Swap_unaligned.
100
70752818
ILT
1012008-04-02 Craig Silverstein <csilvers@google.com>
102
103 * TODO: New file.
104
39d0cb0e
ILT
1052008-04-02 Ian Lance Taylor <iant@google.com>
106
107 * fileread.cc (File_read::find_view): Add byteshift and vshifted
108 parameters. Update for new key type to views_. Change all
109 callers.
110 (File_read::read): Adjust for byteshift in returned view.
111 (File_read::add_view): New function, broken out of
112 find_and_make_view.
113 (File_read::make_view): New function, broken out of
114 find_and_make_view.
115 (File_read::find_or_make_view): Add offset and aligned
116 parameters. Rewrite accordingly. Change all callers.
117 (File_read::get_view): Add offset and aligned parameters. Adjust
118 for byteshift in return value.
119 (File_read::get_lasting_view): Likewise.
120 * fileread.h (class File_read): Update declarations.
121 (class File_read::View): Add byteshift_ field. Add byteshift to
122 constructor. Add byteshift method.
123 * archive.h (Archive::clear_uncached_views): New function.
124 (Archive::get_view): Add aligned parameter. Change all callers.
125 * object.h (Object::get_view): Add aligned parameter. Change all
126 callers.
127 (Object::get_lasting_view): Likewise.
128
129 * fileread.cc (File_read::release): Don't call clear_views if
130 there are multiple objects.
131 * fileread.h (File_read::clear_uncached_views): New function.
132 * archive.cc (Add_archive_symbols::run): Call clear_uncached_views
133 on the archive.
134
a1207466
CC
1352008-03-31 Cary Coutant <ccoutant@google.com>
136
137 Add thin archive support.
138 * archive.cc (Archive::armagt): New const.
139 (Archive::setup): Remove task parameter and calls to unlock.
140 (Archive::unlock_nested_archives): New function.
141 (Archive::read_header): Add nested_off parameter. Change
142 all callers.
143 (Archive::interpret_header): Likewise.
144 (Archive::include_all_members): Change to handle thin
145 archives.
146 (Archive::include_member): Likewise.
147 * archive.h (Archive::Archive): Add new parameters and
148 initializers.
149 (Archive::armagt): New const.
150 (Archive::setup): Remove task parameter.
151 (Archive::unlock_nested_archives): New function.
152 (Archive::read_header): Add nested_off parameter.
153 (Archive::interpret_header): Likewise.
154 (Archive::Nested_archive_table): New typedef.
155 (Archive::is_thin_archive_): New field.
156 (Archive::nested_archives_): New field.
157 (Archive::options_): New field.
158 (Archive::dirpath_): New field.
159 (Archive::task_): New field.
160 * readsyms.cc (Read_symbols::do_read_symbols): Add check
161 for thin archives. Pass additional parameters to
162 Archive::Archive. Unlock the archive file after calling
163 Archive::setup.
164
479f6503
ILT
1652008-03-29 Ian Lance Taylor <iant@google.com>
166
686c8caf
ILT
167 * symtab.cc (Symbol_table::do_define_as_constant): Don't force a
168 version symbol to be local.
169 * testsuite/ver_test_4.sh: New file.
170 * testsuite/Makefile.am (check_SCRIPTS): Add ver_test_4.sh.
171 (check_DATA): Add ver_test_4.syms.
172 (ver_test_4.syms): New target.
173 * testsuite/Makefile.in: Rebuild.
174
ab794b6b
ILT
175 * output.cc
176 (Output_section::Input_section_sort_entry::has_priority): New
177 function.
178 (Output_section::Input_section_sort_entry::match_file_name): New
179 function.
180 (Output_section::Input_section_sort_entry::match_section_name):
181 Remove.
182 (Output_section::Input_section_sort_entry::match_section_name_prefix):
183 Remove.
184 (Output_section::Input_section_sort_entry::match_section_file):
185 Remove.
186 (Output_section::Input_section_sort_compare::operator()): Rewrite
187 using new Input_section_sort_entry functions. Sort crtbegin and
188 crtend first. Sort sections with no priority before sections with
189 a priority.
190 * testsuite/initpri1.c (d3): Check j != 4.
191 (cd5): New constructor/destructor function.
192 (main): Check j != 2.
193
479f6503
ILT
194 * symtab.cc (Symbol_table::add_from_object): If we don't use the
195 new symbol when resolving, don't call set_is_default.
196 * testsuite/ver_test_7.cc: New file.
197 * testsuite/ver_test_7.sh: New file.
198 * testsuite/Makefile.am (ver_test_7.so): New target.
199 (ver_test_7.o): New target.
200 (check_SCRIPTS): Add ver_test_7.sh.
201 (check_DATA): Add ver_test_7.syms.
202 (ver_test_7.syms): New target.
203
2fd32231
ILT
2042008-03-28 Ian Lance Taylor <iant@google.com>
205
206 * layout.cc (Layout::layout): If we see an input section with a
207 name that needs sorting, set the must_sort flag for the output
208 section.
209 (Layout::make_output_section): If the name of the output section
210 indicates that it might require sorting, set the may_sort flag.
211 * output.h (Output_section::may_sort_attached_input_sections): New
212 function.
213 (Output_section::set_may_sort_attached_input_sections): New
214 function.
215 (Output_section::must_sort_attached_input_sections): New
216 function.
217 (Output_section::set_must_sort_attached_input_sections): New
218 function.
219 (class Output_section): Declare Input_section_sort_entry. Define
220 Input_section_sort_compare. Declare
221 sort_attached_input_sections. Add new fields:
222 may_sort_attached_input_sections_,
223 must_sort_attached_input_sections_,
224 attached_input_sections_are_sorted_.
225 * output.cc (Output_section::Output_section): Initialize new
226 fields.
227 (Output_section::add_input_section): Add an entry to
228 input_sections_ if may_sort or must_sort are true.
229 (Output_section::set_final_data_size): Call
230 sort_attached_input_sections if necessary.
231 (Output_section::Input_section_sort_entry): Define new class.
232 (Output_section::Input_section_sort_compare::operator()): New
233 function.
234 (Output_section::sort_attached_input_sections): New function.
235 * configure.ac: Check whether the compiler supports constructor
236 priorities. Define a CONSTRUCTOR_PRIORITY automake conditional.
237 * testsuite/initpri1.c: New file.
238 * testsuite/Makefile.am (check_PROGRAMS): Add initpri1 if
239 CONSTRUCTOR_PRIORITY.
240 (initpri1_SOURCES, initpri1_DEPENDENCIES): New variables.
241 (initpri1_LDFLAGS): New variable.
242 * configure, Makefile.in, testsuite/Makefile.in: Rebuild.
243
18e6b24e
ILT
2442008-03-27 Ian Lance Taylor <iant@google.com>
245
49bdd526
ILT
246 * common.cc (Sort_commons::operator): Correct sorting algorithm.
247 * testsuite/common_test_1.c: New file.
248 * testsuite/Makefile.am (check_PROGRAMS): Add common_test_1.
249 (common_test_1_SOURCES): New variable.
250 (common_test_1_DEPENDENCIES): New variable.
251 (common_test_1_LDFLAGS): New variable.
252
18e6b24e
ILT
253 * symtab.cc (Symbol_table::add_from_object): Handle saw_undefined_
254 and commons_ correctly when NAME/VERSION does not override
255 NAME/NULL.
256 * testsuite/ver_test_6.c: New file.
257 * testsuite/Makefile.am (check_PROGRAMS): Add ver_test_6
258 (ver_test_6_SOURCES, ver_test_6_DEPENDENCIES): New variables.
259 (ver_test_6_LDFLAGS, ver_test_6_LDADD): New variables.
260
04bf7072
ILT
2612008-03-26 Ian Lance Taylor <iant@google.com>
262
5871526f
ILT
263 * symtab.cc (Symbol_table::add_from_relobj): Don't set the version
264 of an undefined symbol from a version script.
265 * testsuite/Makefile.am (ver_test_5.so): New target.
266 (ver_test_5.o): New target.
267 (check_SCRIPTS): Add ver_test_5.sh.
268 (check_DATA): Add ver_test_5.syms.
269 (ver_test_5.syms): New target.
270 * testsuite/ver_test_5.cc: New file.
271 * testsuite/ver_test_5.script: New file.
272 * testsuite/ver_test_5.sh: New file.
273 * Makefile.in, testsuite/Makefile.in: Rebuild.
274
04bf7072
ILT
275 PR gold/5986
276 Fix problems building gold with gcc 4.3.0.
277 * gold.h (TEMPLATE_ATTRIBUTE_PRINTF_4): Define.
278 (gold_error_at_location, gold_warning_at_location): Use it.
279 * configure.ac: Check whether we can compile and use a template
280 function with a printf attribute.
281 * x86_64.cc (Target_x86_64::do_code_fill): Swap out a 32-bit value
282 when jumping over bytes.
283 * object.cc: Instantiate Object::read_section_data.
284 * debug.h: Include <cstring>
285 * dwarf_reader.cc: Include <algorithm>
286 * main.cc: Include <cstring>.
287 * options.cc: Include <cstring>.
288 * output.cc: Include <cstring>.
289 * script.cc: Include <cstring>.
290 * script.h: Include <string>.
291 * symtab.cc: Include <cstring> and <algorithm>.
292 * target-select.cc: Include <cstring>.
293 * version.cc: Include <string>.
294 * testsuite/testmain.cc: Include <cstdlib>.
295 * configure, config.in: Rebuild.
296
874c5b28
ILT
2972008-03-25 Ian Lance Taylor <iant@google.com>
298
819d6c3a
ILT
299 * options.cc: Include "../bfd/bfdver.h".
300 (options::help): Print bug reporting address.
301
f4b2c6f5
ILT
302 * version.cc (print_version): Adjust output for current value of
303 BFD_VERSION_STRING.
304
305 * NEWS: New file.
306
e96caa79
ILT
307 * options.cc (options::help): Print list of supported targets.
308 * target-select.h: Include <vector>.
309 (class Target_selector): Make machine_, size_, and is_big_endian_
310 fields const. Add bfd_name_ and instantiated_target_ fields.
311 (Target_selector::Target_selector): Add bfd_name parameter.
312 (Target_selector::recognize): Make non-virtual, call
313 do_recognize.
314 (Target_selector::recognize_by_name): Make non-virtual, call
315 do_recognize_by_name.
316 (Target_selector::supported_names): New function.
317 (Target_selector::bfd_name): New function.
318 (Target_selector::do_instantiate_target): New pure virtual
319 function.
320 (Target_selector::do_recognize): New virtual function.
321 (Target_selector::do_recognize_by_name): New virtual function.
322 (Target_selector::instantiate_target): New private function.
323 (supported_target_names): Declare.
324 * target-select.cc (Target_selector::Target_selector): Update for
325 new parameter and fields.
326 (select_target_by_name): Check that the name matches before
327 calling recognize_by_name.
328 (supported_target_names): New function.
329 * i386.cc (class Target_selector_i386): Update Target_selector
330 constructor call. Remove recognize and recognize_by_name. Add
331 do_instantiate_target.
332 * x86_64.cc (class Target_selector_x86_64): Likewise.
333 * testsuite/testfile.cc (class Target_selector_test): Update for
334 changes to Target_selector.
335
874c5b28
ILT
336 * README: Rewrite, with some notes on unsupported features.
337
0a65a3a7
CC
3382008-03-24 Cary Coutant <ccoutant@google.com>
339
340 * i386.cc (Target_i386::Got_type): New enum declaration.
341 (Target_i386::Scan::local): Updated callers of Output_data_got
342 member functions.
343 (Target_i386::Scan::global): Likewise.
344 (Target_i386::Relocate::relocate): Likewise.
345 (Target_i386::Relocate::relocate_tls): Likewise.
346 * object.h (Got_offset_list): New class.
347 (Sized_relobj::local_has_got_offset): Added got_type parameter.
348 (Sized_relobj::local_got_offset): Likewise.
349 (Sized_relobj::set_local_got_offset): Likewise.
350 (Sized_relobj::local_has_tls_got_offset): Removed.
351 (Sized_relobj::local_tls_got_offset): Removed.
352 (Sized_relobj::set_local_tls_got_offset): Removed.
353 (Sized_relobj::Local_got_offsets): Changed to store a list of offsets.
354 * output.cc (Output_data_got::add_global): Added got_type parameter.
355 (Output_data_got::add_global_with_rel): Likewise.
356 (Output_data_got::add_global_with_rela): Likewise.
357 (Output_data_got::add_global_pair_with_rel): New function.
358 (Output_data_got::add_global_pair_with_rela): New function.
359 (Output_data_got::add_local): Added got_type parameter.
360 (Output_data_got::add_local_with_rel): Likewise.
361 (Output_data_got::add_local_with_rela): Likewise.
362 (Output_data_got::add_local_pair_with_rel): New function.
363 (Output_data_got::add_local_pair_with_rela): New function.
364 (Output_data_got::add_global_tls): Removed.
365 (Output_data_got::add_global_tls_with_rel): Removed.
366 (Output_data_got::add_global_tls_with_rela): Removed.
367 (Output_data_got::add_local_tls): Removed.
368 (Output_data_got::add_local_tls_with_rel): Removed.
369 (Output_data_got::add_local_tls_with_rela): Removed.
370 * output.h (Output_data_got::add_global): Added got_type parameter.
371 (Output_data_got::add_global_with_rel): Likewise.
372 (Output_data_got::add_global_with_rela): Likewise.
373 (Output_data_got::add_global_pair_with_rel): New function.
374 (Output_data_got::add_global_pair_with_rela): New function.
375 (Output_data_got::add_local): Added got_type parameter.
376 (Output_data_got::add_local_with_rel): Likewise.
377 (Output_data_got::add_local_with_rela): Likewise.
378 (Output_data_got::add_local_pair_with_rel): New function.
379 (Output_data_got::add_local_pair_with_rela): New function.
380 (Output_data_got::add_global_tls): Removed.
381 (Output_data_got::add_global_tls_with_rel): Removed.
382 (Output_data_got::add_global_tls_with_rela): Removed.
383 (Output_data_got::add_local_tls): Removed.
384 (Output_data_got::add_local_tls_with_rel): Removed.
385 (Output_data_got::add_local_tls_with_rela): Removed.
386 * resolve.cc (Symbol::override_base_with_special): Removed
387 reference to has_got_offset_ field.
388 * symtab.cc (Symbol::init_fields): Replaced initialization
389 of got_offset_ with got_offsets_. Removed initialization
390 of has_got_offset_
53fcba31 391 * symtab.h (Symbol::has_got_offset): Aded got_type parameter.
0a65a3a7
CC
392 (Symbol::got_offset): Likewise.
393 (Symbol::set_got_offset): Likewise.
394 (Symbol::has_tls_got_offset): Removed.
395 (Symbol::tls_got_offset): Removed.
396 (Symbol::set_tls_got_offset): Removed.
397 (Symbol::got_offset_): Removed.
398 (Symbol::tls_mod_got_offset_): Removed.
399 (Symbol::tls_pair_got_offset_): Removed.
400 (Symbol::got_offsets_): New field.
401 (Symbol::has_got_offset): Removed.
402 (Symbol::has_tls_mod_got_offset): Removed.
403 (Symbol::has_tls_pair_got_offset): Removed.
404 * x86_64.cc (Target_x86_64::Got_type): New enum declaration.
405 (Target_x86_64::Scan::local): Updated callers of Output_data_got
406 member functions.
407 (Target_x86_64::Scan::global): Likewise.
408 (Target_x86_64::Relocate::relocate): Likewise.
409 (Target_x86_64::Relocate::relocate_tls): Likewise.
410
bd52eafb
BE
4112008-03-25 Ben Elliston <bje@au.ibm.com>
412
413 * yyscript.y: Fix spelling error in comment.
414
8b105e34
ILT
4152008-03-24 Ian Lance Taylor <iant@google.com>
416
8ed814a9
ILT
417 * options.h (class General_options): Define build_id option.
418 * layout.h (class Layout): Declare write_build_id, create_note,
419 create_build_id. Add build_id_note_ member.
420 * layout.cc: Include <cerrno>, <fcntl.h>, <unistd.h>,
421 "libiberty.h", "md5.h", "sha1.h".
422 (Layout::Layout): Initialize eh_frame_data_,
423 eh_frame_hdr_section_, and build_id_note_.
424 (Layout::finalize): Call create_build_id.
425 (Layout::create_note): New function, broken out of
426 Layout::create_gold_note.
427 (Layout::create_gold_note): Call create_note.
428 (Layout::create_build_id): New function.
429 (Layout::write_build_id): New function.
430 (Close_task_runner::run): Call write_build_id.
431
8b105e34
ILT
432 * x86_64.cc: Correct license to GPLv3.
433
086a1841
ILT
4342008-03-23 Ian Lance Taylor <iant@google.com>
435
436 * options.cc: Include "demangle.h".
437 (parse_optional_string): New function.
438 (parse_long_option): Handle takes_optional_argument.
439 (parse_short_option): Update dash_z initializer. Handle
440 takes_optional_argument.
441 (General_options::General_options): Initialize do_demangle_.
442 (General_options::finalize): Set do_demangle_. Handle demangling
443 style.
444 * options.h (parse_optional_string): Declare.
445 (struct One_option): Add optional_arg field. Update constructor.
446 Update call constructor calls. Add takes_optional_argument
447 function.
448 (DEFINE_var): Add optional_arg__ parameter. Change all callers.
449 (DEFINE_optional_string): Define.
450 (General_options::demangle): Change from DEFINE_bool to
451 DEFINE_optional_string.
452 (General_options::no_demangle): New function.
453 (General_options::do_demangle): New function.
454 (General_options::set_do_demangle): New function.
455 (General_options::execstack_status_): Move definition to end of
456 class definition.
457 (General_options::static_): Likewise.
458 (General_options::do_demangle_): New field.
459 * object.cc (big_endian>::get_symbol_location_info): Call
460 Options::do_demangle, not Options::demangle.
461 * symtab.cc (demangle): Likewise.
462
cbb93e63
ILT
4632008-03-22 Ian Lance Taylor <iant@google.com>
464
465 * gold.h: Include <cstddef> and <sys/types.h>
466 * options.h: Include <cstring>.
467
ec531623
ILT
4682008-03-21 Ian Lance Taylor <iant@google.com>
469
470 * Added source code to GNU binutils.
471
This page took 0.047686 seconds and 4 git commands to generate.