* mi/mi-cmd-var.c (varobj_update_one): Print new
[deliverable/binutils-gdb.git] / gold / ChangeLog
CommitLineData
c5818ff1
CC
12008-04-17 Cary Coutant <ccoutant@google.com>
2
3 * errors.cc (Errors::info): New function.
4 (gold_info): New function.
5 * errors.h (Errors::info): New function.
6 * gold.h (gold_info): New function.
7 * object.cc (Input_objects::add_object): Print trace output.
8 * options.cc (options::parse_set): New function.
9 (General_options::parse_wrap): Deleted.
10 (General_options::General_options): Deleted initializer.
11 * options.h (options::String_set): New typedef.
12 (options::parse_set): New function.
13 (DEFINE_set): New macro.
14 (General_options::wrap): Changed to use DEFINE_set. Changed
15 callers of any_wrap_symbols and is_wrap_symbol.
16 (General_options::trace, General_options::trace_symbol):
17 New options.
18 (General_options::any_wrap_symbols, General_options::is_wrap_symbol)
19 (General_options::wrap_symbols_): Deleted.
20 * symtab.cc (Symbol_table::add_from_object): Print trace output.
21
b5be4a7c
DM
222008-04-17 David S. Miller <davem@davemloft.net>
23
24 * options.cc (General_options::parse_V): New function.
25 * options.h: Add entries for -V and -Qy.
26
155a0dd7
ILT
272008-04-17 Ian Lance Taylor <iant@google.com>
28
29 * common.cc (Symbol_table::allocate_commons): Remove options
30 parameter. Change caller.
31 (Symbol_table::do_allocate_commons): Remove options parameter.
32 Change caller. Just call do_allocate_commons_list twice.
33 (Symbol_table::do_allocate_commons_list): New function, broken out
34 of do_allocate_commons.
35 * common.h (class Allocate_commons_task): Remove options_ field.
36 Update constructor.
37 * symtab.cc (Symbol_table::Symbol_table): Initialize
38 tls_commons_.
39 (Symbol_table::add_from_object): Put TLS common symbols on
40 tls_commons_ list.
41 (Symbol_table::sized_finalize_symbol): Handle STT_TLS symbols
42 which are IN_OUTPUT_DATA.
43 * symtab.h (class Symbol_table): Add tls_commons_ field. Update
44 allocate_commons and do_allocate_commons declarations. Declare
45 do_allocate_commons_list.
46 * gold.cc (queue_middle_tasks): Update creation of
47 Allocate_commons_task to not pass options.
48 * testsuite/Makefile.am (INCLUDES): Add -I.. .
49 (TLS_TEST_C_FLAGS): New variable.
50 (tls_test_c_pic.o): New target.
51 (tls_test_shared.so): Link in tls_test_c_pic.o.
52 (tls_test_c_pic_ie.o): New target.
53 (tls_test_ie_shared.so): Link in tls_test_c_pic_ie.o.
54 (tls_test_DEPENDENCIES, tls_test_LDADD): Add tls_test_c.o.
55 (tls_test_c.o): New target.
56 (tls_pic_test_DEPENDENCIES): Add tls_test_c_pic.o.
57 (tls_pic_test_LDADD): Likewise.
58 (tls_shared_gd_to_ie_test_DEPENDENCIES): Add tls_test_c_pic.o.
59 (tls_shared_gd_to_ie_test_LDADD): Likewise.
60 (tls_test_c_gnu2.o): New target.
61 (tls_shared_gnu2_gd_to_ie_test_DEPENDENCIES): Add
62 tls_test_c_gnu2.o.
63 (tls_shared_gnu2_gd_to_ie_test_LDADD): Likewise.
64 (tls_test_gnu2_shared.so): Link in tls_test_c_gnu2.o.
65 (tls_test_shared_nonpic.so): Link in tls_test_c.o.
66 * testsuite/tls_test.cc: Include "config.h".
67 (t_last): Call t11_last.
68 * testsuite/tls_test.h (t11, t11_last): Declare.
69 * testsuite/tls_test_c.c: New file.
70 * testsuite/tls_test_main.cc (thread_routine): Call t11.
71 * configure.ac: Check for OpenMP support.
72 * configure, config.in, Makefile.in: Rebuild.
73 * testsuite/Makefile.in: Rebuild.
74
edfbb029
CC
752008-04-16 Cary Coutant <ccoutant@google.com>
76
77 * i386.cc (Target_i386::define_tls_base_symbol): New function.
78 (Target_i386::tls_base_symbol_defined_): New field.
79 (Target_i386::Scan::local): Define _TLS_MODULE_BASE_ symbol.
80 (Target_i386::Scan::global): Likewise.
81 * symtab.cc (sized_finalize_symbol): Add check for TLS symbol.
82 * x86_64.cc (Target_x86_64::define_tls_base_symbol): New function.
83 (Target_x86_64::tls_base_symbol_defined_): New field.
84 (Target_x86_64::Scan::local): Define _TLS_MODULE_BASE_ symbol.
85 (Target_x86_64::Scan::global): Likewise.
86
f3c69fca
CC
872008-04-16 Cary Coutant <ccoutant@google.com>
88
89 * symtab.h (Symbol::is_strong_undefined): Removed unused function.
90 (Symbol::needs_plt_entry): Allow weak undefined symbols.
91 (Symbol::needs_dynamic_reloc): Allow weak undefined symbols when
92 building shared libraries.
93 * testsuite/Makefile.am (weak_undef_nonpic_test): New target.
94 (weak_undef_file1_nonpic.o, weak_undef_file2_nonpic.o)
95 (weak_undef_lib_nonpic.so, alt/weak_undef_lib_nonpic.so): New targets.
96 * testsuite/Makefile.in: Rebuild.
97 * testsuite/weak_undef.h: New file.
98 * testsuite/weak_undef_file1.cc: Add extra test cases.
99 * testsuite/weak_undef_file2.cc: Likewise.
100 * testsuite/weak_undef_test.cc: Likewise.
101
7c414435
DM
1022008-04-16 David S. Miller <davem@davemloft.net>
103
32b769e1
DM
104 * sparc.cc (Target_sparc::Scan): Change from struct to class.
105 Add issued_non_pic_error_ field. Declare check_non_pic.
106 (Target_sparc::Scan::check_non_pic): New function.
107 (Target_sparc::Scan::local): Call check_non_pic as appropriate.
108 (Target_sparc::Scan::global): Likewise.
109
11936fb1
DM
110 * configure.ac (FN_PTRS_IN_SO_WITHOUT_PIC): Add sparc64.
111 * configure: Rebuild.
112
7c414435
DM
113 * options.h (DEFINE_enable): New macro.
114 (new_dtags): New enable option.
115 (initfirst, interpose, loadfltr, nodefaultlib,
116 nodelete, nodlopen, nodump): New -z options.
117 * layout.cc (Layout:finish_dynamic_section): If new
118 dtags enabled, emit DT_RUNPATH. Also, emit a
119 DT_FLAGS_1 containing any specified -z flags.
120
85c7bf8b
ILT
1212008-04-16 Ian Lance Taylor <iant@google.com>
122
12c0daef
ILT
123 * copy-relocs.cc: New file.
124 * copy-relocs.h: New file.
125 * reloc.cc: Remove Copy_relocs code.
126 * reloc.h: Likewise.
127 * reloc-types.h (struct Reloc_types) [both versions]: Add
128 get_reloc_addend_noerror.
129 * output.h (class Output_data_reloc<elfcpp::SHT_REL>): Add
130 variants of add_global which take an addend which must be zero.
131 * i386.cc: Include "copy-relocs.h".
132 (class Target_i386): Change type of copy_relocs_ to variable,
133 update initializer.
134 (Target_i386::copy_reloc): Rewrite to pass to Copy_relocs class.
135 Change all callers.
136 (Target_i386::do_finalize_sections): Change handling of
137 copy_relocs_.
138 * sparc.cc: Include "copy-relocs.h".
139 (class Target_sparc): Change type of copy_relocs_ to variable,
140 update initializer.
141 (Target_sparc::copy_reloc): Rewrite to pass to Copy_relocs class.
142 Change all callers.
143 (Target_sparc::do_finalize_sections): Change handling of
144 copy_relocs_.
145 * x86_64.cc: Include "copy-relocs.h".
146 (class Target_x86_64): Change type of copy_relocs_ to variable,
147 update initializer.
148 (Target_x86_64::copy_reloc): Rewrite to pass to Copy_relocs
149 class. Change all callers.
150 (Target_x86_64::do_finalize_sections): Change handling of
151 copy_relocs_.
152 * Makefile.am (CCFILES): Add copy-relocs.cc.
153 (HFILES): Add copy-relocs.h.
154
4f4995b6
ILT
155 * Makefile.in, aclocal.m4, testsuite/Makefile.in: Rebuild.
156
85c7bf8b
ILT
157 * testsuite/script_test_4.sh: Permit leading zeroes.
158
4f2a9edd
ILT
1592008-04-15 Ian Lance Taylor <iant@google.com>
160
e6188289
ILT
161 * script-sections.cc (Script_sections::create_segments): Use
162 header_size_adjustment even when there is enough room for the
163 headers.
164 * testsuite/script_test_4.sh: New file.
165 * testsuite/script_test_4.t: New file.
166 * testsuite/Makefile.am (check_SCRIPTS): Add script_test_4.sh.
167 (check_DATA): Add script_test_4.stdout.
168 (MOSTLYCLEANFILES): Likewise.
169 (script_test_4): New target.
170 (script_test_4.stdout): New target.
171 * testsuite/Makefile.in: Rebuild.
172
4f2a9edd
ILT
173 * sparc.cc: Add definitions for Output_data_plt_sparc class
174 constants.
175
f5314dd5
DM
1762008-04-14 David S. Miller <davem@davemloft.net>
177
178 * sparc.cc: New file.
179 * Makefile.am (TARGETSOURCES): Add sparc.cc
180 (ALL_TARGETOBJS): Add sparc.$(OBJEXT)
181 * configure.tgt: Document targ_extra_size and
182 targ_extra_big_endian. Add entries for sparc-* and
183 sparc64-*.
184 * configure.ac: Handle targ_extra_size and
185 targ_extra_big_endian.
186 * Makefile.in: Rebuild.
187 * configure: Likewise.
188 * po/POTFILES.in: Likewise.
189 * po/gold.pot: Likewise.
190
154e0e9a
ILT
1912008-04-14 Ian Lance Taylor <iant@google.com>
192
193 * layout.cc (Layout::Layout): Initialize sections_are_attached_.
194 (Layout::get_output_section): Ignore SHF_WRITE and SHF_EXECINSTR
195 in the name/type/flags to section mapping. Don't call
196 allocate_output_section.
197 (Layout::choose_output_section): Change parameter from adjust_name
198 to is_input_section. Don't permit input sections after sections
199 are attached to segments. Don't call allocate_output_section.
200 (Layout::layout_eh_frame): Call update_flags_for_input_section,
201 not write_enable_output_section.
202 (Layout::make_output_section): Don't push to
203 unattached_section_list_ nor call attach_to_segment. Call
204 attach_section_to_segment if sections are attached.
205 (Layout::attach_sections_to_segments): New function.
206 (Layout::attach_section_to_segment): New function.
207 (Layout::attach_allocated_section_to_segment): Rename from
208 attach_to_segment. Remove flags parameter.
209 (Layout::allocate_output_section): Remove function.
210 (Layout::write_enable_output_section): Remove function.
211 * layout.h (class Layout): Update for above changes. Add new
212 field sections_are_attached_.
213 * output.h (Output_section::update_flags_for_input_section): New
214 function.
215 * output.cc (Output_section::add_input_section): Call
216 update_flags_for_input_section.
217 * gold.cc (queue_middle_tasks): Call attach_sections_to_segments.
218
009a67a2
CC
2192008-04-11 Cary Coutant <ccoutant@google.com>
220
221 * i386.cc (Target_i386::got_mod_index_entry): Restore code previously
222 thought unnecessary.
223 * x86_64.cc (Target_x86_64::got_mod_index_entry): Likewise.
224
759b1a24
ILT
2252008-04-11 Ian Lance Taylor <iant@google.com>
226
227 * output.h (class Output_section_data): Remove inline definition
228 of set_addralign.
229 * output.cc (Output_section_data::set_addralign): New function.
230
c2b45e22
CC
2312008-04-11 Cary Coutant <ccoutant@google.com>
232
233 Add support for TLS descriptors for i386 and x86_64.
234 * i386.cc (Target_i386::Relocate::tls_desc_gd_to_ie): New function.
235 (Target_i386::Relocate::tls_desc_gd_to_le): New function.
236 (Target_i386::Got_type): Add GOT_TYPE_TLS_NOFFSET and
237 GOT_TYPE_TLS_DESC.
238 (Target_i386::got_mod_index_entry): Remove unnecessary code.
239 (Target_i386::Scan::local): Implement R_386_TLS_GOTDESC and
240 R_386_TLS_DESC_CALL relocations. Fix problem with initial-exec
241 relocations.
242 (Target_i386::Scan::global): Fix problem with GD-to-IE relaxation.
243 Implement R_386_TLS_GOTDESC and R_386_TLS_DESC_CALL relocations;
244 Fix problem with initial-exec relocations.
245 (Target_i386::Relocate::relocate_tls): Likewise.
246 (Target_i386::Relocate::tls_gd_to_ie): Fix problem with GD-to-IE
247 relaxation.
248 * output.cc (Output_data_dynamic::Dynamic_entry::write): Add
249 support for section-plus-offset dynamic table entries.
250 * output.h (Output_data_dynamic::add_section_plus_offset): New function.
251 (Output_data_dynamic::Dynamic_entry): Add support for
252 section-plus-offset dynamic table entries.
253 (Output_data_dynamic::Classification): Likewise.
254 (Output_data_dynamic::classification_): Renamed offset_.
255 * x86_64.cc (Target_x86_64::Relocate::tls_desc_gd_to_ie): New function.
256 (Target_x86_64::Relocate::tls_desc_gd_to_le): New function.
257 (Target_x86_64::make_plt_section): New function.
258 (Target_x86_64::reserve_tlsdesc_entries): New function.
259 (Output_data_plt_x86_64::Output_data_plt_x86_64): Add new parameter.
260 (Output_data_plt_x86_64::reserve_tlsdesc_entry): New function.
261 (Output_data_plt_x86_64::has_tlsdesc_entry): New function.
262 (Output_data_plt_x86_64::get_tlsdesc_got_offset): New function.
263 (Output_data_plt_x86_64::get_tlsdesc_plt_offset): New function.
264 (Output_data_plt_x86_64::tlsdesc_plt_entry): New field.
265 (Output_data_plt_x86_64::set_final_data_size): Move out of line;
266 add extra PLT entry for TLS descriptors.
267 (Output_data_plt_x86_64::got_): New field.
268 (Output_data_plt_x86_64::tlsdesc_got_offset_): New field.
269 (Output_data_plt_x86_64::Output_data_plt_x86_64): Initialize new
270 fields.
271 (Output_data_plt_x86_64::do_write): Write extra PLT entry for TLS
272 descriptors.
273 (Target_x86_64::make_plt_entry): Factor out make_plt_section.
274 (Target_x86_64::got_mod_index_entry): Remove unnecessary code.
275 (Target_x86_64::Scan::local): Implement R_386_TLS_GOTDESC and
276 R_386_TLS_DESC_CALL relocations.
277 (Target_x86_64::Scan::global): Likewise.
278 (Target_x86_64::do_finalize_sections): Add dynamic table entries
279 for TLS descriptors.
280 (Relocate::relocate_tls): Fix problem with GD-to-IE relaxation.
281 Implement R_386_TLS_GOTDESC and R_386_TLS_DESC_CALL relocations.
282 (Target_x86_64::Relocate::tls_gd_to_ie): Fix problem with
283 GD-to-IE relaxation.
284 * configure.ac: Export new conditional variables TLS_GNU2_DIALECT
285 and TLS_DESCRIPTORS.
286 * Makefile.in: Rebuild.
287 * configure: Rebuild.
288 * testsuite/Makefile.am (tls_shared_gd_to_ie_test): New target.
289 (tls_test_shared2.so): New target.
290 (tls_shared_gd_to_ie_test_SOURCES): New variable.
291 (tls_shared_gd_to_ie_test_DEPENDENCIES): New variable.
292 (tls_shared_gd_to_ie_test_LDFLAGS): New variable.
293 (tls_shared_gd_to_ie_test_LDADD): New variable.
294 (tls_shared_gnu2_gd_to_ie_test): New target.
295 (tls_test_gnu2.o, tls_test_file2_gnu2.o, tls_test_gnu2_shared2.so):
296 New targets.
297 (tls_shared_gnu2_gd_to_ie_test_SOURCES): New variable.
298 (ls_shared_gnu2_gd_to_ie_test_DEPENDENCIES): New variable.
299 (tls_shared_gnu2_gd_to_ie_test_LDFLAGS): New variable.
300 (tls_shared_gnu2_gd_to_ie_test_LDADD): New variable.
301 (tls_shared_gnu2_test): New target.
302 (tls_test_gnu2_shared.so): New target.
303 (tls_shared_gnu2_test_SOURCES): New variable.
304 (tls_shared_gnu2_test_DEPENDENCIES): New variable.
305 (tls_shared_gnu2_test_LDFLAGS): New variable.
306 (tls_shared_gnu2_test_LDADD): New variable.
307 * testsuite/Makefile.in: Rebuild.
308 * testsuite/Makefile.
309
83bfb6b7
ILT
3102008-04-11 Ian Lance Taylor <iant@google.com>
311
312 * testsuite/Makefile.am (justsyms_2r.o): Add dependency on
313 justsyms.t.
314 * testsuite/Makefile.in: Rebuild.
315
316 * testsuite/script_test_2a.cc (script_test_string_a): Make 8 bytes
317 long.
318 * testsuite/script_test_2.cc (main): Adjust test.
319
706e1f5e
ILT
3202008-04-11 David S. Miller <davem@davemloft.net>
321 Ian Lance Taylor <iant@google.com>
322
323 * options.h (General_options): Add entries for '-Y' and
324 '-relax'.
325 * options.cc (General_options:finalize): If -Y was used, add those
326 entries to the library path instead of the default "/lib" and
327 "/usr/lib".
328
7c98e6bb
DM
3292008-04-11 David S. Miller <davem@davemloft.net>
330
331 * testsuite/justsyms.t: Start at 0x100.
332 * testsuite/justsyms_1.cc: Adjust justsyms_string assertion.
83bfb6b7
ILT
333 * testsuite/script_test_2b.cc (script_test_string_b): Make 8 bytes
334 long.
335 * testsuite/script_test_2.cc: Adjust string and section length
336 checks.
7c98e6bb 337
99a37bfd
ILT
3382008-04-09 Ian Lance Taylor <iant@google.com>
339
2cefc357
ILT
340 PR gold/5996
341 * script-sections.cc (Sections_element::allocate_to_segment): Add
342 orphan parameter.
343 (Output_section_definition::allocate_to_segment): Likewise.
344 (Orphan_output_section::allocate_to_segment): Likewise.
345 (Script_sections::attach_sections_using_phdrs_clause): Don't
346 propagate non-PT_LOAD segments to orphan sections.
347 * testsuite/Makefile.am (script_test_3.stdout): Generate using
348 readelf rather than objdump.
349 * testsuite/script_test_3.sh: Adjust accordingly. Test that
350 .interp section and PT_INTERP segment are the same size.
351 * testsuite/Makefile.in: Rebuild.
352
99a37bfd
ILT
353 * symtab.cc (Symbol_table::add_from_dynobj): Only look for weak
354 aliases for symbols defined in the same object.
355 * testsuite/Makefile.am (check_PROGRAMS): Add weak_alias_test.
356 (weak_alias_test_SOURCES): New variable.
357 (weak_alias_test_DEPENDENCIES): New variable.
358 (weak_alias_test_LDFLAGS): New variable.
359 (weak_alias_test_LDADD): New variable.
360 (weak_alias_test_1_pic.o, weak_alias_test_1.so): New targets.
361 (weak_alias_test_2_pic.o, weak_alias_test_2.so): New targets.
362 (weak_alias_test_3.o): New target.
363 (weak_alias_test_4_pic.o, weak_alias_test_4.so): New targets.
364 * testsuite/weak_alias_test_main.cc: New file.
365 * testsuite/weak_alias_test_1.cc: New file.
366 * testsuite/weak_alias_test_2.cc: New file.
367 * testsuite/weak_alias_test_3.cc: New file.
368
780e49c5
ILT
3692008-04-08 Ian Lance Taylor <iant@google.com>
370
cdb0b8f5
ILT
371 * options.h (class General_options): Add --noinhibit-exec option.
372 * main.cc (main): Check --noinhibit-exec.
373
0864d551
ILT
374 * options.h (class General_options): Define --wrap as a special
375 option. Add wrap_symbols_ field.
376 (General_options::any_wrap_symbols): New function.
377 (General_options::is_wrap_symbol): New function.
378 * options.cc (General_options::parse_wrap): New function.
379 (General_options::General_options): Initialize wrap_symbols_.
380 * symtab.cc (Symbol_table::wrap_symbol): New function.
381 (Symbol_table::add_from_object): Handle --wrap.
382 * symtab.h (class Symbol_table): Declare wrap_symbol.
383 * target.h (Target::wrap_char): New function.
384 (Target::Target_info): Add wrap_char field.
385 * i386.cc (Target_i386::i386_info): Initialize wrap_char.
386 * x86_64.cc (Target_x86_64::x86_64_info): Likewise.
387 * testsuite/testfile.cc (Target_test::test_target_info):
388 Likewise.
389
789aa6de
ILT
390 * errors.cc (Errors::undefined_symbol): Mention symbol version if
391 there is one.
392
2c38906f
ILT
393 * layout.h (class Layout): Add added_eh_frame_data_ field.
394 * layout.cc (Layout::Layout): Initialize new field.
395 (Layout::layout_eh_frame): Don't add eh_frame_data_ to .eh_frame
396 output section until we find a section we merged successfully.
397 * object.cc (Sized_relobj::check_eh_frame_flags): Don't require
398 that the size be non-zero.
399
780e49c5
ILT
400 * merge.cc (Object_merge_map::get_output_offset): Remove inline
401 qualifier.
402
7fcd0256
ILT
4032008-04-08 Craig Silverstein <csilvers@google.com>
404
405 * configure.ac: Export new conditional variable HAVE_ZLIB.
406 * testsuite/Makefile.am (flagstest_o_specialfile): Condition
407 on HAVE_ZLIB.
408 (flagstest_o_specialfile_and_compress_debug_sections): Likewise.
409 * configure, Makefile.in, testsuite/Makefile.in: Rebuild.
410
6835af53
ILT
4112008-04-07 Ian Lance Taylor <iant@google.com>
412
e24f324c
ILT
413 * version.cc (version_string): Set to "1.5".
414
a036edd8
ILT
415 * x86_64.cc (Target_x86_64::Scan): Change from struct to class.
416 Add issued_non_pic_error_ field. Declare check_non_pic.
417 (Target_x86_64::Scan::check_non_pic): New function.
418 (Target_x86_64::Scan::local): Call check_non_pic as appropriate.
419 (Target_x86_64::Scan::global): Likewise.
420
624f8810
ILT
421 * output.cc (Output_reloc<SHT_REL>::local_section_offset): Add
422 addend parameter. Change caller. Handle merge sections.
423 (Output_reloc<SHT_REL>::symbol_value): Change parameter type from
424 Address to Addend. Don't add in the result of
425 local_section_offset, pass down the addend and use the returned
426 value.
427 * output.h (class Output_reloc<SHT_REL>): Add Addend typedef.
428 Update declarations of local_section_offset and symbol_value.
429 * testsuite/two_file_test_1.cc (t18): New function.
430 * testsuite/two_file_test_2.cc (f18): New function.
431 * testsuite/two_file_test_main.cc (main): Call t18.
432 * testsuite/two_file_test.h (t18, f18): Declare.
433
6835af53
ILT
434 * configure.ac: Don't test for objdump, c++filt, or readelf.
435 * testsuite/Makefile.am: Remove READELF and OBJDUMP_AND_CPPFILT
436 conditionals.
437 (TEST_READELF): New variable.
438 (TEST_OBJDUMP, TEST_CXXFILT, TEST_STRIP): New variables.
439 (check_PROGRAMS): Add two_file_strip_test.
440 (two_file_strip_test): New target.
441 (check_PROGRAMS): Add two_file_same_shared_strip_test.
442 (two_file_same_shared_strip_test_SOURCES): New variable.
443 (two_file_same_shared_strip_test_DEPENDENCIES): New variable.
444 (two_file_same_shared_strip_test_LDFLAGS): New variable.
445 (two_file_same_shared_strip_test_LDADD): New variable.
446 (two_file_shared_strip.so): New target.
447 (ver_test_2.syms, ver_test_4.syms): Use TEST_READELF.
448 (ver_test_5.syms, ver_test_7.syms): Likewise.
449 (ver_matching_test.stdout): Use TEST_OBJDUMP and TEST_CXXFILT.
450 (strip_test_3.stdout): Use TEST_OBJDUMP.
451 * configure, Makefile.in, testsuite/Makefile.in: Rebuild.
452
86925eef
CC
4532008-04-04 Cary Coutant <ccoutant@google.com>
454
455 * symtab.h (Symbol::is_weak_undefined): New function.
456 (Symbol::is_strong_undefined): New function.
457 (Symbol::is_absolute): New function.
458 (Symbol::needs_plt_entry): Exclude weak undefined symbols.
459 (Symbol::needs_dynamic_reloc): Exclude weak undefined and
460 absolute symbols.
461 * testsuite/Makefile.am (check_PROGRAMS): Add weak_undef_test.
462 (weak_undef_test): New target.
463 * testsuite/Makefile.in: Rebuild.
464 * testsuite/weak_undef_file1.cc: New file.
465 * testsuite/weak_undef_file2.cc: New file.
466 * testsuite/weak_undef_test.cc: New file.
467
126f3ece
ILT
4682008-04-03 Craig Silverstein <csilvers@google.com>
469
470 * compressed_output.h (class Output_compressed_section): Use
471 unsigned buffer.
472 * compressed_output.cc (zlib_compress): Use unsigned buffers,
473 add zlib header.
474 (zlib_compressed_suffix): Removed.
475 (Output_compressed_section::set_final_data_size): Use unsigned
476 buffers.
477 * testsuite/Makefile.am (flagstest_compress_debug_sections):
478 Fix linker invocation.
479 (flagstest_o_specialfile_and_compress_debug_sections):
480 Likewise.
481 * testsuite/Makefile.in: Regenerated.
482
deae2a14
DM
4832008-04-02 David S. Miller <davem@davemloft.net>
484
485 * dwarf_reader.cc (Sized_dwarf_line_info::read_header_prolog,
486 Sized_dwarf_line_info::process_one_opcode): Use Swap_unaligned.
487
70752818
ILT
4882008-04-02 Craig Silverstein <csilvers@google.com>
489
490 * TODO: New file.
491
39d0cb0e
ILT
4922008-04-02 Ian Lance Taylor <iant@google.com>
493
494 * fileread.cc (File_read::find_view): Add byteshift and vshifted
495 parameters. Update for new key type to views_. Change all
496 callers.
497 (File_read::read): Adjust for byteshift in returned view.
498 (File_read::add_view): New function, broken out of
499 find_and_make_view.
500 (File_read::make_view): New function, broken out of
501 find_and_make_view.
502 (File_read::find_or_make_view): Add offset and aligned
503 parameters. Rewrite accordingly. Change all callers.
504 (File_read::get_view): Add offset and aligned parameters. Adjust
505 for byteshift in return value.
506 (File_read::get_lasting_view): Likewise.
507 * fileread.h (class File_read): Update declarations.
508 (class File_read::View): Add byteshift_ field. Add byteshift to
509 constructor. Add byteshift method.
510 * archive.h (Archive::clear_uncached_views): New function.
511 (Archive::get_view): Add aligned parameter. Change all callers.
512 * object.h (Object::get_view): Add aligned parameter. Change all
513 callers.
514 (Object::get_lasting_view): Likewise.
515
516 * fileread.cc (File_read::release): Don't call clear_views if
517 there are multiple objects.
518 * fileread.h (File_read::clear_uncached_views): New function.
519 * archive.cc (Add_archive_symbols::run): Call clear_uncached_views
520 on the archive.
521
a1207466
CC
5222008-03-31 Cary Coutant <ccoutant@google.com>
523
524 Add thin archive support.
525 * archive.cc (Archive::armagt): New const.
526 (Archive::setup): Remove task parameter and calls to unlock.
527 (Archive::unlock_nested_archives): New function.
528 (Archive::read_header): Add nested_off parameter. Change
529 all callers.
530 (Archive::interpret_header): Likewise.
531 (Archive::include_all_members): Change to handle thin
532 archives.
533 (Archive::include_member): Likewise.
534 * archive.h (Archive::Archive): Add new parameters and
535 initializers.
536 (Archive::armagt): New const.
537 (Archive::setup): Remove task parameter.
538 (Archive::unlock_nested_archives): New function.
539 (Archive::read_header): Add nested_off parameter.
540 (Archive::interpret_header): Likewise.
541 (Archive::Nested_archive_table): New typedef.
542 (Archive::is_thin_archive_): New field.
543 (Archive::nested_archives_): New field.
544 (Archive::options_): New field.
545 (Archive::dirpath_): New field.
546 (Archive::task_): New field.
547 * readsyms.cc (Read_symbols::do_read_symbols): Add check
548 for thin archives. Pass additional parameters to
549 Archive::Archive. Unlock the archive file after calling
550 Archive::setup.
551
479f6503
ILT
5522008-03-29 Ian Lance Taylor <iant@google.com>
553
686c8caf
ILT
554 * symtab.cc (Symbol_table::do_define_as_constant): Don't force a
555 version symbol to be local.
556 * testsuite/ver_test_4.sh: New file.
557 * testsuite/Makefile.am (check_SCRIPTS): Add ver_test_4.sh.
558 (check_DATA): Add ver_test_4.syms.
559 (ver_test_4.syms): New target.
560 * testsuite/Makefile.in: Rebuild.
561
ab794b6b
ILT
562 * output.cc
563 (Output_section::Input_section_sort_entry::has_priority): New
564 function.
565 (Output_section::Input_section_sort_entry::match_file_name): New
566 function.
567 (Output_section::Input_section_sort_entry::match_section_name):
568 Remove.
569 (Output_section::Input_section_sort_entry::match_section_name_prefix):
570 Remove.
571 (Output_section::Input_section_sort_entry::match_section_file):
572 Remove.
573 (Output_section::Input_section_sort_compare::operator()): Rewrite
574 using new Input_section_sort_entry functions. Sort crtbegin and
575 crtend first. Sort sections with no priority before sections with
576 a priority.
577 * testsuite/initpri1.c (d3): Check j != 4.
578 (cd5): New constructor/destructor function.
579 (main): Check j != 2.
580
479f6503
ILT
581 * symtab.cc (Symbol_table::add_from_object): If we don't use the
582 new symbol when resolving, don't call set_is_default.
583 * testsuite/ver_test_7.cc: New file.
584 * testsuite/ver_test_7.sh: New file.
585 * testsuite/Makefile.am (ver_test_7.so): New target.
586 (ver_test_7.o): New target.
587 (check_SCRIPTS): Add ver_test_7.sh.
588 (check_DATA): Add ver_test_7.syms.
589 (ver_test_7.syms): New target.
590
2fd32231
ILT
5912008-03-28 Ian Lance Taylor <iant@google.com>
592
593 * layout.cc (Layout::layout): If we see an input section with a
594 name that needs sorting, set the must_sort flag for the output
595 section.
596 (Layout::make_output_section): If the name of the output section
597 indicates that it might require sorting, set the may_sort flag.
598 * output.h (Output_section::may_sort_attached_input_sections): New
599 function.
600 (Output_section::set_may_sort_attached_input_sections): New
601 function.
602 (Output_section::must_sort_attached_input_sections): New
603 function.
604 (Output_section::set_must_sort_attached_input_sections): New
605 function.
606 (class Output_section): Declare Input_section_sort_entry. Define
607 Input_section_sort_compare. Declare
608 sort_attached_input_sections. Add new fields:
609 may_sort_attached_input_sections_,
610 must_sort_attached_input_sections_,
611 attached_input_sections_are_sorted_.
612 * output.cc (Output_section::Output_section): Initialize new
613 fields.
614 (Output_section::add_input_section): Add an entry to
615 input_sections_ if may_sort or must_sort are true.
616 (Output_section::set_final_data_size): Call
617 sort_attached_input_sections if necessary.
618 (Output_section::Input_section_sort_entry): Define new class.
619 (Output_section::Input_section_sort_compare::operator()): New
620 function.
621 (Output_section::sort_attached_input_sections): New function.
622 * configure.ac: Check whether the compiler supports constructor
623 priorities. Define a CONSTRUCTOR_PRIORITY automake conditional.
624 * testsuite/initpri1.c: New file.
625 * testsuite/Makefile.am (check_PROGRAMS): Add initpri1 if
626 CONSTRUCTOR_PRIORITY.
627 (initpri1_SOURCES, initpri1_DEPENDENCIES): New variables.
628 (initpri1_LDFLAGS): New variable.
629 * configure, Makefile.in, testsuite/Makefile.in: Rebuild.
630
18e6b24e
ILT
6312008-03-27 Ian Lance Taylor <iant@google.com>
632
49bdd526
ILT
633 * common.cc (Sort_commons::operator): Correct sorting algorithm.
634 * testsuite/common_test_1.c: New file.
635 * testsuite/Makefile.am (check_PROGRAMS): Add common_test_1.
636 (common_test_1_SOURCES): New variable.
637 (common_test_1_DEPENDENCIES): New variable.
638 (common_test_1_LDFLAGS): New variable.
639
18e6b24e
ILT
640 * symtab.cc (Symbol_table::add_from_object): Handle saw_undefined_
641 and commons_ correctly when NAME/VERSION does not override
642 NAME/NULL.
643 * testsuite/ver_test_6.c: New file.
644 * testsuite/Makefile.am (check_PROGRAMS): Add ver_test_6
645 (ver_test_6_SOURCES, ver_test_6_DEPENDENCIES): New variables.
646 (ver_test_6_LDFLAGS, ver_test_6_LDADD): New variables.
647
04bf7072
ILT
6482008-03-26 Ian Lance Taylor <iant@google.com>
649
5871526f
ILT
650 * symtab.cc (Symbol_table::add_from_relobj): Don't set the version
651 of an undefined symbol from a version script.
652 * testsuite/Makefile.am (ver_test_5.so): New target.
653 (ver_test_5.o): New target.
654 (check_SCRIPTS): Add ver_test_5.sh.
655 (check_DATA): Add ver_test_5.syms.
656 (ver_test_5.syms): New target.
657 * testsuite/ver_test_5.cc: New file.
658 * testsuite/ver_test_5.script: New file.
659 * testsuite/ver_test_5.sh: New file.
660 * Makefile.in, testsuite/Makefile.in: Rebuild.
661
04bf7072
ILT
662 PR gold/5986
663 Fix problems building gold with gcc 4.3.0.
664 * gold.h (TEMPLATE_ATTRIBUTE_PRINTF_4): Define.
665 (gold_error_at_location, gold_warning_at_location): Use it.
666 * configure.ac: Check whether we can compile and use a template
667 function with a printf attribute.
668 * x86_64.cc (Target_x86_64::do_code_fill): Swap out a 32-bit value
669 when jumping over bytes.
670 * object.cc: Instantiate Object::read_section_data.
671 * debug.h: Include <cstring>
672 * dwarf_reader.cc: Include <algorithm>
673 * main.cc: Include <cstring>.
674 * options.cc: Include <cstring>.
675 * output.cc: Include <cstring>.
676 * script.cc: Include <cstring>.
677 * script.h: Include <string>.
678 * symtab.cc: Include <cstring> and <algorithm>.
679 * target-select.cc: Include <cstring>.
680 * version.cc: Include <string>.
681 * testsuite/testmain.cc: Include <cstdlib>.
682 * configure, config.in: Rebuild.
683
874c5b28
ILT
6842008-03-25 Ian Lance Taylor <iant@google.com>
685
819d6c3a
ILT
686 * options.cc: Include "../bfd/bfdver.h".
687 (options::help): Print bug reporting address.
688
f4b2c6f5
ILT
689 * version.cc (print_version): Adjust output for current value of
690 BFD_VERSION_STRING.
691
692 * NEWS: New file.
693
e96caa79
ILT
694 * options.cc (options::help): Print list of supported targets.
695 * target-select.h: Include <vector>.
696 (class Target_selector): Make machine_, size_, and is_big_endian_
697 fields const. Add bfd_name_ and instantiated_target_ fields.
698 (Target_selector::Target_selector): Add bfd_name parameter.
699 (Target_selector::recognize): Make non-virtual, call
700 do_recognize.
701 (Target_selector::recognize_by_name): Make non-virtual, call
702 do_recognize_by_name.
703 (Target_selector::supported_names): New function.
704 (Target_selector::bfd_name): New function.
705 (Target_selector::do_instantiate_target): New pure virtual
706 function.
707 (Target_selector::do_recognize): New virtual function.
708 (Target_selector::do_recognize_by_name): New virtual function.
709 (Target_selector::instantiate_target): New private function.
710 (supported_target_names): Declare.
711 * target-select.cc (Target_selector::Target_selector): Update for
712 new parameter and fields.
713 (select_target_by_name): Check that the name matches before
714 calling recognize_by_name.
715 (supported_target_names): New function.
716 * i386.cc (class Target_selector_i386): Update Target_selector
717 constructor call. Remove recognize and recognize_by_name. Add
718 do_instantiate_target.
719 * x86_64.cc (class Target_selector_x86_64): Likewise.
720 * testsuite/testfile.cc (class Target_selector_test): Update for
721 changes to Target_selector.
722
874c5b28
ILT
723 * README: Rewrite, with some notes on unsupported features.
724
0a65a3a7
CC
7252008-03-24 Cary Coutant <ccoutant@google.com>
726
727 * i386.cc (Target_i386::Got_type): New enum declaration.
728 (Target_i386::Scan::local): Updated callers of Output_data_got
729 member functions.
730 (Target_i386::Scan::global): Likewise.
731 (Target_i386::Relocate::relocate): Likewise.
732 (Target_i386::Relocate::relocate_tls): Likewise.
733 * object.h (Got_offset_list): New class.
734 (Sized_relobj::local_has_got_offset): Added got_type parameter.
735 (Sized_relobj::local_got_offset): Likewise.
736 (Sized_relobj::set_local_got_offset): Likewise.
737 (Sized_relobj::local_has_tls_got_offset): Removed.
738 (Sized_relobj::local_tls_got_offset): Removed.
739 (Sized_relobj::set_local_tls_got_offset): Removed.
740 (Sized_relobj::Local_got_offsets): Changed to store a list of offsets.
741 * output.cc (Output_data_got::add_global): Added got_type parameter.
742 (Output_data_got::add_global_with_rel): Likewise.
743 (Output_data_got::add_global_with_rela): Likewise.
744 (Output_data_got::add_global_pair_with_rel): New function.
745 (Output_data_got::add_global_pair_with_rela): New function.
746 (Output_data_got::add_local): Added got_type parameter.
747 (Output_data_got::add_local_with_rel): Likewise.
748 (Output_data_got::add_local_with_rela): Likewise.
749 (Output_data_got::add_local_pair_with_rel): New function.
750 (Output_data_got::add_local_pair_with_rela): New function.
751 (Output_data_got::add_global_tls): Removed.
752 (Output_data_got::add_global_tls_with_rel): Removed.
753 (Output_data_got::add_global_tls_with_rela): Removed.
754 (Output_data_got::add_local_tls): Removed.
755 (Output_data_got::add_local_tls_with_rel): Removed.
756 (Output_data_got::add_local_tls_with_rela): Removed.
757 * output.h (Output_data_got::add_global): Added got_type parameter.
758 (Output_data_got::add_global_with_rel): Likewise.
759 (Output_data_got::add_global_with_rela): Likewise.
760 (Output_data_got::add_global_pair_with_rel): New function.
761 (Output_data_got::add_global_pair_with_rela): New function.
762 (Output_data_got::add_local): Added got_type parameter.
763 (Output_data_got::add_local_with_rel): Likewise.
764 (Output_data_got::add_local_with_rela): Likewise.
765 (Output_data_got::add_local_pair_with_rel): New function.
766 (Output_data_got::add_local_pair_with_rela): New function.
767 (Output_data_got::add_global_tls): Removed.
768 (Output_data_got::add_global_tls_with_rel): Removed.
769 (Output_data_got::add_global_tls_with_rela): Removed.
770 (Output_data_got::add_local_tls): Removed.
771 (Output_data_got::add_local_tls_with_rel): Removed.
772 (Output_data_got::add_local_tls_with_rela): Removed.
773 * resolve.cc (Symbol::override_base_with_special): Removed
774 reference to has_got_offset_ field.
775 * symtab.cc (Symbol::init_fields): Replaced initialization
776 of got_offset_ with got_offsets_. Removed initialization
777 of has_got_offset_
53fcba31 778 * symtab.h (Symbol::has_got_offset): Aded got_type parameter.
0a65a3a7
CC
779 (Symbol::got_offset): Likewise.
780 (Symbol::set_got_offset): Likewise.
781 (Symbol::has_tls_got_offset): Removed.
782 (Symbol::tls_got_offset): Removed.
783 (Symbol::set_tls_got_offset): Removed.
784 (Symbol::got_offset_): Removed.
785 (Symbol::tls_mod_got_offset_): Removed.
786 (Symbol::tls_pair_got_offset_): Removed.
787 (Symbol::got_offsets_): New field.
788 (Symbol::has_got_offset): Removed.
789 (Symbol::has_tls_mod_got_offset): Removed.
790 (Symbol::has_tls_pair_got_offset): Removed.
791 * x86_64.cc (Target_x86_64::Got_type): New enum declaration.
792 (Target_x86_64::Scan::local): Updated callers of Output_data_got
793 member functions.
794 (Target_x86_64::Scan::global): Likewise.
795 (Target_x86_64::Relocate::relocate): Likewise.
796 (Target_x86_64::Relocate::relocate_tls): Likewise.
797
bd52eafb
BE
7982008-03-25 Ben Elliston <bje@au.ibm.com>
799
800 * yyscript.y: Fix spelling error in comment.
801
8b105e34
ILT
8022008-03-24 Ian Lance Taylor <iant@google.com>
803
8ed814a9
ILT
804 * options.h (class General_options): Define build_id option.
805 * layout.h (class Layout): Declare write_build_id, create_note,
806 create_build_id. Add build_id_note_ member.
807 * layout.cc: Include <cerrno>, <fcntl.h>, <unistd.h>,
808 "libiberty.h", "md5.h", "sha1.h".
809 (Layout::Layout): Initialize eh_frame_data_,
810 eh_frame_hdr_section_, and build_id_note_.
811 (Layout::finalize): Call create_build_id.
812 (Layout::create_note): New function, broken out of
813 Layout::create_gold_note.
814 (Layout::create_gold_note): Call create_note.
815 (Layout::create_build_id): New function.
816 (Layout::write_build_id): New function.
817 (Close_task_runner::run): Call write_build_id.
818
8b105e34
ILT
819 * x86_64.cc: Correct license to GPLv3.
820
086a1841
ILT
8212008-03-23 Ian Lance Taylor <iant@google.com>
822
823 * options.cc: Include "demangle.h".
824 (parse_optional_string): New function.
825 (parse_long_option): Handle takes_optional_argument.
826 (parse_short_option): Update dash_z initializer. Handle
827 takes_optional_argument.
828 (General_options::General_options): Initialize do_demangle_.
829 (General_options::finalize): Set do_demangle_. Handle demangling
830 style.
831 * options.h (parse_optional_string): Declare.
832 (struct One_option): Add optional_arg field. Update constructor.
833 Update call constructor calls. Add takes_optional_argument
834 function.
835 (DEFINE_var): Add optional_arg__ parameter. Change all callers.
836 (DEFINE_optional_string): Define.
837 (General_options::demangle): Change from DEFINE_bool to
838 DEFINE_optional_string.
839 (General_options::no_demangle): New function.
840 (General_options::do_demangle): New function.
841 (General_options::set_do_demangle): New function.
842 (General_options::execstack_status_): Move definition to end of
843 class definition.
844 (General_options::static_): Likewise.
845 (General_options::do_demangle_): New field.
846 * object.cc (big_endian>::get_symbol_location_info): Call
847 Options::do_demangle, not Options::demangle.
848 * symtab.cc (demangle): Likewise.
849
cbb93e63
ILT
8502008-03-22 Ian Lance Taylor <iant@google.com>
851
852 * gold.h: Include <cstddef> and <sys/types.h>
853 * options.h: Include <cstring>.
854
ec531623
ILT
8552008-03-21 Ian Lance Taylor <iant@google.com>
856
857 * Added source code to GNU binutils.
858
This page took 0.073132 seconds and 4 git commands to generate.