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