OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [binutils-2.20.1/] [gold/] [ChangeLog] - Blame information for rev 341

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 205 julius
2010-01-13  Ian Lance Taylor  
2
 
3
        Bring over from mainline:
4
        2010-01-04  Ian Lance Taylor  
5
 
6
        PR 10980
7
        * options.h (class General_options): Add --add-needed and
8
        --copy-dt-needed-entries.  Tweak --as-needed help entry.
9
        * object.cc (Input_objects::check_dynamic_dependencies): Give an
10
        error if --copy-dt-needed-entries aka --add-needed is used and
11
        would cause a change in behaviour.
12
 
13
2010-01-13  Ian Lance Taylor  
14
 
15
        Bring over from mainline:
16
        2010-01-07  Ian Lance Taylor  
17
 
18
        PR 11042
19
        * copy-relocs.cc (Copy_relocs::emit_copy_reloc): Mark the dynamic
20
        object as needed.
21
 
22
2010-01-13  Ian Lance Taylor  
23
 
24
        Bring over from mainline:
25
        2010-01-08  Ian Lance Taylor  
26
 
27
        PR 11072
28
        * layout.cc (Layout::include_section): Remove .gnu_debuglink
29
        sections.
30
 
31
2009-11-06  Ian Lance Taylor  
32
 
33
        Bring over from mainline:
34
        2009-10-16  Doug Kwan  
35
 
36
        * dynobj.cc (Versions::Versions): Initialize version_script_.
37
        Only insert base version symbol definition for a shared object
38
        if version script defines any version versions.
39
        (Versions::define_base_version): New method definition.
40
        (Versions::add_def): Check that base version is not needed.
41
        (Versions::add_need): Define base version lazily.
42
        * dynobj.h (Versions::define_base_version): New method declaration.
43
        (Versions::needs_base_version_): New data member declaration.
44
 
45
2009-11-06  Ian Lance Taylor  
46
 
47
        PR 10876
48
        * defstd.cc (in_segment): Set only_if_ref true for "end".
49
 
50
2009-11-05  Ian Lance Taylor  
51
 
52
        PR 10910
53
        * output.cc (Output_segment::add_output_section): Add missing
54
        return statement.
55
 
56
2009-11-04  Ian Lance Taylor  
57
 
58
        PR 10880
59
        * object.h (class Object): Add is_needed and set_is_needed
60
        methods.  Add is_needed_ field.  Make bool fields into bitfields.
61
        * symtab.cc (Symbol_table::set_dynsym_indexes): If a symbol is
62
        defined in a dynamic object and referenced by a regular object,
63
        set is_needed for the dynamic object.
64
        * layout.cc (Layout::finish_dynamic_section): Don't add DT_NEEDED
65
        if the file is marked with as_needed and it is not needed.
66
 
67
2009-11-04  Ian Lance Taylor  
68
 
69
        PR 10887
70
        * arm.cc (Target_arm::do_finalize_sections): Don't add dynamic
71
        tags if data is discarded by linker script.
72
        * i386.cc (Target_i386::do_finalize_sections): Likewise.
73
        * powerpc.cc (Target_powerpc::do_finalize_sections): Likewise.
74
        * sparc.cc (Target_sparc::do_finalize_sections): Likewise.
75
        * x86_64.cc (Target_x86_64::do_finalize_sections): Likewise.
76
 
77
2009-11-04  Ian Lance Taylor  
78
 
79
        * layout.cc (Layout::get_output_section): Add is_interp and
80
        is_dynamic_linker_section parameters.  Change all callers.
81
        (Layout::choose_output_section): Likewise.
82
        (Layout::make_output_section): Likewise.
83
        (Layout::add_output_section_data): Add is_dynamic_linker_section
84
        parameter.  Change all callers.
85
        * layout.h (class Layout): Update declarations.
86
        * output.h (class Output_section): Add is_interp, set_is_interp,
87
        is_dynamic_linker_section, set_is_dynamic_linker_section methods.
88
        Add is_interp_, is_dynamic_linker_section_ fields.  Change
89
        generate_code_fills_at_write_ to a bitfield.
90
        * output.cc (Output_section::Output_sections): Initialize new
91
        fields.
92
        (Output_segment::add_output_section): Add do_sort parameter.
93
        Change all callers.
94
 
95
2009-11-03  Ian Lance Taylor  
96
 
97
        PR 10860
98
        * options.h (class General_options): Add --warn-common.
99
        * resolve.cc (Symbol_table::resolve): Handle --warn-common when
100
        merging two common symbols.
101
        (Symbol_table::should_override): Handle --warn-common when merging
102
        a common symbol with a defined symbol.  Use report_resolve_problem
103
        for multiple definitions.
104
        (Symbol_table::report_resolve_problem): New function.
105
        * symtab.h (class Symbol_table): Declare report_resolve_problem.
106
 
107
2009-11-03  Ian Lance Taylor  
108
 
109
        PR 10893
110
        * defstd.cc (in_section): Add entries for __rel_iplt_start,
111
        __rel_iplt_end, __rela_iplt_start, __rela_iplt_end, and __stack.
112
 
113
2009-11-03  Ian Lance Taylor  
114
 
115
        PR 10895
116
        * po/Make-in ($(srcdir)/$(PACKAGE).pot): Pass -C and
117
        --msgid-bugs-address.
118
        (install-pdf): New target.
119
        (install-data_yes): Look up one directory to find mkinstalldirs.
120
 
121
2009-10-16  Doug Kwan  
122
 
123
        * output.cc (Output_segment::set_section_list_address): Cast
124
        expressions to unsigned long long type to avoid format warnings.
125
 
126
2009-10-15  Ian Lance Taylor  
127
 
128
        * script.cc (Script_options::add_symbol_assignment): Always add a
129
        dot assginment to script_sections_.
130
        * script-sections.cc (Script_sections::add_dot_assignment):
131
        Initialize if necessary.
132
 
133
        * layout.cc (Layout::relaxation_loop_body): Don't crash if we see
134
        program headers with no load segment if there is a linker script.
135
 
136
        * layout.cc (Layout::set_segment_offsets): Align the file offset
137
        to the segment aligment for -N or -n with no load segment.
138
        * output.cc (Output_segment::add_output_section): Don't crash if
139
        the first section is a TLS section.
140
        (Output_segment::set_section_list_addresses): Print an error
141
        message if the address moves backward in a linker script.
142
        * script-sections.cc
143
        (Output_section_element_input::set_section_addresses): Don't
144
        increase *dot_value for a SHF_TLS/SHT_NOBITS section.
145
        (Orphan_output_section::set_section_addresses): Likewise.
146
 
147
2009-10-15  Doug Kwan  
148
 
149
        * layout.cc (Layout::finish_dynamic_section): Generate tags
150
        DT_FINI_ARRAY, DT_FINI_ARRAYSZ, DT_INIT_ARRAY, DT_INIT_ARRAYSZ,
151
        DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ as needed. If -Bsymbolic is
152
        used, add DT_SYMBOLIC and set DF_SYMBOLIC in DT_FLAGS.
153
 
154
2009-10-14  Ian Lance Taylor  
155
 
156
        * object.h (class Relocate_info): Add reloc_shdr and data_shdr
157
        fields.
158
        * object.cc (Sized_relobj::relocate_sections): Set reloc_shdr and
159
        data_shdr fields of relinfo.
160
        * i386.cc (class Target_i386::Relocate): Remove ldo_addrs_ field.
161
        (Target_i386::Relocate::relocate_tls): Don't call fix_up_ldo.  For
162
        R_386_TLS_LDO_32, adjust based on section flags.
163
        (Target_i386::Relocate::fix_up_ldo): Remove.
164
 
165
2009-10-13  Ian Lance Taylor  
166
 
167
        Add support for -pie.
168
        * options.h (class General_options): Add -pie and
169
        --pic-executable.
170
        (General_options::output_is_position_independent): Test -pie.
171
        (General_options::output_is_executable): Return true if not shared
172
        and not relocatable.
173
        (General_options::output_is_pie): Remove.
174
        * options.cc (General_options::finalize): Reject incompatible uses
175
        of -pie.
176
        * gold.cc (queue_middle_tasks): A -pie link is not static.
177
        * symtab.h (Symbol::needs_plt_entry): Return false if -pie.
178
        * symtab.cc (Symbol::final_value_is_known): Return false if
179
        output_is_position_independent.
180
        * layout.cc (Layout::set_segment_offsets): Start at address 0 if
181
        output_is_position_independent.
182
        * output.cc (Output_file_header::do_sized_write): Use ET_DYN if
183
        output_is_position_independent.
184
        * i386.cc (Output_data_plt_i386::do_write): Use the PIC PLT if
185
        output_is_position_independent.
186
        * testsuite/Makefile.am (check_PROGRAMS): Add basic_pie_test and
187
        two_file_pie_test.
188
        (basic_pie_test.o, basic_pie_test): New targets.
189
        (two_file_test_1_pie.o, two_file_test_1b_pie.o): New targets.
190
        (two_file_test_2_pie.o, two_file_test_main_pie.o): New targets.
191
        (two_file_pie_test): New target.
192
        * testsuite/Makefile.in: Rebuild.
193
        * README: Remove note saying that -pie is not supported.
194
 
195
2009-10-13  Bernhard Reutner-Fischer  
196
 
197
        * options.h (class General_options): Add -init and -fini.
198
        * layout.cc (Layout::finish_dynamic_section): Emit
199
        given init and fini functions.
200
 
201
2009-10-13  Sriraman Tallam  
202
 
203
        * gc.h (gc_process_relocs): Check if icf is enabled using new
204
        function.
205
        * gold.cc (queue_initial_tasks): Likewise.
206
        (queue_middle_tasks): Likewise.
207
        * object.cc (do_layout): Likewise.
208
        * symtab.cc (is_section_folded): Likewise.
209
        * main.cc (main): Likewise.
210
        * reloc.cc (Read_relocs::run): Likewise.
211
        (Sized_relobj::do_scan_relocs): Likewise.
212
        * icf.cc (is_function_ctor_or_dtor): New function.
213
        (Icf::find_identical_sections): Check if function is ctor or dtor when
214
        safe icf is chosen.
215
        * options.h (General_options::icf): Change option to be an enum.
216
        (Icf_status): New enum.
217
        (icf_enabled): New method.
218
        (icf_safe_folding): New method.
219
        (set_icf_status): New method.
220
        (icf_status_): New variable.
221
        * (options.cc) (General_options::finalize): Set icf_status_.
222
        * testsuite/Makefile.am: Add commands to build icf_safe_test. Modify
223
        icf_test and icf_keep_unique_test to use the --icf enum flag.
224
        * testsuite/icf_safe_test.sh: New file.
225
        * testsuite/icf_safe_test.cc: New file.
226
 
227
2009-10-12  Sriraman Tallam  
228
 
229
        * symtab.h: Check for GOLD_SYMTAB_H before header includes. Remove
230
        includes to gc.h and icf.h.
231
        * arm.cc: Include gc.h.
232
        * gold.cc: Likewise.
233
        * i386.cc: Likewise.
234
        * powerpc.cc: Likewise.
235
        * sparc.cc: Likewise.
236
        * x86_64.cc: Likewise.
237
        * gc.h: Include icf.h.
238
 
239
2009-10-11  Ian Lance Taylor  
240
 
241
        * plugin.cc: Include "gold.h" before other header files.
242
 
243
2009-10-10  Chris Demetriou  
244
 
245
        * options.h (Input_file_argument::Input_file_type): New enum.
246
        (Input_file_argument::is_lib_): Replace with...
247
        (Input_file_argument::type_): New member.
248
        (Input_file_argument::Input_file_argument): Take Input_file_type
249
        'type' rather than boolean 'is_lib' as second argument.
250
        (Input_file_argument::is_lib): Use type_.
251
        (Input_file_argument::is_searched_file): New function.
252
        (Input_file_argument::may_need_search): Handle is_searched_file.
253
        * options.cc (General_options::parse_library): Support -l:filename.
254
        (General_options::parse_just_symbols): Update for Input_file_argument
255
        changes.
256
        (Command_line::process): Likewise.
257
        * archive.cc (Archive::get_file_and_offset): Likewise.
258
        * plugin.cc (Plugin_manager::release_input_file): Likewise.
259
        * script.cc (read_script_file, script_add_file): Likewise.
260
        * fileread.cc (Input_file::Input_file): Likewise.
261
        (Input_file::will_search_for): Handle is_searched_file.
262
        (Input_file::open): Likewise.
263
        * readsyms.cc (Read_symbols::get_name): Likewise.
264
        * testsuite/Makefile.am (searched_file_test): New test.
265
        * testsuite/Makefile.in: Regenerate.
266
        * testsuite/searched_file_test.cc: New file.
267
        * testsuite/searched_file_test_lib.cc: New file.
268
 
269
2009-10-09  Andrew Pinski  
270
            Ian Lance Taylor  
271
 
272
        * descriptor.cc: Include  and "binary-io.h".
273
        (Descriptors::open): Open the files in binary mode always.
274
        * script.cc (Lex::get_token): Treat \r as whitespace.
275
 
276
2009-10-09  Ian Lance Taylor  
277
 
278
        * testsuite/retain_symbols_file_test.sh: Don't test for __tcf_0.
279
 
280
2009-10-09  Andrew Pinski  
281
            Ian Lance Taylor  
282
 
283
        * configure.ac: Check for readv function also.
284
        * fileread.cc (readv): Define if not HAVE_READV.
285
        * fileread.h (File_read:: max_readv_entries): Set to 1 if readv
286
        does not exist.
287
        * config.in: Regenerate.
288
        * configure: Regenerate.
289
 
290
2009-10-09  Doug Kwan  
291
 
292
        * layout.cc (Layout::make_output_section): Call target hook to make
293
        ordinary output section.
294
        (Layout::finalize): Adjust parameter list of call the
295
        Target::may_relax().
296
        * layout.h (class Layout::section_list): New method.
297
        * merge.h (Output_merge_base::entsize): Change visibility to public.
298
        (Output_merge_base::is_string, Output_merge_base::do_is_string):
299
        New methods.
300
        (Output_merge_string::do_is_string): New method.
301
        * object.cc (Sized_relobj::do_setup): renamed from
302
        Sized_relobj::set_up.
303
        * object.h (Sized_relobj::adjust_shndx,
304
        Sized_relobj::initializ_input_to_output_maps,
305
        Sized_relobj::free_input_to_output_maps): Change visibilities to
306
        protected.
307
        (Sized_relobj::setup): Virtualize.
308
        (Sized_relobj::do_setup): New method declaration.
309
        (Sized_relobj::invalidate_section_offset,
310
        Sized_relobj::do_invalidate_section_offset): New method decfinitions.
311
        (Sized_relobj::elf_file, Sized_relobj::local_values): New methods.
312
        * options.cc (parse_int): New function.
313
        * options.h (parse_int): New declaration.
314
        (DEFINE_int): New macro.
315
        (stub_group_size): New option.
316
        * output.cc (Output_section::Output_section): Initialize memebers
317
        merge_section_map_, merge_section_by_properties_map_,
318
        relaxed_input_section_map_, is_relaxed_input_section_map_valid_.
319
        (Output_section::add_input_section): Handled deferred code-fill
320
        generation and remove an old comment.
321
        (Output_section::add_relaxed_input_section): New method definition.
322
        (Output_section::add_merge_input_section): Use merge section by
323
        properties map to speed to search.  Update merge section maps
324
        as appropriate.
325
        (Output_section::build_relaxation_map): New method definition.
326
        (Output_section::convert_input_sections_in_list_to_relaxed_sections):
327
        Same.
328
        (Output_section::relax_input_section): Renamed to
329
        Output_section::convert_input_sections_to_relaxed_sections and change
330
        interface to take a vector of pointers to relaxed sections.
331
        (Output_section::find_merge_section,
332
        Output_section::find_relaxed_input_section): New method definitions.
333
        (Output_section::is_input_address_mapped,
334
        Output_section::output_offset, Output_section::output_address):
335
        Use output section data maps to speed up searching.
336
        (Output_section::find_starting_output_address): Add comments.
337
        (Output_section::do_write,
338
        Output_section::write_to_postprocessing_buffer): Do code-fill
339
        generation as appropriate.
340
        (Output_section::get_input_sections): Invalidate relaxed input section
341
        map.
342
        (Output_section::restore_states): Adjust type of checkpoint .
343
        Invalidate relaxed input section map.
344
        * output.h (Output_merge_base): New class declaration.
345
        (Input_section_specifier): New class defintion.
346
        (class Output_relaxed_input_section) Change base class to
347
        Output_section_data_build.
348
        (Output_relaxed_input_section::Output_relaxed_input_section): Adjust
349
        base class initializer.
350
        (Output_section::add_relaxed_input_section): New method declaration.
351
        (Output_section::Input_section): Change visibility to protected.
352
        (Output_section::Input_section::relobj,
353
        Output_section::Input_section::shndx): Handle relaxed input sections.
354
        Output_section::input_sections) Change visibility to protected.  Also
355
        define overload to return a non-const pointer.
356
        (Output_section::Merge_section_properties): New class defintion.
357
        (Output_section::Merge_section_by_properties_map,
358
        Output_section::Output_section_data_by_input_section_map,
359
        Output_section::Relaxation_map): New types.
360
        (Output_section::relax_input_section): Rename method to
361
        Output_section::convert_input_sections_to_relaxed_sections and change
362
        interface to take a vector of relaxed section pointers.
363
        (Output_section::find_merge_section,
364
        Output_section::find_relaxed_input_section,
365
        Output_section::build_relaxation_map,
366
        Output_section::convert_input_sections_in_list_to_relaxed_sections):
367
        New method declarations.
368
        (Output_section::merge_section_map_
369
        Output_section::merge_section_by_properties_map_,
370
        Output_section::relaxed_input_section_map_,
371
        Output_section::is_relaxed_input_section_map_valid_,
372
        Output_section::generate_code_fills_at_write_): New data members.
373
        * script-sections.cc
374
        (Output_section_element_input::set_section_addresses): Call
375
        current_data_size and addralign methods of relaxed input sections.
376
        (Orphan_output_section::set_section_addresses): Call current_data_size
377
        and addralign methods of relaxed input sections.
378
        * symtab.cc (Symbol_table::compute_final_value): Extract template
379
        from the body of Symbol_table::sized_finalize_symbol.
380
        (Symbol_table::sized_finalized_symbol): Call
381
        Symbol_table::compute_final_value.
382
        * symtab.h (Symbol_table::Compute_final_value_status): New enum type.
383
        (Symbol_table::compute_final_value): New templated method declaration.
384
        * target.cc (Target::do_make_output_section): New method defintion.
385
        * target.h (Target::make_output_section): New method declaration.
386
        (Target::relax): Add more parameters for input objects, symbol table
387
        and layout.  Adjust call to do_relax.
388
        (Target::do_make_output_section): New method declaration.
389
        (Target::do_relax): Add parameters for input objects, symbol table
390
        and layout.
391
 
392
2009-10-09  Andrew Pinski  
393
 
394
        * pread.c: Include stdio.h.
395
 
396
2009-10-09  Andrew Pinski  
397
 
398
        * plugin.cc: Don't include dlfcn.h when ENABLE_PLUGINS is not
399
        defined.
400
 
401
2009-10-09  Andrew Pinski  
402
 
403
        * dwarf_reader.cc (Sized_dwarf_line_info::Sized_dwarf_line_info):
404
        Change read_shndx type to unsigned int.
405
        (Sized_dwarf_line_info::read_lines): Change shndx type to unsigned
406
        int.
407
        (Sized_dwarf_line_info::read_line_mappings): Likewise.
408
        * dwarf_reader.h (Sized_dwarf_line_info::Sized_dwarf_line_info):
409
        Change read_shndx type to unsigned int.
410
        (Sized_dwarf_line_info::read_lines): Change shndx type to unsigned
411
        int.
412
        (Sized_dwarf_line_info::read_line_mappings): Likewise.
413
        * layout.cc (Layout::create_symtab_sections): Cast the result of
414
        local_symcount * symsize to off_t in the gold_assert.
415
 
416
2009-10-09  Viktor Kutuzov  
417
 
418
        * arm.cc (Target_arm::relocate::reloc_is_non_pic): Return true for
419
        R_ARM_THM_ABS5, R_ARM_ABS8, R_ARM_ABS12, R_ARM_ABS16,
420
        R_ARM_BASE_ABS.
421
        (Arm_relocate_functions::abs8): Remove has_thumb_bit parameter.
422
        (Arm_relocate_functions::thm_abs5): New function.
423
        (Arm_relocate_functions::abs12): New function.
424
        (Arm_relocate_functions::abs16): New function.
425
        (Arm_relocate_functions::base_abs): New function.
426
        (Scan::check_non_pic): Handle R_ARM_ABS32_NOI.
427
        (Scan::local): Remove special handling of R_ARM_ABS8.  Handle
428
        R_ARM_ABS32_NOI, R_ARM_THM_ABS5, R_ARM_ABS12, R_ARM_ABS16, and
429
        R_ARM_BASE_ABS.
430
        (Scan::global): Likewise.
431
        (Relocate::relocate): Handle R_ARM_ABS12, R_ARM_ABS16,
432
        R_ARM_ABS32_NOI, R_ARM_THM_ABS5, and R_ARM_BASE_ABS.
433
        (Relocatable_size_for_reloc::get_size_for_reloc): Handle
434
        R_ARM_ABS16, R_ARM_THM_ABS5, R_ARM_ABS32_NOI, R_ARM_ABS12, and
435
        R_ARM_BASE_ABS.
436
 
437
2009-10-09  Viktor Kutuzov  
438
 
439
        * arm.cc (Arm_relocate_functions::movw_prel_nc): New function.
440
        (Arm_relocate_functions::movt_prel): New function.
441
        (Arm_relocate_functions::thm_movw_prel_nc): New function.
442
        (Arm_relocate_functions::thm_movt_prel): New function.
443
        (Scan::local): Handle R_ARM_MOVW_PREL_NC, R_ARM_MOVT_PREL,
444
        R_ARM_THM_MOVW_PREL_NC, and R_ARM_THM_MOVT_PREL.
445
        (Scan::global, Relocate::relocate): Likewise.
446
        (Relocatable_size_for_reloc::get_size_for_reloc): Likewise.
447
 
448
2009-10-09  Mikolaj Zalewski  
449
 
450
        * gold.cc: (queue_initial_tasks): Pass incremental_inputs to
451
        Incremental_checker.
452
        * incremental.cc: (INCREMENTAL_LINK_VERSION): Change type to
453
        unsigned int.
454
        (class Incremental_inputs_header): New class.
455
        (Incremental_inputs_header_writer): Edit comment.
456
        (Incremental_inputs_entry): New class.
457
        (Incremental_inputs_entry_writer): Edit comment.
458
        (Sized_incremental_binary::do_find_incremental_inputs_section):
459
        Add *strtab_shndx parameter, fill it.
460
        (Sized_incremental_binary::do_check_inputs): New method.
461
        (Incremental_checker::can_incrementally_link_output_file): Use
462
        Sized_incremental_binary::check_inputs.
463
        (Incremental_inputs::report_command_line): Save command line in
464
        command_line_.
465
        * incremental.h:
466
        (Incremental_binary::find_incremental_inputs_section): New
467
        method.
468
        (Incremental_binary::do_find_incremental_inputs_section): Add
469
        strtab_shndx parameter.
470
        (Incremental_binary::do_check_inputs): New pure virtual method.
471
        (Sized_incremental_binary::do_check_inputs): Declare.
472
        (Incremental_checker::Incremental_checker): Add incremental_inputs
473
        parameter, use it to initialize incremental_inputs_.
474
        (Incremental_checker::incremental_inputs_): New field.
475
        (Incremental_checker::command_line): New method.
476
        (Incremental_checker::inputs): New method.
477
        (Incremental_checker::command_line_): New field.
478
 
479
2009-10-09  Mikolaj Zalewski  
480
 
481
        * incremental.cc: Include  and "target-select.h".
482
        (vexplain_no_incremental): New function.
483
        (explain_no_incremental): New function.
484
        (Incremental_binary::error): New method.
485
        (Sized_incremental_binary::do_find_incremental_inputs_section): New
486
        method.
487
        (make_sized_incremental_binary): New function.
488
        (open_incremental_binary): New function.
489
        (can_incrementally_link_file): Add checks if output is ELF and has
490
        inputs section.
491
        * incremental.h: Include "elfcpp_file.h" and "output.h".
492
        (Incremental_binary): New class.
493
        (Sized_incremental_binary): New class.
494
        (open_incremental_binary): Declare.
495
        * object.cc (is_elf_object): Use
496
        elfcpp::Elf_recognizer::is_elf_file.
497
        (make_elf_object): Use elfcpp::Elf_recognizer::is_valid_header.
498
        * output.h (Output_file::filesize): New method.
499
 
500
2009-10-07  Viktor Kutuzov  
501
 
502
        * arm.cc (Arm_relocate_functions::extract_arm_movw_movt_addend):
503
        New function.
504
        (Arm_relocate_functions::insert_val_arm_movw_movt): New function.
505
        (Arm_relocate_functions::extract_thumb_movw_movt_addend): New
506
        function.
507
        (Arm_relocate_functions::insert_val_thumb_movw_movt): New
508
        function.
509
        (Arm_relocate_functions::movw_abs_nc): New function.
510
        (Arm_relocate_functions::movt_abs): New function.
511
        (Arm_relocate_functions::thm_movw_abs_nc): New function.
512
        (Arm_relocate_functions::thm_movt_abs): New function.
513
        (Scan::local): Handle R_ARM_MOVW_ABS_NC, R_ARM_MOVT_ABS,
514
        R_ARM_THM_MOVW_ABS_NC, R_ARM_THM_MOVT_ABS.
515
        (Scan::global): Likewise.
516
        (Relocate::relocate): Likewise.
517
        (Relocatable_size_for_reloc::get_size_for_reloc): Likewise.
518
 
519
2009-10-07  Viktor Kutuzov  
520
 
521
        * arm.cc (Arm_relocate_functions::got_prel) New function.
522
        (Scan::local, Scan::global): Handle R_ARM_GOT_PREL.
523
        (Relocate::relocate): Likewise.
524
        (Relocatable_size_for_reloc::get_size_for_reloc): Likewise.
525
 
526
2009-10-06  Ian Lance Taylor  
527
 
528
        * options.h (class General_options): Define
529
        split_stack_adjust_size parameter.
530
        * object.h (class Object): Add uses_split_stack_ and
531
        has_no_split_stack_ fields.  Add uses_split_stack and
532
        has_no_split_stack accessor functions.  Declare
533
        handle_split_stack_section.
534
        (class Reloc_symbol_changes): Define.
535
        (class Sized_relobj): Define Function_offsets.  Declare
536
        split_stack_adjust, split_stack_adjust_reltype, and
537
        find_functions.
538
        * object.cc (Object::handle_split_stack_section): New function.
539
        (Sized_relobj::do_layout): Call handle_split_stack_section.
540
        * dynobj.cc (Sized_dynobj::do_layout): Call
541
        handle_split_stack_section.
542
        * reloc.cc (Sized_relobj::relocate_sections): Call
543
        split_stack_adjust for executable sections in split_stack
544
        objects.  Pass reloc_map to relocate_section.
545
        (Sized_relobj::split_stack_adjust): New function.
546
        (Sized_relobj::split_stack_adjust_reltype): New function.
547
        (Sized_relobj::find_functions): New function.
548
        * target-reloc.h: Include "object.h".
549
        (relocate_section): Add reloc_symbol_changes parameter.  Change
550
        all callers.
551
        * target.h (class Target): Add calls_non_split method.  Declare
552
        do_calls_non_split virtual method.  Declare match_view and
553
        set_view_to_nop.
554
        * target.cc: Include "elfcpp.h".
555
        (Target::do_calls_non_split): New function.
556
        (Target::match_view): New function.
557
        (Target::set_view_to_nop): New function.
558
        * gold.cc (queue_middle_tasks): Give an error if mixing
559
        split-stack and non-split-stack objects with -r.
560
        * i386.cc (Target_i386::relocate_section): Add
561
        reloc_symbol_changes parameter.
562
        (Target_i386::do_calls_non_split): New function.
563
        * x86_64.cc (Target_x86_64::relocate_section): Add
564
        reloc_symbol_changes parameter.
565
        (Target_x86_64::do_calls_non_split): New function.
566
        * arm.cc (Target_arm::relocate_section): Add reloc_symbol_changes
567
        parameter.
568
        * powerpc.cc (Target_powerpc::relocate_section): Add
569
        reloc_symbol_changes parameter.
570
        * sparc.cc (Target_sparc::relocate_section): Add
571
        reloc_symbol_changes parameter.
572
        * configure.ac: Call AM_CONDITIONAL for the default target.
573
        * configure: Rebuild.
574
        * testsuite/Makefile.am (TEST_AS): New variable.
575
        (check_SCRIPTS): Add split_i386.sh and split_x86_64.sh.
576
        (check_DATA): Add split_i386 and split_x86_64 files.
577
        (SPLIT_DEFSYMS): Define.
578
        (split_i386_[1234n].o): New targets.
579
        (split_i386_[124]): New targets.
580
        (split_i386_[1234r].stdout): New targets.
581
        (split_x86_64_[1234n].o): New targets.
582
        (split_x86_64_[124]): New targets.
583
        (split_x86_64_[1234r].stdout): New targets.
584
        (MOSTLYCLEANFILES): Add new executables.
585
        * testsuite/split_i386.sh: New file.
586
        * testsuite/split_x86_64.sh: New file.
587
        * testsuite/split_i386_1.s: New file.
588
        * testsuite/split_i386_2.s: New file.
589
        * testsuite/split_i386_3.s: New file.
590
        * testsuite/split_i386_4.s: New file.
591
        * testsuite/split_i386_n.s: New file.
592
        * testsuite/split_x86_64_1.s: New file.
593
        * testsuite/split_x86_64_2.s: New file.
594
        * testsuite/split_x86_64_3.s: New file.
595
        * testsuite/split_x86_64_4.s: New file.
596
        * testsuite/split_x86_64_n.s: New file.
597
        * testsuite/testfile.cc (Target_test): Update relocation_section
598
        function.
599
        * testsuite/Makefile.in: Rebuild.
600
 
601
2009-10-06  Ian Lance Taylor  
602
 
603
        * i386.cc (class Target_i386::Relocate): Add ldo_addrs_ field.
604
        (Target_i386::Relocate::relocate_tls): Call fix_up_ldo before
605
        changing local_dynamic_type_ from LOCAL_DYNAMIC_NONE.  When
606
        handling R_386_TLS_LDO_32, if local_dynamic_type_ is NONE, push
607
        the address on ldo_addrs_.
608
        (Target_i386::Relocate::fix_up_ldo): New function.
609
 
610
2009-10-06   Rafael Espindola  
611
 
612
        * plugin.cc (add_input_library): New.
613
        (Plugin::load): Add add_input_library to tv.
614
        (Plugin_manager::add_input_file): Add the is_lib argument.
615
        (add_input_file): Update call to Plugin_manager::add_input_file.
616
        (add_input_library): New.
617
        * plugin.h (Plugin_manager::add_input_file): Add the is_lib argument.
618
 
