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