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