619
2009-09-30  Doug Kwan  
620
 
621
        * arm.cc (Target_arm::may_need_copy_reloc): Check for THUMB function
622
        symbol and call Symbol::may_need_copy_reloc to determine if
623
        a copy reloc is needed.
624
        * copy-relocs.cc (Copy_relocs::need_copy_reloc): Return false if -z
625
        nocopyreloc is given in command line.
626
        (Copy_relocs::emit_copy_reloc): Assert that -z nocopyreloc is not
627
        given in command line.
628
        * i386.cc (Target_i386::may_need_copy_reloc): Remove.
629
        (Target_i386::Scan::global): Use Symbol::may_need_copy_reloc instead
630
        of the removed Target_i386::may_need_copy_reloc.
631
        * options.h (copyreloc): New option with default value false.
632
        * powerpc.cc (Target_powerpc::may_need_copy_reloc): Remove.
633
        (Target_powerpc::Scan::global): Use Symbol::may_need_copy_reloc
634
        instead of the removed Target_powerpc::may_need_copy_reloc.
635
        * sparc.cc (Target_powerpc::may_need_copy_reloc): Remove.
636
        (Target_sparc::Scan::global): Use Symbol::may_need_copy_reloc
637
        instead of the removed Target_sparc::may_need_copy_reloc.
638
        * symtab.h (Symbol::may_need_copy_reloc): New method definition.
639
        * x86_64.cc (Target_powerpc::may_need_copy_reloc): Remove.
640
        (Target_x86_64::Scan::global): Use Symbol::may_need_copy_reloc
641
        instead of the removed Target_x86_64::may_need_copy_reloc.
642
 
643
2009-09-30  Ian Lance Taylor  
644
 
645
        * object.h (class Object): Remove target_ field, and target,
646
        sized_target, and set_target methods.
647
        (Object::sized_target): Remove.
648
        (class Sized_relobj): Update declarations.  Remove sized_target.
649
        * object.cc (Sized_relobj::setup): Remove target parameter.
650
        Change all callers.
651
        (Input_objects::add_object): Don't do anything with the target.
652
        (make_elf_sized_object): Add punconfigured parameter.  Change all
653
        callers.  Set or test parameter target.
654
        * dynobj.cc (Sized_dynobj::target): Remove target parameter.
655
        Change all callers.
656
        * parameters.cc (Parameters::set_target): Change parameter type to
657
        be non-const.
658
        (Parameters::default_target): Remove.
659
        (set_parameters_target): Change parameter type to be non-const.
660
        (parameters_force_valid_target): New function.
661
        (parameters_clear_target): New function.
662
        * parameters.h (class Parameters): Update declarations.  Remove
663
        default_target method.  Add sized_target and clear_target
664
        methods.  Change target_ to be non-const.
665
        (set_parameters_target): Update declaration.
666
        (parameters_force_valid_target): Declare.
667
        (parameters_clear_target): Declare.
668
        * readsyms.cc (Read_symbols::do_read_symbols): Pass punconfigured
669
        as NULL if we aren't searching.
670
        (Add_symbols::run): Don't check for compatible target.
671
        * fileread.cc (Input_file::open_binary): Call
672
        parameters_force_valid_target.
673
        * gold.cc (queue_middle_tasks): Likewise.
674
        * plugin.cc (make_sized_plugin_object): Likewise.  Don't call
675
        set_target on object.
676
        * dynobj.h (class Sized_dynobj): Update declarations.
677
        * archive.cc (Archive::get_elf_object_for_member): Return NULL if
678
        make_elf_object returns NULL.
679
        (Archive::include_member): Don't check whether object target is
680
        compatible.
681
        * output.cc (Output_section::add_input_section): Get target from
682
        parameters.
683
        (Output_section::relax_input_section): Likewise.
684
        * reloc.cc (Sized_relobj::do_gc_process_relocs): Get target from
685
        parameters.
686
        (Sized_relobj::do_scan_relocs): Likewise.
687
        (Sized_relobj::relocate_sections): Likewise.
688
        * resolve.cc (Symbol_table::resolve): Likewise.
689
        * symtab.cc (Symbol_table::wrap_symbol): Likewise.  Remove object
690
        parameter.  Change all callers.
691
        (Symbol_table::add_from_object): Get target from parameters.
692
        (Symbol_table::add_from_relobj): Don't check object target.
693
        (Symbol_table::add_from_dynobj): Likewise.
694
        (Symbol_table::define_special_symbol): Get target from
695
        parameters.
696
        * symtab.h (class Symbol_table): Update declaration.
697
        * testsuite/binary_unittest.cc (gold_testsuite): Remove target
698
        parameter.  Change all callers.  Clear parameter target.
699
        (Binary_test): Test target here.
700
        * testsuite/object_unittest.cc (gold_testsuite): Remove
701
        target_test_pointer parameter.  Change all callers.
702
        (Object_test): Test target here.
703
 
704
2009-09-26  Ian Lance Taylor  
705
 
706
        * testsuite/initpri1.c: Don't try to use constructor priorities if
707
        compiling with gcc before 4.3.
708
 
709
2009-09-22  Mikolaj Zalewski  
710
 
711
        * testsuite/retain_symbols_file_test.sh (check_present): Change
712
        output file name to retain_symbols_file_test.stdout.
713
        (check_absent): Likewise.
714
 
715
2009-09-18  Craig Silverstein  
716
 
717
        * object.cc (Sized_relobj::do_count): Test should_retain_symbol map.
718
        * options.cc: Include  and .
719
        (General_options::finalize): Parse -retain-symbols-file tag.
720
        * options.h: New flag.
721
        (General_options): New method should_retain_symbol, new
722
        variable symbols_to_retain.
723
        * symtab.cc (Symbol_table::sized_finalize_symbol): Test
724
        should_retain_symbol map.
725
        * testsuite/Makefile.am (retain_symbols_file_test): New test.
726
        * testsuite/Makefile.in: Regenerate.
727
        * testsuite/retain_symbols_file_test.sh: New file.
728
 
729
2009-09-18  Nick Clifton  
730
 
731
        * po/es.po: Updated Spanish translation.
732
 
733
2009-09-17  Doug Kwan  
734
 
735
        * debug.h (DEBUG_RELAXATION): New constant.
736
        (DEBUG_ALL): Add DEBUG_RELAXATION.
737
        (debug_string_to_enum): Add relaxation debug option.
738
        * layout.cc
739
        (Layout::Relaxation_debug_check::check_output_data_for_reset_values,
740
        Layout::Relaxation_debug_check::read_sections,
741
        Layout::Relaxation_debug_check::read_sections): New method definitions.
742
        (Layout::Layout): Initialize data members
743
        record_output_section_data_from_scrips_,
744
        script_output_section_data_list_ and relaxation_debug_check_.
745
        (Layout::save_segments, Layout::restore_segments,
746
        Layout::clean_up_after_relaxation, Layout::prepare_for_relaxation,
747
        Layout::relaxation_loop_body): New method definitions.
748
        (Layout::finalize): Support relaxation.  Move section layout code to
749
        Layout::relaxation_loop_body.
750
        (Layout::set_asection_address_from_script): Move code for orphan
751
        section placement out.
752
        (Layout::place_orphan_sections_in_script): New method definition.
753
        * layout.h (Output_segment_headers, Output_file_header):
754
        New forward class declarations.
755
        (Layout::~Layout): Define.
756
        (Layout::new_output_section_data_from_script): New method definition.
757
        (Layout::place_orphan_sections_in_script): New method declaration.
758
        (Layout::Segment_states): New type declaration.
759
        (Layout::save_segments, Layout::restore_segments,
760
        Layout::clean_up_after_relaxation, Layout::prepare_for_relaxation,
761
        Layout::relaxation_loop_body): New method declarations.
762
        (Layout::Output_section_data_list): New type declaration.
763
        (Layout::Relaxation_debug_check): New class definition.
764
        (Layout::record_output_section_data_from_script_,
765
        Layout::script_output_section_data_list_, Layout::segment_states_,
766
        Layout::relaxation_debug_check_): New data members.
767
        * output.cc: (Output_section_headers::do_size): New method definition.
768
        (Output_section_headers::Output_section_headers): Move size
769
        computation to Output_section_headers::do_size.
770
        (Output_segment_headers::do_size): New method definition.
771
        (Output_file_header::Output_file_header): Move size computation to
772
        Output_file_header::do_size and call it.
773
        (Output_file_header::do_size): New method definition.
774
        (Output_data_group::Output_data_group): Adjust call to
775
        Output_section_data.
776
        (Output_data_dynamic::set_final_data_size): Add DT_NULL tag only once.
777
        (Output_symtab_xindex::do_write): Add array bound check.
778
        (Output_section::Input_section::print_to_mapfile): Handle
779
        RELAXED_INPUT_SECTION_CODE.
780
        (Output_section::Output_section): Initialize data member checkpoint_.
781
        (Output_section::~Output_section): Delete checkpoint object pointed
782
        by checkpoint_.
783
        (Output_section::add_input_section): Always add an Input_section if
784
        relaxing.
785
        (Output_section::add_merge_input_section): Add assert.
786
        (Output_section::relax_input_section): New method definition.
787
        (Output_section::set_final_data_size): Set load address to zero for
788
        an unallocated section.
789
        (Output_section::do_address_and_file_offset_have_reset_values):
790
        New method definition.
791
        (Output_section::Input_section_sort_enty::Input_section_sort_enty):
792
        Handle relaxed input section.
793
        (Output_section::sort_attached_input_sections): Checkpoint input
794
        section list lazily.
795
        (Output_section::get_input_sections): Change type of input_sections to
796
        list of Simple_input_section pointers.  Checkpoint input section list
797
        lazily.  Also handle relaxed input sections.
798
        (Output_section::add_input_section_for_script): Take a reference to
799
        a Simple_input_section object instead of Relobj pointer and section
800
        index as parameter.  Handle relaxed input sections.
801
        (Output_section::save_states, Output_section::restore_states): New
802
        method definitions.
803
        * output.h (Output_data::Output_data): Initialize is_data_size_fixed_.
804
        (Output_data::is_data_size_fixed): New method definition.
805
        (Output_data::reset_addresss_and_file_offset): Do not reset data size
806
        if it is fixed.
807
        (Output_data::address_and_file_offset_have_reset_values): New method
808
        definition.
809
        (Output_data::do_address_and_file_offset_have_reset_values): New method
810
        definition.
811
        (Output_data::set_data_size): Check that data size is not fixed.
812
        (Output_data::fix_data_size): New method definition.
813
        (Output_data::is_data_size_fixed_): New data member.
814
        (Output_section_headers::set_final_data_size): New method definition.
815
        (Output_section_headers::do_size): New method declaration.
816
        (Output_segment_headers::set_final_data_size): New method definition.
817
        (Output_segment_headers::do_size): New method declaration.
818
        (Output_file_header::set_final_data_size)::New method definition.
819
        (Output_file_header::do_size)::New method declaration.
820
        (Output_section_data::Output_section_data): Add new parameter
821
        is_data_size_fixed and use it to fix data size.
822
        (Output_data_const::Output_data_const): Adjust call to base class
823
        constructor and fix data size.
824
        (Output_data_const_buffer::Output_data_const_buffer): Adjust call to
825
        base class constructor and fix data size.
826
        (Output_data_fixed_space::Output_data_fixed_space): Adjust call to
827
        base class constructor and fix data size.
828
        (Output_data_zero_fill::Output_data_zero_fill): Adjust call to base
829
        class constructor and fix data size.
830
        (Output_data_group::set_final_data_size): New method definition.
831
        (Output_data_dynamic::Dynamic_entry::tag): New method definition.
832
        (Output_symtab_xindex::Output_symtab_xindex): Adjust call to base
833
        class constructor and fix data size.
834
        (Output_relaxed_input_section): New class definition.
835
        (Output_section::Simple_input_section): New class definition.
836
        (Output_section::get_input_sections): Adjust parameter list.
837
        (Output_section::add_input_section_for_script): Same.
