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