838
        (Output_section::save_states, Output_section::restore_states,
839
        Output_section::do_address_and_file_offset_have_reset_values,
840
        (Output_section::Input_section::Input_section): Handle
841
        RELAXED_INPUT_SECTION_CODE.  Add new overload for
842
        Output_relaxed_input_section.
843
        (Output_section::Input_section::is_input_section,
844
        Output_section::Input_section::set_output_section): Handle relaxed
845
        input section.
846
        (Output_section::Input_section::is_relaxed_input_section,
847
        Output_section::Input_section::output_section_data,
848
        Output_section::Input_section::relaxed_input_section): New method
849
        definitions.
850
        (Output_section::Input_section::RELAXED_INPUT_SECTION_CODE): New enum
851
        value.
852
        (Output_section::Input_section::u1_): Update comments.
853
        (Output_section::Input_section::u2_): Add new union member poris.
854
        (Output_section::Checkpoint_output_section): New classs definition.
855
        (Output_section::relax_input_section): New method declaration.
856
        (Output_section::checkpoint_): New data member.
857
        (Output_segment): Update comments.
858
        (Output_segment::Output_segment): Un-privatize copy constructor.
859
        (Output_segment::operator=): Un-privatize.
860
        * script-sections.cc (Output_section_element::Input_section_list):
861
        Change element type to Output_section::Simple_input_section.
862
        (Output_section_element_dot_assignment::set_section_addresses):
863
        Register output section data for relaxation clean up.
864
        (Output_data_exression::Output_data_expression): Adjust call to base
865
        constructor to fix data size.
866
        (Output_section_element_data::set_section_addresses): Register
867
        Output_data_expression object for relaxation clean up.
868
        (struct Input_section_info): Replace Relobj pointer and section index
869
        pair with Output_section::Simple_input_section and Convert struct to a
870
        class.
871
        (Input_section_sorter::operator()): Adjust access to
872
        Input_section_info data member to use accessors.
873
        (Output_section_element_input::set_section_addresses): Use layout
874
        parameter.  Adjust code to use Output_section::Simple_input_section
875
        and Input_secction_info classes.  Register filler for relaxation
876
        clean up.
877
        (Orphan_output_section::set_section_addresses): Replace Relobj pointer
878
        and section index pair with Output_section::Simple_input_section
879
        class.  Adjust code accordingly.
880
        (Phdrs_element::release_segment): New method definition.
881
        (Script_sections::attach_sections_using_phdrs_clause): Do not modify
882
        segment list.
883
        (Script_sections::release_segments): New method definition.
884
        * gold/script-sections.h (Script_sections::release_segments): New
885
        method declaration.
886
        * gold/target.h (Target::may_relax, Target::relax,
887
        Target::do_may_relax, Target::do_relax): New method definitions.
888
 
889
2009-09-17  Viktor Kutuzov  
890
 
891
        * arm.cc (has_signed_unsigned_overflow): New function.
892
        (Arm_relocate_functions::abs8): New function.
893
        (Target_arm::Scan::local): Handle R_ARM_ABS8.
894
        (Target_arm::Scan::global): Likewise.
895
        (Target_arm::relocate::relocate): Likewise.
896
        (Target_arm::Relocatable_size_for_reloc::get_size_for_reloc):
897
        Likewise.
898
 
899
2009-09-16  Cary Coutant  
900
 
901
        * testsuite/Makefile.am (MOSTLYCLEANFILES): Add more generated files.
902
        * testsuite/Makefile.in: Regenerate.
903
 
904
2009-09-11  Nick Clifton  
905
 
906
        * po/gold.pot: Updated by the Translation project.
907
 
908
2009-09-08  Cary Coutant  
909
 
910
        * output.cc (Output_file::open): Add execute permission to empty file.
911
        * testsuite/Makefile.am (permission_test): New test.
912
        * testsuite/Makefile.in: Regenerate.
913
 
914
2009-09-02  Ian Lance Taylor  
915
 
916
        * output.cc (Output_file::resize): Call map_no_anonymous rather
917
        than map.
918
 
919
2009-09-01  Mikolaj Zalewski  
920
 
921
        * gold.cc: Include "incremental.h".
922
        (queue_initial_tasks): Call Incremental_checker methods.
923
        * incremental.cc: Include "output.h".
924
        (Incremental_checker::can_incrementally_link_output_file): New
925
        method.
926
        * incremental.h (Incremental_checker): New class.
927
 
928
        * output.cc (Output_file::open_for_modification): New method.
929
        (Output_file::map_anonymous): Changed return type to bool.  Record
930
        map in base_ field.
931
        (Output_file::map_no_anonymous): New method, broken out of map.
932
        (Output_file::map): Use map_no_anonymous and map_anonymous.
933
        * output.h (class Output_file): Update declarations.
934
 
935
2009-08-24  Cary Coutant  
936
 
937
        * options.h (Command_line::Pre_options): New class.
938
        (Command_line::pre_options): New member.
939
        * options.cc (gold::options::ready_to_register): New variable.
940
        (One_option::register_option): Do nothing if not registering options.
941
        Assert if same short option registered twice.
942
        (General_options::General_options): Turn off option registration when
943
        done constructing.
944
        (Command_line::Pre_options::Pre_options): New constructor.
945
 
946
2009-08-24  Cary Coutant  
947
 
948
        * options.h (General_options::no_keep_memory): Remove incorrect
949
        short option.
950
 
951
2009-08-24  Ralf Wildenhues  
952
 
953
        * Makefile.am (am__skiplex, am__skipyacc): New.
954
        * Makefile.in: Regenerate.
955
 
956
2009-08-22  Ralf Wildenhues  
957
 
958
        * Makefile.am (AM_CPPFLAGS): Renamed from ...
959
        (INCLUDES): ... this.
960
        * testsuite/Makefile.am (AUTOMAKE_OPTIONS): Add -Wno-portability.
961
        (AM_CPPFLAGS): Renamed from ...
962
        (INCLUDE): ... this.
963
        * Makefile.in, testsuite/Makefile.in: Regenerate.
964
 
965
        * Makefile.in: Regenerate.
966
        * aclocal.m4: Likewise.
967
        * config.in: Likewise.
968
        * configure: Likewise.
969
        * testsuite/Makefile.in: Likewise.
970
 
971
        * Makefile.am (AUTOMAKE_OPTIONS): Add foreign.
972
        * testsuite/Makefile.am (AUTOMAKE_OPTIONS): Add foreign.
973
        * Makefile.in: Regenerate.
974
        * testsuite/Makefile.in: Regenerate.
975
 
976
2009-08-19  Cary Coutant  
977
 
978
        * resolve.cc (Symbol_table::resolve): Don't complain about defined
979
        symbols in shared libraries overridden by hidden or internal symbols
980
        in the main program.
981
 
982
2009-08-19  Chris Demetriou  
983
 
984
        * testsuite/debug_msg.sh: Match .* rather than ${srcdir} when
985
        checking source file names in error messages.
986
 
987
2009-08-18  Doug Kwan  
988
 
989
        * dynobj.cc (Sized_dynobj::setup): Take a Target object instead of
990
        an elcpp::Ehdr as parameter.  Adjust call to set_target.
991
        * dynobj.h (Sized_dynobj::setup): Take a Target object instead of
992
        an elfcpp::Ehdr as parameter.
993
        * object.cc (Object::set_target): Remove the version that looks up
994
        a target and sets it.
995
        (Sized_relobj::setup): Take a Target object instead of
996
        an elfcpp::Ehdr as parameter.  Adjust call to set_target.
997
        (make_elf_sized_object): Find target and ask target to
998
        make an ELF object.
999
        * object.h: (Object::set_target): Remove the version that looks up
1000
        a target and sets it.
1001
        (Sized_relobj::setup): Take a Target object instead of
1002
        an elfcpp:Ehdr as parameter.
1003
        * target.cc: Include dynobj.h.
1004
        (Target::do_make_elf_object_implementation): New.
1005
        (Target::do_make_elf_object): New.
1006
        * target.h (Target::make_elf_object): New template declaration.
1007
        (Target::do_make_elf_object): New method declarations.
1008
        (Target::do_make_elf_object_implementation): New template declaration.
1009
 
1010
2009-08-14  Ian Lance Taylor  
1011
 
1012
        * gold.h (FUNCTION_NAME): Define.
1013
        (gold_unreachable): Use FUNCTION_NAME.
1014
 
1015
2009-08-12  Sriraman Tallam  
1016
 
1017
        * icf.cc (Icf::find_identical_sections): Issue a warning when a
1018
        symbol in the --keep-unique list is not found.
1019
 
1020
2009-08-12  Sriraman Tallam  
1021
 
1022
        * icf.cc (Icf::find_identical_sections): Unfold symbols that have
1023
        been maked as --keep-unique.
1024
        (Icf::unfold_section): New function.
1025
        * icf.h (Icf::unfold_section): New function.
1026
        * options.h (General_options::keep_unique): New option.
1027
        * testsuite/Makefile.am: Add commands to build icf_keep_unique_test.
1028
        * testsuite/Makefile.in: Regenerate.
1029
        * testsuite/icf_keep_unique_test.sh: New file.
1030
        * testsuite/icf_keep_unique_test.cc: New file.
1031
 
1032
2009-08-12  Cary Coutant  
1033
 
1034
        PR 10471
1035
        * resolve.cc (Symbol_table::resolve): Check for references from
1036
        dynamic objects to hidden and internal symbols.
1037
        * testsuite/Makefile.am (hidden_test.sh): New test.
1038
        * testsuite/Makefile.in: Regenerate.
1039
        * testsuite/hidden_test.sh: New script.
1040
        * testsuite/hidden_test_1.c: New test source.
1041
        * testsuite/hidden_test_main.c: New test source.
1042
 
1043
2009-08-11  Doug Kwan  
1044
 
1045
        * arm.cc: Update comments.
1046
        (Target_arm::do_finalize_sections): Add a special PT_ARM_EXIDX
1047
        segment to locate the .ARM.exidx section if present.
1048
 
1049
2009-08-09  Doug Kwan  
1050
 
1051
        * dynobj.h (Sized_dynobj::do_section_entsize): Revert the previous
1052
        patch.
1053
 
1054
2009-08-07  Sriraman Tallam  
1055
        * dynobj.h (Sized_dynobj::do_section_entsize): Add return to avoid
1056
        compiler warnings.
1057
 
1058
2009-08-06  Sriraman Tallam  
1059
 
1060
        * x86_64.cc (Target_x86_64::Relocate::relocate_tls): Check for a
1061
        valid tls_segment only for non-debug-section relocations.
1062
        * testsuite/Makefile.am: Add gc_tls_test.
1063
        * testsuite/Makefile.in: Regenerate.
1064
        * testsuite/gc_tls_test.cc: New file.
1065
        * testsuite/gc_tls_test.sh: New file.
1066
 
1067
2009-08-05  Sriraman Tallam  
1068
 
1069
        * icf.cc: New file.
1070
        * icf.h: New file.
1071
        * Makefile.am (CCFILES): Add icf.cc.
1072
        (HFILES): Add icf.h
1073
        * Makefile.in: Regenerate.
1074
        * dynobj.h (Sized_dynobj::do_section_entsize): New function.
1075
        * gc.h (gc_process_relocs): Populate lists used by icf to contain
1076
        section, symbol and addend information for the relocs.
1077
        * gold.cc (queue_middle_tasks): Call identical code folding.
1078
        * gold.h: Add defines for multimap.
1079
        * layout.cc (Layout::create_symtab_sections): Add symtab as parameter
1080
        to the call of finalize_local_symbols.
1081
        * main.cc (main): Create object of class Icf.
1082
        * object.cc (Sized_relobj::do_layout): Allow this function to be
1083
        called twice during icf.
1084
        (Sized_relobj::do_finalize_local_symbols): Fold symbols corresponding
1085
        to sections marked as identical by icf.
1086
        (Sized_relobj::do_section_flags): Get section_flags from Symbols_data
1087
        when available.
1088
        (Sized_relobj::do_section_entsize): New function.
1089
        * object.h (Object::section_entsize): New function.
1090
        (Object::do_section_entsize): New pure virtual function.
1091
        (Relobj::finalize_local_symbols): Add new parameter.
1092
        (Relobj::do_section_entsize): New function.
1093
        * options.h (General_options::icf): New option.
1094
        (General_options::icf_iterations): New option.
1095
        (General_options::print_icf_sections): New option.
1096
        * plugin.cc (Sized_pluginobj::do_section_entsize): New function.
1097
        * plugin.h (Sized_pluginobj::do_section_entsize): New function.
1098
        * reloc.cc (Read_relocs::run): Delay scanning relocs when doing
1099
        icf.
1100
        * symtab.cc (Symbol_table::is_section_folded): New function.
1101
        (Symbol_table::sized_finalize_symbol):  Fold symbols corresponding
1102
        to sections marked as identical by icf.
1103
        * symtab.h (Symbol_table::set_icf): New function.
1104
        (Symbol_table::icf): New function.
1105
        (Symbol_table::is_section_folded): New function.
1106
        (Symbol_table::icf_): New data member.
1107
        * target-reloc.h (relocate_section): Ignore sections folded by icf.
1108
        * testsuite/Makefile.am: Add commands to build icf_test.
1109
        * testsuite/Makefile.in: Regenerate.
1110
        * testsuite/icf_test.sh: New file.
1111
        * testsuite/icf_test.cc: New file.
1112
 
1113
2009-07-24  Chris Demetriou  
1114
 
1115
        * layout.cc (is_compressible_debug_section): Fix incorrect
1116
        comment about compressed section names.
1117
 
1118
2009-07-20  Ian Lance Taylor  
1119
 
1120
        PR 10419
1121
        * x86_64.cc (Target_x86_64::do_code_fill): Correct nop sequences.
1122
 
1123
2009-07-16  Ian Lance Taylor  
1124
 
1125
        PR 10400
1126
        * layout.h: #include .
1127
        (class Kept_section): Change from struct to class.  Add accessors
1128
        and setters.  Add section size to Comdat_group mapping.  Change
1129
        Comdat_group to std::map.  Add is_comdat_ field.  Add
1130
        linkonce_size field in union.
1131
        (class Layout): Update declaration of find_or_add_kept_section.
1132
        Don't declare find_kept_object.
1133
        * layout.cc (Layout::find_or_add_kept_section): Remove candidate
1134
        parameter.  Add object, shndx, is_comdat, and is_group_name
1135
        parameters.  Change all callers.  Adjust for new Kept_section.
1136
        (Layout::find_kept_object): Remove.
1137
        * object.cc (Sized_relobj::include_section_group): Update use of
1138
        Kept_section.  Rename secnum to shndx.  Only record
1139
        Kept_comdat_section if sections are the same size.
1140
        (Sized_relobj::include_linkonce_section): Update use of
1141
        Kept_section.  Only record Kept_comdat_section if sections are the
1142
        same size.  Set size of linkonce section.
1143
        (Sized_relobj::map_to_kept_section): Update call to
1144
        get_kept_comdat_section.
1145
        * object.h (class Sized_relobj): Rename fields in
1146
        Kept_comdat_section to drop trailing underscores; change object
1147
        field to Relobj*.  Change Kept_comdat_section_table to store
1148
        struct rather than pointer.
1149
        (Sized_relobj::set_kept_comdat_section): Remove kept parameter.
1150
        Add kept_object and kept_shndx parameters.  Change all callers.
1151
        (Sized_relobj::get_kept_comdat_section): Change return type to
1152
        bool.  Add kept_object and kept_shndx parameters.  Change all
1153
        callers.
1154
        * plugin.cc (Pluginobj::include_comdat_group): Update call to
1155
        Layout::find_or_add_kept_section.
1156
 
1157
2009-07-09  Ian Lance Taylor  
1158
 
1159
        * merge.cc (Object_merge_map::initialize_input_to_output_map):
1160
        Reserve space in the hash table.
1161
 
1162
2009-07-06  Mikolaj Zalewski  
1163
 
1164
        * fileread.cc (File_read::get_mtime): New method.
1165
        * fileread.h (Timespec): New structure.
1166
        (File_read::get_mtime): New method.
1167
        * incremental.cc (Incremental_inputs_entry_data::timestamp_usec):
1168
        Renamed from timestamp_nsec.
1169
        (Incremental_inputs_entry_write::timestamp_sec): Fix argument to
1170
        Elf_Xword.
1171
        (Incremental_inputs_entry_write::timestamp_usec): Renamed from
1172
        timestamp_nsec.
1173
        (Incremental_inputs::report_archive): Save mtime; style fix.
1174
        (Incremental_inputs::report_obejct): Save mtime; style fix.
1175
        (Incremental_inputs::report_script): Save mtime; style fix.
1176
        (Incremental_inputs::finalize_inputs): Style fix.
1177
        (Incremental_inputs::finalize): Style fix.
1178
        (Incremental_inputs::create_input_section_data): Store inputs
1179
        mtime.
1180
        * incremental.h (Incremental_inputs::report_script): Add mtime
1181
        argument.
1182
        (Incremental_inputs::Input_info::Input_info): Intialize only one
1183
        union member.
1184
        (Incremental_inputs::Input_info::archive): Move to nameless
1185
        union.
1186
        (Incremental_inputs::Input_info::obejct): Move to nameless union.
1187
        (Incremental_inputs::Input_info::script): Move to nameless union.
1188
        (Incremental_inputs::mtime): New field.
1189
        * script.cc (read_input_script): Pass file mtime to
1190
        Incremental_input.
1191
        * script.h (Script_info::inputs): Style fix.
1192
 
1193
2009-07-01  Ian Lance Taylor  
1194
 
1195
        * freebsd.h (Target_freebsd::do_adjust_elf_header): Use size
1196
        instead of 32.
1197
 
1198
2009-06-24  Ian Lance Taylor  
1199
 
1200
        PR 10156
1201
        * layout.cc (Layout::choose_output_section): If we find an
1202
        existing section, update the flags.
1203
        (Layout::create_notes): New function, broken out of
1204
        Layout::finalize.
1205
        (Layout::finalize): Don't create note sections.
1206
        (Layout::create_note): Don't crash if linker script discards
1207
        section.
1208
        (Layout::create_gold_note): Likewise.
1209
        (Layout::create_build_id): Likewise.  Don't set
1210
        after_input_sections on the section.
1211
        (Layout::create_executable_stack_info): Remove target parameter.
1212
        Change caller.
1213
        * layout.h (class Layout): Declare create_notes.  Update
1214
        declaration of create_executable_stack_info.
1215
        * gold.cc (queue_middle_tasks): Call create_notes.
1216
        * output.cc (Output_section::update_flags_for_input_section): Move
1217
        here from output.h.  If SHF_ALLOC flag is newly set, mark address
1218
        invalid.
1219
        * output.h (Output_data::mark_address_invalid): New function.
1220
        (class Output_section): Only declare, not define,
1221
        update_flags_for_input_section.  Remove set_flags.
1222
 
1223
2009-06-24  Ian Lance Taylor  
1224
 
1225
        * script-sections.cc (Output_section_definition::
1226
        set_section_addresses): Rename shadowing local load_address to
1227
        laddr.
1228
 
1229
2009-06-24  Ian Lance Taylor  
1230
 
1231
        PR 10244
1232
        * reloc.cc (relocate_sections): Skip empty relocation sections.
1233
 
1234
2009-06-23  Ian Lance Taylor  
1235
 
1236
        PR 10156
1237
        * layout.cc (Layout::create_note): Use choose_output_section
1238
        rather than make_output_section.
1239
 
1240
2009-06-23  Ian Lance Taylor  
1241
 
1242
        PR 10237
1243
        * options.cc (General_options::parse_V): Set printed_version_.
1244
        (General_options::General_options): Initialize printed_version_.
1245
        * options.h (class General_options): Add printed_version_ field.
1246
        * gold.cc (queue_initial_tasks): If there are no input files,
1247
        don't give a fatal error if we printed the version information.
1248
        (queue_middle_tasks): If using -r with a shared object, give a
1249
        fatal error rather than an ordinary error.
1250
 
1251
2009-06-23  Ian Lance Taylor  
1252
 
1253
        PR 10219
1254
        * layout.cc (Layout::Layout): Initialize have_stabstr_section_.
1255
        (Layout::make_output_section): Set have_stabstr_section_ if we see
1256
        a .stab*str section.
1257
        (Layout::finalize): Call link_stabs_sections.
1258
        (Layout::link_stabs_sections): New file.
1259
        * layout.h (class Layout): Add have_stabstr_section_ field.
1260
        Declare link_stabs_sections.
1261
 
1262
2009-06-23  Doug Kwan  
1263
 
1264
        * Makefile.am (libgold_a_LIBADD): New.
1265
        (ld_new_DEPENDENCIES, ld_new_LDADD): Remove LIBOBJS
1266
        * Makefile.in: Regenerate.
1267
        * config.in (HAVE_DECL_MEMMEM, HAVE_DECL_STRNDUP): New.
1268
        * configure: Regenerate.
1269
        * configure.ac (AC_CHECK_DECLS): Add strndup and memmem.
1270
        * fileread.cc: Include sys/state.h
1271
        * gold.h: Declare memmem and strndup if found missing.
1272
        * gold_reloc.h: Include byteswap.h if HAVE_BYTESWAP_H is defined.
1273
 
1274
2009-06-23  Ian Lance Taylor  
1275
 
1276
        * configure.ac: Call AC_CHECK_DECLS using C, not C++.
1277
        * configure: Rebuild.
1278
 
1279
2009-06-23  Ian Lance Taylor  
1280
 
1281
        PR 10147
1282
        * object.cc (Object::section_contents): Don't try to get a view if
1283
        the section has length zero.
1284
        (Object::handle_gnu_warning_section): If the section is empty, use
1285
        the name of the section as the warning.
1286
 
1287
2009-06-23  Ian Lance Taylor  
1288
 
1289
        PR 10133
1290
        * stringpool.h (class Stringpool_template): Add optimize_ field.
1291
        (Stringpool_template::set_optimize): New function.
1292
        * stringpool.cc (Stringpool_template::Stringpool_template):
1293
        Initialize optimize_ field.
1294
        (Stringpool_template::set_string_offsets): Test local optimize
1295
        fild rather than parameter.
1296
        * layout.cc (Layout::Layout): Call set_optimize on the section
1297
        name stringpool.
1298
 
1299
2009-06-22  Ian Lance Taylor  
1300
 
1301
        PR 10030
1302
        * yyscript.y: Parse TARGET.
1303
        * script.cc (script_set_target): New function.
1304
        * script-c.h (script_set_target): Declare.
1305
        * options.cc (General_options::string_to_object_format): Rename
1306
        from string_to_object_format in anonymous namespace.  Change
1307
        callers.
1308
        * options.h (class General_options): Declare
1309
        string_to_object_format.
1310
 
1311
2009-06-22  Ian Lance Taylor  
1312
 
1313
        * script-sections.cc (Script_sections::create_segments): Don't put
1314
        program headers in a PT_LOAD segment if -n or -N.
1315
 
1316
2009-06-22  Ian Lance Taylor  
1317
 
1318
        PR 10141
1319
        * options.h (class General_options): Add -z lazy and -z now.  Sort
1320
        -z options into alphabetical order.
1321
        * layout.cc (Layout::finish_dynamic_section): Handle -z now.
1322
 
1323
2009-06-21  Ian Lance Taylor  
1324
 
1325
        * layout.cc (Layout::make_output_section): Call
1326
        Target::new_output_section.
1327
        (Layout::attach_allocated_section_to_segment): Put large section
1328
        sections in a separate load segment with the large segment flag
1329
        set.
1330
        (Layout::segment_precedes): Sort large data segments after other
1331
        load segments.
1332
        (align_file_offset): New static function.
1333
        (Layout::set_segment_offsets): Use align_file_offset.
1334
        * output.h (class Output_section): Add is_small_section_ and
1335
        is_large_section_ fields.
1336
        (Output_section::is_small_section): New function.
1337
        (Output_section::set_is_small_section):  New function.
1338
        (Output_section::is_large_section): New function.
1339
        (Output_section::set_is_large_section): New function.
1340
        (Output_section::is_large_data_section): New function.
1341
        (class Output_segment): Add is_large_data_segment_ field.
1342
        (Output_segment::is_large_data_segment): New function.
1343
        (Output_segment::set_is_large_data_segment): New function.
1344
        * output.cc (Output_section::Output_section): Initialize new
1345
        fields.
1346
        (Output_segment::Output_segment): Likewise.
1347
        (Output_segment::add_output_section): Add assertion that large
1348
        data sections always go in large data segments.  Force small data
1349
        sections to the end of the list of data sections.  Force small BSS
1350
        sections to the start of the list of BSS sections.  For large BSS
1351
        sections to the end of the list of BSS sections.
1352
        * symtab.h (class Symbol): Declare is_common_shndx.
1353
        (Symbol::is_defined): Check Symbol::is_common_shndx.
1354
        (Symbol::is_common): Likewise.
1355
        (class Symbol_table): Define enum Commons_section_type.  Update
1356
        declarations.  Add small_commons_ and large_commons_ fields.
1357
        * symtab.cc (Symbol::is_common_shndx): New function.
1358
        (Symbol_table::Symbol_table): Initialize new fields.
1359
        (Symbol_table::add_from_object): Put small and large common
1360
        symbols in the right list.
1361
        (Symbol_table::sized_finalized_symbol): Check
1362
        Symbol::is_common_shndx.
1363
        (Symbol_table::sized_write_globals): Likewise.
1364
        * common.cc (Symbol_table::do_allocate_commons): Allocate new
1365
        common symbol lists.  Don't call do_allocate_commons_list if the
1366
        list is empty.
1367
        (Symbol_table::do_allocate_commons_list): Remove is_tls
1368
        parameter.  Add comons_section_type parameter.  Change all
1369
        callers.  Handle small and large common symbols.
1370
        * object.cc (Sized_relobj::do_finalize_local_symbols): Check
1371
        Symbol::is_common_shndx.
1372
        * resolve.cc (symbol_to_bits): Likewise.
1373
        * target.h (Target::small_common_shndx): New function.
1374
        (Target::small_common_section_flags): New function.
1375
        (Target::large_common_shndx): New function.
1376
        (Target::large_common_section_flags): New function.
1377
        (Target::new_output_section): New function.
1378
        (Target::Target_info): Add small_common_shndx, large_common_shndx,
1379
        small_common_section_flags, and large_common_section_flags
1380
        fields.
1381
        (Target::do_new_output_section): New virtual function.
1382
        * arm.cc (Target_arm::arm_info): Initialize new fields.
1383
        * i386.cc (Target_i386::i386_info): Likewise.
1384
        * powerpc.cc (Target_powerpc::powerpc_info) [all versions]:
1385
        Likewise.
1386
        * sparc.c (Target_sparc::sparc_info) [all versions]: Likewise.
1387
        * x86_64.cc (Target_x86_64::x86_64_info): Likewise.
1388
        (Target_x86_64::do_new_output_section): New function.
1389
        * configure.ac: Define conditional MCMODEL_MEDIUM.
1390
        * testsuite/Makefile.am (check_PROGRAMS): Add large.
1391
        (large_SOURCES, large_CFLAGS, large_DEPENDENCIES): Define.
1392
        (large_LDFLAGS): Define.
1393
        * testsuite/large.c: New file.
1394
        * testsuite/testfile.cc (Target_test::test_target_info):
1395
        Initialize new fields.
1396
        * configure, testsuite/Makefile.in: Rebuild.
1397
 
1398
2009-06-05  Doug Kwan  
1399
 
1400
        * Makefile.am (CCFILES): Add target.cc.
1401
        * Makefile.in: Regenerate.
1402
        * i386.cc (class Target_i386): Define new virtual method to
1403
        override do_is_local_label_name in parent.
1404
        * object.cc (Sized_relobj::do_count_local_symbols): Discard
1405
        local symbols if --discard-locals or -X is given.
1406
        * options.h (class General_options): Declare new options
1407
        '--discard-locals' and '-X' for discarding locals.
1408
        * target.h (class Target): Define new methods is_local_label_name.
1409
        Declare new virtual method do_is_local_label_name.
1410
        * target.cc: New file.
1411
        * testsuite/Makefile.am (check_PROGRAMS): Add discard_locals_test.
1412
        (check_SCRIPTS): Add discard_locals_test.sh.
1413
        (check_DATA): Add discard_local_tests.syms.
1414
        (discard_locals_test_SOURCES, discard_locals_test_LDFLAGS): Define.
1415
        (discard_local_tests.syms, discard_locals_test.o): New make rules.
1416
        * testsuite/Makefile.in: Regenerate.
1417
        * testsuite/discard_locals_test.c: New file.
1418
        * testsuite/discard_locals_test.sh: Same.
1419
 
1420
2009-06-05  Doug Kwan  
1421
 
1422
        * object.cc (Sized_relobj::Sized_relobj): Initialize
1423
        discarded_eh_frame_shndx_ to -1U.
1424
        (Sized_relobj::do_layout): Record index of a discard .eh_frame
1425
        section.
1426
        (Sized_relobj::do_count_local_symbols): Skip local symbols in
1427
        a discarded .eh_frame section.
1428
        (Sized_relobj::do_finalize_local_symbols): Ditto.
1429
        * object.h (class Sized_relobj): Declare new member
1430
        discarded_eh_frame_shndx_.
1431
        * testsuite/Makefile.am (check_PROGRAMS): Add local_labels_test.
1432
        (local_labels_test.o, local_labels_test): New rules.
1433
        * testsuite/Makefile.in: Regenerate.
1434
 
1435
2009-06-04  Doug Kwan  
1436
 
1437
        * layout.cc (Layout::section_name_mapping): Add mapping for
1438
        special ARM sections.
1439
 
1440
2009-06-03  Doug Kwan  
1441
 
1442
        * arm.cc (utils::sign_extend): Reverse test in gold_assert.
1443
        (utils::has_overflow): Same.
1444
 
1445
2009-06-03  Ian Lance Taylor  
1446
 
1447
        * layout.cc (Layout::section_name_mapping): New array, replacing
1448
        Layout::linkonce_mapping.
1449
        (Layout::section_name_mapping_count): New variable, replacing
1450
        Layout::linkonce_mapping_count.
1451
        (Layout::linkonce_output_name): Remove.
1452
        (Layout::output_section_name): Rewrite.
1453
        * layout.h (class Layout): Rename Linkonce_mapping to
1454
        Section_name_mapping, linkonce_mapping to section_name_mapping,
1455
        linkonce_mapping_count to section_name_mapping_count.  Don't
1456
        declare linkonce_output_name.
1457
 
1458
2009-06-03  Doug Kwan  
1459
 
1460
        * gold/arm.cc (namespace utils): New.
1461
        (Target_arm::reloc_is_non_pic): Define new method.
1462
        (class Arm_relocate_functions): New.
1463
        (Target_arm::Relocate::relocate): Handle relocation types used by
1464
        Android.
1465
 
1466
2009-06-03  Ian Lance Taylor  
1467
 
1468
        * arm.cc (Target_arm::scan::global): Use || instead of |.
1469
 
1470
2009-06-02  Doug Kwan  
1471
 
1472
        * gold/arm.cc (Target_arm::Scan::Scan):  Initialize
1473
        issued_non_pic_error_.
1474
        (class Target_arm::Scan): Declare new method check_non_pic.
1475
        Define new method symbol_needs_plt_entry.
1476
        Declare new data member issued_non_pic_error_.
1477
        (class Target_arm::Relocate): Declare new method
1478
        should_apply_static_reloc.
1479
        (Target_arm::may_need_copy_reloc): Handle STT_ARM_TFUNC.
1480
        (Target_arm::Scan::check_non_pic): Define new method.
1481
        (Target_arm::Scan::local): Handle a small subset of reloc types used
1482
        by Android.
1483
        (Target_arm::Scan::local): Same.
1484
        (Target_arm::Relocate::should_apply_statci_reloc): Define new method.
1485
 
1486
2009-05-31  Mikolaj Zalewski  
1487
 
1488
        * incremental.cc (Incremental_inputs::report_command_line): Filter
1489
        out --incremental-* options.
1490
 
1491
2009-05-29  Doug Kwan  
1492
 
1493
        * gold/arm.cc (Output_data_plt_arm): Forward declaration for new
1494
        template class.
1495
        (class Target_arm): Update comment.
1496
        (Target_arm::Target_arm): Initialize new data members GOT_,
1497
        PLT_, GOT_PLT_, REL_DYN_, COPY_RELOCS_ and DYNBSS_.
1498
        Declare new methods Target_arm::got_section, Target_arm::make_plt_entry
1499
        and Target_arm::rel_dyn_section.
1500
        Declare new_enum Target_arm::Got_type.
1501
        Declare new data members GOT_, PLT_, GOT_PLT_, REL_DYN_, COPY_RELOCS_
1502
        and DYNBSS_.
1503
        Update commments for member do_dynsym_value.
1504
        (Target_arm::got_size, Target_arm::plt_section,
1505
        Target_arm::may_need_copy_reloc and Target_arm::copy_reloc): Define
1506
        new methods inside class defintion.
1507
        (Target_arm::got_section): Define new method.
1508
        (Target_arm::rel_dyn_section): Same.
1509
        (Output_data_plt_arm): New template class.
1510
        (Output_data_plt_arm::Output_data_plt_arm): Define constructor.
1511
        (Output_data_plt_arm:do_adjust_output_section): Define new method.
1512
        (Output_data_plt_arm::add_entry): Same.
1513
        (Output_data_plt_arm::first_plt_entry): Define new
1514
        static data member for PLT instruction template.
1515
        (Output_data_plt_arm::plt_entry): Same.
1516
        (Output_data_plt_arm::do_write): Define new method.
1517
        (Target_arm::make_plt_entry): Same.
1518
        (Target_arm::do_finalize_sections): Same.
1519
        (Target_arm::do_dynsym_value): Same.
1520
 
1521
2009-05-28  Doug Kwan  
1522
 
1523
        * Makefile.am (TARGETSOURCES): Add arm.cc.
1524
        (ALL_TARGETOBJECTS): Add arm.$(OBJEXT)
1525
        * Makefile.in: Regenerate.
1526
        * arm.cc: New file.
1527
        * configure.tgt: Add armbe*-*-*, armeb*-*-* and arm*-*-* targets.
1528
 
1529
2009-05-26  Doug Kwan  
1530
 
1531
        * options.cc (General_options::parse_exclude_libs).  Fix a comment.
1532
        (General_options::check_excluded_libs): Strip off directories in
1533
        archive name before matching like GNU ld does.
1534
        * testsuite/Makefile.am (MOSTLYCLEANFILES,
1535
        exclude_libs_test_DEPENDENCIES): Add alt/libexclude_libs_test_3.a
1536
        (exclude_libs_test_LDFLAGS): Add linker option
1537
        -Wl,--exclude-libs,libexclude_libs_test_3
1538
        (exclude_libs_test_LADD): Add alt/libexclude_libs_test_3.a as
1539
        an explicit archive without using -l.
1540
        (alt/libexclude_libs_test_3.a): New make rule.
1541
        * testsuite/Makefile.in: Regenerate.
1542
        * testsuite/exclude_libs_test.c : Declare lib3_default().
1543
        (main): Call it.
1544
        * exclude_libs_test.sh: Add tests for alt/exclude_libs_test_3.a.
1545
        * exclude_libs_test_3.c: New file.
1546
 
1547
2009-05-26  Nick Clifton  
1548
 
1549
        * po/id.po: New Indonesian translation.
1550
        * po/gold.pot: Updated template file.
1551
 
1552
2009-05-22  Sriraman Tallam  
1553
 
1554
        * testsuite/Makefile.am: Add -ffunction-sections to compile
1555
        gc_comdat_test files.  Add -Wl,--gc-sections to build
1556
        gc_comdat_test.
1557
        * testsuite/Makefile.in: Regenerate.
1558
        * testsuite/gc_comdat_test.sh: Fix the condition around grep.
1559
 
1560
2009-05-21  Sriraman Tallam  
1561
 
1562
        * object.cc (Sized_relobj::map_to_kept_section): Return NULL if the
1563
        kept comdat section was garbage collected.
1564
        * testsuite/Makefile.am: Add test gc_comdat_test.sh.
1565
        * testsuite/Makefile.in: Regenerate.
1566
        * testsuite/gc_comdat_test.sh: New file.
1567
        * testsuite/gc_comdat_test_1.cc: New file.
1568
        * testsuite/gc_comdat_test_2.cc: New file.
1569
 
1570
2009-05-19  Doug Kwan  
1571
 
1572
        * archive.cc (Archive::Archive): Move constructor from archive.h
1573
        to here.  Initialize no_export_.
1574
        (Archive::get_elf_object_for_member): Set no_export flag of object.
1575
        * archive.h (Archive::Archive): Move constructor body to
1576
        archive.cc.
1577
        (Archive::no_export): New method.
1578
        (Archive::no_export_): New field.
1579
        * object.h (Object::Object): Initialize no_export_ to false.
1580
        (Object::no_export, Object::set_no_export): New methods.
1581
        (Object::no_export_): New field.
1582
        * options.cc (General_options::parse_exclude_libs): New method.
1583
        (General_options::check_excluded_libs) Same.
1584
        * options.h (exclude_libs): New option.
1585
        (General_options::check_excluded_libs): New method declaration.
1586
        (General_options::excluded_libs_): New field.
1587
        * symtab.cc (Symbol_table::add_from_relobj): Hide symbols with
1588
        default or protected visibility if an object has no-export flag set.
1589
        testsuite/Makefile.am (check_PROGRAMS): Add exclude_libs_test.
1590
        (check_SCRIPTS): Add exclude_libs_test.sh.
1591
        (check_DATA): Add exclude_libs_test.syms.
1592
        (MOSTLYCLEANFILES): Add exclude_libs_test.syms,
1593
        libexclude_libs_test_1.a and libexclude_libs_test_2.a.
1594
        (exclude_libs_test_SOURCES, exclude_libs_test_DEPENDENCIES,
1595
        exclude_libs_test_LDFLAGS and exclude_libs_test_LDADD): Define.
1596
        (exclude_libs_test.syms, libexclude_libs_test_1.a,
1597
        libexclude_libs_test_2.a): New rules.
1598
        * testsuite/Makefile.in: Regenerate.
1599
        * testsuite/exclude_libs_test.c: New file.
1600
        * testsuite/exclude_libs_test.sh: Ditto.
1601
        * testsuite/exclude_libs_test_1.c: Ditto.
1602
        * testsuite/exclude_libs_test_2.c: Ditto.
1603
 
1604
2009-05-15  Ian Lance Taylor  
1605
 
1606
        * configure.ac: Check for declarations for cases where libiberty.h
1607
        checks HAVE_DECL_xxx.
1608
        * configure, config.in: Rebuild.
1609
 
1610
2009-05-15  Mikolaj Zalewski  
1611
 
1612
        * gold.h (Incremental_argument_list): Remove (invalid) forward
1613
        declaration.
1614
        * incremental.cc (Incremental_inputs::report_achive): New method.
1615
        (Incremental_inputs::report_object): New method.
1616
        (Incremental_inputs::report_script): New method.
1617
        (Incremental_inputs::finalize_inputs): New method.
1618
        (Incremental_inputs::finalize): Call finalize_inputs().
1619
        (Incremental_inputs::sized_create_incremental_inputs_section_data):
1620
        Create inputs entries.
1621
        * incremental.h (Incremental_input_type): New enum.
1622
        (Incremental_inputs::Incremental_input): Initialize new fields.
1623
        (Incremental_inputs::report_inputs): New method.
1624
        (Incremental_inputs::report_achive): New method.
1625
        (Incremental_inputs::report_object): New method.
1626
        (Incremental_inputs::report_script): New method.
1627
        (Incremental_inputs::finalize_inputs): New method.
1628
        (Incremental_inputs::Input_info): New struct.
1629
        (Incremental_inputs::Input_info_map): New typedef.
1630
        (Incremental_inputs::lock_): New field.
1631
        (Incremental_inputs::Inputs_): New field.
1632
        (Incremental_inputs::Inputs_map): New field.
1633
        * main.cc (main): Call Incremental_input::report_inputs.
1634
        * options.h (Input_argument_list): Typedef moved from
1635
        Input_arguments.
1636
        (Input_file_group::Files): Remove, use ::Input_argument_list.
1637
        (Input_file_group::Input_argument_list): Remove, use
1638
        ::Input_argument_list.
1639
        * plugin.cc (Plugin_manager::add_input_file): Add error in
1640
        incremental build.
1641
        * read_syms.cc (do_read_syms): Call Incremental_input::report_*
1642
        functions.
1643
        * script.cc (read_input_script): Call
1644
        Incremental_input::report_script.
1645
        * script.h (Script_info): New class.
1646
 
1647
2009-04-27  Ian Lance Taylor  
1648
 
1649
        * x86_64.cc (do_adjust_output_section): Set entsize to
1650
        plt_entry_size.
1651
 
1652
2009-04-23  Elliott Hughes  
1653
 
1654
        * output.cc (Output_file::close): After short writes, continue
1655
        writing from the correct offset in the buffer being written.
1656
 
1657
2009-04-23  Chris Demetriou  
1658
 
1659
        * configure.ac (HAVE_TR1_UNORDERED_MAP_REHASH): New define.
1660
        * configure: Regenerate.
1661
        * config.in: Regenerate.
1662
        * gold.h: Avoid std::tr1::unordered_map and std::tr1::unordered_set
1663
        if HAVE_TR1_UNORDERED_MAP_REHASH is not defined.
1664
 
1665
2009-04-21  Mikolaj Zalewski  
1666
 
1667
        * incremental.cc (Incremental_inputs_header_data): Renamed from
1668
        Incremental_input_header_data.
1669
        (Incremental_inputs_header_data::data_size): New field.
1670
        (Incremental_inputs_header_data::put_input_file_count): Renamed
1671
        from input_file_count.
1672
        (Incremental_inputs_header_data::put_command_line_offset): Renamed
1673
        from command_line_offset.
1674
        (Incremental_inputs_header_data::put_reserved): Renamed from
1675
        put_reserved.
1676
        (Incremental_inputs_entry_data): Renamed from
1677
        Incremental_input_entry_data.
1678
        (Incremental_inputs_entry_data::data_size): New field.
1679
        (Incremental_inputs::report_command_line): New method.
1680
        (Incremental_inputs::finalize): New method.
1681
        (Incremental_inputs::create_incremental_inputs_data): New method.
1682
        (Incremental_inputs::sized_create_incremental_inputs_data): New method.
1683
        * incremental.h: New file.
1684
        * layout.cc (Layout::Layout): Handle new incremental_inputs_.
1685
       (Layout::finalize): Create incremental inputs section in
1686
        incremental builds.
1687
       (Layout::create_incremental_info_sections): New method.
1688
        * layout.h (Layout::incremental_inputs): New method.
1689
       (Layout::create_incremental_info_sections): New method.
1690
       (Layout::incremental_inputs_): New field.
1691
        * main.cc (main): Notify Incremental_input of the command line.
1692
 
1693
2009-04-01  Ian Lance Taylor  
1694
            Mikolaj Zalewski  
1695
 
1696
        * gold.h (reserve_unordered_map): Define, three versions, one for
1697
        each version of Unordered_map.
1698
        * layout.cc (Layout::Layout): Remove options parameter.  Add
1699
        number_of_input_files parameter.  Don't initialize options_.
1700
        Initialize number_of_input_files_ and resized_signatures_.  Move
1701
        sections_are_attached_.
1702
        (Layout::layout_group): Reserve space for group_signatures_.
1703
        (Layout::find_or_add_kept_section): Change name parameter to be a
1704
        reference.  Resize signatures_ map when it gets large enough.
1705
        (Layout::layout_eh_frame): Use parameters->options() instead of
1706
        this->options_.
1707
        (Layout::make_output_section): Likewise.
1708
        (Layout::attach_allocated_section_to_segment): Likewise.
1709
        (Layout::finalize, Layout::create_executable_stack): Likewise.
1710
        (Layout::set_segment_offsets, Layout::create_interp): Likewise.
1711
        (Layout::finish_dynamic_section, Layout::write_binary): Likewise.
1712
        * layout.h (class Layout): Update declarations.  Remove options_
1713
        field.  Add number_of_input_files_ and resized_signatures_
1714
        fields.  Move sections_are_attached_ field.
1715
        * main.cc (main): Pass number of input files to Layout
1716
        constructor.  Don't pass options.
1717
 
1718
2009-03-30  Ian Lance Taylor  
1719
 
1720
        * ffsll.c (ffsll): Correct implementation.
1721
 
1722
2009-03-27  Ian Lance Taylor  
1723
 
1724
        * ffsll.c: New file.
1725
        * configure.ac: Call AC_REPLACE_FUNCS on ffsll.
1726
        * gold.h (ffsll): Declare if HAVE_FFSLL is not defined.
1727
        * ftruncate.c (ftruncate): Declare before definition.
1728
        * mremap.c (mremap): Likewise.
1729
        * pread.c (pread): Likewise.
1730
        * configure, Makefile.in, config.in: Rebuild.
1731
 
1732
        * mremap.c: New file.
1733
        * configure.ac: Call AC_REPLACE_FUNCS on mremap.
1734
        * gold.h (MREMAP_MAYMOVE): Define if HAVE_MREMAP is not defined.
1735
        (mremap): Declare if HAVE_MREMAP is not defined.
1736
        * configure, Makefile.in, config.in: Rebuild.
1737
 
1738
2009-03-27  Cary Coutant  
1739
 
1740
        * powerpc.cc (Target_powerpc::check_non_pic): Assert that output is
1741
        position independent.
1742
        * sparc.cc (Target_sparc::check_non_pic): Likewise.
1743
        * x86_64.cc (Target_x86_64::check_non_pic): Likewise.
1744
 
1745
2009-03-24  Cary Coutant  
1746
 
1747
        * symtab.h (needs_plt_entry): Check for unsatisfied reference from
1748
        an executable.
1749
        (needs_dynamic_reloc): Likewise.
1750
 
1751
2009-03-24  Ian Lance Taylor  
1752
 
1753
        * yyscript.y (file_cmd): Recognize EXTERN.
1754
        (extern_name_list, extern_name_list_body): New nonterminals.
1755
        * script.cc (script_add_extern): Define.
1756
        * script-c.h (script_add_extern): Declare.
1757
 
1758
2009-03-24  Rafael Avila de Espindola  
1759
 
1760
        * object.cc (is_elf_object): Define.
1761
        * object.h (is_elf_object): Declare.
1762
        * archive.cc (Archive::get_elf_object_for_member): Call
1763
        is_elf_object.
1764
        * readsyms.cc (Read_symbols::do_read_symbols): Likewise.
1765
 
1766
2009-03-24  Elliott Hughes  
1767
 
1768
        * output.cc (Output_file::map_anonymous): Define.
1769
        (Output_file::map): Use map_anonymous.  If the regular mmap fails,
1770
        try an anonymous one.  Report the size if the mmap fails.
1771
        * output.h (class Output_file): Declare map_anonymous.
1772
 
1773
2009-03-24  Ian Lance Taylor  
1774
 
1775
        * target-select.cc (instantiate_target): Don't acquire the lock if
1776
        the instantiated_target_ field has already been set.
1777
 
1778
2009-03-23  Ian Lance Taylor  
1779
 
1780
        * gold-threads.h (class Initialize_lock): Define.
1781
        * gold-threads.cc (class Initialize_lock_once): Define.
1782
        (initialize_lock_control): New static variable.
1783
        (initialize_lock_pointer): New static variable.
1784
        (initialize_lock_once): New static function.
1785
        (Initialize_lock::Initialize_lock): Define.
1786
        (Initialize_lock::initialize): Define.
1787
        * target-select.h: Include "gold-threads.h".
1788
        (class Target_selector): Add lock_ and initialize_lock_ fields.
1789
        Don't define instantiate_target, just declare it.
1790
        * target-select.cc (Target_selector::Target_selector): Initialize
1791
        new fields.
1792
        (Target_selector::instantiate_target): Define.
1793
        * descriptors.h: Include "gold-threads.h".
1794
        (class Descriptors): Add initialize_lock_ field.
1795
        * descriptors.cc (Descriptors::Descriptors): Initialize new
1796
        field.
1797
        (Descriptors::open): Use initialize_lock_ field
1798
        * errors.h (class Errors): Add initialize_lock_ field.
1799
        * errors.cc (Errors::Errors): Initialize new field.
1800
        (Errors::initialize_lock): Use initialize_lock_ field.
1801
        * powerpc.cc (class Target_selector_powerpc): Remove
1802
        instantiated_target_ field.  In do_recognize call
1803
        instantiate_target rather than do_instantiate_target.  In
1804
        do_instantiate_target just allocate a new target.
1805
        * sparc.cc (class Target_selector_sparc): Likewise.
1806
 
1807
        * freebsd.h: New file.
1808
        * i386.cc: Include "freebsd.h".
1809
        (Target_i386): Derive from Target_freebsd rather than
1810
        Sized_target.
1811
        (Target_selector_i386): Derive from Target_selector_freebsd rather
1812
        than Target_selector.
1813
        * x86_64.cc: Include "freebsd.h".
1814
        (Target_x86_64): Derive from Target_freebsd rather than
1815
        Sized_target.
1816
        (Target_selector_x86_64): Derive from Target_selector_freebsd
1817
        rather than Target_selector.
1818
        * target.h (class Target): Add adjust_elf_header and
1819
        do_adjust_elf_header.
1820
        * output.cc (Output_file_header:: do_sized_write): Call target
1821
        adjust_elf_header routine.
1822
        * configure.tgt: Set targ_osabi.
1823
        * configure.ac: Define GOLD_DEFAULT_OSABI.
1824
        * parameters.cc (Parameters::default_target): Pass
1825
        GOLD_DEFAULT_OSABI to select_target.
1826
        * target-select.h (class Target_selector): Make instantiate_target
1827
        protected rather than private.
1828
        * Makefile.am (HFILES): Add freebsd.h.
1829
        * configure, Makefile.in, config.in: Rebuild.
1830
 
1831
        * merge.cc (do_add_input_section): Correct pend value.  Change
1832
        message about last entry not being null terminated from error to
1833
        warning.
1834
 
1835
2009-03-20  Mikolaj Zalewski  
1836
 
1837
        * incremental.cc: New file.
1838
        * Makefile.am (CCFILES): Add incremental.cc.
1839
        * Makefile.in: Rebuild.
1840
 
1841
2009-03-19  Paul Pluzhnikov  
1842
 
1843
        * layout.cc (Layout::output_section_name): Preserve names
1844
        of '.note.' sections.
1845
 
1846
2009-03-19  Ian Lance Taylor  
1847
 
1848
        * descriptors.cc (Descriptors::open): Check that the options are
1849
        valid before using them.
1850
 
1851
2009-03-18  Ian Lance Taylor  
1852
 
1853
        * script-sections.h: Include .
1854
        (class Script_sections): Change Sections_elements from std::vector
1855
        to std::list.  Typedef public Elements_iterator.  Add
1856
        orphan_section_placement_, data_segment_align_start_, and
1857
        saw_data_segment_align_ fields.  Remove data_segment_align_index_
1858
        field.
1859
        * script-sections.cc (class Orphan_section_placement): New class.
1860
        (class Sections_element): Add virtual functions is_relro and
1861
        orphan_section_init.  Remove virtual function place_orphan_here.
1862
        (class Output_section_definition): Add is_relro and
1863
        orphan_section_init.  Remove place_orphan_here.
1864
        (class Orphan_output_section): Likewise.
1865
        (Script_sections::Script_sections): Update for field changes.
1866
        (Script_sections::data_segment_align): Set saw_data_segment_align_
1867
        and data_segment_align_start_, not data_segment_align_index.
1868
        (Script_sections::data_segment_relro_end): Check
1869
        saw_data_segment_align_.  Use data_segment_align_start_ rather
1870
        than data_segment_align_index_.
1871
        (Script_sections::place_orphan): Rewrite to use
1872
        Orphan_section_placement.
1873
 
1874
2009-03-17  Ian Lance Taylor  
1875
 
1876
        * archive.cc (Archive::add_symbols): Check for a version attached
1877
        to the symbol name in the archive map.
1878
        * testsuite/Makefile.am (check_PROGRAMS): Add ver_test_11.
1879
        (ver_test_11_SOURCES, ver_test_11_DEPENDENCIES): Define.
1880
        (ver_test_11_LDFLAGS, ver_test_11_LDADD): Define.
1881
        (ver_test_11.a): New target.
1882
        * testsuite/Makefile.in: Rebuild.
1883
 
1884
        * configure.ac: Check for chsize and posix_fallocate.  Replace
1885
        ftruncate.
1886
        * ftruncate.c: New file, from gnulib.
1887
        * output.cc (posix_fallocate): Define dummy version if not
1888
        HAVE_POSIX_FALLOCATE.
1889
        (Output_file::map): Call posix_fallocate rather than lseek and
1890
        write.
1891
        * gold.h (ftruncate): Declare if not HAVE_FTRUNCATE.
1892
        * configure, Makefile.in, config.in: Rebuild.
1893
 
1894
2009-03-17  Paul Pluzhnikov  
1895
 
1896
        * layout.h (Layout::create_note): Add section_name parameter.
1897
        * layout.cc (Layout::create_note): Likewise.
1898
        (Layout::create_build_id, Layout::create_gold_note): Fix callers.
1899
 
1900
2009-03-17  Ian Lance Taylor  
1901
 
1902
        * descriptors.cc: Include "options.h".
1903
        (FD_CLOEXEC, O_CLOEXEC): Define if not defined.
1904
        (Descriptors::open): Always use O_CLOEXEC when opening a new
1905
        descriptor.  If we have a plugin, and O_CLOEXEC was not defined,
1906
        then set FD_CLOEXEC.
1907
 
1908
        * sparc.cc (class Target_sparc): Add has_got_section.
1909
        (Target_sparc::Scan::global): If we see _GLOBAL_OFFSET_TABLE_,
1910
        make sure we have a GOT section.
1911
 
1912
        * sparc.cc (optimize_tls_reloc): Recognize R_SPARC_TLS_IE_ADD.
1913
        (Target_sparc::Scan::local): Likewise.
1914
        (Target_sparc::Scan::global): Likewise.
1915
        (Target_sparc::Relocate::relocate): Likewise.
1916
        (Target_sparc::Relocate::relocate_tls): Likewise.
1917
 
1918
        * symtab.cc (Symbol_table::define_default_version): New function,
1919
        broken out of add_from_object.
1920
        (Symbol_table::add_from_object): Call define_default_version.
1921
        (Symbol_table::define_special_symbol): Add resolve_oldsym
1922
        parameter.  Change all callers.  If the version for a symbol comes
1923
        from a version script, resolve it with the symbol with the same
1924
        name with no version.  Also add the symbol without a version if
1925
        appropriate.
1926
        (do_define_in_output_data): If resolving with oldsym, don't delete
1927
        sym.
1928
        (do_define_in_output_segment): Likewise.
1929
        (do_define_as_constant): Likewise.
1930
        * symtab.h (class Symbol_table): Update declarations.
1931
 
1932
2009-03-13  Ian Lance Taylor  
1933
 
1934
        * readsyms.cc (Read_symbols::incompatible_warning): New function.
1935
        (Read_symbols::requeue): New function.
1936
        (Read_symbols::do_read_symbols): If make_elf_object fails because
1937
        the target type is not configured, and the file was searched for,
1938
        issue a warning and retry with the next directory.
1939
        (Add_symbols::run): If the file has an incompatible format, and
1940
        it was searched for, requeue the Read_symbols task.  On error,
1941
        release the object.
1942
        * readsyms.h (class Read_symbols): Add dirindex_ field.  Add
1943
        dirindex parameter to constructor.  Change all callers.  Declare
1944
        incompatible_warning and requeue.
1945
        (class Add_symbols): Add dirpath_, dirindex_, mapfile_,
1946
        input_argument_ and input_group_ fields.  Add them to
1947
        constructor.  Change all callers.
1948
        (class Read_script): Add dirindex_ field.  Add it to constructor.
1949
        Change all callers.
1950
        * archive.cc (Archive::setup): Remove input_objects parameter.
1951
        Change all callers.
1952
        (Archive::get_file_and_offset): Likewise.
1953
        (Archive::read_all_symbols): Likewise.
1954
        (Archive::read_symbols): Likewise.
1955
        (Archive::get_elf_object_for_member): Remove input_objects
1956
        parameter.  Add punconfigured parameter.  Change all callers.
1957
        (Archive::add_symbols): Change return type to bool.  Check return
1958
        value of include_member.
1959
        (Archive::include_all_members): Likewise.
1960
        (Archive::include_member): Change return type to bool.  Return
1961
        false if first included object has incompatible target.  Set
1962
        included_member_ field.
1963
        (Add_archive_symbols::run): If add_symbols returns false, requeue
1964
        Read_symbols task.
1965
        * archive.h (class Archive): Add included_member_ field.
1966
        Initialize it in constructor.  Add input_file and searched_for
1967
        methods.  Update declarations.
1968
        (class Add_archive_symbols): Add dirpath_, dirindex_, and
1969
        input_argument_ fields.  Add them to constructor.  Change all
1970
        callers.
1971
        * script.cc: Include "target-select.h".
1972
        (class Parser_closure): Add skip_on_incompatible_target_ and
1973
        found_incompatible_target_ fields.  Add
1974
        skip_on_incompatible_target parameter to constructor.  Change all
1975
        callers.  Add methods skip_on_incompatible_target,
1976
        clear_skip_on_incompatible_target, found_incompatible_target, and
1977
        set_found_incompatible_target.
1978
        (read_input_script): Add dirindex parameter.  Change all callers.
1979
        If parser finds an incompatible target, requeue Read_symbols
1980
        task.
1981
        (script_set_symbol): Clear skip_on_incompatible_target in
1982
        closure.
1983
        (script_add_assertion, script_parse_option): Likewise.
1984
        (script_start_sections, script_add_phdr): Likewise.
1985
        (script_check_output_format): New function.
1986
        * script.h (read_input_script): Update declaration.
1987
        * script-c.h (script_check_output_format): Declare.
1988
        * yyscript.y (file_cmd): Handle OUTPUT_FORMAT.
1989
        (ignore_cmd): Remove OUTPUT_FORMAT.
1990
        * fileread.cc (Input_file::Input_file): Add explicit this.
1991
        (Input_file::will_search_for): New function.
1992
        (Input_file::open): Add pindex parameter.  Change all callers.
1993
        * fileread.h (class Input_file): Add input_file_argument method.
1994
        Declare will_search_for.  Update declarations.
1995
        * object.cc (make_elf_object): Add punconfigured parameter.
1996
        Change all callers.
1997
        * object.h (class Object): Make input_file public.  Add
1998
        searched_for method.
1999
        (make_elf_object): Update declaration.
2000
        * dirsearch.cc (Dirsearch::find): Add pindex parameter.  Use it to
2001
        restart search.
2002
        * dirsearch.h (class Dirsearch): Update declaration.
2003
        * options.h (class General_options): Add --warn-search-mismatch.
2004
        * parameters.cc (Parameters::is_compatible_target): New function.
2005
        * parameters.h (class Parameters): Declare is_compatible_target.
2006
        * workqueue.cc (Workqueue::add_blocker): New function.
2007
        * workqueue.h (class Workqueue): Declare add_blocker.
2008
 
2009
        * fileread.cc (Input_file::open): Remove options parameter.
2010
        Change all callers.
2011
        (Input_file::open_binary): Likewise.
2012
        * script.cc (read_input_script): Likewise.
2013
        * readsyms.h (class Read_symbols): Remove options_ field.  Remove
2014
        options parameter from constructor.  Change all callers.
2015
        (class Read_script): Likewise.
2016
        * fileread.h (class Input_file): Update declarations.
2017
        * script.h (read_input_script): Update declaration.
2018
 
2019
2009-03-10  Nick Clifton  
2020
 
2021
        * po/es.po: New Spanish translation.
2022
 
2023
2009-03-06  Cary Coutant  
2024
 
2025
        * options.cc (parse_short_option): Keep dash_z from registering itself.
2026
 
2027
2009-03-03  Ian Lance Taylor  
2028
 
2029
        PR 9918
2030
        * target-reloc.h (relocate_section): Pass output_section to
2031
        relocate.
2032
        * i386.cc (Target_i386::should_apply_static_reloc): Add
2033
        output_section parameter.  Change all callers.
2034
        (Target_i386::Relocate::relocate): Add output_section parameter.
2035
        * x86_64.cc (Target_x86_64::Relocate::relocate): Likewise.
2036
        * sparc.cc (Target_sparc::Relocate::relocate): Likewise.
2037
        * powerpc.cc (Target_powerpc::Relocate::relocate): Likewise.
2038
        * testsuite/two_file_shared.sh: New script.
2039
        * testsuite/Makefile.am (check_SCRIPTS): Add two_file_shared.sh.
2040
        (check_DATA): Add two_file_shared.dbg.
2041
        (two_file_shared.dbg): New target.
2042
        * testsuite/Makefile.in: Rebuild.
2043
 
2044
2009-03-01  Ian Lance Taylor  
2045
 
2046
        * configure.ac: Check for byteswap.h.
2047
        * configure: Rebuild.
2048
        * config.in: Rebuild.
2049
 
2050
2009-03-01  Mikolaj Zalewski  
2051
 
2052
        * layout.cc (Layout::find_or_add_kept_section): New function.
2053
        (Layout::add_comdat): Removed.
2054
        * layout.h (struct Kept_section): Move out of class Layout.
2055
        Remove trailing underscores from field names.  Add group_sections
2056
        field.  Rename group_ field to is_group.  Change all uses.
2057
        (class Layout): Declare find_or_add_kept_section, not add_comdat.
2058
        * object.cc (Sized_relobj::Sized_relobj): Don't initialize
2059
        comdat_groups_ field.
2060
        (Sized_relobj::include_section_group): Use
2061
        find_or_add_kept_section and Kept_section::group_sections.
2062
        (Sized_relobj::include_linkonce_section): Likewise.
2063
        * object.cc (class Sized_relobj): Don't define Comdat_group or
2064
        Comdat_group_table.  Remove find_comdat_group and
2065
        add_comdat_group.  Remove comdat_groups_ field.
2066
        * plugin.cc (include_comdat_group): Use
2067
        Layout::find_or_add_kept_section.
2068
 
2069
2009-02-28  Ian Lance Taylor  
2070
 
2071
        * README: --gc-sections and map files are now supported.  Document
2072
        some build requirements.
2073
 
2074
        PR 6992
2075
        * symtab.cc (Symbol_table::sized_write_section_symbol): In a
2076
        relocatable link set the value of the section symbol to zero.
2077
        * object.cc (Sized_relobj::do_finalize_local_symbols): In a
2078
        relocatable link don't include the section address in the local
2079
        symbol value.
2080
 
2081
2009-02-27  Ian Lance Taylor  
2082
 
2083
        PR 6811
2084
        * options.h (class Search_directory): Add is_system_directory.
2085
        (class General_options): Declare is_in_system_directory.
2086
        * options.cc (get_relative_sysroot): Make static.
2087
        (get_default_sysroot): Make static.
2088
        (General_optoins::is_in_system_directory): New function.
2089
        * fileread.cc (Input_file::is_in_system_directory): New function.
2090
        * fileread.h (class Input_file): Declare is_in_system_directory.
2091
        * object.h (class Object): Add is_in_system_directory.
2092
        (class Input_objects): Remove system_library_directory_ field.
2093
        * object.cc (Input_objects::add_object): Don't set
2094
        system_library_directory_.
2095
        (input_objects::found_in_system_library_directory): Remove.
2096
        * symtab.cc (Symbol_table::write_globals): Remove input_objects
2097
        parameter.  Change all callers.
2098
        (Symbol_table::sized_write_globals): Likewise.
2099
        (Symbol_table::warn_about_undefined_dynobj_symbol): Likewise.
2100
        Call Object::is_in_system_directory.
2101
        * symtab.h (class Symbol_table): Update declarations.
2102
 
2103
        PR 5990
2104
        * descriptors.h (Open_descriptor): Add is_on_stack field.
2105
        * descriptors.cc (Descriptors::open): If the descriptor is on the
2106
        top of the stack, remove it.  Initialize is_on_stack field.
2107
        (Descriptors::release): Only add pod to stack if it is not on the
2108
        stack already.
2109
        (Descriptors::close_some_descriptor): Clear stack_next and
2110
        is_on_stack fields.
2111
 
2112
        PR 7091
2113
        * output.cc (Output_section::find_starting_output_address): Rename
2114
        from starting_output_address; add PADDR parameter; change return
2115
        type.
2116
        * output.h (class Output_section): Declare
2117
        find_starting_output_address instead of starting_output_address.
2118
        * object.cc (Sized_relobj::do_finalize_local_symbols): Handle a
2119
        section symbol for which we can't find a merge section.
2120
 
2121
        PR 9836
2122
        * symtab.cc (Symbol_table::add_from_object): If the visibility is
2123
        hidden or internal, force the symbol to be local.
2124
        * resolve.cc (Symbol::override_visibility): Define.
2125
        (Symbol::override_base): Use override_visibility.
2126
        (Symbol_table::resolve): Likewise.
2127
        (Symbol::override_base_with_special): Likewise.
2128
        (Symbol_table::override_with_special): If the visibility is hidden
2129
        or internal, force the symbol to be local.
2130
        * symtab.h (class Symbol): Add set_visibility and
2131
        override_visibility.
2132
        * testsuite/ver_test_1.sh: New file.
2133
        * testsuite/Makefile.am (check_SCRIPTS): Add ver_test_1.sh.
2134
        (check_DATA): Add ver_test_1.syms.
2135
        (ver_test_1.syms): New target.
2136
        * testsuite/Makefile.in: Rebuild.
2137
 
2138
2009-02-25  Cary Coutant  
2139
 
2140
        * layout.cc (Layout::choose_output_section): Don't rename sections
2141
        when using a linker script that has a SECTIONS clause.
2142
        * Makefile.in: Regenerate.
2143
 
2144
        * testsuite/Makefile.am (script_test_5.sh): New test case.
2145
        * testsuite/Makefile.in: Regenerate.
2146
        * testsuite/script_test_5.cc: New file.
2147
        * testsuite/script_test_5.sh: New file.
2148
        * testsuite/script_test_5.t: New file.
2149
 
2150
2009-02-13  Rafael Avila de Espindola  
2151
 
2152
        * archive.cc (Archive::include_member): Update calls to add_symbols.
2153
        * dynobj.cc (Sized_dynobj::make_version_map): Add
2154
        the Layout argument.
2155
        * dynobj.h (do_add_symbols): Add the Layout argument.
2156
        * object.cc (Sized_relobj::do_add_symbols): Add the
2157
        Layout argument.
2158
        * object.h (Object::add_symbols): Add the Layout argument.
2159
        (Object::do_add_symbols): Add the Layout argument.
2160
        (Sized_relobj::do_add_symbols): Add the Layout argument.
2161
        * plugin.cc (Sized_pluginobj::do_add_symbols):
2162
        Unify the two versions.
2163
        (Add_plugin_symbols): Remove.
2164
        * plugin.h (Pluginobj::add_symbols, Pluginobj::do_add_symbols): Remove.
2165
        (Sized_pluginobj::do_add_symbols): Unify the two versions.
2166
        (Add_plugin_symbols): Remove.
2167
        * readsyms.cc (Read_symbols::do_read_symbols): Update call to
2168
        Add_symbols. Use Add_symbols instead of Add_plugin_symbols.
2169
        (Add_symbols::run): Make it work with Pulginobj.
2170
 
2171
2009-02-06  Ian Lance Taylor  
2172
 
2173
        * object.cc (Sized_relobj::do_layout): Make info message start
2174
        with lower case letter.
2175
 
2176
2009-02-06  Mikolaj Zalewski  
2177
 
2178
        * binary.cc: Fix file comment.
2179
 
2180
        * options.h (enum Incremental_disposition): Define.
2181
        (class General_options): Add new options: --incremental,
2182
        --incremental_changed, --incremental_unchanged,
2183
        --incremental_unknown.  Add incremental_disposition_ and
2184
        implicit_incremental_ fields.
2185
        (General_options::incremental_disposition): New function.
2186
        (class Position_dependent_options): Add incremental_disposition
2187
        option.
2188
        (Position_dependent_options::copy_from_options): Set incremental
2189
        dispositions.
2190
        * options.cc (General_options::parse_incremental_changed): New
2191
        function.
2192
        (General_options::parse_incremental_unchanged): New function.
2193
        (General_options::parse_incremental_unknown): New function.
2194
        (General_options::General_options): Initialize new fields
2195
        incremental_disposition_ and implicit_incremental_.
2196
        (General_options::finalize): Check for uasge of --incremental-*
2197
        without --incremental.
2198
 
2199
2009-02-06  Chris Demetriou  
2200
 
2201
        * gold.h (gold_undefined_symbol): Change to take only a Symbol
2202
        pointer and to report location as the file name associated with
2203
        the symbol.
2204
        (gold_undefined_symbol_at_location): New function to replace the
2205
        old gold_undefined_symbol functionality.
2206
        * target-reloc.h (relocate_section): Update to use
2207
        gold_undefined_symbol_at_location.
2208
        * symtab.cc (Symbol_table::warn_about_undefined_dynobj_symbol):
2209
        Call gold_undefined_symbol function rather than gold_error.
2210
        * errors.h (Errors::undefined_symbol): Take location as a
2211
        string, rather than calculating it from a relocation.
2212
        * errors.cc (Errors::fatal): Print "fatal error:" before the
2213
        formatted message.
2214
        (Errors::error, Errors::error_at_location): Print "error: "
2215
        before the formatted message.
2216
        (Errors::undefined_symbol): Take location as a string, rather
2217
        than calculating it from a relocation.
2218
        (gold_undefined_symbol_at_location): New function akin to
2219
        old gold_undefined_symbol, calculates location from relocation.
2220
        (gold_undefined_symbol): Change to take only a Symbol pointer
2221
        and to report location as the file name associated with the symbol.
2222
        * testsuite/debug_msg.sh: Update for changed error messages.
2223
        * testsuite/undef_symbol.sh: Likewise.
2224
 
2225
2009-02-04  Duncan Sands  
2226
 
2227
        PR 9812
2228
        * reduced_debug_output.h
2229
        (Output_reduced_debug_abbrev_section::failed): Use format for
2230
        gold_warning.
2231
        (Output_reduced_debug_info_section::faild): Likewise.
2232
 
2233
2009-01-31  Mikolaj Zalewski  
2234
 
2235
        * script.cc (Lazy_demangler): New class.
2236
        (Version_script_info::get_symbol_version_helper): Demangle a
2237
        symbol only once.
2238
 
2239
2009-01-29  Cary Coutant  
2240
 
2241
        * i386.cc (Target_i386::Relocate::relocate): Recognize non-PIC calls
2242
        to __tls_get_addr.
2243
        * x86_64.cc (Target_x86_64::Relocate::relocate): Likewise.
2244
 
2245
2009-01-28  Ian Lance Taylor  
2246
 
2247
        * version.cc (version_string): Bump to 1.9.
2248
 
2249
        * gold.h: Include  and .
2250
        * version.cc: Include .
2251
        * object.cc (Sized_relobj::do_layout): Initialize gc_sd to avoid a
2252
        warning.
2253
        * reduced_debug_output.cc (insert_into_vector): Rename from
2254
        Insert_into_vector; change all callers.  Use Swap_unaligned to
2255
        avoid aliasing issue; remove union since it is unnecessary.
2256
 
2257
2009-01-27  Sriraman Tallam  
2258
 
2259
        * Makefile.am (CCFILES): Add gc.cc.
2260
        (HFILES): Add gc.h.
2261
        * Makefile.in: Regenerate.
2262
        * gold.cc (Gc_runner): New class.
2263
        (queue_initial_tasks): Call garbage collection related tasks
2264
        when corresponding options are invoked.
2265
        (queue_middle_gc_tasks): New function.
2266
        (queue_middle_tasks): Reorder tasks to allow relocs to be read and
2267
        processed early before laying out sections during garbage collection.
2268
        * gold.h (queue_middle_gc_tasks): New function.
2269
        (is_prefix_of): Move from "layout.cc".
2270
        * i386.cc (Target_i386::gc_process_relocs): New function.
2271
        * layout.cc (is_prefix_of): Remove. Move to "gold.h"
2272
        * main.cc (main): Create object of class "Garbage_collection".
2273
        * object.cc (Relobj::copy_symbols_data): New function.
2274
        (Relobj::is_section_name_included): New function.
2275
        (Sized_relobj::do_layout): Allow this function to be called twice
2276
        during garbage collection and defer layout of section during the
2277
        first call.
2278
        * object.h (Relobj::get_symbols_data): New function.
2279
        (Relobj::is_section_name_included): New function.
2280
        (Relobj::copy_symbols_data): New function.
2281
        (Relobj::set_symbols_data): New function.
2282
        (Relobj::get_relocs_data): New function.
2283
        (Relobj::set_relocs_data): New function.
2284
        (Relobj::is_output_section_offset_invalid): New pure virtual function.
2285
        (Relobj::gc_process_relocs): New function.
2286
        (Relobj::do_gc_process_relocs): New pure virtual function.
2287
        (Relobj::sd_): New data member.
2288
        (Sized_relobj::is_output_section_offset_invalid): New function.
2289
        (Sized_relobj::do_gc_process_relocs): New function.
2290
        * options.h (General_options::gc_sections): Modify to not be a no-op.
2291
        (General_options::print_gc_sections): New option.
2292
        * plugin.cc (Plugin_finish::run): Remove function call to
2293
        Plugin_manager::layout_deferred_objects.  Move it to "gold.cc".
2294
        * powerpc.cc (Target_powerpc::gc_process_relocs): New function.
2295
        * reloc.cc (Read_relocs::run): Add task to process relocs and
2296
        determine unreferenced sections when doing garbage collection.
2297
        (Gc_process_relocs): New class.
2298
        (Sized_relobj::do_gc_process_relocs): New function.
2299
        (Sized_relobj::do_scan_relocs): Don't try to scan the relocs for
2300
        sections that are garbage collected.
2301
        * reloc.h (Gc_process_relocs): New class.
2302
        * sparc.cc (Target_sparc::gc_process_relocs): New function.
2303
        * symtab.cc (Symbol::should_add_dynsym_entry): Do not add entries for
2304
        symbols whose corresponding sections are garbage collected.
2305
        (Symbol_table::Symbol_table): Add new parameter for the garbage
2306
        collection object.
2307
        (Symbol_table::gc_mark_undef_symbols): New function.
2308
        (Symbol_table::gc_mark_symbol_for_shlib): New function.
2309
        (Symbol_table::gc_mark_dyn_syms): New function.
2310
        (Symbol_table::resolve): Do not treat symbols seen in dynamic objects
2311
        as garbage.
2312
        (Symbol_table::add_from_object): Likewise.
2313
        (Symbol_table::add_from_relobj): When building shared objects, do not
2314
        treat externally visible symbols as garbage.
2315
        (Symbol_table::sized_finalize_symbol): Do not check dynamic symbol
2316
        table information for static and relocatable links.
2317
        * symtab.h (Symbol_table::set_gc): New function.
2318
        (Symbol_table::gc): New function.
2319
        (Symbol_table::gc_mark_undef_symbols): New function.
2320
        (Symbol_table::gc_mark_symbol_for_shlib): New function.
2321
        (Symbol_table::gc_mark_dyn_syms): New function.
2322
        (Symbol_table::gc_): New data member.
2323
        * target.h (Sized_target::gc_process_relocs): New pure virtual
2324
        function.
2325
        * x86_64.cc (Target_x86_64::gc_process_relocs): New function.
2326
        * testsuite/testfile.cc (Target_test::gc_process_relocs): New function.
2327
 
2328
2009-01-20  Chris Faylor 
2329
 
2330
        * options.h (General_options::gc_sections): Define as a no-op for now.
2331
        (General_options::no_keep_memory): Ditto.
2332
        (General_options::Bshareable): Define.
2333
        * options.cc (General_options::finalize): Honor -Bshareable.
2334
 
2335
2009-01-20  Andreas Schwab  
2336
 
2337
        * powerpc.cc (Powerpc_relocate_functions::rel16_ha): Don't try to
2338
        read the value in the contents, since we don't use it.  Use the
2339
        template endianness when writing.
2340
        (Relocate::relocate): Use it for R_PPC_REL16_HA.
2341
 
2342
2009-01-19  Andreas Schwab  
2343
 
2344
        * configure.tgt (powerpc64-*): Fix targ_obj.
2345
 
2346
2009-01-15  Ian Lance Taylor  
2347
 
2348
        * object.cc (Sized_relobj::write_local_symbols): Don't write out
2349
        local symbols when stripping all symbols.
2350
 
2351
2009-01-14  Cary Coutant  
2352
 
2353
        * output.cc (Output_reloc): Add explicit instantiations.
2354
 
2355
2009-01-14  Cary Coutant  
2356
 
2357
        * archive.cc (Archive::get_elf_object_for_member): Remove call
2358
        to File_read::claim_for_plugin.
2359
        * descriptors.cc (Descriptors::open): Remove reference to
2360
        is_claimed.
2361
        (Descriptors::claim_for_plugin): Remove.
2362
        * descriptors.h (Descriptors::claim_for_plugin): Remove.
2363
        (Descriptors::is_claimed): Remove.
2364
        (claim_descriptor_for_plugin): Remove.
2365
        * fileread.cc (File_read::claim_for_plugin): Remove.
2366
        * fileread.h (File_read::claim_for_plugin): Remove.
2367
        (File_read::descriptor): Reopen descriptor if necessary.
2368
        * plugin.cc  (Plugin::load): Add two new APIs to transfer vector.
2369
        (Plugin_manager::all_symbols_read): Add task parameter. Change
2370
        all callers.
2371
        (Plugin_manager::get_input_file): New function.
2372
        (Plugin_manager::release_input_file): New function.
2373
        (Pluginobj::Pluginobj): Add filesize parameter and initialize
2374
        corresponding data member.
2375
        (Sized_pluginobj::Sized_pluginobj): Add filesize parameter
2376
        and pass to base constructor. Change all callers.
2377
        (get_input_file, release_input_file): New functions.
2378
        (make_sized_plugin_object): Add filesize parameter. Change all callers.
2379
        * plugin.h (Plugin_manager::Plugin_manager): Initialize task_ member.
2380
        (Plugin_manager::all_symbols_read): Add task parameter.
2381
        (Plugin_manager::get_input_file): New function.
2382
        (Plugin_manager::release_input_file): New function.
2383
        (Plugin_manager::task_): New data member.
2384
        (Pluginobj::Pluginobj): Add filesize parameter.
2385
        (Pluginobj::filename): New function.
2386
        (Pluginobj::descriptor): New function.
2387
        (Pluginobj::filesize): New function.
2388
        (Pluginobj::filesize_): New data member.
2389
        (Sized_pluginobj::Sized_pluginobj): Add filesize parameter.
2390
        * readsyms.cc (Read_symbols::do_read_symbols): Remove call to
2391
        File_read::claim_for_plugin; use Object::unlock to unlock the file.
2392
 
2393
        * testsuite/Makefile.am (plugin_test_4): New test case for plugins
2394
        with archive libraries.
2395
        * testsuite/Makefile.in: Regenerate.
2396
        * testsuite/plugin_test.c (struct sym_info): New type.
2397
        (get_input_file, release_input_file): New static variables.
2398
        (onload): Capture new transfer vector entries.
2399
        (claim_file_hook): Stop reading at end of file according to filesize.
2400
        Factor out parsing of readelf output into separate function.
2401
        (all_symbols_read_hook): Exercise get_input_file and release_input_file
2402
        APIs and get the source file name from the symbol table.  Convert
2403
        source file name to corresponding object file name.  Print info
2404
        message when adding new input files.
2405
        (parse_readelf_line): New function.
2406
        * testsuite/plugin_test_1.sh: Add checks for new info messages.
2407
        * testsuite/plugin_test_2.sh: Likewise.
2408
        * testsuite/plugin_test_3.sh: Likewise.
2409
        * testsuite/plugin_test_4.sh: New test case.
2410
 
2411
2009-01-07  Ian Lance Taylor  
2412
 
2413
        * version.cc (version_string): Bump to 1.8.
2414
 
2415
2008-12-23  Cary Coutant  
2416
 
2417
        * gold.cc (gold_exit): Call plugin cleanup handlers on exit.
2418
        * plugin.cc (Plugin_manager::finish): Rename as
2419
        layout_deferred_objects.  Move cleanup to separate function.
2420
        (Plugin_manager::cleanup): New function.
2421
        (Plugin_finish::run): Call layout_deferred_objects and cleanup
2422
        separately.
2423
        * plugin.h (Plugin_manager::finish): Rename as
2424
        layout_deferred_objects.
2425
        (Plugin_manager::cleanup): New function.
2426
        (Plugin_manager::cleanup_done): New field.
2427
 
2428
2008-12-23  Cary Coutant  
2429
 
2430
        * plugin.cc (is_visible_from_outside): New function.
2431
        (Pluginobj::get_symbol_resolution_info): Call is_visible_from_outside
2432
        so we don't return "IR only" status for exported symbols or -r links.
2433
 
2434
        * testsuite/Makefile.am (plugin_test_3): New test case.
2435
        * testsuite/Makefile.in: Regenerate.
2436
        * testsuite/plugin_test_3.sh: New file.
2437
 
2438
2008-12-22  Cary Coutant  
2439
 
2440
        * object.cc (Sized_relobj::layout_section): New function.
2441
        (Sized_relobj::do_layout): Defer layout of input sections until after
2442
        plugin has provided replacement files.
2443
        (Sized_relobj::do_layout_deferred_sections): New function.
2444
        * object.h (Relobj::set_section_offset): Remove virtual keyword.
2445
        (Relobj::layout_deferred_sections): New function.
2446
        (Relobj::do_layout_deferred_sections): New function.
2447
        (Sized_relobj::do_layout_deferred_sections): New function.
2448
        (Sized_relobj::layout_section): New function.
2449
        (Sized_relobj::Deferred_layout): New structure.
2450
        (Sized_relobj::deferred_layout_): New field.
2451
        * plugin.cc (Plugin_manager::finish): Renamed, was cleanup.
2452
        Change all callers.  Layout deferred sections.
2453
        (class Plugin_finish): Renamed, was Plugin_cleanup.  Change all
2454
        references.
2455
        (Plugin_hook::run): Move code from do_plugin_hook inline.
2456
        (Plugin_hook::do_plugin_hook): Remove.
2457
        * plugin.h (Plugin_manager::Plugin_manager): Add missing initializers.
2458
        (Plugin_manager::finish): Renamed, was cleanup.
2459
        (Plugin_manager::should_defer_layout): New function.
2460
        (Plugin_manager::add_deferred_layout_object): New function.
2461
        (Plugin_manager::Deferred_layout_list): New type.
2462
        (Plugin_manager::deferred_layout_objects_): New field.
2463
        (Plugin_hook::do_plugin_hook): Remove.
2464
 
2465
2008-12-17  Ian Lance Taylor  
2466
 
2467
        * options.h (class General_options): Add --no case for
2468
        --export-dynamic.
2469
 
2470
2008-12-16  Cary Coutant  
2471
 
2472
        * plugin.cc (Plugin::load): Move LDPT_MESSAGE to front of transfer
2473
        vector.
2474
        (Plugin_manager::claim_file): Create plugin object even if
2475
        plugin did not call the add_symbols callback.
2476
        (Plugin_obj::get_symbol_resolution_info): Guard against plugin
2477
        asking for more symbols than were added.
2478
        * testsuite/Makefile.am (plugin_test_1): Add test case with
2479
        no global symbols.
2480
        (empty.syms): New target.
2481
        * testsuite/Makefile.in: Regenerate.
2482
        * testsuite/plugin_test.c (claim_file_hook): Add new debug
2483
        message. Don't call add_symbols if no globals.
2484
        (all_symbols_read_hook): Don't provide replacement for empty
2485
        claimed file.
2486
 
2487
2008-12-12  Ian Lance Taylor  
2488
 
2489
        * target-reloc.h (Default_scan_relocatable_relocs): Only discard
2490
        r_type == 0 for a local symbol with r_sym == 0.
2491
        (scan_relocatable_relocs): Pass r_sym to
2492
        local_non_section_strategy.
2493
        * reloc.cc (Emit_relocs_strategy::local_non_section_strategy): Add
2494
        r_sym parameter.
2495
 
2496
        * configure.ac: Update test for TLS descriptors: they are
2497
        supported as of glibc 2.9.
2498
        * configure: Rebuild.
2499
 
2500
2008-12-11  Ian Lance Taylor  
2501
 
2502
        PR 7091
2503
        * target-reloc.h (Default_scan_relocatable_relocs): For each
2504
        function, map r_type == 0 to RELOC_DISCARD.
2505
 
2506
2008-12-10  Cary Coutant  
2507
 
2508
        * layout.cc (Layout::add_comdat): Allow COMDAT group from a replacement
2509
        object to override a kept COMDAT group from a plugin object.
2510
 
2511
2008-12-09  Ian Lance Taylor  
2512
 
2513
        PR 7088
2514
        * yyscript.y (file_cmd): Handle INPUT.
2515
 
2516
        * testsuite/initpri1.c: Change all declarations to be full
2517
        prototypes by adding void, to avoid compiler warnings.
2518
 
2519
2008-12-05  Rafael Avila de Espindola  
2520
 
2521
        * options.cc (General_options::parse_plugin_opt): New.
2522
        (General_options::add_plugin): The argument now is just the filename.
2523
        (General_options::add_plugin_option): New.
2524
        * options.h (plugin_opt): New.
2525
        (add_plugin): Change argument name.
2526
        (add_plugin_option): New.
2527
        * plugin.cc (Plugin::load): Don't parse the plugin option.
2528
        * plugin.h (Plugin::Plugin): Rename argument. Init filename_.
2529
        (Plugin::add_option): New.
2530
        (Plugin::args_): Change type.
2531
        (Plugin::filename_): New.
2532
        (Plugin_manager::add_plugin_option): New.
2533
        * testsuite/Makefile.am (plugin_test_1): Use new syntax.
2534
        * testsuite/Makefile.in: Regenerate.
2535
 
2536
2008-12-05  Cary Coutant  
2537
 
2538
        * layout.cc (Layout::include_section): Check for SHF_EXCLUDE.
2539
        Handle --strip-lto-sections option.
2540
        * options.h (strip_lto_sections): New option.
2541
 
2542
2008-12-01  Cary Coutant  
2543
 
2544
        * plugin.cc (ld_plugin_message): Change format parameter to const.
2545
        Fix mismatch between new[] and delete.
2546
 
2547
2008-11-14  Cary Coutant  
2548
 
2549
        * reloc.cc (Sized_relobj::do_read_relocs): Use constant invalid_address
2550
        instead of -1U.
2551
 
2552
2008-11-05  Craig Silverstein  
2553
 
2554
        * options.cc (General_options::parse_dynamic_list): New function.
2555
        * options.h (General_options): New flags dynamic_list,
2556
        dynamic_list_data, dynamic_list_cpp_new, and
2557
        dynamic_list_cpp_typeinfo.  New variable dynamic_list_.
2558
        (General_options::in_dynamic_list): New function.
2559
        * script.cc (Lex::Mode): New enum DYNAMIC_LIST.
2560
        (Lex::can_start_name): Add support for DYNAMIC_LIST mode.
2561
        (Lex::can_continue_name): Likewise.
2562
        (yylex): Likewise.
2563
        (read_script_file): New parameter script_options.
2564
        (read_dynamic_list): New function.
2565
        (Script_options::define_dynamic_list): New function.
2566
        (dynamic_list_keyword_parsecodes): New variable.
2567
        (dynamic_list_keywords): New variable.
2568
        * script.h (Script_options::define_dynamic_list): New function
2569
        prototype.
2570
        (read_dynamic_list): New function prototype.
2571
        * symtab.cc (strprefix): New macro.
2572
        (Symbol::should_add_dynsym_entry): Support dynamic_list,
2573
        dynamic_list_data, dynamic_list_cpp_new, and
2574
        dynamic_list_cpp_typeinfo.
2575
        * yyscript.y (PARSING_DYNAMIC_LIST): New token.
2576
        (dynamic_list_expr): New rule.
2577
        (dynamic_list_nodes): Likewise.
2578
        (dynamic_list_node): Likewise.
2579
        * testsuite/Makefile.am (dynamic_list): New test.
2580
        * testsuite/Makefile.in: Regenerated.
2581
        * testsuite/dynamic_list.t: New file.
2582
        * testsuite/dynamic_list.sh: New file.
2583
 
2584
2008-11-05  Craig Silverstein  
2585
 
2586
        * testsuite/tls_test_c.c: Add prototype for t11 and t11_last.
2587
        * testsuite/tls_test_c.c (t11): Add explicit "void" to prototype.
2588
        (t11_last): Likewise.
2589
        * testsuite/ver_test_6.c (main): Likewise.
2590
 
2591
2008-10-07  Cary Coutant  
2592
 
2593
        * options.c (General_options::finalize): Add check for -static and
2594
        -shared.
2595
        * gold.cc (queue_middle_tasks): Assert that list of dynamic objects
2596
        is not empty.
2597
 
2598
2008-10-02  Cary Coutant  
2599
 
2600
        * plugin.cc (make_sized_plugin_object): Fix conditional
2601
        compilation to work when not all targets are enabled.
2602
 
2603
2008-09-29  Cary Coutant  
2604
 
2605
        * archive.cc (Archive::get_file_and_offset): Use filename instead
2606
        of name to get library path.
2607
        (Archive::include_member): Unlock external member of a thin archive.
2608
 
2609
        * testsuite/Makefile.am (TEST_AR): New variable.
2610
        (thin_archive_test_1): New test.
2611
        (thin_archive_test_2): New test.
2612
        * testsuite/Makefile.in: Regenerate.
2613
        * testsuite/thin_archive_main.cc: New file.
2614
        * testsuite/thin_archive_test_1.cc: New file.
2615
        * testsuite/thin_archive_test_2.cc: New file.
2616
        * testsuite/thin_archive_test_3.cc: New file.
2617
        * testsuite/thin_archive_test_4.cc: New file.
2618
 
2619
2008-09-29  Cary Coutant  
2620
 
2621
        * mapfile.cc (Mapfile::print_input_section): Change -1U to -1ULL.
2622
        * object.cc (Sized_relobj::do_layout): Use constant invalid_address
2623
        instead of -1U.
2624
        (Sized_relobj::do_finalize_local_symbols): Likewise.
2625
        (Sized_relobj::map_to_kept_section): Likewise.
2626
        * object.h (Sized_relobj::invalid_address): New constant.
2627
        (Sized_relobj::do_output_section_offset): Check for invalid_address
2628
        and return -1ULL.
2629
        * output.cc (Output_reloc::local_section_offset): Use constant
2630
        invalid_address instead of -1U.
2631
        (Output_reloc::get_address): Likewise.
2632
        (Output_section::output_address): Change -1U to -1ULL.
2633
        * output.h (Output_reloc::invalid_address): New constant.
2634
        * reloc.cc (Sized_relobj::write_sections): Use constant
2635
        invalid_address instead of -1U.
2636
        (Sized_relobj::relocate_sections): Likewise.
2637
        * symtab.cc (Symbol_table::sized_finalize_symbol): Handle symbol
2638
        values for merge sections.
2639
        * target-reloc.h (relocate_for_relocatable): Use constant
2640
        invalid_address instead of -1U.
2641
 
2642
2008-09-19  Cary Coutant  
2643
 
2644
        Add plugin functionality for link-time optimization (LTO).
2645
        * configure.ac (plugins): Add --enable-plugins option.
2646
        * configure: Regenerate.
2647
        * config.in: Regenerate.
2648
        * Makefile.am (LIBDL): New variable.
2649
        (CCFILES): Add plugin.cc.
2650
        (HFILES): Add plugin.h.
2651
        (ldadd_var): Add LIBDL.
2652
        * Makefile.in: Regenerate.
2653
 
2654
        * archive.cc: Include "plugin.h".
2655
        (Archive::setup): Don't preread archive symbols when using a plugin.
2656
        (Archive::get_file_and_offset): Add memsize parameter.  Change callers.
2657
        (Archive::get_elf_object_for_member): Call plugin hooks for claiming
2658
        files.
2659
        (Archive::include_member): Add symbols from plugin objects.
2660
        * archive.h (Archive::get_file_and_offset): Add memsize parameter.
2661
        * descriptors.cc (Descriptors::open): Check for file descriptors
2662
        abandoned by plugins.
2663
        (Descriptors::claim_for_plugin): New function.
2664
        * descriptors.h (Descriptors::claim_for_plugin): New function.
2665
        (Open_descriptor::is_claimed): New field.
2666
        (claim_descriptor_for_plugin): New function.
2667
        * fileread.cc (File_read::claim_for_plugin): New function.
2668
        * fileread.h (File_read::claim_for_plugin): New function.
2669
        (File_read::descriptor): New function.
2670
        * gold.cc: Include "plugin.h".
2671
        (queue_initial_tasks): Add task to call plugin hooks for generating
2672
        new object files.
2673
        * main.cc: Include "plugin.h".
2674
        (main): Load plugin libraries.
2675
        * object.h (Pluginobj): Declare.
2676
        (Object::pluginobj): New function.
2677
        (Object::do_pluginobj): New function.
2678
        (Object::set_target): New function.
2679
        * options.cc: Include "plugin.h".
2680
        (General_options::parse_plugin): New function.
2681
        (General_options::General_options): Initialize plugins_ field.
2682
        (General_options::add_plugin): New function.
2683
        * options.h (Plugin_manager): Declare.
2684
        (General_options): Add --plugin option.
2685
        (General_options::has_plugins): New function.
2686
        (General_options::plugins): New function.
2687
        (General_options::add_plugin): New function.
2688
        (General_options::plugins_): New field.
2689
        * plugin.cc: New file.
2690
        * plugin.h: New file.
2691
        * readsyms.cc: Include "plugin.h".
2692
        (Read_symbols::do_read_symbols): Check for archive before checking
2693
        for ELF file.  Call plugin hooks to claim files.
2694
        * resolve.cc (Symbol_table::resolve): Record when symbol is referenced
2695
        from a real object file; force override when processing replacement
2696
        files.
2697
        * symtab.cc (Symbol::init_fields): Initialize in_real_elf_ field.
2698
        (Symbol::init_base_object): Likewise.
2699
        (Symbol::init_base_output_data): Likewise.
2700
        (Symbol::init_base_output_segment): Likewise.
2701
        (Symbol::init_base_constant): Likewise.
2702
        (Symbol::init_base_undefined): Likewise.
2703
        (Symbol::output_section): Assert that object is not a plugin.
2704
        (Symbol_table::add_from_pluginobj): New function.
2705
        (Symbol_table::sized_finalize_symbol): Treat symbols from plugins as
2706
        undefined.
2707
        (Symbol_table::sized_write_globals): Likewise.
2708
        (Symbol_table::add_from_pluginobj): Instantiate template.
2709
        * symtab.h (Sized_pluginobj): Declare.
2710
        (Symbol::in_real_elf): New function.
2711
        (Symbol::set_in_real_elf): New function.
2712
        (Symbol::in_real_elf_): New field.
2713
        (Symbol_table::add_from_pluginobj): New function.
2714
 
2715
        * testsuite/Makefile.am (AM_CFLAGS): New variable.
2716
        (LIBDL): New variable.
2717
        (LDADD): Add LIBDL.
2718
        (check_PROGRAMS): Add plugin_test_1 and plugin_test_2.
2719
        (check_SCRIPTS): Add plugin_test_1.sh and plugin_test_2.sh.
2720
        (check_DATA): Add plugin_test_1.err and plugin_test_2.err.
2721
        (MOSTLYCLEANFILES): Likewise.
2722
        * testsuite/Makefile.in: Regenerate.
2723
        * testsuite/plugin_test.c: New file.
2724
        * testsuite/plugin_test_1.sh: New file.
2725
        * testsuite/plugin_test_2.sh: New file.
2726
 
2727
2008-09-16  Ian Lance Taylor  
2728
 
2729
        * target-reloc.h (relocate_section): Check whether a symbol is
2730
        defined by the ABI before reporting an undefined symbol error.
2731
        * target.h (Target::is_defined_by_abi): Make parameter const.
2732
        (Target::do_is_defined_by_abi): Likewise.
2733
        * i386.cc (Target_i386::do_is_defined_by_abi): Likewise.
2734
        * powerpc.cc (Target_powerpc::do_is_defined_by_abi): Likewise.
2735
        * sparc.cc (Target_sparc::do_is_defined_by_abi): Likewise.
2736
        * x86_64.cc (Target_x86_64::do_is_defined_by_abi): Likewise.
2737
        * testsuite/Makefile.am (tls_test_shared.so): Add -Wl,-z,defs.
2738
        * testsuite/Makefile.in: Rebuild.
2739
 
2740
        * fileread.cc (make_view): Add casts to avoid warning.
2741
 
2742
2008-09-16  Alexandre Oliva  
2743
 
2744
        * i386.cc (Target_i386::define_tls_base_symbol): Update comments.
2745
        * x86_64.cc (Target_x86_64::define_tls_base_symbol): Likewise.
2746
 
2747
2008-09-16  Alexandre Oliva  
2748
 
2749
        * options.h (General_options::output_is_executable): New.
2750
        (General_options::output_is_pie): New.
2751
        * i386.cc (Target_i386::define_tls_base_symbol): Use SEGMENT_START
2752
        for shared libraries.
2753
        * x86_64.cc (Target_x86_64::define_tls_base_symbol): Likewise.
2754
 
2755
2008-09-11  Chris Demetriou  
2756
 
2757
        * options.h (origin): New -z option.
2758
        * layout.cc (Layout:finish_dynamic_section): If "-z origin"
2759
        is specified, set DF_ORIGIN in DT_FLAGS and set DF_1_ORIGIN
2760
        in DT_FLAGS_1.
2761
 
2762
2008-09-05  Cary Coutant  
2763
 
2764
        * fileread.cc (File_read::make_view): Add check for attempt to map
2765
        beyond end of file.
2766
 
2767
2008-09-05  Cary Coutant  
2768
 
2769
        * symtab.cc (Symbol_table::add_from_dynobj): Fix typos in
2770
        explicit instantiations.
2771
 
2772
2008-08-28  Kris Van Hees  
2773
 
2774
        PR gold/6858
2775
        * options.cc (General_options::finalize): Allow undefined symbols
2776
        in shlibs if linking -shared.
2777
 
2778
        PR gold/6859
2779
        * symtab.cc (Symbol::init_base_undefined): Mark explicitly undefined
2780
        symbols as not needing a dynsym entry.
2781
 
2782
2008-08-20  Craig Silverstein  
2783
 
2784
        * fileread.cc (File_read::open): Do not lock the file unless it
2785
        was successfully opened.
2786
 
2787
2008-08-14  Cary Coutant  
2788
 
2789
        * x86_64.cc (Target_x86_64::Relocate::relocat_tls):
2790
        Use addend for DTPOFF32, DTPOFF64, and TPOFF32 relocs.
2791
        * testsuite/tls_test.cc (struct int128): 128-bit struct
2792
        for testing TLS relocs with non-zero addend.
2793
        (v12): New TLS variable.
2794
        (t12): New test.
2795
        (t_last): Add check for v12.
2796
        * testsuite/tls_test.h (t12): New function.
2797
        * testsuite/tls_test_main.cc (thread_routine): Call new test.
2798
 
2799
2008-08-13  Ian Lance Taylor  
2800
 
2801
        * layout.cc (Layout::attach_allocated_section_to_segment): Don't
2802
        set tls_segment_ or relro_segment_.
2803
        (Layout::make_output_segment): Set tls_segment_ and relro_segment_
2804
        when appropriate.
2805
        * output.h (Output_section::clear_is_relro): New function.
2806
        * output.cc (Output_segment::add_output_section): Handle SHF_TLS
2807
        sections specially even when output_data_ is empty.
2808
        (Output_segment::maximum_alignment): When first section is relro,
2809
        only force alignment for PT_LOAD segments.
2810
        * script.cc (script_data_segment_align): New function.
2811
        (script_data_segment_relro_end): New function.
2812
        * script-c.h (script_data_segment_align): Declare.
2813
        (script_data_segment_relro_end): Declare.
2814
        * script-sections.h (class Script_sections): Declare
2815
        data_segment_align and data_segment_relro_end.  Add fields
2816
        segment_align_index_ and saw_relro_end_.
2817
        * script-sections.cc (class Sections_element): Add set_is_relro
2818
        virtual function.  Add new bool* parameter to place_orphan_here.
2819
        Add get_output_section virtual function.
2820
        (class Output_section_definition): Add set_is_relro.  Add new
2821
        bool* parameter to place_orphan_here.  Add get_output_section.
2822
        Add is_relro_ field.
2823
        (Output_section_definition::Output_section_definition): Initialize
2824
        evaluated_address_, evaluated_load_address, evaluated_addralign_,
2825
        and is_relro_ fields.
2826
        (Output_section_definition::place_orphan_here): Add is_relro
2827
        parameter.
2828
        (Output_section_definition::set_section_addresses): Set relro for
2829
        output section.
2830
        (Output_section_definition::alternate_constraint): Likewise.
2831
        (class Orphan_output_section): Add new bool* parameter to
2832
        place_orphan_here.  Add get_output_section.
2833
        (Orphan_output_section::place_orphan_here): Add is_relro
2834
        parameter.
2835
        (Script_sections::Script_sections): Initialize
2836
        data_segment_align_index_ and saw_relro_end_.
2837
        (Script_sections::data_segment_align): New function.
2838
        (Script_sections::data_segment_relro_end): New function.
2839
        (Script_sections::place_orphan): Set or clear is_relro.
2840
        (Script_sections::set_section_addresses): Force alignment of first
2841
        TLS section.
2842
        * yyscript.y (exp): Call script_data_segment_align and
2843
        script_data_segment_relro_end.
2844
        * testsuite/relro_script_test.t: New file.
2845
        * testsuite/relro_test.cc (using_script): Declare.
2846
        (t1, t2): Test using_script.
2847
        * testsuite/Makefile.am (check_PROGRAMS): Add relro_script_test.
2848
        (relro_script_test_SOURCES): Define.
2849
        (relro_script_test_DEPENDENCIES): Define.
2850
        (relro_script_test_LDFLAGS): Define.
2851
        (relro_script_test_LDADD): Define.
2852
        (relro_script_test.so): New target.
2853
        * testsuite/Makefile.in: Rebuild.
2854
 
2855
2008-08-06  Cary Coutant 
2856
 
2857
        * archive.cc (Archive::total_archives, Archive::total_members)
2858
        (Archive::total_members_loaded): New variables.
2859
        (Archive::setup): Add parameter.  Add option to preread
2860
        archive symbols.
2861
        (Archive::read_armap): Add counter.
2862
        (Archive::get_file_and_offset): New function.
2863
        (Archive::get_elf_object_for_member): New function.
2864
        (Archive::read_all_symbols): New function.
2865
        (Archive::read_symbols): New function.
2866
        (Archive::add_symbols): Add counters.
2867
        (Archive::include_all_members): Use armap to find members if it's
2868
        already built.
2869
        (Archive::include_member): Skip reading symbols if already read.
2870
        Factored code into Archive::get_file_and_offset and
2871
        Archive::get_elf_object_for_member.  Changed call to
2872
        Mapfile::report_include_archive_member.
2873
        (Archive::print_stats): New function.
2874
        * archive.h: Declare Object and Read_symbols_data classes.
2875
        (Archive::Archive): Add initializers for new members.
2876
        (Archive::setup): Add parameter.
2877
        (Archive::print_stats): New function.
2878
        (Archive::total_archives, Archive::total_members)
2879
        (Archive::total_members_loaded): New variables.
2880
        (Archive::get_file_and_offset): New function.
2881
        (Archive::get_elf_object_for_member): New function.
2882
        (Archive::read_all_symbols): New function.
2883
        (Archive::read_symbols): New function.
2884
        (Archive::Archive_member): New class.
2885
        (Archive::members_): New member.
2886
        (Archive::num_members_): New member.
2887
        * main.cc: Include archive.h.
2888
        (main): Call Archive::print_stats.
2889
        * mapfile.cc (Mapfile::report_include_archive_member): Delete
2890
        archive parameter; member_name is now the fully-decorated name.
2891
        * mapfile.h (Mapfile::report_include_archive_member): Likewise.
2892
        * options.h: (General_options): Add --preread-archive-symbols option.
2893
        * readsyms.cc (Read_symbols::do_read_symbols): Change call to
2894
        Archive::setup.
2895
 
2896
2008-08-04  Ian Lance Taylor  
2897
 
2898
        * symtab.h (Symbol::use_plt_offset): New function.
2899
        * i386.cc (Relocate::relocate): Call Symbol::use_plt_offset.
2900
        * powerpc.cc (Relocate::relocate): Likewise.
2901
        * sparc.cc (Relocate::relocate): Likewise.
2902
        * x86_64.cc (Relocate::relocate): Likewise.
2903
        * testsuite/weak_plt.sh: New test.
2904
        * testsuite/weak_plt_main.cc: New test.
2905
        * testsuite/weak_plt_shared.cc: New test.
2906
        * testsuite/Makefile.am (check_SCRIPTS): Add weak_plt.sh.
2907
        (check_PROGRAMS): Add weak_plt.
2908
        (check_DATA): Add weak_plt_shared.so.
2909
        (weak_plt_main_pic.o, weak_plt): New targets.
2910
        (weak_plt_shared_pic.o, weak_plt_shared.so): New targets.
2911
        * testsuite/Makefile.in: Rebuild.
2912
 
2913
        * testsuite/Makefile.am (weak_alias_test_1.so): Depend upon
2914
        gcctestdir/ld.
2915
        (weak_alias_test_2.so, weak_alias_test_4.so): Likewise.
2916
        * testsuite/Makefile.in: Rebuild.
2917
 
2918
2008-08-04  Alan Modra  
2919
 
2920
        * Makefile.am (POTFILES.in): Set LC_ALL=C.
2921
        * Makefile.in: Regenerate.
2922
        * po/POTFILES.in: Regenerate.
2923
 
2924
2008-07-29  Ian Lance Taylor  
2925
 
2926
        * script.cc (Script_options::finalize_symbols): Finalize SECTIONS
2927
        symbols before other symbols.
2928
        * testsuite/script_test_2.cc (test_addr): Declare.
2929
        (test_addr_alias): Declare.
2930
        (main): Check that test_addr and test_addr_alias have the right
2931
        values.
2932
        * testsuite/script_test_2.t: Define test_addr_alias and
2933
        test_addr.
2934
 
2935
2008-07-24  Ian Lance Taylor  
2936
 
2937
        PR 5990
2938
        * descriptors.cc: New file.
2939
        * descriptors.h: New file.
2940
        * gold-threads.h (class Hold_optional_lock): New class.
2941
        * fileread.cc: Include "descriptors.h".
2942
        (File_read::~File_read): Release descriptor rather than closing
2943
        it.
2944
        (File_read::open) [file]: Call open_descriptor rather than open.
2945
        Set is_descriptor_opened_.
2946
        (File_read::open) [memory]: Assert that descriptor is not open.
2947
        (File_read::reopen_descriptor): New function.
2948
        (File_read::release): Release descriptor.
2949
        (File_read::do_read): Make non-const.  Reopen descriptor.
2950
        (File_read::read): Make non-const.
2951
        (File_read::make_view): Reopen descriptor.
2952
        (File_read::do_readv): Likewise.
2953
        * fileread.h (class File_read): Add is_descriptor_opened_ field.
2954
        Update declarations.
2955
        * layout.cc: Include "descriptors.h".
2956
        (Layout::create_build_id): Use open_descriptor rather than open.
2957
        * output.cc: Include "descriptors.h".
2958
        (Output_file::open): Use open_descriptor rather than open.
2959
        * archive.cc (Archive::const_iterator): Change Archive to be
2960
        non-const.
2961
        (Archive::begin, Archive::end): Make non-const.
2962
        (Archive::count_members): Likewise.
2963
        * archive.h (class Archive): Update declarations.
2964
        * object.h (Object::read): Make non-const.
2965
        * Makefile.am (CCFILES): Add descriptors.cc.
2966
        (HFILES): Add descriptors.h.
2967
        * Makefile.in: Rebuild.
2968
 
2969
        PR 6716
2970
        * gold.h: Always include .  Add Solaris workarounds
2971
        following code in binutils/sysdep.h.
2972
 
2973
        PR 6048
2974
        * ehframe.cc (Eh_frame::add_ehframe_input_section): Check whether
2975
        this->eh_frame_hdr_ is NULL before using it.
2976
 
2977
        * dynobj.cc (Versions::Versions): Update comment.
2978
 
2979
        * dynobj.cc (Versions::Versions): If there is an soname, use it as
2980
        the base version name.
2981
 
2982
        * stringpool.cc (Stringpool_template::add_with_length): Set key to
2983
        array size plus one.
2984
        (Stringpool_template::set_string_offsets): Subtract one from key
2985
        before using it as an array index.
2986
        (Stringpool_template::get_offset_with_length): Likewise.
2987
        (Stringpool_template::write_to_buffer): Likewise.
2988
        * stringpool.h (Stringpool_template::get_offset_from_key):
2989
        Likewise.
2990
 
2991
2008-07-23  Ian Lance Taylor  
2992
 
2993
        PR 6658
2994
        * object.h (Merged_symbol_value::value): Do our best to handle a
2995
        negative addend.
2996
 
2997
        PR 6647
2998
        * script.cc (Version_script_info::get_versions): Don't add empty
2999
        version tag to return value.
3000
        (Version_script_info::get_symbol_version_helper): Change return
3001
        type to bool.  Add pversion parameter.  Change all callers.
3002
        (script_register_vers_node): Don't require a non-NULL tag.
3003
        * script.h (class Version_script_info): Update declarations.
3004
        (Version_script_info::get_symbol_version): Change return type to
3005
        bool.  Add version parameter.  Change all callers.
3006
        * symtab.cc (Sized_symbol::add_from_relobj): Rework version
3007
        handling.  Handle an empty version from a version script.
3008
        (Symbol_table::define_special_symbol): Likewise.
3009
        * testsuite/ver_test_10.script: New file.
3010
        * testsuite/ver_test_10.sh: New file.
3011
        * testsuite/Makefile.am (check_SCRIPTS): Add ver_test_10.sh.
3012
        (check_DATA): Add ver_test_10.syms.
3013
        (ver_test_10.syms, ver_test_10.so): New target.
3014
        * testsuite/Makefile.in: Rebuild.
3015
 
3016
2008-07-23  Simon Baldwin  
3017
 
3018
        * symtab.cc (Symbol_table::sized_write_symbol): Only set st_size
3019
        to zero for undefined symbols from dynamic libraries.
3020
 
3021
2008-07-23  Ian Lance Taylor  
3022
 
3023
        * symtab.cc (Symbol_table::resolve): Remove version parameter.
3024
        Change all callers.
3025
        * symtab.h (class Symbol_table): Update declaration.
3026
        * testsuite/ver_test_9.cc: New file.
3027
        * testsuite/Makefile.am (check_PROGRAMS): Add ver_test_9.
3028
        (ver_test_9_SOURCES, ver_test_9_DEPENDENCIES): Define.
3029
        (ver_test_9_LDFLAGS, ver_test_9_LDADD): Define.
3030
        (ver_test_9.so, ver_test_9.o): New targets.
3031
        * testsuite/Makefile.in: Rebuild.
3032
 
3033
2008-07-22  Ian Lance Taylor  
3034
 
3035
        * options.h (class General_options): Define --check-sections.
3036
        * layout.cc (Layout::set_segment_offsets): Handle
3037
        --check-sections.
3038
 
3039
        * options.h (class General_options): Define -n/--nmagic and
3040
        -N/--omagic.
3041
        * options.cc (General_options::finalize): For -n/--nmagic or
3042
        -N/--omagic, set -static.
3043
        * layout.cc (Layout::attach_allocated_section_to_segment): If
3044
        -N/--omagic, don't put read-only and read-write sections in
3045
        different segments.
3046
        (Layout::find_first_load_seg): If -N/--omagic, don't insist on
3047
        finding a read-only segment.
3048
        (Layout::set_segment_offsets): If -N/--omagic or -n/--nmagic,
3049
        don't set the minimum segment alignment to the common page size,
3050
        and don't set the file offset to the address modulo the page size.
3051
        * script-sections.cc (Script_sections::create_segments): If
3052
        -n/--omagic, don't put read-only and read-write sections in
3053
        different segments.
3054
 
3055
        * cref.cc: New file.
3056
        * cref.h: New file.
3057
        * options.h (class General_options): Add --print-symbol-counts.
3058
        * main.cc (main): Issue defined symbol report if requested.
3059
        * archive.cc (Archive::interpret_header): Make into a const member
3060
        function.
3061
        (Archive::add_symbols): Call Input_objects::archive_start and
3062
        archive_stop.
3063
        (Archive::const_iterator): Define new class.
3064
        (Archive::begin, Archive::end): New functions.
3065
        (Archive::include_all_members): Rewrite to use iterator.
3066
        (Archive::count_members): New function.
3067
        * archive.h (class Archive): Update declarations.
3068
        (Archive::filename): New function.
3069
        * object.cc: Include "cref.h".
3070
        (Sized_relobj::Sized_relobj): Initialize defined_count_.
3071
        (Sized_relobj::do_get_global_symbol_counts): New function.
3072
        (Input_objects::add_object): Add object to cross-referencer.
3073
        (Input_objects::archive_start): New function.
3074
        (Input_objects::archive_stop): New function.
3075
        (Input_objects::print_symbol_counts): New function.
3076
        * object.h: Declare Cref and Archive.
3077
        (Object::get_global_symbol_counts): New function.
3078
        (Object::do_get_global_symbol_counts): New pure virtual function.
3079
        (class Sized_relobj): Add defined_count_ field.  Update
3080
        declarations.
3081
        (class Input_objects): Add cref_ field.  Update constructor.
3082
        Update declarations.
3083
        * dynobj.cc (Sized_dynobj::Sized_dynobj): Initialize symbols_ and
3084
        defined_count_.
3085
        (Sized_dynobj::do_add_symbols): Allocate symbols_ if printing
3086
        symbol counts.
3087
        (Sized_dynobj::do_get_global_symbol_counts): New function.
3088
        * dynobj.h (class Sized_dynobj): Add fields symbols_ and
3089
        defined_count_.  Update declarations.  Define Symbols typedef.
3090
        * symtab.cc (Symbol_table::add_from_relobj): Add defined
3091
        parameter.  Change all callers.
3092
        (Symbol_table::add_from_dynobj): Add sympointers and defined
3093
        parameters.  Change all callers.
3094
        * symtab.h (class Symbol_table): Update declarations.
3095
        * Makefile.am (CCFILES): Add cref.cc.
3096
        (HFILES): Add cref.h.
3097
        * Makefile.in: Rebuild.
3098
 
3099
2008-07-22  Simon Baldwin  
3100
 
3101
        * symtab.cc (Symbol_table::sized_write_symbol): Set symbol size
3102
        to zero when writing undefined symbols.
3103
 
3104
2008-07-22  Ian Lance Taylor  
3105
 
3106
        * output.cc (Output_section::add_input_section): Don't try to
3107
        merge empty merge sections.
3108
 
3109
2008-07-21  Craig Silverstein  
3110
 
3111
        * symtab.cc (Symbol_table::warn_about_undefined_dynobj_symbol):
3112
        Include symbol version in error message.
3113
 
3114
2008-07-20  Chris Demetriou  
3115
 
3116
        * configure.ac (gold_cv_c_random_seed): New configured variable.
3117
        (RANDOM_SEED_CFLAGS): New substituted variable.
3118
        * Makefile.am (AM_CFLAGS, AM_CXXFLAGS): Add $(RANDOM_SEED_CFLAGS).
3119
        * configure: Rebuild.
3120
        * Makefile.in: Likewise.
3121
        * testsuite/Makefile.in: Likewise.
3122
 
3123
2008-07-18  Ian Lance Taylor  
3124
 
3125
        * symtab.cc (Symbol_table::add_from_object): Rewrite the case
3126
        where we see NAME/NULL and NAME/VERSION  as separate symbols.
3127
        * testsuite/ver_test_main.cc (main): Call t4.
3128
        (t4, t4_2a): Define.
3129
        * testsuite/ver_test_2.cc (t4_2): Define.
3130
        * testsuite/ver_test_2.script: Put t4_2a in VER2.
3131
        * testsuite/ver_test_4.cc (t4_2a): Define.
3132
        * testsuite/ver_test_4.script: Put t4_2a in VER2.
3133
        * testsuite/ver_test.h (t4, t4_2, t4_2a): Declare.
3134
 
3135
2008-07-17  Ian Lance Taylor  
3136
 
3137
        * dynobj.cc (Versions::add_def): If we give an error about a
3138
        missing version, go ahead and create the version anyhow.
3139
 
3140
2008-07-10  Ian Lance Taylor  
3141
 
3142
        Handle output sections with more than 0x7fffffff bytes.
3143
        * object.h (class Relobj): Change map_to_output_ to
3144
        output_sections_, and just keep a section pointer.  Change all
3145
        uses.  Move comdat group support to Sized_relobj.
3146
        (Relobj::is_section_specially_mapped): Remove.
3147
        (Relobj::output_section): Remove poff parameter.  Change all
3148
        callers.
3149
        (Relobj::output_section_offset): New function.
3150
        (Relobj::set_section_offset): Rewrite.
3151
        (Relobj::map_to_output): Remove.
3152
        (Relobj::output_sections): New function.
3153
        (Relobj::do_output_section_offset): New pure virtual function.
3154
        (Relobj::do_set_section_offset): Likewise.
3155
        (class Sized_relobj): Add section_offsets_ field.  Add comdat
3156
        group support from Relobj.  Update declarations.
3157
        (Sized_relobj::get_output_section_offset): New function.
3158
        (Sized_relobj::do_output_section_offset): New function.
3159
        (Sized_relobj::do_set_section_offset): New function.
3160
        * object.cc (Relobj::output_section_address): Remove.
3161
        (Sized_relobj::Sized_relobj): Initialize new fields.
3162
        (Sized_relobj::include_section_group): Cast find_kept_object to
3163
        Sized_relobj.
3164
        (Sized_relobj::include_linkonce_section): Likewise.
3165
        (Sized_relobj::do_layout): Use separate arrays for output section
3166
        and output offset.
3167
        (Sized_relobj::do_count_local_symbols): Change map_to_output to
3168
        output_sections.
3169
        (Sized_relobj::do_finalize_local_symbols): Change map_to_output to
3170
        output_sections and section_offsets.
3171
        (Sized_relobj::write_local_symbols): Likewise.
3172
        (map_to_kept_section): Compute output address directly.
3173
        * reloc.cc (Sized_relobj::do_read_relocs): Change map_to_output to
3174
        output_sections and section_offsets.
3175
        (Sized_relobj::write_sections): Likewise.
3176
        (Sized_relobj::relocate_sections): Likewise.
3177
        * symtab.cc (sized_finalize_symbol): Use output_section_offset.
3178
        * output.h (class Output_reloc): Update declarations.  Change
3179
        u2_.relobj to Sized_relobj*.
3180
        (class Output_data_reloc): Change add functions to use
3181
        Sized_relobj*.
3182
        * output.cc (Output_reloc::Output_reloc): Change relobj to
3183
        Sized_relobj*.
3184
        (Output_reloc::local_section_offset): Change return type to
3185
        Elf_Addr.  Use get_output_section_offset.
3186
        (Output_reloc::get_address): Likewise.
3187
        (Output_section::is_input_address_mapped): Don't call
3188
        is_section_specially_mapped.
3189
        (Output_section::output_offset): Likewise.
3190
        (Output_section::output_address): Likewise.
3191
        (Output_section::starting_output_address): Likewise.
3192
        * copy-relocs.cc (Copy_relocs::copy_reloc): Change object
3193
        parameter to Sized_relobj*.
3194
        (Copy_relocs::need_copy_reloc): Likewise.
3195
        (Copy_relocs::save): Likewise.
3196
        * copy-relocs.h (class Copy_relocs): Update declarations.
3197
        (class Copy_relocs::Copy_reloc_entry): Change constructor to use
3198
        Sized_relobj*.  Change relobj_ field to Sized_relobj*.
3199
        * target-reloc.h (relocate_for_relocatable): Change
3200
        offset_in_output_section type to Elf_Addr.  Change code that uses
3201
        it as well.
3202
        * layout.cc (Layout::layout): Always set *off.
3203
        * mapfile.cc (Mapfile::print_input_section): Use
3204
        output_section_offset.
3205
        * i386.cc (Target_i386::copy_reloc): Change object parameter to
3206
        Sized_relobj*.
3207
        * powerpc.cc (Target_powerpc::copy_reloc): Likewise.
3208
        * sparc.cc (Target_sparc::copy_reloc): Likewise.
3209
        * x86_64.cc (Target_x86_64::copy_reloc): Likewise.
3210
 
3211
2008-07-03  Ian Lance Taylor  
3212
 
3213
        * layout.cc (Layout::include_section): Do not discard unrecognized
3214
        SHT_STRTAB sections.
3215
 
3216
2008-06-30  Craig Silverstein  
3217
 
3218
        * script.cc (Lex::can_continue_name): Make '?' allowable in
3219
        version-script names.
3220
        * testsuite/version_script.map: Change glob pattern to use '?'
3221
 
3222
2008-06-30  Manish Singh  
3223
 
3224
        PR 6585
3225
        * symtab.cc (Symbol_table::add_undefined_symbols_from_command_line):
3226
        Correct typo.
3227
 
3228
2008-06-30  Ian Lance Taylor  
3229
 
3230
        PR 6660
3231
        PR 6682
3232
        * powerpc.cc (Powerpc_relocate_functions::addr16_ha) [both
3233
        versions]: Don't try to read the value in the contents, since we
3234
        don't use it.  Use the template endianness when writing.
3235
 
3236
2008-06-25  Cary Coutant  
3237
 
3238
        * fileread.cc (File_read::make_view): Assert on zero-length view.
3239
        * object.cc (Sized_relobj::do_read_symbols): Don't try to read
3240
        symbol table when there are no symbols to read.
3241
 
3242
2008-06-23  Craig Silverstein  
3243
 
3244
        * version.cc (version_string): Bump to 1.7
3245
 
3246
2008-06-18  Craig Silverstein  
3247
 
3248
        * powerpc.cc (Powerpc_relocate_functions::addr16_ha): cast
3249
        constant 0xFFFF to type Valtype.
3250
        (Powerpc_relocate_functions::rel16_ha): Likewise.
3251
 
3252
2008-06-17  Ian Lance Taylor  
3253
 
3254
        * output.h (Output_section::Input_section): Initialize p2align_ to
3255
        zero for Output_section_data constructors.
3256
        (Output_section::Input_section::addralign): If not an input
3257
        section, return the alignment of the Output_section_data.
3258
        * testsuite/copy_test.cc: New file.
3259
        * testsuite/copy_test_1.cc: New file.
3260
        * testsuite/copy_test_2.cc: New file.
3261
        * testsuite/Makefile.am (check_PROGRAMS): Add copy_test.
3262
        (copy_test_SOURCES, copy_test_DEPENDENCIES): New variables.
3263
        (copy_test_LDFLAGS, copy_test_LDADD): New variables.
3264
        (copy_test_1_pic.o, copy_test_1.so): New targets.
3265
        (copy_test_2_pic.o, copy_test_2.so): New targets.
3266
        * testsuite/Makefile.in: Rebuild.
3267
 
3268
        * script-sections.cc (Script_sections::place_orphan): Initialize
3269
        local variable exact.
3270
 
3271
2008-06-13  David Edelsohn  
3272
 
3273
        * powerpc.cc (Output_data_plt_powerpc::do_write): 8 + 4 = 0xC.
3274
 
3275
2008-06-12  David Edelsohn  
3276
            David S. Miller  
3277
 
3278
        * powerpc.cc: New file.
3279
        * Makefile.am (TARGETSOURCES): Add powerpc.cc
3280
        (ALL_TARGETOBJS): Add powerpc.$(OBJEXT)
3281
        * configure.tgt: Add entries for powerpc-* and powerpc64-*.
3282
        * Makefile.in: Rebuild.
3283
 
3284
2008-06-09  Ian Lance Taylor  
3285
 
3286
        * testsuite/relro_test.cc: Include , , and
3287
        .
3288
        (throwing, orig_terminate): New static variables.
3289
        (terminate_handler): New static function.
3290
        (t2): Set terminate handler.
3291
 
3292
2008-06-05  Kris Van Hees  
3293
 
3294
        PR 6584
3295
        * binary.cc (Binary_to_elf::sized_convert): Fix .data
3296
        alignment.
3297
 
3298
2008-05-30  Cary Coutant  
3299
 
3300
        * archive.cc (Archive::include_all_members) Correct to step
3301
        over symbol table and extended name table in thin archives.
3302
 
3303
2008-05-29  Kris Van Hees  
3304
 
3305
        PR 6407
3306
        * target-reloc.h (relocate_for_relocatable): Fix new_offset
3307
        calculation.
3308
 
3309
2008-05-28  Caleb Howe  
3310
 
3311
        * reduced_debug_output.cc: New file.
3312
        * reduced_debug_output.h: New file.
3313
        * options.h (class General_options): Add --strip-debug-non-line.
3314
        * options.cc (General_options::finalize): Add strip_debug_non_line
3315
        to the strip heirarchy.
3316
        * layout.h (class Layout): Add debug_abbrev_ and debug_info_
3317
        fields.
3318
        * layout.cc: Include "reduced_debug_output.h".
3319
        (Layout::Layout): Initialize new fields.
3320
        (line_only_debug_sections): New static array.
3321
        (is_lines_only_debug_sections): New static inline function.
3322
        (Layout::include_section): Handle --strip-debug-non-line.
3323
        (Layout::make_output_section): If --strip-debug-non-line, build
3324
        new output sections for .debug_abbrev and .debug_info.
3325
        * dwarf_reader.cc (read_unsigned_LEB_128): Move to namespace
3326
        gold.  Warn about possible overflow.
3327
        (read_signed_LEB_128): Likewise.
3328
        * dwarf_reader.h: (read_unsigned_LEB_128): Declare.
3329
        (read_signed_LEB_128): Declare.
3330
        * Makefile.am (CCFILES): Add reduced_debug_output.cc.
3331
        (HFILES): Add reduced_debug_output.h.
3332
        * Makefile.in: Rebuild.
3333
 
3334
2008-05-21  Ian Lance Taylor  
3335
 
3336
        * mapfile.cc: New file.
3337
        * mapfile.h: New file.
3338
        * options.h (class General_options): Add -M/--print-map and -Map.
3339
        * options.cc (General_options::finalize): Make -M equivalent to
3340
        -Map -.
3341
        * main.cc: Include  and "mapfile.h".
3342
        (main): Open mapfile if requested.
3343
        * gold.cc (class Middle_runner): Add mapfile_ field.  Update
3344
        constructor.  Change caller.
3345
        (queue_initial_tasks): Add mapfile parameter.  Change caller.
3346
        (queue_middle_tasks): Likewise.
3347
        * gold.h (queue_initial_tasks, queue_middle_tasks): Update
3348
        declarations.
3349
        * archive.cc: Include "mapfile.h".
3350
        (Archive::add_symbols): Add mapfile parameter.  Change all
3351
        callers.  Pass mapfile, symbol, and reason to include_member.
3352
        (Archive::include_all_members): Add mapfile parameter.  Change all
3353
        callers.
3354
        (Archive::include_member): Add mapfile, sym, and why parameters.
3355
        Change all callers.  Report inclusion to map file.
3356
        * archive.h: Include "fileread.h".
3357
        (class Archive): Update declarations.
3358
        (Archive::file): New const method.
3359
        (class Add_archive_symbols): Add mapfile_ field.  Update
3360
        constructor.  Change all callers.
3361
        * readsyms.h (class Read_symbols): Likewise.
3362
        (class Finish_group): Likewise.
3363
        (class Read_script): Likewise.
3364
        * common.cc: Include "mapfile.h".
3365
        (Symbol_table::allocate_commons): Add mapfile parameter.  Change
3366
        all callers.
3367
        (Symbol_table::do_allocate_commons): Likewise.
3368
        (Symbol_table::do_allocate_commons_list): Likewise.  Report common
3369
        symbol allocation to mapfile.
3370
        * common.h (class Allocate_commons_task): Add mapfile_ field.
3371
        Update constructor.  Change all callers.
3372
        * symtab.h (class Symbol_table): Update declarations.
3373
        * layout.cc: Include "mapfile.h".
3374
        (Layout_task_runner::run): Print information to mapfile.
3375
        (Layout::create_gold_note): Change Output_data_fixed_space to
3376
        Output_data_zero_fill.
3377
        (Layout::create_build_id): Likewise.
3378
        (Layout::print_to_mapfile): New function.
3379
        * layout.h (class Layout_task_runner): Add mapfile_ field.  Update
3380
        constructor.  Change caller.
3381
        (class Layout): Declare print_to_mapfile.
3382
        * output.cc (Output_section::Input_section::print_to_mapfile): New
3383
        function.
3384
        (Output_section::add_input_section): If producing a map, always
3385
        add to input_sections_ list.
3386
        (Output_section::do_print_to_mapfile): New function.
3387
        (Output_segment::print_sections_to_mapfile): New function.
3388
        (Output_segment::print_section_list_to_mapfile): New function.
3389
        * output.h: Include "mapfile.h".
3390
        (Output_data::print_to_mapfile): New function.
3391
        (Output_data::do_print_to_mapfile): New virtual function.
3392
        (Output_segment_headers::do_print_to_mapfile): New function.
3393
        (Output_file_header::do_print_to_mapfile): New function.
3394
        (Output_data_const::do_print_to_mapfile): New function.
3395
        (class Output_data_const_buffer): Add map_name_ field.  Update
3396
        constructor.  Change all callers.  Add do_print_to_mapfile
3397
        function.
3398
        (class Output_data_fixed_space): Likewise.
3399
        (class Output_data_space): Likewise.
3400
        (class Output_data_zero_fill): New class.
3401
        (Output_data_strtab::do_print_to_mapfile): New function.
3402
        (Output_data_reloc_base::do_print_to_mapfile): New function.
3403
        (Output_relocatable_relocs::do_print_to_mapfile): New function.
3404
        (Output_data_group::do_print_to_mapfile): New function.
3405
        (Output_data_got::do_print_to_mapfile): New function.
3406
        (Output_data_dynamic::do_print_to_mapfile): New function.
3407
        (Output_symtab_xindex::do_print_to_mapfile): New function.
3408
        (class Output_section): Declare do_print_to_mapflie.  Declare
3409
        print_to_mapfile in Input_section.
3410
        (class Output_segment): Declare new functions.
3411
        * object.h (Sized_relobj::symbol_count): New function.
3412
        * script-sections.cc
3413
        (Output_section_element_dot_assignment::set_section_addresses):
3414
        Change Output_data_fixed_space to Output_data_zero_fill.
3415
        (Output_data_expression::do_print_to_mapfile): New function.
3416
        * script.cc (read_input_script): Add mapfile parameter.  Change
3417
        all callers.
3418
        * script.h (read_input_script): Update declaration.
3419
        * ehframe.h (Eh_frame_hdr::do_print_to_mapfile): New function.
3420
        (Eh_frame::do_print_to_mapfile): New function.
3421
        * merge.h (Output_merge_data::do_print_to_mapfile): New function.
3422
        (Output_merge_string::do_print_to_mapfile): New function.
3423
        * i386.cc (Output_data_plt_i386::do_print_to_mapfile): New
3424
        function.
3425
        * sparc.cc (Output_data_plt_sparc::do_print_to_mapfile): New
3426
        function.
3427
        * x86_64.cc (Output_data_plt_x86_64::do_print_to_mapfile): New
3428
        function.
3429
        * Makefile.am (CCFILES): Add mapfile.cc.
3430
        (HFILES): Add mapfile.h.
3431
        * Makefile.in: Rebuild.
3432
 
3433
2008-05-19  Ian Lance Taylor  
3434
 
3435
        * options.h (class General_options): Add -z relro.
3436
        * layout.cc (Layout::Layout): Initialize relro_segment_.
3437
        (Layout::add_output_section_data): Return the output section.
3438
        (Layout::make_output_section): Rcognize relro sections and mark
3439
        them appropriately.
3440
        (Layout::attach_allocated_section_to_segment): Put relro sections
3441
        in a PT_GNU_RELRO segment.
3442
        (Layout::create_initial_dynamic_sections): Mark the .dynamic
3443
        section as relro.
3444
        (Layout::segment_precedes): Sort PT_GNU_RELRO segments after
3445
        PT_TLS segments.
3446
        (Layout::linkonce_mapping): Map d.rel.ro.local to
3447
        .data.rel.ro.local.
3448
        (Layout::output_section_name): Us .data.rel.ro.local for any
3449
        section which begins with that.
3450
        * layout.h (class Layout): Update add_output_section_data
3451
        declaration.  Add relro_segment_ field.
3452
        * output.cc (Output_section::Output_section): Initialize is_relro_
3453
        and is_relro_local_ fields.
3454
        (Output_segment::add_output_section): Group relro sections.
3455
        (Output_segment::is_first_section_relro): New function.
3456
        (Output_segment::maximum_alignment): If there is a relro section,
3457
        align the segment to the common page size.
3458
        (Output_segment::set_section_addresses): Track whether we are
3459
        looking at relro sections.  If the last section is a relro
3460
        section, align to the common page size.
3461
        (Output_segment::set_section_list_addresses): Add in_relro
3462
        parameter.  Change all callers.  Align to the page size when
3463
        moving from relro to non-relro section.
3464
        (Output_segment::set_offset): Align memsz of a PT_GNU_RELRO
3465
        segment.
3466
        * output.h (class Output_section): Add is_relro_ and
3467
        is_relro_local_ fields.
3468
        (Output_section::is_relro): New function.
3469
        (Output_section::set_is_relro): New function.
3470
        (Output_section::is_relro_local): New function.
3471
        (Output_section::set_is_relro_local): New function.
3472
        (class Output_segment): Update declarations.
3473
        * i386.cc (Target_i386::got_section): Mark .got section as relro.
3474
        * sparc.cc (Target_sparc::got_section): Likewise.
3475
        * x86_64.cc (Target_x86_64::got_section): Likewise.
3476
        * testsuite/relro_test_main.cc: New file.
3477
        * testsuite/relro_test.cc: New file.
3478
        * testsuite/Makefile.am (check_PROGRAMS): Add relro_test.
3479
        (relro_test_SOURCES, relro_test_DEPENDENCIES): New variables.
3480
        (relro_test_LDFLAGS, relro_test_LDADD): New variables.
3481
        (relro_test.so, relro_test_pic.o): New targets.
3482
        * testsuite/Makefile.in: Rebuild.
3483
 
3484
2008-05-16  Ian Lance Taylor  
3485
 
3486
        * output.cc (Output_segment::add_output_section): Remove front
3487
        parameter.
3488
        * output.h (class Output_segment): Remove
3489
        add_initial_output_section and overloaded add_output_section.
3490
        Update declaration of remaining add_output_section.
3491
        * layout.cc (Layout::create_interp): Call add_output_section
3492
        rather than add_initial_output_section.
3493
        (Layout::finish_dynamic_section): Likewise.
3494
 
3495
        * i386.cc (Target_i386::Relocate::relocate_tls): Set dynamic type
3496
        for TLS_GOTDESC and TLS_DESC_CALL.  Only optimize TLS_LDO_32 if we
3497
        know the dynamic type.
3498
        * x86_64.cc (Target_x86_64::Relocate): Add saw_tls_block_reloc_
3499
        field.  Initialize it in constructor.
3500
        (Target_x86_64::Relocate::relocate_tls): Record that we saw a TLS
3501
        block reloc for TLSGD, GOTPC32_TLSDESC, TLSDESC_CALL, and TLSLD.
3502
        Only optimize DTPOFF32 and DTPOFF64 if we have seen a TLS block
3503
        reloc.
3504
 
3505
        * output.cc (Output_reloc::get_address): Change return type to
3506
        Elf_Addr.
3507
        * output.h (class Output_reloc): Update get_address declaration.
3508
        * x86_64.cc (Output_data_plt_x86_64::do_write): Use 64-bit types
3509
        for section addresses.
3510
 
3511
2008-05-09  Ian Lance Taylor  
3512
 
3513
        PR 6493
3514
        * gold.cc (gold_nomem): Use return value of write.
3515
 
3516
2008-05-08  Ian Lance Taylor  
3517
 
3518
        * symtab.c (Symbol::init_base_output_data): Add version
3519
        parameter.  Change all callers.
3520
        (Symbol::init_base_output_segment): Likewise.
3521
        (Symbol::init_base_constant): Likewise.
3522
        (Symbol::init_base_undefined): Likewise.
3523
        (Sized_symbol::init_output_data): Likewise.
3524
        (Sized_symbol::init_output_segment): Likewise.
3525
        (Sized_symbol::init_constant): Likewise.
3526
        (Sized_symbol::init_undefined): Likewise.
3527
        (Symbol_table::do_define_in_output_data): If the new symbol has a
3528
        version, mark it as the default.
3529
        (Symbol_table::do_define_in_output_segment): Likewise.
3530
        (Symbol_table::do_define_as_constant): Likewise.
3531
        * symtab.h (class Symbol): Update declarations.
3532
        (class Sized_symbol): Likewise.
3533
        * resolve.cc (Symbol::override_version): New function.
3534
        (Symbol::override_base): Call override_version.
3535
        (Symbol::override_base_with_special): Likewise.
3536
        * testsuite/ver_script_8.script: New file.
3537
        * testsuite/Makefile.am (check_PROGRAMS): Add ver_test_8.
3538
        (ver_test_8_SOURCES, ver_test_8_DEPENDENCIES): Define.
3539
        (ver_test_8_LDFLAGS, ver_test_8_LDADD): Define.
3540
        (ver_test_8_1.so, ver_test_8_2.so): New targets.
3541
 
3542
2008-05-06  Ian Lance Taylor  
3543
 
3544
        PR 6049
3545
        * options.h (DEFINE_set): Add VARNAME_begin and VARNAME_end
3546
        functions.
3547
        (class General_options): Remove existing --undefined, and add
3548
        --no-undefined instead.  Add new --undefined as synonym for -u.
3549
        * archive.cc (Archive::add_symbols): Check whether symbol was
3550
        named with -u.
3551
        * gold.cc (queue_middle_tasks): Add -u symbols to symbol table.
3552
        * symtab.h (class Symbol): Rename CONSTANT to IS_CONSTANT; change
3553
        all uses.  Add IS_UNDEFINED.  Update declarations to split
3554
        different versions of init_base.  Declare init_base_undefined.
3555
        (Symbol::is_defined): Handle IS_UNDEFINED.
3556
        (Symbol::is_undefined): Likewise.
3557
        (Symbol::is_weak_undefined): Call is_undefined.
3558
        (Symbol::is_absolute): Handle IS_CONSTANT.
3559
        (class Sized_symbol): Update declarations to split different
3560
        versions of init.  Declare init_undefined.
3561
        (class Symbol_table): Declare new functions.
3562
        * symtab.cc (Symbol::init_base_object): Rename from init_base.
3563
        Change all callers.
3564
        (Symbol::init_base_output_data): Likewise.
3565
        (Symbol::init_base_output_segment): Likewise.
3566
        (Symbol::init_base_constant): Likewise.
3567
        (Symbol::init_base_undefined): New function.
3568
        (Sized_symbol::init_object): Rename from init.  Change all
3569
        callers.
3570
        (Sized_symbol::init_output_data): Likewise.
3571
        (Sized_symbol::init_output_segment): Likewise.
3572
        (Sized_symbol::init_constant): Likewise.
3573
        (Sized_symbol::init_undefined): New function.
3574
        (Symbol_table::add_undefined_symbols_from_command_line): New
3575
        function.
3576
        (Symbol_table::do_add_undefined_symbols_from_command_line): New
3577
        function.
3578
        (Symbol::final_value_is_known): Handle IS_UNDEFINED.
3579
        (Symbol::output_section): Likewise.
3580
        (Symbol::set_output_section): Likewise.
3581
        (Symbol_table::sized_finalize_symbol): Likewise.
3582
        (Symbol_table::sized_write_globals): Likewise.
3583
        * resolve.cc (Symbol_table::should_override): Likewise.
3584
        (Symbol::override_base_with_special): Likewise.
3585
 
3586
        * symtab.cc (Symbol_table::add_from_dynobj): If we see a protected
3587
        symbol, change it to have default visibility.
3588
        * testsuite/protected_1.cc: New file.
3589
        * testsuite/protected_2.cc: New file.
3590
        * testsuite/protected_3.cc: New file.
3591
        * testsuite/protected_main_1.cc: New file.
3592
        * testsuite/protected_main_2.cc: New file.
3593
        * testsuite/protected_main_3.cc: New file.
3594
        * testsuite/Makefile.am (check_PROGRAMS): Add protected_1.
3595
        (protected_1_SOURCES, protected_1_DEPENDENCIES): Define.
3596
        (protected_1_LDFLAGS, protected_1_LDADD): Define.
3597
        (protected_1.so): New target.
3598
        (protected_1_pic.o, protected_2_pic.o): New targets.
3599
        (protected_3_pic.o): New target.
3600
        (check_PROGRAMS): Add protected_2.
3601
        (protected_2_SOURCES, protected_2_DEPENDENCIES): Define.
3602
        (protected_2_LDFLAGS, protected_2_LDADD): Define.
3603
        * testsuite/Makefile.in: Rebuild.
3604
 
3605
        * options.h (DEFINE_var): Add set_user_set_##varname__.
3606
        (DEFINE_bool_alias): New macro.
3607
        (class General_options): Define -Bstatic using DEFINE_bool_alias
3608
        rather than DEFINE_special.  Add --undefined as an alias for -z
3609
        defs.
3610
        * options.cc (General_options::parse_Bstatic): Remove.
3611
 
3612
        * options.h (class General_options): Add --fatal-warnings.
3613
        * main.cc (main): Implement --fatal-warnings.
3614
        * errors.h (Errors::warning_count): New function.
3615
 
3616
        * options.h (class General_options): Add -Bsymbolic-functions.
3617
        * symtab.h (Symbol::is_preemptible): Check for
3618
        -Bsymbolic-functions.
3619
 
3620
2008-05-05  Ian Lance Taylor  
3621
 
3622
        * options.h (DEFINE_bool): For DASH_Z, create the negative option
3623
        as noVARNAME rather than no-VARNAME.
3624
        (class General_options): Add option -z combreloc.
3625
        * output.h (class Output_reloc) [SHT_REL]: Declare compare and
3626
        get_address.
3627
        (Output_reloc::sort_before) [SHT_REL]: New function.
3628
        (Output_reloc::sort_before) [SHT_RELA]: New function.
3629
        (class Output_data_reloc_base): Add sort_relocs_ field.  Define
3630
        Sort_relocs_comparison.
3631
        (Output_data_reloc_base::Output_data_reloc_base): Add sort_relocs
3632
        parameter.  Change all callers.
3633
        (Output_data_reloc::Output_data_reloc) [both versions]: Add
3634
        sort_relocs parameter.  Change all callers.
3635
        * output.cc (Output_reloc::get_address): New function, broken out
3636
        of write_rel.
3637
        (Output_reloc::write_rel): Call it.
3638
        (Output_reloc::compare): New function.
3639
        (Output_data_reloc_base::do_write): Optionally sort relocs.
3640
 
3641
        * configure.ac: If targ_extra_obj is set, link it in.
3642
        * configure.tgt: Initialize all variables.
3643
        (x86_64*): Set targ_extra_obj and targ_extra_size.
3644
        * configure: Rebuild.
3645
 
3646
        * object.cc (Sized_relobj::include_section_group): Adjust section
3647
        indexes read from group data.  Build vector to pass to
3648
        layout_group.
3649
        * layout.cc (Layout::layout_group): Add flags and shndxes
3650
        parameters.  Remove contents parameter.  Change caller.  Update
3651
        explicit instantiations.
3652
        * layout.h (class Layout): Update layout_group declaration.
3653
        * output.cc (Output_data_group::Output_data_group): Add flags and
3654
        input_shndxes parameters.  Remove contents parameter.  Change
3655
        caller.
3656
        (Output_data_group::do_write): Change input_sections_ to
3657
        input_shndxes_.
3658
        * output.h (class Output_data_group): Update constructor
3659
        declaration.  Rename input_sections_ to input_shndxes_.
3660
        * testsuite/many_sections_test.cc: Add template.
3661
 
3662
2008-04-30  Cary Coutant  
3663
 
3664
        * target-reloc.h (relocate_section): Fix dead-pointer bug.
3665
 
3666
        * layout.cc (Layout::include_section): Refactored check for debug
3667
        info section.
3668
        (Layout::add_comdat): Add new parameters.  Change type
3669
        of signature parameter.  Add object and shndx to signatures table.
3670
        (Layout::find_kept_object): New function.
3671
        * layout.h: Include .
3672
        (Layout::is_debug_info_section): New function.
3673
        (Layout::add_comdat): Add new parameters.
3674
        (Layout::find_kept_object): New function.
3675
        (Layout::Kept_section): New struct.
3676
        (Layout::Signatures): Change type of map range.
3677
        * object.cc (Relobj::output_section_address): New function.
3678
        (Sized_relobj::include_section_group): Add new parameters.  Change
3679
        calls to Layout::add_comdat.  Change to build table of kept comdat
3680
        groups and table mapping discarded sections to kept sections.
3681
        (Sized_relobj::include_linkonce_section): Likewise.  Add new parameter.
3682
        (Sized_relobj::do_layout): Change calls to include_section_group and
3683
        include_linkonce_section.
3684
        (Sized_relobj::do_finalize_local_symbols): Do not set local symbol
3685
        value to zero when section is discarded.
3686
        (Sized_relobj::map_to_kept_section): New function.
3687
        * object.h (Relobj::output_section_address): New function.
3688
        (Relobj::Comdat_group): New type.
3689
        (Relobj::find_comdat_group): New function.
3690
        (Relobj::Comdat_group_table): New type.
3691
        (Relobj::Kept_comdat_section): New type.
3692
        (Relobj::Kept_comdat_section_table): New type.
3693
        (Relobj::add_comdat_group): New function.
3694
        (Relobj::set_kept_comdat_section): New function.
3695
        (Relobj::get_kept_comdat_section): New function.
3696
        (Relobj::comdat_groups_): New field.
3697
        (Relobj::kept_comdat_sections_): New field.
3698
        (Symbol_value::input_value): Update comment.
3699
        (Sized_relobj::map_to_kept_section) New function.
3700
        (Sized_relobj::include_linkonce_section): Add new parameter.
3701
        * target-reloc.h (Comdat_behavior): New type.
3702
        (get_comdat_behavior): New function.
3703
        (relocate_section): Add code to map a discarded section to the
3704
        corresponding kept section when applying a relocation.
3705
 
3706
2008-04-30  Craig Silverstein  
3707
 
3708
        * dwarf_reader.cc (next_generation_count): New static var.
3709
        (Addr2line_cache_entry): New struct.
3710
        (addr2line_cache): New static var.
3711
        (Dwarf_line_info::one_addr2line): Added caching.
3712
        (Dwarf_line_info::clear_addr2line_cache): New function.
3713
        * dwarf_reader.h (Dwarf_line_info::one_addr2line): Add
3714
        cache-size parameter.
3715
        (Dwarf_line_info::one_addr2line_cache): New function.
3716
        * symtab.cc (Symbol_table::detect_odr_violations): Pass
3717
        new cache-size argument to one_addr2line(), and clear cache.
3718
 
3719
2008-04-28  Cary Coutant  
3720
 
3721
        * i386.cc (Relocate::relocate): Fix typos for R_386_PC16 and
3722
        R_386_PC8 relocations.
3723
 
3724
2008-04-23  Ian Lance Taylor  
3725
 
3726
        * object.cc (Sized_relobj::include_section_group): Check for
3727
        invalid section group.
3728
 
3729
        * object.cc (make_elf_object): Correct test for 64-bit ELF file
3730
        header size.
3731
 
3732
        * readsyms.cc (Read_symbols::do_read_symbols): Use get_view rather
3733
        than read for file header.
3734
        * archive.cc (Archive::include_member): Likewise.
3735
 
3736
2008-04-23  Paolo Bonzini  
3737
 
3738
        * aclocal.m4: Regenerate.
3739
        * configure: Regenerate.
3740
 
3741
2008-04-19  Ian Lance Taylor  
3742
 
3743
        * version.cc (version_string): Bump to 1.6.
3744
 
3745
        * testsuite/Makefile.am (many_sections_r_test): New target.
3746
        (many_sections_r_test_SOURCES): Remove.
3747
        (many_sections_r_test_DEPENDENCIES): Remove.
3748
        (many_sections_r_test_LDFLAGS): Remove.
3749
        (many_sections_r_test_LDADD): Remove.
3750
 
3751
        * object.cc (Sized_relobj::do_add_symbols): Always pass
3752
        local_symbol_count_ to add_from_relobj.
3753
 
3754
        * testsuite/Makefile.am (many_sections_check.h): Only check one in
3755
        every thousand variables.
3756
        * testsuite/Makefile.in: Rebuild.
3757
 
3758
        * object.cc (Xindex::initialize_symtab_xindex): New function.
3759
        (Xindex::read_symtab_xindex): New function.
3760
        (Xindex::sym_xindex_to_shndx): New function.
3761
        (Sized_relobj::find_symtab): Pick up SHT_SYMTAB_SHNDX section if
3762
        available.
3763
        (Sized_relobj::do_initialize_xindex): New function.
3764
        (Sized_relobj::do_read_symbols): Adjust section links.
3765
        (Sized_relobj::symbol_section_and_value): Add is_ordinary
3766
        parameter.  Change all callers.
3767
        (Sized_relobj::include_section_group): Adjust section links and
3768
        symbol section indexes.
3769
        (Sized_relobj::do_layout): Adjust section links.
3770
        (Sized_relobj::do_count_local_symbols): Adjust section links and
3771
        symbol section indexes.
3772
        (Sized_relobj::do_finalize_local_symbols): Distinguish between
3773
        ordinary and special symbols.
3774
        (Sized_relobj::write_local_symbols): Add symtab_xindex and
3775
        dynsym_xindex parameters.  Change all callers.  Adjust section
3776
        links.  Use SHN_XINDEX when needed.
3777
        (Sized_relobj::get_symbol_location_info): Adjust section links.
3778
        Don't get fooled by special symbols.
3779
        * object.h (class Xindex): Define.
3780
        (class Object): Add xindex_ parameter.  Declare virtual functoin
3781
        do_initialize_xindex.
3782
        (Object::adjust_sym_shndx): New function.
3783
        (Object::set_xindex): New protected function.
3784
        (class Symbol_value): Add is_ordinary_shndx_ field.
3785
        (Symbol_value::Symbol_value): Initialize is_ordinary_shndx_.
3786
        (Symbol_value::value): Assert ordinary section.
3787
        (Symbol_value::initialize_input_to_output_map): Likewise.
3788
        (Symbol_value::set_input_shndx): Add is_ordinary parameter.
3789
        Change all callers.
3790
        (Symbol_value::input_shndx): Add is_ordinary parameter.  Change
3791
        all callers.
3792
        (class Sized_relobj): Update declarations.
3793
        (Sized_relobj::local_symbol_input_shndx): Add is_ordinary
3794
        parameter.  Change all callers.
3795
        (Sized_relobj::adjust_shndx): New function.
3796
        * dynobj.cc (Sized_dynobj::Sized_dynobj): Initialize dynsym_shndx_
3797
        field.
3798
        (Sized_dynobj::find_dynsym_sections): Remove pdynsym_shndx
3799
        parameter.  Change all callers.  Pick up SHT_DYNSYM_SHNDX section
3800
        for SHT_DYNSYM section if available.  Set dynsym_shndx_ field.
3801
        (Sized_dynobj::read_dynsym_section): Adjust section links.
3802
        (Sized_dynobj::read_dynamic): Likewise.
3803
        (Sized_dynobj::do_read_symbols): Use dynsym_shndx_ field.  Adjust
3804
        section links.
3805
        (Sized_dynobj::do_initialize_xindex): New function.
3806
        * dynobj.h (class Sized_dynobj): Add dynsym_shndx_ field.  Declare
3807
        do_initialize_xindex.
3808
        (Sized_dynobj::adjust_shndx): New function.
3809
        * layout.cc (Layout::Layout): Initialize symtab_xindex_ and
3810
        dynsym_xindex_ fields.
3811
        (Layout::finalize): Add a call to set_section_indexes before
3812
        creating the symtab sections.
3813
        (Layout::set_section_indexes): Don't do anything if the section
3814
        already has a section index.
3815
        (Layout::create_symtab_sections): Add shnum parameter.  Change
3816
        caller.  Create .symtab_shndx section if needed.
3817
        (Layout::create_shdrs): Add shstrtab_section parameter.  Change
3818
        caller.
3819
        (Layout::allocated_output_section_count): New function.
3820
        (Layout::create_dynamic_symtab): Create .dynsym_shndx section if
3821
        needed.
3822
        * layout.h (class Layout): Add symtab_xindex_ and dynsym_xindex_
3823
        fields.  Update declarations.
3824
        (Layout::symtab_xindex): New function.
3825
        (Layout::dynsym_xindex): New function.
3826
        (class Write_symbols_task): Add layout_ field.
3827
        (Write_symbols_task::Write_symbols_task): Add layout parameter.
3828
        Change caller.
3829
        * output.cc (Output_section_headers::Output_section_headers): Add
3830
        shstrtab_section parameter.  Change all callers.
3831
        (Output_section_headers::do_sized_write): Store overflow values
3832
        for section count and section string table section index in
3833
        section header zero.
3834
        (Output_file_header::do_sized_write): Check for overflow of
3835
        section count and section string table section index.
3836
        (Output_symtab_xindex::do_write): New function.
3837
        (Output_symtab_xindex::endian_do_write): New function.
3838
        * output.h (class Output_section_headers): Add shstrtab_section_.
3839
        Update declarations.
3840
        (class Output_symtab_xindex): Define.
3841
        (Output_section::has_out_shndx): New function.
3842
        * symtab.cc (Symbol::init_fields): Initialize is_ordinary_shndx_
3843
        field.
3844
        (Symbol::init_base): Add st_shndx and is_ordinary parameters.
3845
        Change all callers.
3846
        (Sized_symbol::init): Likewise.
3847
        (Symbol::output_section): Check for ordinary symbol.
3848
        (Symbol_table::add_from_object): Remove orig_sym parameter.  Add
3849
        st_shndx, is_ordinary, and orig_st_shndx parameters.  Change all
3850
        callers.
3851
        (Symbol_table::add_from_relobj): Add symndx_offset parameter.
3852
        Change all callers.  Simplify handling of symbols from sections
3853
        not included in the link.
3854
        (Symbol_table::add_from_dynobj): Handle ordinary symbol
3855
        distinction.
3856
        (Weak_alias_sorter::operator()): Assert that symbols are
3857
        ordinary.
3858
        (Symbol_table::sized_finalize_symbol): Handle ordinary symbol
3859
        distinction.
3860
        (Symbol_table::write_globals): Add symtab_xindex and dynsym_xindex
3861
        parameters.  Change all callers.
3862
        (Symbol_table::sized_write_globals): Likewise.  Handle ordinary
3863
        symbol distinction.  Use SHN_XINDEX when needed.
3864
        (Symbol_table::write_section_symbol): Add symtab_xindex
3865
        parameter.  Change all callers.
3866
        (Symbol_table::sized_write_section_symbol): Likewise.  Use
3867
        SHN_XINDEX when needed.
3868
        * symtab.h (class Symbol): Add is_ordinary_shndx_ field.  Update
3869
        declarations.
3870
        (Symbol::shndx): Add is_ordinary parameter.  Change all callers.
3871
        (Symbol::is_defined): Check is_ordinary.
3872
        (Symbol::is_undefined, Symbol::is_weak_undefined): Likewise.
3873
        (Symbol::is_absolute, Symbol::is_common): Likewise.
3874
        (class Sized_symbol): Update declarations.
3875
        (class Symbol_table): Update declarations.
3876
        * resolve.cc (Symbol::override_base): Add st_shndx and is_ordinary
3877
        parameters.  Change all callers.
3878
        (Sized_symbol::override): Likewise.
3879
        (Symbol_table::override): Likewise.
3880
        (symbol_to_bits): Add is_ordinary parameter.  Change all callers.
3881
        (Symbol_table::resolve): Remove orig_sym parameter.  Add st_shndx,
3882
        is_ordinary, and orig_st_shndx parameters.  Change all callers.
3883
        * copy-relocs.cc (Copy_relocs::emit_copy_reloc): Require symbol
3884
        to be in an ordinary section.
3885
        * dwarf_reader.cc (Sized_dwarf_line_info::symbol_section): Add
3886
        object and is_ordinary parameters.  Change all callers.
3887
        (Sized_dwarf_line_info::read_relocs): Add object parameter.
3888
        Change all callers.  Don't add undefined or non-ordinary symbols
3889
        to reloc_map_.
3890
        (Sized_dwarf_line_info::read_line_mappings): Add object parameter.
3891
        Change all callers.
3892
        * dwarf_reader.h (class Sized_dwarf_line_info): Update
3893
        declarations.
3894
        * ehframe.cc (Eh_frame::read_fde): Check for ordinary symbol.
3895
        * reloc.cc (Sized_relobj::do_read_relocs): Adjust section links.
3896
        (Sized_relobj::relocate_sections): Likewise.
3897
        * target-reloc.h (scan_relocs): Adjust section symbol index.
3898
        (scan_relocatable_relocs): Likewise.
3899
        * i386.cc (Scan::local): Check for ordinary symbols.
3900
        * sparc.cc (Scan::local): Likewise.
3901
        * x86_64.cc (Scan::local): Likewise.
3902
        * testsuite/binary_unittest.cc (Sized_binary_test): Update calls
3903
        to symbol_section_and_value.
3904
        * testsuite/many_sections_test.cc: New file.
3905
        * testsuite/Makefile.am (BUILT_SOURCES): Define.
3906
        (check_PROGRAMS): Add many_sections_test.
3907
        (many_sections_test_SOURCES): Define.
3908
        (many_sections_test_DEPENDENCIES): Define.
3909
        (many_sections_test_LDFLAGS): Define.
3910
        (BUILT_SOURCES): Add many_sections_define.h.
3911
        (many_sections_define.h): New target.
3912
        (BUILT_SOURCES): Add many_sections_check.h.
3913
        (many_sections_check.h): New target.
3914
        (check_PROGRAMS): Add many_sections_r_test.
3915
        (many_sections_r_test_SOURCES): Define.
3916
        (many_sections_r_test_DEPENDENCIES): Define.
3917
        (many_sections_r_test_LDFLAGS): Define.
3918
        (many_sections_r_test_LDADD): Define.
3919
        (many_sections_r_test.o): New target.
3920
        * testsuite/Makefile.in: Rebuild.
3921
 
3922
2008-04-17  Cary Coutant  
3923
 
3924
        * errors.cc (Errors::info): New function.
3925
        (gold_info): New function.
3926
        * errors.h (Errors::info): New function.
3927
        * gold.h (gold_info): New function.
3928
        * object.cc (Input_objects::add_object): Print trace output.
3929
        * options.cc (options::parse_set): New function.
3930
        (General_options::parse_wrap): Deleted.
3931
        (General_options::General_options): Deleted initializer.
3932
        * options.h (options::String_set): New typedef.
3933
        (options::parse_set): New function.
3934
        (DEFINE_set): New macro.
3935
        (General_options::wrap): Changed to use DEFINE_set. Changed
3936
        callers of any_wrap_symbols and is_wrap_symbol.
3937
        (General_options::trace, General_options::trace_symbol):
3938
        New options.
3939
        (General_options::any_wrap_symbols, General_options::is_wrap_symbol)
3940
        (General_options::wrap_symbols_): Deleted.
3941
        * symtab.cc (Symbol_table::add_from_object): Print trace output.
3942
 
3943
2008-04-17  David S. Miller  
3944
 
3945
        * options.cc (General_options::parse_V): New function.
3946
        * options.h: Add entries for -V and -Qy.
3947
 
3948
2008-04-17  Ian Lance Taylor  
3949
 
3950
        * common.cc (Symbol_table::allocate_commons): Remove options
3951
        parameter.  Change caller.
3952
        (Symbol_table::do_allocate_commons): Remove options parameter.
3953
        Change caller.  Just call do_allocate_commons_list twice.
3954
        (Symbol_table::do_allocate_commons_list): New function, broken out
3955
        of do_allocate_commons.
3956
        * common.h (class Allocate_commons_task): Remove options_ field.
3957
        Update constructor.
3958
        * symtab.cc (Symbol_table::Symbol_table): Initialize
3959
        tls_commons_.
3960
        (Symbol_table::add_from_object): Put TLS common symbols on
3961
        tls_commons_ list.
3962
        (Symbol_table::sized_finalize_symbol): Handle STT_TLS symbols
3963
        which are IN_OUTPUT_DATA.
3964
        * symtab.h (class Symbol_table): Add tls_commons_ field.  Update
3965
        allocate_commons and do_allocate_commons declarations.  Declare
3966
        do_allocate_commons_list.
3967
        * gold.cc (queue_middle_tasks): Update creation of
3968
        Allocate_commons_task to not pass options.
3969
        * testsuite/Makefile.am (INCLUDES): Add -I.. .
3970
        (TLS_TEST_C_FLAGS): New variable.
3971
        (tls_test_c_pic.o): New target.
3972
        (tls_test_shared.so): Link in tls_test_c_pic.o.
3973
        (tls_test_c_pic_ie.o): New target.
3974
        (tls_test_ie_shared.so): Link in tls_test_c_pic_ie.o.
3975
        (tls_test_DEPENDENCIES, tls_test_LDADD): Add tls_test_c.o.
3976
        (tls_test_c.o): New target.
3977
        (tls_pic_test_DEPENDENCIES): Add tls_test_c_pic.o.
3978
        (tls_pic_test_LDADD): Likewise.
3979
        (tls_shared_gd_to_ie_test_DEPENDENCIES): Add tls_test_c_pic.o.
3980
        (tls_shared_gd_to_ie_test_LDADD): Likewise.
3981
        (tls_test_c_gnu2.o): New target.
3982
        (tls_shared_gnu2_gd_to_ie_test_DEPENDENCIES): Add
3983
        tls_test_c_gnu2.o.
3984
        (tls_shared_gnu2_gd_to_ie_test_LDADD): Likewise.
3985
        (tls_test_gnu2_shared.so): Link in tls_test_c_gnu2.o.
3986
        (tls_test_shared_nonpic.so): Link in tls_test_c.o.
3987
        * testsuite/tls_test.cc: Include "config.h".
3988
        (t_last): Call t11_last.
3989
        * testsuite/tls_test.h (t11, t11_last): Declare.
3990
        * testsuite/tls_test_c.c: New file.
3991
        * testsuite/tls_test_main.cc (thread_routine): Call t11.
3992
        * configure.ac: Check for OpenMP support.
3993
        * configure, config.in, Makefile.in: Rebuild.
3994
        * testsuite/Makefile.in: Rebuild.
3995
 
3996
2008-04-16  Cary Coutant  
3997
 
3998
        * i386.cc (Target_i386::define_tls_base_symbol): New function.
3999
        (Target_i386::tls_base_symbol_defined_): New field.
4000
        (Target_i386::Scan::local): Define _TLS_MODULE_BASE_ symbol.
4001
        (Target_i386::Scan::global): Likewise.
4002
        * symtab.cc (sized_finalize_symbol): Add check for TLS symbol.
4003
        * x86_64.cc (Target_x86_64::define_tls_base_symbol): New function.
4004
        (Target_x86_64::tls_base_symbol_defined_): New field.
4005
        (Target_x86_64::Scan::local): Define _TLS_MODULE_BASE_ symbol.
4006
        (Target_x86_64::Scan::global): Likewise.
4007
 
4008
2008-04-16  Cary Coutant  
4009
 
4010
        * symtab.h (Symbol::is_strong_undefined): Removed unused function.
4011
        (Symbol::needs_plt_entry): Allow weak undefined symbols.
4012
        (Symbol::needs_dynamic_reloc): Allow weak undefined symbols when
4013
        building shared libraries.
4014
        * testsuite/Makefile.am (weak_undef_nonpic_test): New target.
4015
        (weak_undef_file1_nonpic.o, weak_undef_file2_nonpic.o)
4016
        (weak_undef_lib_nonpic.so, alt/weak_undef_lib_nonpic.so): New targets.
4017
        * testsuite/Makefile.in: Rebuild.
4018
        * testsuite/weak_undef.h: New file.
4019
        * testsuite/weak_undef_file1.cc: Add extra test cases.
4020
        * testsuite/weak_undef_file2.cc: Likewise.
4021
        * testsuite/weak_undef_test.cc: Likewise.
4022
 
4023
2008-04-16  David S. Miller  
4024
 
4025
        * sparc.cc (Target_sparc::Scan): Change from struct to class.
4026
        Add issued_non_pic_error_ field.  Declare check_non_pic.
4027
        (Target_sparc::Scan::check_non_pic): New function.
4028
        (Target_sparc::Scan::local): Call check_non_pic as appropriate.
4029
        (Target_sparc::Scan::global): Likewise.
4030
 
4031
        * configure.ac (FN_PTRS_IN_SO_WITHOUT_PIC): Add sparc64.
4032
        * configure: Rebuild.
4033
 
4034
        * options.h (DEFINE_enable): New macro.
4035
        (new_dtags): New enable option.
4036
        (initfirst, interpose, loadfltr, nodefaultlib,
4037
        nodelete, nodlopen, nodump): New -z options.
4038
        * layout.cc (Layout:finish_dynamic_section): If new
4039
        dtags enabled, emit DT_RUNPATH.  Also, emit a
4040
        DT_FLAGS_1 containing any specified -z flags.
4041
 
4042
2008-04-16  Ian Lance Taylor  
4043
 
4044
        * copy-relocs.cc: New file.
4045
        * copy-relocs.h: New file.
4046
        * reloc.cc: Remove Copy_relocs code.
4047
        * reloc.h: Likewise.
4048
        * reloc-types.h (struct Reloc_types) [both versions]: Add
4049
        get_reloc_addend_noerror.
4050
        * output.h (class Output_data_reloc): Add
4051
        variants of add_global which take an addend which must be zero.
4052
        * i386.cc: Include "copy-relocs.h".
4053
        (class Target_i386): Change type of copy_relocs_ to variable,
4054
        update initializer.
4055
        (Target_i386::copy_reloc): Rewrite to pass to Copy_relocs class.
4056
        Change all callers.
4057
        (Target_i386::do_finalize_sections): Change handling of
4058
        copy_relocs_.
4059
        * sparc.cc: Include "copy-relocs.h".
4060
        (class Target_sparc): Change type of copy_relocs_ to variable,
4061
        update initializer.
4062
        (Target_sparc::copy_reloc): Rewrite to pass to Copy_relocs class.
4063
        Change all callers.
4064
        (Target_sparc::do_finalize_sections): Change handling of
4065
        copy_relocs_.
4066
        * x86_64.cc: Include "copy-relocs.h".
4067
        (class Target_x86_64): Change type of copy_relocs_ to variable,
4068
        update initializer.
4069
        (Target_x86_64::copy_reloc): Rewrite to pass to Copy_relocs
4070
        class.  Change all callers.
4071
        (Target_x86_64::do_finalize_sections): Change handling of
4072
        copy_relocs_.
4073
        * Makefile.am (CCFILES): Add copy-relocs.cc.
4074
        (HFILES): Add copy-relocs.h.
4075
 
4076
        * Makefile.in, aclocal.m4, testsuite/Makefile.in: Rebuild.
4077
 
4078
        * testsuite/script_test_4.sh: Permit leading zeroes.
4079
 
4080
2008-04-15  Ian Lance Taylor  
4081
 
4082
        * script-sections.cc (Script_sections::create_segments): Use
4083
        header_size_adjustment even when there is enough room for the
4084
        headers.
4085
        * testsuite/script_test_4.sh: New file.
4086
        * testsuite/script_test_4.t: New file.
4087
        * testsuite/Makefile.am (check_SCRIPTS): Add script_test_4.sh.
4088
        (check_DATA): Add script_test_4.stdout.
4089
        (MOSTLYCLEANFILES): Likewise.
4090
        (script_test_4): New target.
4091
        (script_test_4.stdout): New target.
4092
        * testsuite/Makefile.in: Rebuild.
4093
 
4094
        * sparc.cc: Add definitions for Output_data_plt_sparc class
4095
        constants.
4096
 
4097
2008-04-14  David S. Miller  
4098
 
4099
        * sparc.cc: New file.
4100
        * Makefile.am (TARGETSOURCES): Add sparc.cc
4101
        (ALL_TARGETOBJS): Add sparc.$(OBJEXT)
4102
        * configure.tgt: Document targ_extra_size and
4103
        targ_extra_big_endian.  Add entries for sparc-* and
4104
        sparc64-*.
4105
        * configure.ac: Handle targ_extra_size and
4106
        targ_extra_big_endian.
4107
        * Makefile.in: Rebuild.
4108
        * configure: Likewise.
4109
        * po/POTFILES.in: Likewise.
4110
        * po/gold.pot: Likewise.
4111
 
4112
2008-04-14  Ian Lance Taylor  
4113
 
4114
        * layout.cc (Layout::Layout): Initialize sections_are_attached_.
4115
        (Layout::get_output_section): Ignore SHF_WRITE and SHF_EXECINSTR
4116
        in the name/type/flags to section mapping.  Don't call
4117
        allocate_output_section.
4118
        (Layout::choose_output_section): Change parameter from adjust_name
4119
        to is_input_section.  Don't permit input sections after sections
4120
        are attached to segments.  Don't call allocate_output_section.
4121
        (Layout::layout_eh_frame): Call update_flags_for_input_section,
4122
        not write_enable_output_section.
4123
        (Layout::make_output_section): Don't push to
4124
        unattached_section_list_ nor call attach_to_segment.  Call
4125
        attach_section_to_segment if sections are attached.
4126
        (Layout::attach_sections_to_segments): New function.
4127
        (Layout::attach_section_to_segment): New function.
4128
        (Layout::attach_allocated_section_to_segment): Rename from
4129
        attach_to_segment.  Remove flags parameter.
4130
        (Layout::allocate_output_section): Remove function.
4131
        (Layout::write_enable_output_section): Remove function.
4132
        * layout.h (class Layout): Update for above changes.  Add new
4133
        field sections_are_attached_.
4134
        * output.h (Output_section::update_flags_for_input_section): New
4135
        function.
4136
        * output.cc (Output_section::add_input_section): Call
4137
        update_flags_for_input_section.
4138
        * gold.cc (queue_middle_tasks): Call attach_sections_to_segments.
4139
 
4140
2008-04-11  Cary Coutant  
4141
 
4142
        * i386.cc (Target_i386::got_mod_index_entry): Restore code previously
4143
        thought unnecessary.
4144
        * x86_64.cc (Target_x86_64::got_mod_index_entry): Likewise.
4145
 
4146
2008-04-11  Ian Lance Taylor  
4147
 
4148
        * output.h (class Output_section_data): Remove inline definition
4149
        of set_addralign.
4150
        * output.cc (Output_section_data::set_addralign): New function.
4151
 
4152
2008-04-11  Cary Coutant  
4153
 
4154
        Add support for TLS descriptors for i386 and x86_64.
4155
        * i386.cc (Target_i386::Relocate::tls_desc_gd_to_ie): New function.
4156
        (Target_i386::Relocate::tls_desc_gd_to_le): New function.
4157
        (Target_i386::Got_type): Add GOT_TYPE_TLS_NOFFSET and
4158
        GOT_TYPE_TLS_DESC.
4159
        (Target_i386::got_mod_index_entry): Remove unnecessary code.
4160
        (Target_i386::Scan::local): Implement R_386_TLS_GOTDESC and
4161
        R_386_TLS_DESC_CALL relocations.  Fix problem with initial-exec
4162
        relocations.
4163
        (Target_i386::Scan::global): Fix problem with GD-to-IE relaxation.
4164
        Implement R_386_TLS_GOTDESC and R_386_TLS_DESC_CALL relocations;
4165
        Fix problem with initial-exec relocations.
4166
        (Target_i386::Relocate::relocate_tls): Likewise.
4167
        (Target_i386::Relocate::tls_gd_to_ie): Fix problem with GD-to-IE
4168
        relaxation.
4169
        * output.cc (Output_data_dynamic::Dynamic_entry::write): Add
4170
        support for section-plus-offset dynamic table entries.
4171
        * output.h (Output_data_dynamic::add_section_plus_offset): New function.
4172
        (Output_data_dynamic::Dynamic_entry): Add support for
4173
        section-plus-offset dynamic table entries.
4174
        (Output_data_dynamic::Classification): Likewise.
4175
        (Output_data_dynamic::classification_): Renamed offset_.
4176
        * x86_64.cc (Target_x86_64::Relocate::tls_desc_gd_to_ie): New function.
4177
        (Target_x86_64::Relocate::tls_desc_gd_to_le): New function.
4178
        (Target_x86_64::make_plt_section): New function.
4179
        (Target_x86_64::reserve_tlsdesc_entries): New function.
4180
        (Output_data_plt_x86_64::Output_data_plt_x86_64): Add new parameter.
4181
        (Output_data_plt_x86_64::reserve_tlsdesc_entry): New function.
4182
        (Output_data_plt_x86_64::has_tlsdesc_entry): New function.
4183
        (Output_data_plt_x86_64::get_tlsdesc_got_offset): New function.
4184
        (Output_data_plt_x86_64::get_tlsdesc_plt_offset): New function.
4185
        (Output_data_plt_x86_64::tlsdesc_plt_entry): New field.
4186
        (Output_data_plt_x86_64::set_final_data_size): Move out of line;
4187
        add extra PLT entry for TLS descriptors.
4188
        (Output_data_plt_x86_64::got_): New field.
4189
        (Output_data_plt_x86_64::tlsdesc_got_offset_): New field.
4190
        (Output_data_plt_x86_64::Output_data_plt_x86_64): Initialize new
4191
        fields.
4192
        (Output_data_plt_x86_64::do_write): Write extra PLT entry for TLS
4193
        descriptors.
4194
        (Target_x86_64::make_plt_entry): Factor out make_plt_section.
4195
        (Target_x86_64::got_mod_index_entry): Remove unnecessary code.
4196
        (Target_x86_64::Scan::local): Implement R_386_TLS_GOTDESC and
4197
        R_386_TLS_DESC_CALL relocations.
4198
        (Target_x86_64::Scan::global): Likewise.
4199
        (Target_x86_64::do_finalize_sections): Add dynamic table entries
4200
        for TLS descriptors.
4201
        (Relocate::relocate_tls): Fix problem with GD-to-IE relaxation.
4202
        Implement R_386_TLS_GOTDESC and R_386_TLS_DESC_CALL relocations.
4203
        (Target_x86_64::Relocate::tls_gd_to_ie): Fix problem with
4204
        GD-to-IE relaxation.
4205
        * configure.ac: Export new conditional variables TLS_GNU2_DIALECT
4206
        and TLS_DESCRIPTORS.
4207
        * Makefile.in: Rebuild.
4208
        * configure: Rebuild.
4209
        * testsuite/Makefile.am (tls_shared_gd_to_ie_test): New target.
4210
        (tls_test_shared2.so): New target.
4211
        (tls_shared_gd_to_ie_test_SOURCES): New variable.
4212
        (tls_shared_gd_to_ie_test_DEPENDENCIES): New variable.
4213
        (tls_shared_gd_to_ie_test_LDFLAGS): New variable.
4214
        (tls_shared_gd_to_ie_test_LDADD): New variable.
4215
        (tls_shared_gnu2_gd_to_ie_test): New target.
4216
        (tls_test_gnu2.o, tls_test_file2_gnu2.o, tls_test_gnu2_shared2.so):
4217
        New targets.
4218
        (tls_shared_gnu2_gd_to_ie_test_SOURCES): New variable.
4219
        (ls_shared_gnu2_gd_to_ie_test_DEPENDENCIES): New variable.
4220
        (tls_shared_gnu2_gd_to_ie_test_LDFLAGS): New variable.
4221
        (tls_shared_gnu2_gd_to_ie_test_LDADD): New variable.
4222
        (tls_shared_gnu2_test): New target.
4223
        (tls_test_gnu2_shared.so): New target.
4224
        (tls_shared_gnu2_test_SOURCES): New variable.
4225
        (tls_shared_gnu2_test_DEPENDENCIES): New variable.
4226
        (tls_shared_gnu2_test_LDFLAGS): New variable.
4227
        (tls_shared_gnu2_test_LDADD): New variable.
4228
        * testsuite/Makefile.in: Rebuild.
4229
        * testsuite/Makefile.
4230
 
4231
2008-04-11  Ian Lance Taylor  
4232
 
4233
        * testsuite/Makefile.am (justsyms_2r.o): Add dependency on
4234
        justsyms.t.
4235
        * testsuite/Makefile.in: Rebuild.
4236
 
4237
        * testsuite/script_test_2a.cc (script_test_string_a): Make 8 bytes
4238
        long.
4239
        * testsuite/script_test_2.cc (main): Adjust test.
4240
 
4241
2008-04-11  David S. Miller  
4242
            Ian Lance Taylor  
4243
 
4244
        * options.h (General_options): Add entries for '-Y' and
4245
        '-relax'.
4246
        * options.cc (General_options:finalize): If -Y was used, add those
4247
        entries to the library path instead of the default "/lib" and
4248
        "/usr/lib".
4249
 
4250
2008-04-11  David S. Miller  
4251
 
4252
        * testsuite/justsyms.t: Start at 0x100.
4253
        * testsuite/justsyms_1.cc: Adjust justsyms_string assertion.
4254
        * testsuite/script_test_2b.cc (script_test_string_b): Make 8 bytes
4255
        long.
4256
        * testsuite/script_test_2.cc: Adjust string and section length
4257
        checks.
4258
 
4259
2008-04-09  Ian Lance Taylor  
4260
 
4261
        PR gold/5996
4262
        * script-sections.cc (Sections_element::allocate_to_segment): Add
4263
        orphan parameter.
4264
        (Output_section_definition::allocate_to_segment): Likewise.
4265
        (Orphan_output_section::allocate_to_segment): Likewise.
4266
        (Script_sections::attach_sections_using_phdrs_clause): Don't
4267
        propagate non-PT_LOAD segments to orphan sections.
4268
        * testsuite/Makefile.am (script_test_3.stdout): Generate using
4269
        readelf rather than objdump.
4270
        * testsuite/script_test_3.sh: Adjust accordingly.  Test that
4271
        .interp section and PT_INTERP segment are the same size.
4272
        * testsuite/Makefile.in: Rebuild.
4273
 
4274
        * symtab.cc (Symbol_table::add_from_dynobj): Only look for weak
4275
        aliases for symbols defined in the same object.
4276
        * testsuite/Makefile.am (check_PROGRAMS): Add weak_alias_test.
4277
        (weak_alias_test_SOURCES): New variable.
4278
        (weak_alias_test_DEPENDENCIES): New variable.
4279
        (weak_alias_test_LDFLAGS): New variable.
4280
        (weak_alias_test_LDADD): New variable.
4281
        (weak_alias_test_1_pic.o, weak_alias_test_1.so): New targets.
4282
        (weak_alias_test_2_pic.o, weak_alias_test_2.so): New targets.
4283
        (weak_alias_test_3.o): New target.
4284
        (weak_alias_test_4_pic.o, weak_alias_test_4.so): New targets.
4285
        * testsuite/weak_alias_test_main.cc: New file.
4286
        * testsuite/weak_alias_test_1.cc: New file.
4287
        * testsuite/weak_alias_test_2.cc: New file.
4288
        * testsuite/weak_alias_test_3.cc: New file.
4289
 
4290
2008-04-08  Ian Lance Taylor  
4291
 
4292
        * options.h (class General_options): Add --noinhibit-exec option.
4293
        * main.cc (main): Check --noinhibit-exec.
4294
 
4295
        * options.h (class General_options): Define --wrap as a special
4296
        option.  Add wrap_symbols_ field.
4297
        (General_options::any_wrap_symbols): New function.
4298
        (General_options::is_wrap_symbol): New function.
4299
        * options.cc (General_options::parse_wrap): New function.
4300
        (General_options::General_options): Initialize wrap_symbols_.
4301
        * symtab.cc (Symbol_table::wrap_symbol): New function.
4302
        (Symbol_table::add_from_object): Handle --wrap.
4303
        * symtab.h (class Symbol_table): Declare wrap_symbol.
4304
        * target.h (Target::wrap_char): New function.
4305
        (Target::Target_info): Add wrap_char field.
4306
        * i386.cc (Target_i386::i386_info): Initialize wrap_char.
4307
        * x86_64.cc (Target_x86_64::x86_64_info): Likewise.
4308
        * testsuite/testfile.cc (Target_test::test_target_info):
4309
        Likewise.
4310
 
4311
        * errors.cc (Errors::undefined_symbol): Mention symbol version if
4312
        there is one.
4313
 
4314
        * layout.h (class Layout): Add added_eh_frame_data_ field.
4315
        * layout.cc (Layout::Layout): Initialize new field.
4316
        (Layout::layout_eh_frame): Don't add eh_frame_data_ to .eh_frame
4317
        output section until we find a section we merged successfully.
4318
        * object.cc (Sized_relobj::check_eh_frame_flags): Don't require
4319
        that the size be non-zero.
4320
 
4321
        * merge.cc (Object_merge_map::get_output_offset): Remove inline
4322
        qualifier.
4323
 
4324
2008-04-08  Craig Silverstein  
4325
 
4326
        * configure.ac: Export new conditional variable HAVE_ZLIB.
4327
        * testsuite/Makefile.am (flagstest_o_specialfile): Condition
4328
        on HAVE_ZLIB.
4329
        (flagstest_o_specialfile_and_compress_debug_sections): Likewise.
4330
        * configure, Makefile.in, testsuite/Makefile.in: Rebuild.
4331
 
4332
2008-04-07  Ian Lance Taylor  
4333
 
4334
        * version.cc (version_string): Set to "1.5".
4335
 
4336
        * x86_64.cc (Target_x86_64::Scan): Change from struct to class.
4337
        Add issued_non_pic_error_ field.  Declare check_non_pic.
4338
        (Target_x86_64::Scan::check_non_pic): New function.
4339
        (Target_x86_64::Scan::local): Call check_non_pic as appropriate.
4340
        (Target_x86_64::Scan::global): Likewise.
4341
 
4342
        * output.cc (Output_reloc::local_section_offset): Add
4343
        addend parameter.  Change caller.  Handle merge sections.
4344
        (Output_reloc::symbol_value): Change parameter type from
4345
        Address to Addend.  Don't add in the result of
4346
        local_section_offset, pass down the addend and use the returned
4347
        value.
4348
        * output.h (class Output_reloc): Add Addend typedef.
4349
        Update declarations of local_section_offset and symbol_value.
4350
        * testsuite/two_file_test_1.cc (t18): New function.
4351
        * testsuite/two_file_test_2.cc (f18): New function.
4352
        * testsuite/two_file_test_main.cc (main): Call t18.
4353
        * testsuite/two_file_test.h (t18, f18): Declare.
4354
 
4355
        * configure.ac: Don't test for objdump, c++filt, or readelf.
4356
        * testsuite/Makefile.am: Remove READELF and OBJDUMP_AND_CPPFILT
4357
        conditionals.
4358
        (TEST_READELF): New variable.
4359
        (TEST_OBJDUMP, TEST_CXXFILT, TEST_STRIP): New variables.
4360
        (check_PROGRAMS): Add two_file_strip_test.
4361
        (two_file_strip_test): New target.
4362
        (check_PROGRAMS): Add two_file_same_shared_strip_test.
4363
        (two_file_same_shared_strip_test_SOURCES): New variable.
4364
        (two_file_same_shared_strip_test_DEPENDENCIES): New variable.
4365
        (two_file_same_shared_strip_test_LDFLAGS): New variable.
4366
        (two_file_same_shared_strip_test_LDADD): New variable.
4367
        (two_file_shared_strip.so): New target.
4368
        (ver_test_2.syms, ver_test_4.syms): Use TEST_READELF.
4369
        (ver_test_5.syms, ver_test_7.syms): Likewise.
4370
        (ver_matching_test.stdout): Use TEST_OBJDUMP and TEST_CXXFILT.
4371
        (strip_test_3.stdout): Use TEST_OBJDUMP.
4372
        * configure, Makefile.in, testsuite/Makefile.in: Rebuild.
4373
 
4374
2008-04-04  Cary Coutant  
4375
 
4376
        * symtab.h (Symbol::is_weak_undefined): New function.
4377
        (Symbol::is_strong_undefined): New function.
4378
        (Symbol::is_absolute): New function.
4379
        (Symbol::needs_plt_entry): Exclude weak undefined symbols.
4380
        (Symbol::needs_dynamic_reloc): Exclude weak undefined and
4381
        absolute symbols.
4382
        * testsuite/Makefile.am (check_PROGRAMS): Add weak_undef_test.
4383
        (weak_undef_test): New target.
4384
        * testsuite/Makefile.in: Rebuild.
4385
        * testsuite/weak_undef_file1.cc: New file.
4386
        * testsuite/weak_undef_file2.cc: New file.
4387
        * testsuite/weak_undef_test.cc: New file.
4388
 
4389
2008-04-03  Craig Silverstein  
4390
 
4391
        * compressed_output.h (class Output_compressed_section): Use
4392
        unsigned buffer.
4393
        * compressed_output.cc (zlib_compress): Use unsigned buffers,
4394
        add zlib header.
4395
        (zlib_compressed_suffix): Removed.
4396
        (Output_compressed_section::set_final_data_size): Use unsigned
4397
        buffers.
4398
        * testsuite/Makefile.am (flagstest_compress_debug_sections):
4399
        Fix linker invocation.
4400
        (flagstest_o_specialfile_and_compress_debug_sections):
4401
        Likewise.
4402
        * testsuite/Makefile.in: Regenerated.
4403
 
4404
2008-04-02  David S. Miller  
4405
 
4406
        *  dwarf_reader.cc (Sized_dwarf_line_info::read_header_prolog,
4407
        Sized_dwarf_line_info::process_one_opcode): Use Swap_unaligned.
4408
 
4409
2008-04-02  Craig Silverstein  
4410
 
4411
        * TODO: New file.
4412
 
4413
2008-04-02  Ian Lance Taylor  
4414
 
4415
        * fileread.cc (File_read::find_view): Add byteshift and vshifted
4416
        parameters.  Update for new key type to views_.  Change all
4417
        callers.
4418
        (File_read::read): Adjust for byteshift in returned view.
4419
        (File_read::add_view): New function, broken out of
4420
        find_and_make_view.
4421
        (File_read::make_view): New function, broken out of
4422
        find_and_make_view.
4423
        (File_read::find_or_make_view): Add offset and aligned
4424
        parameters.  Rewrite accordingly.  Change all callers.
4425
        (File_read::get_view): Add offset and aligned parameters.  Adjust
4426
        for byteshift in return value.
4427
        (File_read::get_lasting_view): Likewise.
4428
        * fileread.h (class File_read): Update declarations.
4429
        (class File_read::View): Add byteshift_ field.  Add byteshift to
4430
        constructor.  Add byteshift method.
4431
        * archive.h (Archive::clear_uncached_views): New function.
4432
        (Archive::get_view): Add aligned parameter.  Change all callers.
4433
        * object.h (Object::get_view): Add aligned parameter.  Change all
4434
        callers.
4435
        (Object::get_lasting_view): Likewise.
4436
 
4437
        * fileread.cc (File_read::release): Don't call clear_views if
4438
        there are multiple objects.
4439
        * fileread.h (File_read::clear_uncached_views): New function.
4440
        * archive.cc (Add_archive_symbols::run): Call clear_uncached_views
4441
        on the archive.
4442
 
4443
2008-03-31  Cary Coutant  
4444
 
4445
        Add thin archive support.
4446
        * archive.cc (Archive::armagt): New const.
4447
        (Archive::setup): Remove task parameter and calls to unlock.
4448
        (Archive::unlock_nested_archives): New function.
4449
        (Archive::read_header): Add nested_off parameter. Change
4450
        all callers.
4451
        (Archive::interpret_header): Likewise.
4452
        (Archive::include_all_members): Change to handle thin
4453
        archives.
4454
        (Archive::include_member): Likewise.
4455
        * archive.h (Archive::Archive): Add new parameters and
4456
        initializers.
4457
        (Archive::armagt): New const.
4458
        (Archive::setup): Remove task parameter.
4459
        (Archive::unlock_nested_archives): New function.
4460
        (Archive::read_header): Add nested_off parameter.
4461
        (Archive::interpret_header): Likewise.
4462
        (Archive::Nested_archive_table): New typedef.
4463
        (Archive::is_thin_archive_): New field.
4464
        (Archive::nested_archives_): New field.
4465
        (Archive::options_): New field.
4466
        (Archive::dirpath_): New field.
4467
        (Archive::task_): New field.
4468
        * readsyms.cc (Read_symbols::do_read_symbols): Add check
4469
        for thin archives.  Pass additional parameters to
4470
        Archive::Archive.  Unlock the archive file after calling
4471
        Archive::setup.
4472
 
4473
2008-03-29  Ian Lance Taylor  
4474
 
4475
        * symtab.cc (Symbol_table::do_define_as_constant): Don't force a
4476
        version symbol to be local.
4477
        * testsuite/ver_test_4.sh: New file.
4478
        * testsuite/Makefile.am (check_SCRIPTS): Add ver_test_4.sh.
4479
        (check_DATA): Add ver_test_4.syms.
4480
        (ver_test_4.syms): New target.
4481
        * testsuite/Makefile.in: Rebuild.
4482
 
4483
        * output.cc
4484
        (Output_section::Input_section_sort_entry::has_priority): New
4485
        function.
4486
        (Output_section::Input_section_sort_entry::match_file_name): New
4487
        function.
4488
        (Output_section::Input_section_sort_entry::match_section_name):
4489
        Remove.
4490
        (Output_section::Input_section_sort_entry::match_section_name_prefix):
4491
        Remove.
4492
        (Output_section::Input_section_sort_entry::match_section_file):
4493
        Remove.
4494
        (Output_section::Input_section_sort_compare::operator()): Rewrite
4495
        using new Input_section_sort_entry functions.  Sort crtbegin and
4496
        crtend first.  Sort sections with no priority before sections with
4497
        a priority.
4498
        * testsuite/initpri1.c (d3): Check j != 4.
4499
        (cd5): New constructor/destructor function.
4500
        (main): Check j != 2.
4501
 
4502
        * symtab.cc (Symbol_table::add_from_object): If we don't use the
4503
        new symbol when resolving, don't call set_is_default.
4504
        * testsuite/ver_test_7.cc: New file.
4505
        * testsuite/ver_test_7.sh: New file.
4506
        * testsuite/Makefile.am (ver_test_7.so): New target.
4507
        (ver_test_7.o): New target.
4508
        (check_SCRIPTS): Add ver_test_7.sh.
4509
        (check_DATA): Add ver_test_7.syms.
4510
        (ver_test_7.syms): New target.
4511
 
4512
2008-03-28  Ian Lance Taylor  
4513
 
4514
        * layout.cc (Layout::layout): If we see an input section with a
4515
        name that needs sorting, set the must_sort flag for the output
4516
        section.
4517
        (Layout::make_output_section): If the name of the output section
4518
        indicates that it might require sorting, set the may_sort flag.
4519
        * output.h (Output_section::may_sort_attached_input_sections): New
4520
        function.
4521
        (Output_section::set_may_sort_attached_input_sections): New
4522
        function.
4523
        (Output_section::must_sort_attached_input_sections): New
4524
        function.
4525
        (Output_section::set_must_sort_attached_input_sections): New
4526
        function.
4527
        (class Output_section): Declare Input_section_sort_entry.  Define
4528
        Input_section_sort_compare.  Declare
4529
        sort_attached_input_sections.  Add new fields:
4530
        may_sort_attached_input_sections_,
4531
        must_sort_attached_input_sections_,
4532
        attached_input_sections_are_sorted_.
4533
        * output.cc (Output_section::Output_section): Initialize new
4534
        fields.
4535
        (Output_section::add_input_section): Add an entry to
4536
        input_sections_ if may_sort or must_sort are true.
4537
        (Output_section::set_final_data_size): Call
4538
        sort_attached_input_sections if necessary.
4539
        (Output_section::Input_section_sort_entry): Define new class.
4540
        (Output_section::Input_section_sort_compare::operator()): New
4541
        function.
4542
        (Output_section::sort_attached_input_sections): New function.
4543
        * configure.ac: Check whether the compiler supports constructor
4544
        priorities.  Define a CONSTRUCTOR_PRIORITY automake conditional.
4545
        * testsuite/initpri1.c: New file.
4546
        * testsuite/Makefile.am (check_PROGRAMS): Add initpri1 if
4547
        CONSTRUCTOR_PRIORITY.
4548
        (initpri1_SOURCES, initpri1_DEPENDENCIES): New variables.
4549
        (initpri1_LDFLAGS): New variable.
4550
        * configure, Makefile.in, testsuite/Makefile.in: Rebuild.
4551
 
4552
2008-03-27  Ian Lance Taylor  
4553
 
4554
        * common.cc (Sort_commons::operator): Correct sorting algorithm.
4555
        * testsuite/common_test_1.c: New file.
4556
        * testsuite/Makefile.am (check_PROGRAMS): Add common_test_1.
4557
        (common_test_1_SOURCES): New variable.
4558
        (common_test_1_DEPENDENCIES): New variable.
4559
        (common_test_1_LDFLAGS): New variable.
4560
 
4561
        * symtab.cc (Symbol_table::add_from_object): Handle saw_undefined_
4562
        and commons_ correctly when NAME/VERSION does not override
4563
        NAME/NULL.
4564
        * testsuite/ver_test_6.c: New file.
4565
        * testsuite/Makefile.am (check_PROGRAMS): Add ver_test_6
4566
        (ver_test_6_SOURCES, ver_test_6_DEPENDENCIES): New variables.
4567
        (ver_test_6_LDFLAGS, ver_test_6_LDADD): New variables.
4568
 
4569
2008-03-26  Ian Lance Taylor  
4570
 
4571
        * symtab.cc (Symbol_table::add_from_relobj): Don't set the version
4572
        of an undefined symbol from a version script.
4573
        * testsuite/Makefile.am (ver_test_5.so): New target.
4574
        (ver_test_5.o): New target.
4575
        (check_SCRIPTS): Add ver_test_5.sh.
4576
        (check_DATA): Add ver_test_5.syms.
4577
        (ver_test_5.syms): New target.
4578
        * testsuite/ver_test_5.cc: New file.
4579
        * testsuite/ver_test_5.script: New file.
4580
        * testsuite/ver_test_5.sh: New file.
4581
        * Makefile.in, testsuite/Makefile.in: Rebuild.
4582
 
4583
        PR gold/5986
4584
        Fix problems building gold with gcc 4.3.0.
4585
        * gold.h (TEMPLATE_ATTRIBUTE_PRINTF_4): Define.
4586
        (gold_error_at_location, gold_warning_at_location): Use it.
4587
        * configure.ac: Check whether we can compile and use a template
4588
        function with a printf attribute.
4589
        * x86_64.cc (Target_x86_64::do_code_fill): Swap out a 32-bit value
4590
        when jumping over bytes.
4591
        * object.cc: Instantiate Object::read_section_data.
4592
        * debug.h: Include 
4593
        * dwarf_reader.cc: Include 
4594
        * main.cc: Include .
4595
        * options.cc: Include .
4596
        * output.cc: Include .
4597
        * script.cc: Include .
4598
        * script.h: Include .
4599
        * symtab.cc: Include  and .
4600
        * target-select.cc: Include .
4601
        * version.cc: Include .
4602
        * testsuite/testmain.cc: Include .
4603
        * configure, config.in: Rebuild.
4604
 
4605
2008-03-25  Ian Lance Taylor  
4606
 
4607
        * options.cc: Include "../bfd/bfdver.h".
4608
        (options::help): Print bug reporting address.
4609
 
4610
        * version.cc (print_version): Adjust output for current value of
4611
        BFD_VERSION_STRING.
4612
 
4613
        * NEWS: New file.
4614
 
4615
        * options.cc (options::help): Print list of supported targets.
4616
        * target-select.h: Include .
4617
        (class Target_selector): Make machine_, size_, and is_big_endian_
4618
        fields const.  Add bfd_name_ and instantiated_target_ fields.
4619
        (Target_selector::Target_selector): Add bfd_name parameter.
4620
        (Target_selector::recognize): Make non-virtual, call
4621
        do_recognize.
4622
        (Target_selector::recognize_by_name): Make non-virtual, call
4623
        do_recognize_by_name.
4624
        (Target_selector::supported_names): New function.
4625
        (Target_selector::bfd_name): New function.
4626
        (Target_selector::do_instantiate_target): New pure virtual
4627
        function.
4628
        (Target_selector::do_recognize): New virtual function.
4629
        (Target_selector::do_recognize_by_name): New virtual function.
4630
        (Target_selector::instantiate_target): New private function.
4631
        (supported_target_names): Declare.
4632
        * target-select.cc (Target_selector::Target_selector): Update for
4633
        new parameter and fields.
4634
        (select_target_by_name): Check that the name matches before
4635
        calling recognize_by_name.
4636
        (supported_target_names): New function.
4637
        * i386.cc (class Target_selector_i386): Update Target_selector
4638
        constructor call.  Remove recognize and recognize_by_name.  Add
4639
        do_instantiate_target.
4640
        * x86_64.cc (class Target_selector_x86_64): Likewise.
4641
        * testsuite/testfile.cc (class Target_selector_test): Update for
4642
        changes to Target_selector.
4643
 
4644
        * README: Rewrite, with some notes on unsupported features.
4645
 
4646
2008-03-24  Cary Coutant  
4647
 
4648
        * i386.cc (Target_i386::Got_type): New enum declaration.
4649
        (Target_i386::Scan::local): Updated callers of Output_data_got
4650
        member functions.
4651
        (Target_i386::Scan::global): Likewise.
4652
        (Target_i386::Relocate::relocate): Likewise.
4653
        (Target_i386::Relocate::relocate_tls): Likewise.
4654
        * object.h (Got_offset_list): New class.
4655
        (Sized_relobj::local_has_got_offset): Added got_type parameter.
4656
        (Sized_relobj::local_got_offset): Likewise.
4657
        (Sized_relobj::set_local_got_offset): Likewise.
4658
        (Sized_relobj::local_has_tls_got_offset): Removed.
4659
        (Sized_relobj::local_tls_got_offset): Removed.
4660
        (Sized_relobj::set_local_tls_got_offset): Removed.
4661
        (Sized_relobj::Local_got_offsets): Changed to store a list of offsets.
4662
        * output.cc (Output_data_got::add_global): Added got_type parameter.
4663
        (Output_data_got::add_global_with_rel): Likewise.
4664
        (Output_data_got::add_global_with_rela): Likewise.
4665
        (Output_data_got::add_global_pair_with_rel): New function.
4666
        (Output_data_got::add_global_pair_with_rela): New function.
4667
        (Output_data_got::add_local): Added got_type parameter.
4668
        (Output_data_got::add_local_with_rel): Likewise.
4669
        (Output_data_got::add_local_with_rela): Likewise.
4670
        (Output_data_got::add_local_pair_with_rel): New function.
4671
        (Output_data_got::add_local_pair_with_rela): New function.
4672
        (Output_data_got::add_global_tls): Removed.
4673
        (Output_data_got::add_global_tls_with_rel): Removed.
4674
        (Output_data_got::add_global_tls_with_rela): Removed.
4675
        (Output_data_got::add_local_tls): Removed.
4676
        (Output_data_got::add_local_tls_with_rel): Removed.
4677
        (Output_data_got::add_local_tls_with_rela): Removed.
4678
        * output.h (Output_data_got::add_global): Added got_type parameter.
4679
        (Output_data_got::add_global_with_rel): Likewise.
4680
        (Output_data_got::add_global_with_rela): Likewise.
4681
        (Output_data_got::add_global_pair_with_rel): New function.
4682
        (Output_data_got::add_global_pair_with_rela): New function.
4683
        (Output_data_got::add_local): Added got_type parameter.
4684
        (Output_data_got::add_local_with_rel): Likewise.
4685
        (Output_data_got::add_local_with_rela): Likewise.
4686
        (Output_data_got::add_local_pair_with_rel): New function.
4687
        (Output_data_got::add_local_pair_with_rela): New function.
4688
        (Output_data_got::add_global_tls): Removed.
4689
        (Output_data_got::add_global_tls_with_rel): Removed.
4690
        (Output_data_got::add_global_tls_with_rela): Removed.
4691
        (Output_data_got::add_local_tls): Removed.
4692
        (Output_data_got::add_local_tls_with_rel): Removed.
4693
        (Output_data_got::add_local_tls_with_rela): Removed.
4694
        * resolve.cc (Symbol::override_base_with_special): Removed
4695
        reference to has_got_offset_ field.
4696
        * symtab.cc (Symbol::init_fields): Replaced initialization
4697
        of got_offset_ with got_offsets_.  Removed initialization
4698
        of has_got_offset_
4699
        * symtab.h (Symbol::has_got_offset): Aded got_type parameter.
4700
        (Symbol::got_offset): Likewise.
4701
        (Symbol::set_got_offset): Likewise.
4702
        (Symbol::has_tls_got_offset): Removed.
4703
        (Symbol::tls_got_offset): Removed.
4704
        (Symbol::set_tls_got_offset): Removed.
4705
        (Symbol::got_offset_): Removed.
4706
        (Symbol::tls_mod_got_offset_): Removed.
4707
        (Symbol::tls_pair_got_offset_): Removed.
4708
        (Symbol::got_offsets_): New field.
4709
        (Symbol::has_got_offset): Removed.
4710
        (Symbol::has_tls_mod_got_offset): Removed.
4711
        (Symbol::has_tls_pair_got_offset): Removed.
4712
        * x86_64.cc (Target_x86_64::Got_type): New enum declaration.
4713
        (Target_x86_64::Scan::local): Updated callers of Output_data_got
4714
        member functions.
4715
        (Target_x86_64::Scan::global): Likewise.
4716
        (Target_x86_64::Relocate::relocate): Likewise.
4717
        (Target_x86_64::Relocate::relocate_tls): Likewise.
4718
 
4719
2008-03-25  Ben Elliston  
4720
 
4721
        * yyscript.y: Fix spelling error in comment.
4722
 
4723
2008-03-24  Ian Lance Taylor  
4724
 
4725
        * options.h (class General_options): Define build_id option.
4726
        * layout.h (class Layout): Declare write_build_id, create_note,
4727
        create_build_id.  Add build_id_note_ member.
4728
        * layout.cc: Include , , ,
4729
        "libiberty.h", "md5.h", "sha1.h".
4730
        (Layout::Layout): Initialize eh_frame_data_,
4731
        eh_frame_hdr_section_, and build_id_note_.
4732
        (Layout::finalize): Call create_build_id.
4733
        (Layout::create_note): New function, broken out of
4734
        Layout::create_gold_note.
4735
        (Layout::create_gold_note): Call create_note.
4736
        (Layout::create_build_id): New function.
4737
        (Layout::write_build_id): New function.
4738
        (Close_task_runner::run): Call write_build_id.
4739
 
4740
        * x86_64.cc: Correct license to GPLv3.
4741
 
4742
2008-03-23  Ian Lance Taylor  
4743
 
4744
        * options.cc: Include "demangle.h".
4745
        (parse_optional_string): New function.
4746
        (parse_long_option): Handle takes_optional_argument.
4747
        (parse_short_option): Update dash_z initializer.  Handle
4748
        takes_optional_argument.
4749
        (General_options::General_options): Initialize do_demangle_.
4750
        (General_options::finalize): Set do_demangle_.  Handle demangling
4751
        style.
4752
        * options.h (parse_optional_string): Declare.
4753
        (struct One_option): Add optional_arg field.  Update constructor.
4754
        Update call constructor calls.  Add takes_optional_argument
4755
        function.
4756
        (DEFINE_var): Add optional_arg__ parameter.  Change all callers.
4757
        (DEFINE_optional_string): Define.
4758
        (General_options::demangle): Change from DEFINE_bool to
4759
        DEFINE_optional_string.
4760
        (General_options::no_demangle): New function.
4761
        (General_options::do_demangle): New function.
4762
        (General_options::set_do_demangle): New function.
4763
        (General_options::execstack_status_): Move definition to end of
4764
        class definition.
4765
        (General_options::static_): Likewise.
4766
        (General_options::do_demangle_): New field.
4767
        * object.cc (big_endian>::get_symbol_location_info): Call
4768
        Options::do_demangle, not Options::demangle.
4769
        * symtab.cc (demangle): Likewise.
4770
 
4771
2008-03-22  Ian Lance Taylor  
4772
 
4773
        * gold.h: Include  and 
4774
        * options.h: Include .
4775
 
4776
2008-03-21  Ian Lance Taylor  
4777
 
4778
        * Added source code to GNU binutils.

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.