Home | History | Annotate | Download | only in gold
      1 2016-10-21  Gergely Nagy  <ngg (a] tresorit.com>
      2 
      3 	PR gold/17704
      4 	* icf.cc (match_sections): Add new parameter section_addraligns.
      5 	Check section alignment and keep the section with the strictest
      6 	alignment.
      7 	(find_identical_sections): New local variable section_addraligns.
      8 	Store each section's alignment.
      9 	* testsuite/pr17704a_test.s: New file.
     10 	* testsuite/Makefile.am (pr17704a_test): New test.
     11 	* testsuite/Makefile.in: Regenerate.
     12 
     13 2015-07-20  Yiran Wang  <yiran (a] google.com>
     14 	Cary Coutant  <ccoutant (a] gmail.com>
     15 
     16 	PR gold/15574
     17 	* resolve.cc (Symbol_table): Remove warning about references
     18 	from shared objects to hidden symbols.
     19 	* testsuite/Makefile.am (hidden_test): Add hidden_test.syms.
     20 	* testsuite/Makefile.in: Regenerate.
     21 	* testsuite/hidden_test.sh: Check dynamic symbol table; update
     22 	expected error messages.
     23 
     24 2016-06-28 Rahul Chaudhry  <rahulchaudhry (a] google.com>
     25 
     26 	Revert patch -- to be replaced by the upstream patch with tests.
     27 
     28 	2015-06-16  Yiran Wang <yiran (a] google.com>
     29 
     30 	    * resolve.cc disable the warning of a hidden symbol matches a
     31 	    reference to be resolved
     32 
     33 2016-02-05  Sriraman Tallam  <tmsriram (a] google.com>
     34 
     35         * icf.cc (get_rel_addend): New function.
     36         (get_section_contents):  Move merge section addend computation to a
     37         new function.  Ignore negative values for SHT_REL and SHT_RELA addends.
     38         Fix bug to not read past the length of the section.
     39 
     40     Fix bug related to addend computation for MERGE sections.
     41 
     42 
     43 2016-02-26  Egor Kochetov  <egor.kochetov (a] intel.com>
     44 	    Cary Coutant  <ccoutant (a] gmail.com>
     45 
     46 	PR gold/19735
     47 	* ehframe.h (Cie::fde_encoding): New method.
     48 	* ehframe.cc (Eh_frame::read_fde): Discard FDEs for zero-length
     49 	address ranges.
     50 
     51 2016-02-11 Rahul Chaudhry  <rahulchaudhry (a] google.com>
     52 
     53 	* aarch64.cc (Target_aarch64::scan_erratum_843419_span): Remove
     54 	info message for every erratum 843419 found and fixed.
     55 
     56 2015-12-17  Peter Collingbourne  <pcc (a] google.com>
     57 
     58 	PR gold/18780
     59 	* arm.cc (Target_arm::do_make_data_plt): Choose PLT generator based
     60 	on value of --long-plt flag.
     61 	(Output_data_plt_arm_standard::do_get_plt_entry_size): Moved to
     62 	Output_data_plt_arm_short.
     63 	(Output_data_plt_arm_standard::do_fill_plt_entry): Likewise.
     64 	(Output_data_plt_arm_standard::plt_entry): Likewise.
     65 	(Output_data_plt_arm_standard::do_fill_first_plt_entry): Fix
     66 	variable reference.
     67 	(Output_data_plt_arm_short): New class.
     68 	(Output_data_plt_arm_short::do_fill_plt_entry): Error out on too large
     69 	PLT offsets instead of asserting.
     70 	(Output_data_plt_arm_long): New class.
     71 	* options.h (General_options): Define --long-plt flag.
     72 
     73 2016-01-15 Han Shen  <shenhan (a] google.com>
     74 
     75 	PR gold/19472 - need pc-relative stubs.
     76 
     77 	* aarch64.cc (Reloc_stub::stub_type_for_reloc): Return PC-relative
     78 	stub type for DSOs and pie executables.
     79 
     80 2015-11-05  Cary Coutant  <ccoutant (a] gmail.com>
     81 
     82 	PR gold/19163
     83 	* aarch64.cc (Target_aarch64::Relocate::relocate): Don't apply
     84 	certain relocations if --no-apply-dynamic-relocs is set.
     85 	* options.h (--apply-dynamic-relocs): New aarch64-specific option.
     86 
     87 2015-10-27  Han Shen  <shenhan (a] google.com>
     88 
     89 	PR gold/19042 - unsupported reloc 311/312.
     90 
     91 	* aarch64.cc (Target_aarch64::Scan::local): Add support for
     92 	reloc 311/312.
     93 
     94 2015-01-02  Alan Modra  <amodra (a] gmail.com>
     95 
     96 	* version.cc (print_version): Just print current year.
     97 	* dwp.cc (print_version): Likewise.
     98 
     99 2015-02-21  H.J. Lu  <hongjiu.lu (a] intel.com>
    100 
    101 	* configure.ac (default_size): Set to 32 for x32.
    102 	* configure: Regenerated.
    103 
    104 2015-02-18  Alan Modra  <amodra (a] gmail.com>
    105 
    106 	PR 17954
    107 	* powerpc.cc (Global_symbol_visitor_opd::operator()): Set default
    108 	visibility.
    109 
    110 2015-02-17  Rafael vila de Espndola <rafael.espindola (a] gmail.com>
    111 
    112 	* gc.h (Garbage_collection::add_reference): Don't use find.
    113 
    114 2015-02-17  Rafael vila de Espndola <rafael.espindola (a] gmail.com>
    115 
    116 	* object.cc (write_local_symbols): avoid std::vector copy.
    117 
    118 2015-02-17  Rafael vila de Espndola <rafael.espindola (a] gmail.com>
    119 
    120 	* merge.cc (get_output_offset): Use upper_bound instead of lower_bound.
    121 
    122 2015-02-09  Mark Wielaard  <mjw (a] redhat.com>
    123 
    124 	* gdb-index.cc (Gdb_index_info_reader::visit_top_die): Recognize
    125 	DW_LANG_Fortran03 and DW_LANG_Fortran08.
    126 
    127 2015-02-16  Cary Coutant  <ccoutant (a] google.com>
    128 
    129 	PR gold/17971
    130 	* incremental.cc: Remove redundant include of "output.h".
    131 
    132 2015-02-11  Will Newton  <will.newton (a] linaro.org>
    133 
    134 	PR gold/13321
    135 	* arm.cc (Target_arm::make_plt_section): Create an ARM
    136 	state mapping symbol at the start of the PLT.
    137 
    138 2015-02-09  H.J. Lu  <hongjiu.lu (a] intel.com>
    139 
    140 	* testsuite/Makefile.am (two_file_shared_2_pic_1_test_DEPENDENCIES):
    141 	Replace two_file_shared_2.so with two_file_shared_1.so.
    142 	* testsuite/Makefile.in: Regenerated.
    143 
    144 2015-02-09  Alan Modra  <amodra (a] gmail.com>
    145 
    146 	* testsuite/Makefile.am (MOSTLYCLEANFILES): Add libweak_undef_2.a,
    147 	plugin_test_thin.a and defsym_test.
    148 	* testsuite/Makefile.in: Regenerate.
    149 
    150 2015-02-04  Rafael vila de Espndola <rafael.espindola (a] gmail.com>
    151 
    152 	* merge.cc (do_add_input_section): Combine loop epilogue into main loop
    153 	body.
    154 
    155 2015-02-02  Cary Coutant  <ccoutant (a] google.com>
    156 
    157 	* x86_64.cc (Target_x86_64::Relocate::relocate_tls): Check for
    158 	executable output file.
    159 
    160 2015-01-28  Cary Coutant  <ccoutant (a] google.com>
    161 
    162 	* x86_64.cc (Target_x86_64::Scan::global): Allow IE-to-LE optimization
    163 	for undef TLS symbols.
    164 	(Target_x86_64::Relocate::relocate_tls): Likewise.
    165 	(Target_x86_64::Relocate::tls_ie_to_le): Likewise.
    166 
    167 2015-01-25  Cary Coutant  <ccoutant (a] google.com>
    168 
    169 	* output.cc (Output_segment::set_section_addresses): Fix calculation
    170 	of size of relro segment.
    171 
    172 2015-01-14  Sasa Stankovic  <Sasa.Stankovic (a] imgtec.com>
    173 
    174 	* mips.cc (reloc_high): Add r_sym.
    175 	(Mips_relocate_functions::relhi16): Add r_sym parameter. Pass r_sym to
    176 	reloc_high constructor.
    177 	(Mips_relocate_functions::relgot16_local): Likewise.
    178 	(Mips_relocate_functions::rello16): Add r_sym parameter. Use r_sym and
    179 	r_type to decide whether LO16 matches HI16.
    180 	(Target_mips::Relocate::relocate): Pass r_sym to calls to relhi16,
    181 	rello16 and relgot16_local.
    182 
    183 2015-01-09  Cary Coutant  <ccoutant (a] google.com>
    184 
    185 	* layout.cc (Layout::set_segment_offsets): Don't align start of segment
    186 	unless alignment is larger than page size.
    187 
    188 2015-01-06  H.J. Lu  <hongjiu.lu (a] intel.com>
    189 	    Cary Coutant  <ccoutant (a] google.com>
    190 
    191 	PR gold/17729
    192 	* configure.ac (DEFAULT_TARGET_X86_64): Don't set for x32.
    193 	(DEFAULT_TARGET_X32): Set for x32.
    194 	* x86_64.cc (cmp_insn_32): New.
    195 	(lea_r10_insn_32): Likewise.
    196 	(lea_r11_insn_32): Likewise.
    197 	(cmp_insn_64): Likewise.
    198 	(lea_r10_insn_64): Likewise.
    199 	(lea_r11_insn_64): Likewise.
    200 	(Target_x86_64<size>::do_calls_non_split): Handle x32.
    201 	* testsuite/Makefile.am (check_SCRIPTS): Add split_x32.sh.
    202 	(check_DATA): Add split_x32 files.
    203 	(split_x32_[1234n].o): New targets.
    204 	(split_x32_[124]): New targets.
    205 	(split_x32_[1234r].stdout): New targets.
    206 	* testsuite/split_x32.sh: New file.
    207 	* testsuite/split_x32_1.s: Likewise.
    208 	* testsuite/split_x32_2.s: Likewise.
    209 	* testsuite/split_x32_3.s: Likewise.
    210 	* testsuite/split_x32_4.s: Likewise.
    211 	* testsuite/split_x32_n.s: Likewise.
    212 	* configure: Regenerated.
    213 	* testsuite/Makefile.in: Likewise.
    214 
    215 2015-01-06  H.J. Lu  <hongjiu.lu (a] intel.com>
    216 
    217 	PR gold/17809
    218 	* x86_64.cc (Target_x86_64<size>::Relocate::tls_ie_to_le): Handle
    219 	x32.
    220 
    221 2014-12-25  Alan Modra  <amodra (a] gmail.com>
    222 
    223 	* arm.cc (Target_arm::do_adjust_elf_header): Provide namespace on
    224 	new enums.
    225 	(Target_arm::merge_object_attributes, ): Likewise.
    226 
    227 2014-12-25  Thomas Preud'homme  <thomas.preudhomme (a] arm.com>
    228 
    229 	* arm.cc (Target_arm::do_adjust_elf_header): Set e_flags in ELF header
    230 	as hard float only when Tag_ABI_VFP_args is 1, using new enum value
    231 	AEABI_VFP_args_vfp to check that.
    232 	(Target_arm::merge_object_attributes): Handle new Tag_ABI_VFP_args
    233 	value and replace hardcoded values by enum values.
    234 
    235 2014-12-20  H.J. Lu  <hongjiu.lu (a] intel.com>
    236 
    237 	PR gold/14608
    238 	* testsuite/debug_msg.cc (SometimesInlineFunction): Changed
    239 	to "return i * i * 3;".
    240 
    241 2014-12-16  Cary Coutant  <ccoutant (a] google.com>
    242 
    243 	* mapfile.cc (Mapfile::print_input_section): Print uncompressed sizes.
    244 	(Mapfile::print_output_data): Use current_data_size() to avoid
    245 	assert for sections requiring postprocessing; if address is not valid,
    246 	print 0.
    247 	(Mapfile::print_output_section): Use current_data_size(); print note
    248 	that addresses and sizes are before compression.
    249 
    250 2014-12-03  H.J. Lu  <hongjiu.lu (a] intel.com>
    251 
    252 	PR gold/17675
    253 	* testsuite/Makefile.am (pie_copyrelocs_test_CXXFLAGS): New.
    254 	* testsuite/Makefile.in: Regenerated.
    255 
    256 2014-12-01  Dimitry Ivanov <dimitry (a] google.com>
    257 
    258 	* layout.cc (Layout::finish_dynamic_section): When '-z global'
    259 	is specified set DF_1_GLOBAL in DT_FLAGS_1 flags.
    260 	* options.h (General_options): New -z option (global).
    261 
    262 2014-12-01  Cary Coutant  <ccoutant (a] google.com>
    263 
    264 	PR gold/17578
    265 	* layout.cc (Layout::layout_gnu_stack): Don't warn when -z execstack
    266 	is given.
    267 	(Layout::create_executable_stack_info): Warn when -z noexecstack is
    268 	given but some inputs require executable stack.
    269 
    270 2014-11-26  Cary Coutant  <ccoutant (a] google.com>
    271 
    272 	* layout.cc (gdb_sections): Keep .debug_gdb_scripts and
    273 	.debug_str_offsets; strip .debug_gnu_pubnames and
    274 	.debug_gnu_pubtypes.
    275 	(lines_only_debug_sections): Strip all four new sections.
    276 
    277 2014-11-25  Cary Coutant  <ccoutant (a] google.com>
    278 
    279 	* binary.cc (Binary_to_elf::sized_convert): Add size to _start symbol.
    280 	(Binary_to_elf::write_symbol): Add st_size parameter.
    281 	* binary.h (Binary_to_elf::write_symbol): Add st_size parameter.
    282 
    283 2014-11-25  Cary Coutant  <ccoutant (a] google.com>
    284 
    285 	PR gold/17639
    286 	* object.cc (Sized_relobj_file): Initialize is_deferred_layout_.
    287 	(Sized_relobj_file::do_layout): Handle deferred sections properly
    288 	during GC pass 1. Don't add reloc sections to deferred list twice.
    289 	* object.h (Sized_relobj_file::is_deferred_layout): New function.
    290 	(Sized_relobj_file::is_deferred_layout_): New data member.
    291 
    292 2014-11-21  H.J. Lu  <hongjiu.lu (a] intel.com>
    293 
    294 	PR gold/17619
    295 	* x86_64.cc (Output_data_plt_x86_64_standard<size>::do_fill_plt_entry):
    296 	Check PC-relative offset overflow in PLT entry.
    297 
    298 2015-06-16  Yiran Wang <yiran (a] google.com>
    299 
    300 	* resolve.cc disable the warning of a hidden symbol matches a
    301 	reference to be resolved
    302 
    303 2015-07-23  Ian Coolidge  <icoolidge (a] google.com>
    304 
    305 	Plumb --pic-veneer option for gold.
    306 
    307 	This fixes ARM Linux gold link after
    308 	02e541d: ARM: 8323/1: force linker to use PIC veneers
    309 
    310 	gold/
    311 	* arm.cc (Reloc_stub::stub_type_for_reloc): Plumb to stub
    312 	generation.
    313 	* options.h (General_options): Add --pic-veneer option.
    314 
    315 2015-06-11  Cary Coutant  <ccoutant (a] gmail.com>
    316 
    317 	* aarch64.cc (Erratum_stub::STUB_ADDR_ALIGN): Move initialization
    318 	outside class body.
    319 	(Reloc_stub::STUB_ADDR_ALIGN): Likewise.
    320 
    321 2015-07-20  Han Shen  <shenhan (a] google.com>
    322 
    323 	Optimize erratum 843419 fix.
    324 
    325 	* aarch64.cc (AArch64_insn_utilities::is_adr): New method.
    326 	(AArch64_insn_utilities::aarch64_adr_encode_imm): New method.
    327 	(AArch64_insn_utilities::aarch64_adrp_decode_imm): New method.
    328 	(E843419_stub): New sub-class of Erratum_stub.
    329 	(AArch64_relobj::try_fix_erratum_843419_optimized): New method.
    330 	(AArch64_relobj::section_needs_reloc_stub_scanning): Try optimized fix.
    331 	(AArch64_relobj::create_erratum_stub): Add 1 argument.
    332 	(Target_aarch64::scan_erratum_843419_span): Pass in adrp insn offset.
    333 
    334 2015-07-20  Han Shen  <shenhan (a] google.com>
    335 
    336 	Fix arm elf header flags wrt hardfp bit.
    337 
    338 	* arm.cc (Target_arm::do_adjust_elf_header): Set flags into view.
    339 
    340 2015-07-09  Han Shen  <shenhan (a] google.com>
    341 
    342 	Drop missing symbol warning for arm/aarch64.
    343 
    344 	* aarch64.cc (AArch64_relobj::scan_errata): Drop missing symbol warning.
    345 	* arm.cc (Arm_relobj::scan_section_for_cortex_a8_erratum): Drop missing
    346 	symbol warning.
    347 
    348 2015-07-09  Han Shen  <shenhan (a] google.com>
    349 
    350 	Use "gold_info" instead of "gold_warning" for erratum fix.
    351 
    352 	* aarch64.cc (Target_aarch64::scan_erratum_843419_span): Use
    353 	'gold_info'.
    354 	(Target_aarch64::scan_erratum_835769_span): USe 'gold_info'.
    355 
    356 2015-07-07  Han Shen  <shenhan (a] google.com>
    357 
    358 	Make gold aarch64 accept long form of mapping symbols.
    359 
    360 	* aarch64.cc (AArch64_relobj::do_count_local_symbols): Make legal
    361 	of mapping symbols.
    362 
    363 2015-06-29  Han Shen  <shenhan (a] google.com>
    364 
    365 	Patch for erratum 843419 internal error.
    366 
    367 	* aarch64.cc (Erratum_stub::Insn_utilities): New typedef.
    368 	(Erratum_stub::update_erratum_insn): New method.
    369 	(Stub_table::relocate_stubs): Modified to place relocated insn.
    370 	(AArch64_relobj::fix_errata): Modified gold_assert.
    371 
    372 2015-06-12  Han Shen  <shenhan (a] google.com>
    373 
    374 	Fix erratum 835769.
    375 
    376 	* aarch64.cc (AArch64_insn_utilities::BYTES_PER_INSN): Move
    377 	defintion outside class definition.
    378 	(AArch64_insn_utilities::AARCH64_ZR): New static constant.
    379 	(AArch64_insn_utilities::aarch64_op31): New member.
    380 	(AArch64_insn_utilities::aarch64_ra): New member.
    381 	(AArch64_insn_utilities::aarch64_mac): New member.
    382 	(AArch64_insn_utilities::aarch64_mlxl): New member.
    383 	(ST_E_835769): New global enum member.
    384 	(Stub_table::relocate_stubs): Add 835769 handler.
    385 	(Stub_template_repertoire::Stub_template_repertoire): Install new
    386 	stub type.
    387 	(AArch64_relobj::scan_errata): This func is renamed from
    388 	scan_erratum_843419.
    389 	(AArch64_relobj::do_count_local_symbols): Add 835769 handler.
    390 	(AArch64_relobj::do_relocate_sections): Add 835769 handler.
    391 	(AArch64_relobj::scan_sections_for_stubs): Add 835769 handler.
    392 	(Target_aarch64::scan_erratum_835769_span): New method.
    393 	(Target_aarch64::create_erratum_stub): New method.
    394 	(Target_aarch64::is_erratum_835769_sequence): New method.
    395 	(Target_aarch64::scan_erratum_843419_sequence): Move part of the
    396 	code into create_erratum_stub.
    397 	* options.h (fix_cortex_a53_835769): New option.
    398 
    399 2015-06-10  Han Shen  <shenhan (a] google.com>
    400 	Patch for erratum-843419 (2 of 2 - fix erratum occurrences).
    401 
    402 	Now fixing for 843419 is fully functional.
    403 
    404 	The first part of the erratum fix CL is here -
    405 	https://sourceware.org/ml/binutils/2015-04/msg00229.html
    406 
    407 	* aarch64.cc(global enum): New constants representing stub types.
    408 	(Stub_template): New POD struct.
    409 	(Stub_template_repertoire): New class.
    410 	(Stub_base): New class.
    411 	(Erratum_stub): New class.
    412 	(Reloc_stub): Refactored to be a subclass of Stub_base.
    413 	(Reloc_stub::Stub_type): Removed.
    414 	(Reloc_stub::offset): Moved to Stub_base.
    415 	(Reloc_stub::set_offset): Moved to Stub_base.
    416 	(Reloc_stub::destination_address): Moved to Stub_base.
    417 	(Reloc_stub::set_destination_address): Moved to Stub_base.
    418 	(Reloc_stub::reset_destination_address): Moved to Stub_base.
    419 	(Reloc_stub::stub_type): Renamed and moved to Stub_base.
    420 	(Reloc_stub::stub_size): Renamed and moved to Stub_base.
    421 	(Reloc_stub::stub_insns): Renamed and moved to Stub_base.
    422 	(Reloc_stub::write): Moved to Stub_base.
    423 	(Reloc_stub::invalid_offset): Moved to Stub_base.
    424 	(Reloc_stub::invalid_address): Moved to Stub_base.
    425 	(Reloc_stub::stub_type_): Renamed and moved to Stub_base.
    426 	(Reloc_stub::stub_insns_): Moved to Stub_base.
    427 	(Reloc_stub::offset_): Moved to Stub_base.
    428 	(Reloc_stub::destination_address_): Moved to Stub_base.
    429 	(Stub_table::The_aarch64_relobj): New typedef.
    430 	(Stub_table::The_erratum_stub): New typedef.
    431 	(Stub_table::The_erratum_stub_less): New typedef.
    432 	(Stub_table::The_erratum_stub_set): New typedef.
    433 	(Stub_table::The_erratum_stub_set_iter): New typedef.
    434 	(Stub_table::empty): Added emptiness testing for erratum stubs.
    435 	(Stub_table::add_erratum_stub): New method to add an erratum stub.
    436 	(Stub_table::find_erratum_stub): New method.
    437 	(Stub_table::find_erratum_stubs_for_input_section): New method.
    438 	(Stub_table::erratum_stub_address): New method.
    439 	(Stub_table::update_date_size_changed_p): Modified to handle erratum stubs.
    440 	(Stub_table::do_addralign): Modified to handle erratum stubs.
    441 	(Stub_table::erratum_stubs_): New member.
    442 	(Stub_table::erratum_stub_size_): New member.
    443 	(Stub_table::relocate_stubs): Modified to handle erratum stubs.
    444 	(Stub_table::do_write): Modified to handle erratum stubs.
    445 	(AArch64_relobj::The_erratum_stub): New typedef.
    446 	(AArch64_relobj::Erratum_stub_set_iter): New typedef.
    447 	(AArch64_relobj::fix_errata): New method.
    448 	(Target_aarch64::The_reloc_stub_type): Removed.
    449 	(Target_aarch64::The_erratum_stub): New typede.
    450 	(AArch64_relocate_functions::construct_b): New method.
    451 
    452 2015-04-27  Han Shen  <shenhan (a] google.com>
    453 
    454 	* options.h (--fix-cortex-a53-843419): Rename option.
    455 	* aarch64.cc (AArch64_relobj::do_count_local_symbols): Use renamed
    456 	option.
    457 	(AArch64_relobj::scan_sections_for_stubs): Use renamed option.
    458 
    459 2015-04-16  Han Shen  <shenhan (a] google.com>
    460 
    461 	* aarch64.cc (AArch64_insn_utilities): New utility class.
    462 	(AArch64_relobj::Mapping_symbol_position): New struct.
    463 	(AArch64_relobj::Mapping_symbol_info): New typedef.
    464 	(AArch64_relobj::do_count_local_symbols): New function overriding
    465 	parent's implementation.
    466 	(AArch64_relobj::mapping_symbol_info_): New member
    467 	(AArch64_relobj::scan_erratum_843419): New method.
    468 	(Target_aarch64::scan_erratum_843419_span): New method.
    469 	(Target_aarch64::is_erratum_843419_sequence): New method.
    470 	* options.h (fix_cortex_a53): New option.
    471 
    472 2015-02-02  Khem Raj  <raj.khem (a] gmail.com>
    473 
    474 	* attributes.h (class Output_attributes_section_data ): Add
    475 	do_print_to_mapfile function.
    476 
    477 2015-04-07  HC Yen <hc.yen (a] mediatek.com>
    478 
    479 	Add AArch32 support for gold linker.
    480 	gold/
    481 	* arm.cc: Add V8 arch combine table.
    482 
    483 2015-03-21  Cary Coutant  <cary (a] google.com>
    484 
    485 	PR gold/18048
    486 	* script-c.h (script_include_directive): Add first_token parameter.
    487 	* script.cc (script_include_directive): Add first_token parameter, and
    488 	pass it to read_script_file.
    489 	* yyscript.y (PARSING_SECTIONS_BLOCK, PARSING_SECTION_CMDS)
    490 	(PARSING_MEMORY_DEF): New tokens.
    491 	(top): Add new productions for INCLUDE files.
    492 	(file_cmd): Replace file_or_sections_cmd with copy of its productions.
    493 	Pass PARSING_LINKER_SCRIPT to script_include_directive.
    494 	(section_block_cmd): Likewise; pass PARSING_SECTIONS_BLOCK.
    495 	(section_cmd): Pass PARSING_SECTION_CMDS.
    496 	(file_or_sections_cmd): Remove.
    497 	(memory_def): Pass PARSING_MEMORY_DEF.
    498 	* testsuite/Makefile.am (memory_test_2): New test.
    499 	* testsuite/Makefile.in: Regenerate.
    500 	* testsuite/memory_test_inc.t: New script file.
    501 	* testsuite/memory_test_inc_1.t.src: New script file.
    502 	* testsuite/memory_test_inc_2.t.src: New script file.
    503 	* testsuite/memory_test_inc_3.t.src: New script file.
    504 
    505 2015-03-21  Cary Coutant  <cary (a] google.com>
    506 
    507 	PR gold/18010
    508 	* stringpool.cc (Stringpool_template): Don't optimize if section
    509 	alignment is greater than sizeof(char).
    510 
    511 2014-11-13  H.J. Lu  <hongjiu.lu (a] intel.com>
    512 
    513 	* x86_64.cc (Target_x86_64<size>::Scan::global): Don't make PLT
    514 	entry for R_X86_64_GOTPLT64.
    515 	(Target_x86_64<size>::Relocate::relocate): Update comments for
    516 	R_X86_64_GOTPLT64.
    517 
    518 2014-11-06  Evgeniy Dushistov  <dushistov (a] mail.ru>
    519 
    520 	* plugin.cc: use lock to searialize calls of Plugin_manager::claim_file
    521 	* plugin.h: add lock definition
    522 
    523 2014-10-29  Han Shen  <shenhan (a] google.com>
    524 	    Jing Yu   <jingyu (a] google.com>
    525 
    526 	* aarch64-reloc.def: Add LD_PREL_LO12, ADR_PREL_LO21,
    527 	TLSLD_ADR_PAGE21, TLSLD_ADD_LO12_NC, TLSLD_MOVW_DTPREL_G1,
    528 	TLSLD_MOVW_DTPREL_G0_NC. Change property of TLS relocations to
    529 	Symbol::TLS_REF.
    530 	* aarch64.cc (Target_aarch64::do_can_check_for_function_pointers): New
    531 	method.
    532 	(Target_aarch64::reloc_needs_plt_for_ifunc): New method.
    533 	(Target_aarch64::tls_ld_to_le): New method.
    534 	(Target_aarch64::aarch64_info): Enable can_icf_inline_merge_sections
    535 	for 64bit targets.
    536 	(Output_data_plt_aarch64::irelative_rel_): New data member.
    537 	(Output_data_plt_aarch64::add_entry): Add irelative entries to plt.
    538 	(Output_data_plt_aarch64::add_local_ifunc_entry): New method.
    539 	(Output_data_plt_aarch64::add_relocation): New method.
    540 	(Output_data_plt_aarch64::do_write): Add gold_assert on got_irelative
    541 	offset. Add got_irelative size to got size.
    542 	(AArch64_relocate_functions): Typedef AArch64_valtype. Replace long
    543 	type string with the new typename.
    544 	(AArch64_relocate_functions::update_adr): Replace parameter x with
    545 	immed.
    546 	(AArch64_relocate_functions::update_movnz): Correct wrong val mask.
    547 	(AArch64_relocate_functions::reloc_common): New method.
    548 	(AArch64_relocate_funcsions::rela_general): Extract common part out
    549 	into reloc_common method.
    550 	(AArch64_relocate_functions::rela_general): Likewise.
    551 	(AArch64_relocate_functions::pcrela_general): Likewise.
    552 	(AArch64_relocate_functions::adr): New method.
    553 	(AArch64_relocate_functions::adrp): Calculate immed before calling
    554 	update_adr.
    555 	(AArch64_relocate_functions::adrp): Likewise.
    556 	(AArch64_relocate_functions::movnz): Cast x to SignedW type when
    557 	comparing x to 0. Calculate immed from ~x when x < 0.
    558 	(Target_aarch64::optimize_tls_reloc): Add new cases for
    559 	TLSLD_ADR_PAGE21, TLSLD_ADD_LO12_NC, TLSLD_MOVW_DTPREL_G1,
    560 	TLSLD_MOVW_DTPREL_G0_NC.
    561 	(Target_aarch64::possible_function_pointer_reloc): Implement this
    562 	method.
    563 	(Target_aarch64::Scan::local_reloc_may_be_function_pointer): Update
    564 	comment.
    565 	(Target_aarch64::Scan::local): Add codes to handle STT_GNU_IFUNC
    566 	symbol. Add cases for TLSLD_ADR_PAGE21, TLSLD_ADD_LO12_NC,
    567 	TLSLD_MOVW_DTPREL_G1, TLSLD_MOVW_DTPREL_G0_NC.
    568 	(Target_aarch64::Scan::global): Add codes to handle STT_GNU_IFUNC
    569 	symbol. Add cases for TLSLD_ADR_PAGE21, TLSLD_ADD_LO12_NC,
    570 	TLSLD_MOVW_DTPREL_G1, TLSLD_MOVW_DTPREL_G0_NC.
    571 	(Target_aarch64::make_plt_entry): Call add_entry with two more
    572 	parameters.
    573 	(Target_aarch64::make_local_ifunc_plt_entry): New method.
    574 	(Target_aarch64::Relocate::relocate): Add cases for LD_PREL_LO19,
    575 	ADR_PREL_LO21, TLSLD_ADR_PAGE21, TLSLD_ADD_LO12_NC,
    576 	TLSLD_MOVW_DTPREL_G1, TLSLD_MOVW_DTPREL_G0_NC.
    577 	(Target_aarch64::Relocate::relocate_tls): Add cases for
    578 	TLSLD_ADR_PAGE21, TLSLD_ADD_LO12_NC, TLSLD_MOVW_DTPREL_G1,
    579 	TLSLD_MOVW_DTPREL_G0_NC.
    580 	* testsuite/icf_safe_so_test.cc: Correct test comment.
    581 	* testsuite/icf_safe_test.sh: Add AArch64 arch.
    582 
    583 2014-10-22  Alan Modra  <amodra (a] gmail.com>
    584 
    585 	* powerpc.cc (do_relax): Add gcc-4.9 libgomp functions to
    586 	thread_starter.
    587 
    588 2014-10-18  Andreas Schwab  <schwab (a] linux-m68k.org>
    589 
    590 	* configure.tgt (targ_extra_obj) [aarch64*-*]: Define.
    591 
    592 2014-10-17  Cary Coutant  <ccoutant (a] google.com>
    593 
    594 	* aarch64.cc (AArch64_relocate_functions::maybe_apply_stub):
    595 	Add "typename" keyword.
    596 
    597 2014-09-22  Han Shen  <shenhan (a] google.com>
    598             Jing Yu   <jingyu (a] google.com>
    599 
    600 	Patch for gold aarch64 backend to support relaxation.
    601 	* aarch64-reloc.def: Change format.
    602 	* aarch64.cc (class Reloc_stub): New class.
    603 	(class Stub_table): New class.
    604 	(class AArch64_relobj): New class.
    605 	(class AArch64_input_section): New class.
    606 	(class AArch64_output_section): New class.
    607 	(Target_aarch64::new_stub_table): New method.
    608 	(Target_aarch64::new_aarch64_input_section): New method.
    609 	(Target_aarch64::find_aarch64_input_section): New method.
    610 	(Target_aarch64::scan_section_for_stubs): New method.
    611 	(Target_aarch64::scan_reloc_section_for_stubs): New method.
    612 	(Target_aarch64::relocate_stub): New method.
    613 	(Target_aarch64::current_target): New method.
    614 	(Target_aarch64::do_make_elf_object): New method.
    615 	(Target_aarch64::do_may_relax): New method.
    616 	(Target_aarch64::do_relax): New method.
    617 	(Target_aarch64::group_sections): New method.
    618 	(Target_aarch64::scan_reloc_for_stub): New method.
    619 	(Target_aarch64::do_make_output_section): New method.
    620 	(Target_aarch64::stub_tables_): New data member.
    621 	(Target_aarch64::aarch64_input_section_map_): New data member.
    622 	(AArch64_relocate_functions::maybe_apply_stub): New method.
    623 
    624 2014-09-30  Cary Coutant  <ccoutant (a] google.com>
    625 
    626 	PR gold/17432
    627 	* resolve.cc (Symbol_table::resolve): Fix local shadowing error.
    628 
    629 2014-09-30  Kito Cheng  <kito (a] 0xlab.org>
    630 
    631 	PR gold/13597
    632 	* layout.cc (Layout::create_dynamic_symtab): Build gnu-style
    633 	hash table before sysv-style hash table.
    634 
    635 2014-09-29  Sriraman Tallam  <tmsriram (a] google.com>
    636 
    637 	* options.h (--pic-executable): Add negative to alias to -no-pie.
    638 
    639 2014-09-26  Cary Coutant  <ccoutant (a] google.com>
    640 
    641 	PR gold/16773
    642 	* object.cc (Sized_relobj_file): Compute value of section symbols
    643 	for TLS sections the same as TLS symbols.
    644 
    645 2014-09-25  Cary Coutant  <ccoutant (a] google.com>
    646 
    647 	PR gold/17432
    648 	* resolve.cc (Symbol_table::resolve): Override common placeholder
    649 	symbols, but adjust sizes.
    650 	* symtab.cc (Symbol_table::add_from_object): Don't add placeholder
    651 	symbols to common lists.
    652 
    653 2014-09-24  Alan Modra  <amodra (a] gmail.com>
    654 
    655 	* po/POTFILES.in: Regenerate.
    656 
    657 2014-09-23  Taiju Tsuiki  <tzik (a] google.com>
    658             Cary Coutant  <ccoutant (a] google.com>
    659 
    660 	PR gold/14860
    661 	* gold.cc (queue_final_tasks): Add Write_sections_task as a blocker
    662 	on input_sections_blocker.
    663 	* layout.cc (Write_sections_task::locks): Unblock
    664 	input_sections_blocker_.
    665 	* layout.h (Write_sections_task::Write_sections_task): Add
    666 	input_sections_blocker.
    667 	* testsuite/Makefile.am (exception_x86_64_bnd_test): Add gcctestdir/ld
    668 	to DEPENDENCIES.
    669 	* testsuite/Makefile.in: Regenerate.
    670 
    671 2014-09-18  Rafael vila de Espndola <rafael.espindola (a] gmail.com>
    672 
    673 	* testsuite/Makefile.am (plugin_test_10): New test.
    674 	* testsuite/Makefile.in: Regenerate
    675 	* testsuite/plugin_common_test_2.c (c1): Align to 8.
    676 	* testsuite/plugin_test_10.sh: New file.
    677 
    678 2014-09-17  Rafael vila de Espndola <rafael.espindola (a] gmail.com>
    679 
    680 	* plugin.cc (Sized_pluginobj::do_add_symbols): Ignore isym->size.
    681 	* resolve.cc (Symbol_table::resolve): Don't override common symbols
    682 	during the replacement phase.
    683 
    684 2014-09-17  Han Shen  <shenhan (a] google.com>
    685 	    Jing Yu  <jingyu (a] google.com>
    686 
    687 	* aarch64-reloc.def: Add TLSGD_ADR_PAGE21, TLSGD_ADD_LO12_NC,
    688 	TLSDESC_ADR_PAGE21, TLSDESC_LD64_LO12, TLSDESC_ADD_LO12, TLSDESC_CALL.
    689 	* aarch64.cc (Target_aarch64): Add data members
    690 	got_irelative_, got_tlsdesc_, rela_irelative_, got_mod_index_offset_,
    691 	tlsdesc_reloc_info_, tls_base_symbol_defined_. Initialize them in
    692 	constructor.
    693 	(Target_aarch64::do_reloc_symbol_index): New method.
    694 	(Target_aarch64::do_reloc_addend): New method.
    695 	(Target_aarch64::add_tlsdesc_info): New method.
    696 	(Target_aarch64::do_dynsym_value): New method.
    697 	(Target_aarch64::do_make_data_plt): Add new parameters: got,
    698 	got_irelative. Pass them to Output_data_plt_aarch64_standard.
    699 	(Target_aarch64::make_data_plt): Add new parameters: got,
    700 	got_irelative. Pass them to do_make_data_plt.
    701 	(Target_aarch64::Relocate): Add skip_call_tls_get_addr_ variable.
    702 	(Target_aarch64::Relocate:tls_gd_to_le): New method.
    703 	(Target_aarch64::Relocate:tls_ie_to_le): New method.
    704 	(Target_aarch64::Relocate:tls_desc_gd_to_le): New method.
    705 	(Target_aarch64::Relocate:tls_desc_gd_to_ie): New method.
    706 	(Target_aarch64::got_tlsdesc_section): New method.
    707 	(Target_aarch64::make_local_ifunc_plt_entry): New method.
    708 	(Target_aarch64::define_tls_base_symbol): New method.
    709 	(Target_aarch64::reserve_tlsdesc_entries): New method.
    710 	(Target_aarch64::got_mod_index_entry): New method.
    711 	(Target_aarch64::rela_tlsdesc_section): New method.
    712 	(Target_aarch64::rela_irelative_section): New method.
    713 	(Target_aarch64::Tlsdesc_info): New struct.
    714 	(Target_aarch64::got_section): Create .got.plt space for IRELATIVE
    715 	relocations and tlsdesc relocations.
    716 	(Target_aarch64::optimize_tls_reloc): Implement method.
    717 	(Output_data_plt_aarch64): Add member variables: tlsdesc_rel_, got_,
    718 	got_irelative_, irelative_count_, tlsdesc_got_offset_. Initialize them
    719 	in constructor.
    720 	(Output_data_plt_aarch64::reserve_tlsdesc_entry): New method.
    721 	(Output_data_plt_aarch64::has_tlsdesc_entry): New method.
    722 	(Output_data_plt_aarch64::get_tlsdesc_got_offset): New method.
    723 	(Output_data_plt_aarch64::get_tlsdesc_plt_offset): New method.
    724 	(Output_data_plt_aarch64::rela_tlsdesc): New method.
    725 	(Output_data_plt_aarch64::rela_irelative): New method.
    726 	(Output_data_plt_aarch64::entry_count): Count IRELATIVE relocations.
    727 	(Output_data_plt_aarch64::first_plt_entry_offset): Add const attribute.
    728 	(Output_data_plt_aarch64::get_plt_tlsdesc_entry_size): New method.
    729 	(Output_data_plt_aarch64::fill_tlsdesc_entry): New method.
    730 	(Output_data_plt_aarch64::do_get_plt_tlsdesc_entry_size): New method.
    731 	(Output_data_plt_aarch64::do_fill_tlsdesc_entry): New method.
    732 	(Output_data_plt_aarch64_standard): New member variables:
    733 	plt_tlsdesc_entry_size, tlsdesc_plt_entry.
    734 	(Output_data_plt_aarch64_standard::Output_data_plt_aarch64_standard):
    735 	New parameter: got, got_irelative.
    736 	(Output_data_plt_aarch64_standard::do_get_plt_entry_size): New method.
    737 	(Output_data_plt_aarch64_standard::do_fill_tlsdesc_entry): New method.
    738 	(Output_data_plt_aarch64::do_write): Replace got_address with
    739 	gotplt_address. Add irelative_count_ to count. Write tlsdesc entry.
    740 	(AArch64_relocate_functions::update_movnz): New method.
    741 	(AArch64_relocate_functions): Correct format.
    742 	(AArch64_relocate_functions::movnz): New method.
    743 	(Target_aarch64::Scan::local): Correct format. Move r_sym, got to
    744 	before the switch. Add new cases to switch.
    745 	Check ie_to_le relaxation on tlsie relocations. Add code handling
    746 	tlsgd tlsdesc cases.
    747 	(Target_aarch64::Scan::global): Move arp to front. Do copy_reloc when
    748 	needed. Add new cases to switch. Insert dynamic RELATIVE relocation
    749 	when needed. Add code handling tlsgd, tlsie, tlsdesc cases.
    750 	Call reloc_name_in_error_message to print unsupported reloc.
    751 	(Target_aarch64::make_plt_section): Pass got_ and got_irelative_ to
    752 	make_data_plt.
    753 	(Target_aarch64::do_finalize_sections): Emit relocs to save COPY
    754 	relocs. Fill in some more dynamic tags.
    755 	(Target_aarch64::Relocate::relocate): Handle tlsgd, tlsdesc relocs.
    756 	Skip call tls_get_addr when tlsgd is relaxed.
    757 	(Target_aarch64::Relocate::relocate_tls): Correct format. Add code
    758 	handling tlsgd, tlsdesc relocs, and tls gd->le, ie->le, tlsdesc->le,
    759 	tlsdesc->ie relaxation.
    760 
    761 2014-09-03  Sasa Stankovic  <Sasa.Stankovic (a] imgtec.com>
    762 
    763 	* mips.cc (Target_mips_nacl): New class.
    764 	(Target_selector_mips_nacl): New class.
    765 	(target_selector_mips32): Rename from target_selector_mips32be and use
    766 	Target_selector_mips_nacl instead of Target_selector_mips.
    767 	(target_selector_mips32el): Rename from target_selector_mips32 and use
    768 	Target_selector_mips_nacl instead of Target_selector_mips.
    769 	(target_selector_mips64): Rename from target_selector_mips64be and use
    770 	Target_selector_mips_nacl instead of Target_selector_mips.
    771 	(target_selector_mips64el): Rename from target_selector_mips64 and use
    772 	Target_selector_mips_nacl instead of Target_selector_mips.
    773 	(Target_mips::mips_info): Add const attribute.
    774 
    775 2014-09-02  Cary Coutant  <ccoutant (a] google.com>
    776 
    777 	* dwp.cc (Sized_relobj_dwo::do_section_name): Add const attribute.
    778 	* dynobj.h (Sized_dynobj::do_section_name): Likewise.
    779 	* incremental.cc (Sized_relobj_incr::do_section_name): Likewise.
    780 	(Sized_incr_dynobj::do_section_name): Likewise.
    781 	* incremental.h (Sized_relobj_incr::do_section_name): Likewise.
    782 	(Sized_incr_dynobj::do_section_name): Likewise.
    783 	* object.h (Object::section_name): Likewise.
    784 	(Object::do_section_name): Likewise.
    785 	(Sized_relobj_file::do_section_name): Likewise.
    786 	* plugin.cc (Sized_pluginobj::do_section_name): Likewise.
    787 	* plugin.h (Sized_pluginobj::do_section_name): Likewise.
    788 
    789 2014-09-02  Cary Coutant  <ccoutant (a] google.com>
    790 
    791 	PR gold/17005
    792 	* ehframe.cc (Fde::write): Add output_offset parameter.
    793 	(Cie::write): Likewise.
    794 	(Eh_frame::set_final_data_size): Account for offset within output
    795 	section.
    796 	(Eh_frame::do_sized_write): Likewise.
    797 	* ehframe.h (Fde::write): Add output_offset parameter.
    798 	(Cie::write): Likewise.
    799 	* output.cc (Output_section::Input_section_sort_entry): Remove
    800 	section_has_name_; add output_section_name parameter. Use
    801 	output section name for non-input sections.
    802 	(Output_section::Input_section_sort_entry::section_has_name): Remove.
    803 	(Output_section::Input_section_sort_entry::section_has_name_): Remove.
    804 	(Output_section::Input_section_sort_compare): Remove logic for
    805 	sections without names.
    806 	(Output_section::Input_section_sort_init_fini_compare): Likewise.
    807 	(Output_section::Input_section_sort_section_prefix_special_ordering_compare):
    808 	Likewise.
    809 	(Output_section::Input_section_sort_section_name_compare): Likewise.
    810 
    811 2014-08-29 Han Shen <shenhan (a] google.com>
    812 	   Jing Yu <jingyu (a] google.com>
    813 
    814 	* aarch64-reloc-property.cc
    815 	(AArch64_reloc_property_table::reloc_name_in_error_message): Fix bug in
    816 	reference reloc property in the table.
    817 	* aarch64-reloc.def: Add TLSLE reloc types and fix some errors in
    818 	3 other entries.
    819 	* aarch64.cc: (Output_data_got_aarch64::add_static_reloc):
    820 	2 new overloaded methods.
    821 	(Output_data_got_aarch64::do_write): Add code to write out
    822 	static relocs.
    823 	(class Output_data_got_aarch64::Static_reloc): New class to wrap
    824 	static relocs.
    825 	(Output_data_got_aarch64::static_relocs): New vector to
    826 	hold static relocs.
    827 	(Target_aarch64::TCB_SIZE): New const static memeber.
    828 	(Target_aarch64::tcb_size): New method.
    829 	(Target_aarch64::Relocate::relocate): Add code handling new reloc types.
    830 	(Target_aarch64::Relocate::relocate_tls): New method.
    831 	(Target_aarch64::Scan::local): Add code handling new reloc types.
    832 	(Target_aarch64::Scan::global): Add code handling new reloc types.
    833 
    834 2014-08-13  Sriraman Tallam  <tmsriram (a] google.com>
    835 
    836 	* options.h (-no-pie): Add option.
    837 
    838 2014-08-08  Jing Yu  <jingyu (a] google.com>
    839 	    Han Shen  <shenhan (a] google.com>
    840 
    841 	* Makefile.am (HFILES): Add aarch64-reloc-property.h.
    842 	(DEFFILES): add aarch64-reloc.def.
    843 	(TARGETSOURCES): Add aarch64-reloc-property.cc.
    844 	(ALL_TARGETOBJS): Add aarch64-reloc-property.$(OBJEXT).
    845 	* Makefile.in: Regenerate.
    846 	* aarch64-reloc-property.cc: New file.
    847 	* aarch64-reloc-property.h: New file.
    848 	* aarch64-reloc.def: New file.
    849 	* aarch64.cc: Include aarch64-reloc-property.h. Replace spaces
    850 	with tab to make the format consistent.
    851 	(Output_data_got_aarch64::symbol_table_): New method.
    852 	(Target_aarch64::do_plt_address_for_global): New method.
    853 	(Target_aarch64::do_plt_address_for_local): New method.
    854 	(Target_aarch64::do_select_as_default_target): New method.
    855 	(Target_aarch64::do_make_data_plt): New method.
    856 	(Target_aarch64::make_data_plt): New method.
    857 	(Output_data_plt_aarch64::has_irelative_section): New method.
    858 	(Output_data_plt_aarch64::address_for_global): New method.
    859 	(Output_data_plt_aarch64::address_for_local): New method.
    860 	(Output_data_plt_aarch64::irelative_rel_): New parameter.
    861 	(Output_data_plt_aarch64::add_entry): Implement contents.
    862 	(Output_data_plt_aarch64::set_final_data_size): Fix typo.
    863 	(Output_data_plt_aarch64::do_write): Remove useless got_base. Set
    864 	the got_pov entry to plt0.
    865 	(Output_data_plt_aarch64_standard::do_fill_first_plt_entry):
    866 	Implement contents.
    867 	(Output_data_plt_aarch64_standard::do_fill_plt_entry): Implement.
    868 	(AArch64_howto): New struct.
    869 	(aarch64_howto[]): New static const array.
    870 	(AArch64_relocate_functions): New class.
    871 	(Target_aarch64::Scan::get_reference_flags): Remove method.
    872 	(Target_aarch64::Scan::local): Implement to support a few relocations.
    873 	(Target_aarch64::Scan::global): Implement to support a few relocations.
    874 	(Target_aarch64::make_plt_section): Implement contents.
    875 	(Target_aarch64::make_plt_entry): Implement contents.
    876 	(Target_aarch64::do_finalize_sections): Implement contents.
    877 	(Target_aarch64::Relocate::relocate): Implement a few relocations.
    878 	(Target_aarch64::relocate_section): Implement contents.
    879 
    880 2014-08-06  Alan Modra  <amodra (a] gmail.com>
    881 
    882 	* testsuite/defsym_test.sh: Allow ppc64le localentry annotation.
    883 
    884 2014-08-06  Alan Modra  <amodra (a] gmail.com>
    885 
    886 	PR 13227
    887 	* symtab.cc (Symbol_table::add_from_relobj): Warn on __gnu_lto_slim.
    888 
    889 2014-07-21  Sriraman Tallam  <tmsriram (a] google.com>
    890 
    891 	* object.cc (Relobj::is_section_name_included): Add
    892 	".rodata.nptl_version" to not garbage collect this section.
    893 
    894 2014-07-08  Cary Coutant  <ccoutant (a] google.com>
    895 
    896 	* expression.cc (struct Expression::Expression_eval_info): Add
    897 	new fields type_pointer, vis_pointer, and nonvis_pointer.
    898 	(Expression::eval_maybe_dot): Add type_pointer, vis_pointer, and
    899 	nonvis_pointer parameters. Adjust all calls.
    900 	(Symbol_expression::value): Update type, visibility, and nonvis bits
    901 	in caller.
    902 	* script.cc (Symbol_assignment::sized_finalize): Update type,
    903 	visibility, and remaining st_other bits for new symbol.
    904 	* script.h: (Expression::eval_maybe_dot): Add type_pointer,
    905 	vis_pointer, and nonvis_pointer parameters.
    906 	* symtab.h (Symbol::set_type): New method.
    907 
    908 	* testsuite/Makefile.am (defsym_test): New test.
    909 	* testsuite/Makefile.in: Regenerate.
    910 	* testsuite/defsym_test.c: New file.
    911 	* testsuite/defsym_test.sh: New file.
    912 
    913 2014-07-08  Cary Coutant  <ccoutant (a] google.com>
    914 
    915 	PR gold/15639
    916 	* dynobj.h (Sized_dynobj::base_read_symbols): New method.
    917 	* dynobj.cc (Sized_dynobj::do_read_symbols): Move body to...
    918 	(Sized_dynobj::base_read_symbols): ...new method.
    919 	* object.h (Sized_relobj_file::base_read_symbols): New method.
    920 	* object.cc (Sized_relobj_file::do_read_symbols): Move body to...
    921 	(Sized_relobj_file::base_read_symbols): ...new method.
    922 	* arm.cc (Arm_relobj::do_read_symbols): Call base_read_symbols.
    923 	* mips.cc: (Mips_relobj::do_read_symbols): Likewise.
    924 	* powerpc.cc (Powerpc_dynobj::do_read_symbols): Likewise.
    925 
    926 2014-07-04  Alan Modra  <amodra (a] gmail.com>
    927 
    928 	* po/POTFILES.in: Regenerate.
    929 
    930 2014-07-02  Jing Yu  <jingyu (a] google.com>
    931 
    932 	* aarch64.cc: New file
    933 	* Makefile.am (TARGETSOURCES): Add aarch64.cc
    934 	(ALL_TARGETOBJS): Add aarch64.$(OBJEXT)
    935 	* Makefile.in: Regenerate.
    936 	* configure.tgt: Add entries for aarch64*.
    937 	* configure.ac:  Likewise.
    938 	* configure: Likewise.
    939 
    940 2014-06-27  Alan Modra  <amodra (a] gmail.com>
    941 
    942 	* symtab.cc (Symbol::should_add_dynsym_entry): Don't make inline.
    943 
    944 2014-06-24  Cary Coutant  <ccoutant (a] google.com>
    945 
    946 	* dwp.cc (Dwo_file::read): Allow files with no .debug_types
    947 	sections.
    948 	(Dwo_file::sized_read_unit_index): Likewise.
    949 
    950 2014-06-23  Sasa Stankovic  <Sasa.Stankovic (a] imgtec.com>
    951 
    952 	* mips.cc: New file.
    953 	* Makefile.am (TARGETSOURCES): Add mips.cc
    954 	(ALL_TARGETOBJS): Add mips.$(OBJEXT)
    955 	* configure.tgt: Add entries for mips*.
    956 	* configure.ac: Likewise.
    957 	* Makefile.in: Regenerate.
    958 	* configure: Likewise.
    959 
    960 2014-06-09  Cary Coutant  <ccoutant (a] google.com>
    961 
    962 	* dwarf_reader.cc (Dwarf_pubnames_table::read_header): Check that
    963 	unit_length is within section bounds.
    964 
    965 2014-06-09  Cary Coutant  <ccoutant (a] google.com>
    966 
    967 	PR gold/16980
    968 	* layout.cc (Layout::print_to_mapfile): Print unattached sections in
    969 	map.
    970 
    971 2014-06-07  Alan Modra  <amodra (a] gmail.com>
    972 
    973 	* powerpc.cc (relocate): Treat field of cmpli insn as a bitfield.
    974 
    975 2014-06-06  Cary Coutant  <ccoutant (a] google.com>
    976 
    977 	* dwarf_reader.h (Dwarf_pubnames_table): Remove output_section_offset_.
    978 	* dwarf_reader.cc (Dwarf_pubnames_table::read_section): Likewise.
    979 	(Dwarf_pubnames_table::read_header): Likewise.
    980 	* layout.cc (gdb_fast_lookup_sections): Add .debug_gnu_pubnames and
    981 	.debug_gnu_pubtypes.
    982 
    983 2014-06-05  Joel Brobecker  <brobecker (a] adacore.com>
    984 
    985 	* Makefile.am (CONFIG_STATUS_DEPENDENCIES): New.
    986 	* Makefile.in, configure: Regenerate.
    987 
    988 2014-06-03  Alan Modra  <amodra (a] gmail.com>
    989 
    990 	* powerpc.cc (addis_12_2): Define.
    991 	(Stub_table::do_write): Support fusion on ELFv2 stubs.
    992 
    993 2014-06-03  Alan Modra  <amodra (a] gmail.com>
    994 
    995 	* testsuite/plugin_test.c (parse_readelf_line): Skip non-visibility
    996 	st_other output.
    997 
    998 2014-06-02  Alan Modra  <amodra (a] gmail.com>
    999 
   1000 	* powerpc.cc (Target_powerpc::local_reloc_may_be_function_pointer):
   1001 	Only ignore relocs on ELFv1.
   1002 	(Target_powerpc::global_reloc_may_be_function_pointer): Likewise.
   1003 
   1004 2014-05-30  Cary Coutant  <ccoutant (a] google.com>
   1005 
   1006 	* testsuite/Makefile.am (ehdr_start_test_4): Fix typo in -B option.
   1007 	* testsuite/Makefile.in: Regenerate.
   1008 	* testsuite/ehdr_start_test_4.sh: Look for "U" instead of "w".
   1009 
   1010 2014-05-27  H.J. Lu  <hongjiu.lu (a] intel.com>
   1011 
   1012 	PR gold/16945
   1013 	* x86_64.cc (Target_x86_64::Relocate::relocate): Use signed int
   1014 	for got_offset.  Properly get GOT address for R_X86_64_PLTOFF64.
   1015 
   1016 2014-05-15  Alan Modra  <amodra (a] gmail.com>
   1017 
   1018 	* powerpc.cc (do_plt_fde_location): Handle zero length .glink.
   1019 	Compare FDE contents with DW_CFA_nop rather than 0.
   1020 
   1021 2014-05-13  Sriraman Tallam  <tmsriram (a] google.com>
   1022 
   1023 	* symtab.h (may_need_copy_reloc): Remove check for position independent
   1024 	code.
   1025 	* x86_64.cc (Target_x86_64<size>::Scan::global): Add check for no
   1026 	position independence before pc absolute may_need_copy_reloc call.
   1027 	Add check for executable output befor pc relative may_need_copy_reloc
   1028 	call.
   1029 	* i386.cc: Ditto.
   1030 	* arm.cc: Ditto.
   1031 	* sparc.cc: Ditto.
   1032 	* tilegx.cc: Ditto.
   1033 	* powerpc.cc: Add check for no position independence before
   1034 	may_need_copy_reloc calls.
   1035 	* testsuite/pie_copyrelocs_test.cc: New file.
   1036 	* testsuite/pie_copyrelocs_shared_test.cc: New file.
   1037 	* Makefile.am (pie_copyrelocs_test): New test.
   1038 	* Makefile.in: Regenerate.
   1039 
   1040 2014-05-08  Martin Lika  <mliska (a] suse.cz>
   1041 
   1042 	* output.cc (Sized_relobj_file::do_layout): Fix typo in info message.
   1043 
   1044 2014-05-06  Cary Coutant  <ccoutant (a] google.com>
   1045 
   1046 	PR gold/16900
   1047 	* i386.cc (Output_data_got_plt_i386): New class.
   1048 	(Output_data_plt_i386::Output_data_plt_i386): Change type of got_plt
   1049 	parameter. Change all callers.
   1050 	(Output_data_plt_i386::layout_): Remove.
   1051 	(Output_data_plt_i386::got_plt_): Change type.
   1052 	(Target_i386::got_plt_): Change type. Change all references.
   1053 	(Target_i386::got_section): Create instance of new class.
   1054 	(Output_data_got_plt_i386::do_write): New function.
   1055 	* x86_64.cc (Output_data_got_plt_x86_64): New class.
   1056 	(Output_data_plt_x86_64::Output_data_plt_x86_64): Change type of got_plt
   1057 	parameter. Change all callers.
   1058 	(Output_data_plt_x86_64::layout_): Remove.
   1059 	(Output_data_plt_x86_64::got_plt_): Change type.
   1060 	(Target_x86_64::got_plt_): Change type. Change all references.
   1061 	(Target_x86_64::got_section): Create instance of new class.
   1062 	(Output_data_got_plt_x86_64::do_write): New function.
   1063 	(Output_data_plt_x86_64::do_write): Don't write reserved words in GOT.
   1064 	(Target_x86_64<size>::init_got_plt_for_update): Create instance of new
   1065 	class.
   1066 
   1067 2014-05-05  Cary Coutant  <ccoutant (a] google.com>
   1068 
   1069 	* gdb-index.cc (Gdb_index_info_reader): Don't complain about language
   1070 	if we have pubnames/pubtypes.
   1071 
   1072 2014-05-02  Cary Coutant  <ccoutant (a] google.com>
   1073 
   1074 	* defstd.cc (in_segment): Define __ehdr_start here...
   1075 	* layout.cc (Layout::finalize): ...Instead of here.  Set the
   1076 	output segment when known.
   1077 	* resolve.cc (Symbol::override_base_with_special): Remember
   1078 	the original binding.
   1079 	* symtab.cc (Symbol::set_output_segment): New function.
   1080 	(Symbol::set_undefined): New function.
   1081 	* symtab.h (Symbol::is_weak_undefined): Check original undef
   1082 	binding.
   1083 	(Symbol::is_strong_undefined): New function.
   1084 	(Symbol::set_output_segment): New function.
   1085 	(Symbol::set_undefined): New function.
   1086 	* target-reloc.h (is_strong_undefined): Remove.
   1087 	(issue_undefined_symbol_error): Call Symbol::is_weak_undefined.
   1088 	Check for hidden undefs.
   1089 	(relocate_section): Call Symbol::is_strong_undefined.
   1090 
   1091 	* testsuite/Makefile.am (ehdr_start_test_1)
   1092 	(ehdr_start_test_2, ehdr_start_test_3)
   1093 	(ehdr_start_test_4, ehdr_start_test_5): New test cases.
   1094 	* testsuite/Makefile.in: Regenerate.
   1095 	* testsuite/ehdr_start_def.cc: New source file.
   1096 	* testsuite/ehdr_start_test.cc: New source file.
   1097 	* testsuite/ehdr_start_test.t: New linker script.
   1098 	* testsuite/ehdr_start_test_4.sh: New shell script.
   1099 
   1100 2014-04-23  Cary Coutant  <ccoutant (a] google.com>
   1101 
   1102 	PR gold/16870
   1103 	* x86_64.cc (Target_x86_64::Relocate::relocate): Add missing break.
   1104 
   1105 2014-04-15  Sasa Stankovic  <Sasa.Stankovic (a] imgtec.com>
   1106 
   1107 	* layout.cc (Layout::include_section): Allow a target to decide
   1108 	whether to include a section.
   1109 	* target.h (Target::should_include_section): New function.
   1110 	(Target::do_should_include_section): New function.
   1111 
   1112 2014-04-15  Sasa Stankovic  <Sasa.Stankovic (a] imgtec.com>
   1113 
   1114 	* copy-relocs.cc (Copy_relocs::Copy_reloc_entry::emit): Remove and
   1115 	inline into ...
   1116 	(Copy_relocs::emit): ... here.
   1117 	* copy-relocs.h (Copy_reloc_entry): Change from class to struct.
   1118 	(Copy_reloc_entry::make_copy_reloc): Change from private to protected.
   1119 	(Copy_reloc_entry::entries_): Change from private to protected.
   1120 
   1121 2014-04-02  Sriraman Tallam  <tmsriram (a] google.com>
   1122 
   1123 	* icf.cc (get_section_contents): Replace copies of reloc
   1124 	vectors with const references.
   1125 
   1126 2014-04-02  Cary Coutant  <ccoutant (a] google.com>
   1127 
   1128 	* configure.ac (HAVE_PUBNAMES): Use C instead of C++.
   1129 	(HAVE_NO_USE_LINKER_PLUGIN): Check for -fno-use-linker-plugin.
   1130 	* configure: Regenerate.
   1131 	* testsuite/Makefile.am (OPT_NO_PLUGINS): New macro for
   1132 	-fno-use-linker-plugin.
   1133 	(LINK1, CXXLINK1): Add it to the link command.
   1134 	* testsuite/Makefile.in: Regenerate.
   1135 
   1136 2014-03-12  Alan Modra  <amodra (a] gmail.com>
   1137 
   1138 	* Makefile.in: Regenerate.
   1139 
   1140 2014-03-10  Sasa Stankovic  <Sasa.Stankovic (a] imgtec.com>
   1141 
   1142 	* symtab.h (Symbol::set_nonvis): New function.
   1143 
   1144 2014-03-10  Sasa Stankovic  <Sasa.Stankovic (a] imgtec.com>
   1145 
   1146 	* symtab.cc (Sized_symbol<32>::init_output_data):
   1147 	Instantiate the template.
   1148 	(Sized_symbol<64>::init_output_data): Likewise.
   1149 
   1150 2014-03-10  Sasa Stankovic  <Sasa.Stankovic (a] imgtec.com>
   1151 
   1152 	* symtab.cc (Symbol_table::sized_write_globals): Allow a target to
   1153 	adjust dynamic symbol value.
   1154 	* target.h (Target::adjust_dyn_symbol): New function.
   1155 	(Target::do_adjust_dyn_symbol): New function.
   1156 
   1157 2014-03-10  Sasa Stankovic  <Sasa.Stankovic (a] imgtec.com>
   1158 
   1159 	* output.cc (Output_data_dynamic::Dynamic_entry::write):
   1160 	Get the value of DYNAMIC_CUSTOM dynamic entry.
   1161 	* output.h (Output_data_dynamic::add_custom): New function.
   1162 	(Dynamic_entry::Dynamic_entry): New constructor for DYNAMIC_CUSTOM
   1163 	dynamic entry.
   1164 	(enum Dynamic_entry::Classification): Add DYNAMIC_CUSTOM.
   1165 	* target.h (Target::dynamic_tag_custom_value): New function.
   1166 	(Target::do_dynamic_tag_custom_value): New function.
   1167 
   1168 2014-03-10  Sasa Stankovic  <Sasa.Stankovic (a] imgtec.com>
   1169 
   1170 	* symtab.cc (Symbol_table::set_dynsym_indexes): Allow a target to set
   1171 	dynsym indexes.
   1172 	* target.h (Target::has_custom_set_dynsym_indexes): New function.
   1173 	(Target::do_has_custom_set_dynsym_indexes): New function.
   1174 	(Target::set_dynsym_indexes): New function.
   1175 	(Target::do_set_dynsym_indexes): New function.
   1176 
   1177 2014-03-07  Alan Modra  <amodra (a] gmail.com>
   1178 
   1179 	* powerpc.cc (Powerpc_relocate_functions::Overflow_check): Add
   1180 	CHECK_UNSIGNED, CHECK_LOW_INSN, CHECK_HIGH_INSN.
   1181 	(Powerpc_relocate_functions::has_overflow_unsigned): New function.
   1182 	(Powerpc_relocate_functions::has_overflow_bitfield,
   1183 	overflowed): Use the above.
   1184 	(Target_powerpc::Relocate::relocate): Correct overflow checking
   1185 	for a number of relocations.  Modify overflow test for 16-bit
   1186 	fields in instructions to signed/unsigned according to whether
   1187 	the field takes a signed or unsigned value.
   1188 
   1189 2014-03-05  Alan Modra  <amodra (a] gmail.com>
   1190 
   1191 	Update copyright years.
   1192 
   1193 2014-03-05  Alan Modra  <amodra (a] gmail.com>
   1194 
   1195 	* powerpc.cc (Target_powerpc::Scan::local, global): Support
   1196 	R_PPC64_ADDR64_LOCAL.
   1197 	(Target_powerpc::Relocate::relocate): Likewise.
   1198 
   1199 2014-03-03  Alan Modra  <amodra (a] gmail.com>
   1200 
   1201 	* dwp.cc (print_version): Update copyright year to current.
   1202 
   1203 2014-02-10  Alan Modra  <amodra (a] gmail.com>
   1204 
   1205 	* po/gold.pot: Regenerate.
   1206 
   1207 2014-02-06  Cary Coutant  <ccoutant (a] google.com>
   1208 
   1209 	Fix problem where -u is ignored when a weak undef is seen.
   1210 
   1211 	* archive.cc (Library_base::should_include_member): Reorder
   1212 	code to check for -u option if a weak undef has already been seen.
   1213 	* testsuite/Makefile.am (weak_undef_test_2): New test case.
   1214 	* testsuite/Makefile.in: Regenerate.
   1215 	* testsuite/weak_undef_file3.cc: New file.
   1216 	* testsuite/weak_undef_file4.cc: New file.
   1217 	* testsuite/weak_undef_test_2.cc: New file.
   1218 
   1219 2014-02-05  Cary Coutant  <ccoutant (a] google.com>
   1220 
   1221 	Fix issues with gold undefined symbol diagnostics.
   1222 
   1223 	PR binutils/15435
   1224 	* errors.cc (Errors::undefined_symbol): Move undef vtable symbol
   1225 	check to here.
   1226 	* target-reloc.h (is_strong_undefined): New function.
   1227 	(relocate_section): Move undef vtable symbol check from here.
   1228 	Check for is_strong_undefined.
   1229 
   1230 2014-02-05  Cary Coutant  <ccoutant (a] google.com>
   1231 
   1232 	Fix problems with the --dynamic-list option.
   1233 
   1234 	PR gold/13577
   1235 	* options.cc (General_options::parse_dynamic_list):
   1236 	Set have_dynamic_list_.
   1237 	(General_options::General_options): Initialize have_dynamic_list_.
   1238 	(General_options::finalize): Turn off -Bsymbolic and
   1239 	-Bsymbolic-functions if --dynamic-list provided.
   1240 	* options.h (General_options::have_dynamic_list): New function.
   1241 	(General_options::have_dynamic_list_): New data member.
   1242 	* symtab.h (Symbol::is_preemptible): Handle --dynamic-list
   1243 	correctly.
   1244 
   1245 	PR gold/16530
   1246 	* symtab.cc (Symbol_table::add_from_relobj): If symbol is named
   1247 	in --dynamic-list, mark it.
   1248 
   1249 	* testsuite/Makefile.am (gc_dynamic_list_test.sh): New test case.
   1250 	(dynamic_list_2): New test case.
   1251 	* testsuite/Makefile.in: Regenerate.
   1252 	* testsuite/dynamic_list_2.cc: New file.
   1253 	* testsuite/dynamic_list_2.t: New file.
   1254 	* testsuite/dynamic_list_lib1.cc: New file.
   1255 	* testsuite/dynamic_list_lib2.cc: New file.
   1256 	* testsuite/gc_dynamic_list_test.c: New file.
   1257 	* testsuite/gc_dynamic_list_test.sh: New file.
   1258 	* testsuite/gc_dynamic_list_test.t: New file.
   1259 
   1260 2014-01-28  Cary Coutant  <ccoutant (a] google.com>
   1261 
   1262 	Add .gdb_index version 7 support.
   1263 
   1264 	* gold/dwarf_reader.cc: include <utility> (for make_pair).
   1265 	(Dwarf_abbrev_table::do_read_abbrevs): Check for compressed
   1266 	debug sections.
   1267 	(Dwarf_ranges_table::read_ranges_table): Likewise.
   1268 	(Dwarf_pubnames_table::read_section): Check for GNU-style
   1269 	sections, and for compressed debug sections.
   1270 	(Dwarf_pubnames_table::read_header): Compute end address of table.
   1271 	(Dwarf_pubnames_table::next_name): Return flag_byte.  Check
   1272 	for end of list by offset, not by offset == 0.
   1273 	(Dwarf_info_reader::do_read_string_table): Check for compressed
   1274 	debug sections.
   1275 	* gold/dwarf_reader.h (Dwarf_pubnames_table::Dwarf_pubnames_table):
   1276 	Initialize new data members.
   1277 	(Dwarf_pubnames_table::next_name): return flag_byte.
   1278 	(Dwarf_pubnames_table::end_of_table_): New data member.
   1279 	(Dwarf_pubnames_table::is_gnu_style_): New data member.
   1280 	* gold/gdb-index.cc (gdb_index_version): Update to version 7.
   1281 	(Gdb_index_info_reader::read_pubtable): Read flag_byte.
   1282 	(Gdb_index_info_reader::read_pubnames_and_pubtypes): Don't
   1283 	read skeleton type unit DIEs.
   1284 	(Gdb_index::add_symbol): Add flag_byte; adjust all callers.
   1285 	(Gdb_index::do_write): Write flag_byte.
   1286 	* gold/gdb-index.h (Gdb_index::add_symbol): Add flags parameter.
   1287 	(Gdb_index::Cu_vector): Store flags along with cu indexes.
   1288 	* gold/testsuite/gdb_index_test_3.sh: Allow versions 4-7.
   1289 	* gold/testsuite/gdb_index_test_comm.sh: Likewise.
   1290 
   1291 2014-01-08  H.J. Lu  <hongjiu.lu (a] intel.com>
   1292 
   1293 	* version.cc (print_version): Update copyright year to 2014.
   1294 
   1295 2013-12-19  Dimitry Andric  <dimitry (a] andric.com>
   1296 
   1297 	* stringpool.cc (Stringpool_template::reserve): Add
   1298 	HAVE_UNORDERED_MAP case.
   1299 	* stringpool.cc (Stringpool_template::print_stats): Likewise.
   1300 
   1301 2013-12-18  Cary Coutant  <ccoutant (a] google.com>
   1302 
   1303 	* configure.ac: Check for <unordered_set> and <unordered_map>.
   1304 	* config.in: Regenerate.
   1305 	* configure: Regenerate.
   1306 	* system.h: Use <unordered_set> and <unordered_map> if available.
   1307 
   1308 2013-12-10  Roland McGrath  <mcgrathr (a] google.com>
   1309 
   1310 	* Makefile.am (install-exec-local): Prefix $(INSTALL_PROGRAM) uses
   1311 	with $(INSTALL_PROGRAM_ENV).
   1312 	* Makefile.in: Regenerate.
   1313 
   1314 2013-11-22  Cary Coutant  <ccoutant (a] google.com>
   1315 
   1316 	* configure.ac: Add check for which library is needed for
   1317 	dlopen.
   1318 	* configure: Regenerate.
   1319 
   1320 2013-11-22  Cary Coutant  <ccoutant (a] google.com>
   1321 
   1322 	* testsuite/Makefile.am (exception_x86_64_bnd_test): Use in-tree
   1323 	assembler.
   1324 	* testsuite/Makefile.in: Regenerate.
   1325 
   1326 2013-11-17  H.J. Lu  <hongjiu.lu (a] intel.com>
   1327 
   1328 	* x86_64.cc (Target_x86_64<size>::Scan::get_reference_flags):
   1329 	Handle R_X86_64_PC32_BND and R_X86_64_PLT32_BND just like
   1330 	R_X86_64_PC32 and R_X86_64_PLT32, respectively.
   1331 	(Target_x86_64<size>::Scan::local): Likewise.
   1332 	(Target_x86_64<size>::Scan::global): Likewise.
   1333 	(Target_x86_64<size>::Relocate::relocate): Likewise.
   1334 	(Target_x86_64<size>::Relocatable_size_for_reloc::get_size_for_reloc):
   1335 	Likewise.
   1336 	(Target_x86_64<size>::Scan::check_non_pic(): Handle
   1337 	R_X86_64_PC32_BND.
   1338 
   1339 	* testsuite/Makefile.am (check_PROGRAMS): Add
   1340 	exception_x86_64_bnd_test.
   1341 	(exception_x86_64_bnd_test_SOURCES): New macro.
   1342 	(exception_x86_64_bnd_test_DEPENDENCIES): Likewise.
   1343 	(exception_x86_64_bnd_test_LDFLAGS): Likewise.
   1344 	(exception_x86_64_bnd_test_LDADD): Likewise.
   1345 	(exception_x86_64_bnd_1.o): New rule.
   1346 	(exception_x86_64_bnd_2.o): Likewise.
   1347 	* testsuite/Makefile.in: Regenerated.
   1348 
   1349 2013-11-15  Alan Modra  <amodra (a] gmail.com>
   1350 
   1351 	* powerpc.cc (Target_powerpc::glink_section): Provide non-const
   1352 	accessor.
   1353 	(Target_powerpc::Branch_info::make_stub): Make global entry stubs.
   1354 	Only call ppc64_local_entry_offset for 64-bit.  Restrict
   1355 	symval_for_branch lookup to ELFv1.
   1356 	(Stub_table::add_plt_call_entry): Use unsigned int off.
   1357 	(Output_data_glink::Address, invalid_address): New.
   1358 	(Output_data_glink::add_eh_frame): Move out of line.  Add
   1359 	support for ELFv2.
   1360 	(Output_data_glink::add_global_entry, find_global_entry,
   1361 	global_entry_address): New functions.
   1362 	(Output_data_glink::global_entry_stubs_, end_branch_table_,
   1363 	ge_size): New variables.
   1364 	(Output_data_glink::set_final_data_size): Add global entry
   1365 	stub sizing.
   1366 	(Output_data_glink::do_write): Write global entry stubs.
   1367 	(Target_powerpc::Scan::reloc_needs_plt_for_ifunc): Add target
   1368 	parameter.  Return true for ELFv2.  Adjust callers.
   1369 	(Target_powerpc::Scan::local, global): Restrict opd lookup to
   1370 	ELFv1.  Similarly for ifunc and dynamic relocation processing
   1371 	specific to ELFv1.  Recognize that symbols are defined on
   1372 	their plt entries for ELFv2.
   1373 	(Target_powerpc::symval_for_branch): Assert if called for
   1374 	ELFv2 or ppc32.
   1375 	(Target_powerpc::Relocate::relocate): Use global entry plt
   1376 	stub for symbol value if such exists on ELFv2.
   1377 	(Target_powerpc::Relocate::relocate): Don't call
   1378 	symval_for_branch when ELFv2.  Do adjust for local entry
   1379 	offset when ELFv2.
   1380 	(Target_powerpc::do_dynsym_value): Set symbols to global entry
   1381 	plt stub for ELFv2.
   1382 	(Target_powerpc::do_plt_address_for_global): Similarly.
   1383 
   1384 2013-11-14  Cary Coutant  <ccoutant (a] google.com>
   1385 
   1386 	Revert patch -- this did not fix the problem, and there is
   1387 	no race there.
   1388 
   1389 	2013-11-14  Cary Coutant  <ccoutant (a] google.com>
   1390 
   1391 	    PR gold/14860
   1392 	    * ehframe.cc (Eh_frame_hdr::Eh_frame_hdr): Initialize lock_.
   1393 	    (Ehframe_hdr::set_final_data_size): Allocate a Lock.
   1394 	    * ehframe.h (Eh_frame_hdr::record_fde): Hold the lock while
   1395 	    updating fde_offsets_.
   1396 	    (Eh_frame_hdr::lock_): New data member.
   1397 
   1398 2013-11-14  Cary Coutant  <ccoutant (a] google.com>
   1399 
   1400 	* dwp.cc (Dwo_file_entry): New type.
   1401 	(File_list): Use Dwo_file_entry.
   1402 	(Dwo_file::verify): New function.
   1403 	(Dwo_file::verify_dwo_list): New function.
   1404 	(Dwo_file::sized_verify_dwo_list): New function.
   1405 	(Dwo_name_info_reader::visit_compilation_unit): Add dwo_id to file
   1406 	list.
   1407 	(Dwp_options): New enum type.
   1408 	(dwp_options): Add --verify-only.
   1409 	(usage): Likewise.
   1410 	(main): Likewise.
   1411 	* dwp.h (gold_info): Add declaration.
   1412 
   1413 2013-11-14  Cary Coutant  <ccoutant (a] google.com>
   1414 
   1415 	PR gold/14860
   1416 	* ehframe.cc (Eh_frame_hdr::Eh_frame_hdr): Initialize lock_.
   1417 	(Ehframe_hdr::set_final_data_size): Allocate a Lock.
   1418 	* ehframe.h (Eh_frame_hdr::record_fde): Hold the lock while
   1419 	updating fde_offsets_.
   1420 	(Eh_frame_hdr::lock_): New data member.
   1421 
   1422 2013-11-06  Cary Coutant  <ccoutant (a] google.com>
   1423 
   1424 	PR gold/15758
   1425 	* object.cc (Sized_relobj_file::do_layout): Handle .eh_frame sections
   1426 	before reloc sections.
   1427 
   1428 2013-11-04  Alan Modra  <amodra (a] gmail.com>
   1429 
   1430 	* symtab.h (Symbol::Reference_flags): Add FUNC_DESC_ABI.
   1431 	(Symbol::needs_dynamic_reloc): Test new flag.
   1432 	* powerpc.cc (needs_dynamic_reloc, use_plt_offset): Delete.
   1433 	(Target_powerpc::Scan::get_reference_flags): Add target param.
   1434 	Return FUNC_DESC_ABI for 64-bit ELFv1.
   1435 	(Target_powerpc::Branch_info::make_stub): Adjust get_reference_flags
   1436 	call.
   1437 	(Target_powerpc::Scan::global): Use Symbol::needs_dynamic_reloc.
   1438 	(Target_powerpc::Relocate::relocate): Use Symbol::use_plt_offset.
   1439 
   1440 2013-10-31  Cary Coutant  <ccoutant (a] google.com>
   1441 
   1442 	Restore support for dwp v2 DWARF package file format.
   1443 
   1444 	* dwarf_reader.cc (Dwarf_info_reader::visit_type_unit): Add
   1445 	tu_length parameter.  Adjust all callers.
   1446 	* dwarf_reader.h (Dwarf_info_reader::visit_type_unit): Likewise.
   1447 	* dwp.cc: Include dwarf.h.
   1448 	(Section_bounds): New struct type.
   1449 	(Unit_set): New struct type.
   1450 	(Dwo_file::Dwo_file): Initialize new data member.
   1451 	(Dwo_file::read_compunit_index, Dwo_file::read_typeunit_index):
   1452 	Combine and rename to...
   1453 	(Dwo_file::read_unit_index): ...this.
   1454 	(Dwo_file::sized_read_compunit_index)
   1455 	(Dwo_file::sized_read_typeunit_index): Combine and rename to...
   1456 	(Dwo_file::sized_read_unit_index): ...this.
   1457 	(Dwo_file::copy_section): Remove section_name, is_str_offsets
   1458 	parameters; add section_id parameter.
   1459 	(Dwo_file::add_cu_set, Dwo_file::add_tu_set): Combine and rename to...
   1460 	(Dwo_file::add_unit_set): ...this.
   1461 	(Dwo_file::shndx_map_): Remove.
   1462 	(Dwo_file::sect_offsets_): New data member.
   1463 	(Dwp_output_file::Dwp_output_file): Initialize new data members.
   1464 	(Dwp_output_file::add_section): Rename to...
   1465 	(Dwp_output_file::add_contribution): ...this.
   1466 	(Dwp_output_file::add_cu_set): Combine parameters into a struct.
   1467 	(Dwp_output_file::add_tu_set): Likewise.
   1468 	(Dwp_output_file::Contribution): New type.
   1469 	(Dwp_output_file::Section::contributions): New data member.
   1470 	(Dwp_output_file::Cu_or_tu_set): Remove.
   1471 	(Dwp_output_file::Section::Section): New ctor.
   1472 	(Dwp_output_file::Dwp_index::Shndx_pool): Remove.
   1473 	(Dwp_output_file::Dwp_index::Section_table): New type.
   1474 	(Dwp_output_file::Dwp_index::Dwp_index): Initialize new data members.
   1475 	(Dwp_output_file::Dwp_index::enter_set): Change type of "set"
   1476 	parameter.
   1477 	(Dwp_output_file::Dwp_index::shndx_pool): Remove.
   1478 	(Dwp_output_file::Dwp_index::shndx_pool_end): Remove.
   1479 	(Dwp_output_file::Dwp_index::section_table): New member function.
   1480 	(Dwp_output_file::Dwp_index::section_table_end): New member function.
   1481 	(Dwp_output_file::Dwp_index::shndx_pool_size): Remove.
   1482 	(Dwp_output_file::Dwp_index::section_table_rows): New member function.
   1483 	(Dwp_output_file::Dwp_index::section_table_cols): New member function.
   1484 	(Dwp_output_file::Dwp_index::shndx_pool_): Remove.
   1485 	(Dwp_output_file::Dwp_index::section_table_): New data member.
   1486 	(Dwp_output_file::Dwp_index::section_mask_): New data member.
   1487 	(Dwp_output_file::add_output_section): New member function.
   1488 	(Dwp_output_file::write_new_section): New member function.
   1489 	(Dwp_output_file::write_contributions): New member function.
   1490 	(Dwp_output_file::section_id_map_): New data member.
   1491 	(class Dwo_id_info_reader): Remove.
   1492 	(class Unit_reader): New class.
   1493 	(get_dwarf_section_name): New function.
   1494 	(Dwo_file::read_executable): Adjust initializations of class data.
   1495 	(Dwo_file::read): Add support for v2 package file format.
   1496 	(Dwo_file::read_unit_index): Likewise.
   1497 	(Dwo_file::sized_read_unit_index): Likewise.
   1498 	(Dwo_file::copy_section): Likewise.
   1499 	(Dwo_file::add_unit_set): Likewise.
   1500 	(Dwp_output_file::add_output_section): Likewise.
   1501 	(Dwp_output_file::add_contribution): Likewise.
   1502 	(Dwp_output_file::Dwp_index::find_or_add): Use row index to check
   1503 	for empty slot.
   1504 	(Dwp_output_file::Dwp_index::enter_set): Add support for v2 package
   1505 	file format.
   1506 	(Dwp_output_file::Dwp_index::grow): Use row index to check for empty
   1507 	slot.
   1508 	(Dwp_output_file::initialize): Remove unused function.
   1509 	(Dwp_output_file::finalize): Add support for v2 package file format.
   1510 	(Dwp_output_file::write_index): Likewise.
   1511 	* gdb-index.cc (Gdb_index_info_reader::visit_type_unit): Adjust
   1512 	function prototype.
   1513 
   1514 2013-10-31  Cary Coutant  <ccoutant (a] google.com>
   1515 
   1516 	* configure.ac: Fix check for -fmerge-constants.
   1517 	* configure.ac: Regenerate.
   1518 
   1519 2013-10-30  Roland McGrath  <mcgrathr (a] google.com>
   1520 
   1521 	* x86_64.cc (Output_data_plt_x86_64_nacl::first_plt_entry):
   1522 	Correct 9-byte nop sequence to match what the assembler generates.
   1523 
   1524 2013-10-30  Alan Modra  <amodra (a] gmail.com>
   1525 
   1526 	* powerpc.cc (Powerpc_relobj::abiversion, set_abiversion,
   1527 	ppc64_local_entry_offset, ppc64_local_entry_offset,
   1528 	do_read_symbols): New functions.
   1529 	(Powerpc_relobj::e_flags_, st_other_): New vars.
   1530 	(Powerpc_relobj::Powerpc_relobj): Call set_abiversion.
   1531 	(Powerpc_dynobj::abiversion, set_abiversion): New functions.
   1532 	(Powerpc_relobj::e_flags_): New var.
   1533 	(Target_powerpc::first_plt_entry_offset, plt_entry_size): Inline
   1534 	and adjust for ELFv2.
   1535 	(Target_powerpc::abiversion, set_abiversion, stk_toc): New functions.
   1536 	(Powerpc_relobj::do_find_special_sections): Check no .opd in ELFv2.
   1537 	(Powerpc_dynobj::do_find_special_sections): Likewise.
   1538 	(Target_powerpc::do_define_standard_symbols): Define ".TOC.".
   1539 	(Target_powerpc::Branch_info::make_stub): Adjust stub destination
   1540 	to ELFv2 local entry.
   1541 	(Target_powerpc::do_relax): No thread safe barriers needed for
   1542 	ELFv2.
   1543 	(Output_data_plt_powerpc::initial_plt_entry_size_,
   1544 	plt_entry_size): Delete.  Replace all uses with
   1545 	first_plt_entry_offset() and plt_entry_size().
   1546 	(Output_data_plt_powerpc::Output_data_plt_powerpc): Remove
   1547 	reserved_size parm.  Update callers.
   1548 	(Output_data_plt_powerpc::entry_count): Update.
   1549 	(Output_data_plt_powerpc::first_plt_entry_offset): Make private
   1550 	and use Target_powerpc::first_plt_entry_offset().
   1551 	(Output_data_plt_powerpc::get_plt_entry_size): Similarly and
   1552 	rename to plt_entry_size.
   1553 	(Output_data_plt_powerpc::add_ifunc_entry,
   1554 	add_local_ifunc_entry): Adjust reloc for ELFv2.
   1555 	(glink_eh_frame_fde_64): Rename to glink_eh_frame_fde_64v1.
   1556 	(glink_eh_frame_fde_64v2): New.
   1557 	(Stub_table::plt_call_size): Support ELFv2 sizing.
   1558 	(Output_data_glink::add_eh_frame): Use the new FDE.
   1559 	(Output_data_glink::set_final_data_size): Adjust for ELFv2 glink.
   1560 	(Stub_table::do_write): Write ELFv2 stubs and glink.
   1561 	(Target_powerpc::Relocate::relocate): Replaces nop after call
   1562 	with ld 2,24(1) and adjust local offset destination for ELFv2.
   1563 
   1564 2013-10-30  Alan Modra  <amodra (a] gmail.com>
   1565 
   1566 	* powerpc.cc (Target_powerpc::Scan::check_non_pic): Handle new relocs.
   1567 	(Target_powerpc::Scan::global, local): Likewise.
   1568 	(Target_powerpc::Relocate::relocate): Likewise.  Check for overflow
   1569 	on all ppc64 @h and @ha relocs.
   1570 
   1571 2013-10-14  Alan Modra  <amodra (a] gmail.com>
   1572 
   1573 	* output.h (Output_data_got::add_constant): Tidy.
   1574 	(Output_data_got::add_constant_pair): New function.
   1575 	* powerpc.cc (Output_data_got_powerpc): Override all Output_data_got
   1576 	methods used so as to first call reserve_ent().
   1577 
   1578 2013-10-11  Roland McGrath  <mcgrathr (a] google.com>
   1579 
   1580 	* powerpc.cc (Output_data_got_powerpc): Remove unused methods
   1581 	add_got_entry and add_got_entry_pair.
   1582 
   1583 	* configure.ac (TLS_GNU2_DIALECT): Use -Werror in test.
   1584 	(HAVE_PUBNAMES): Likewise.
   1585 	* configure: Regenerate.
   1586 
   1587 	* testsuite/Makefile.am: Replace '-T foo' with '-Wl,-T,foo' throughout.
   1588 	* testsuite/Makefile.in: Regenerate.
   1589 
   1590 	* target.h (Target::adjust_elf_header, Target::do_adjust_elf_header):
   1591 	Remove const from declaration.
   1592 	* target.cc (Sized_target::do_adjust_elf_header): Update definition.
   1593 	* sparc.cc (Target_sparc::do_adjust_elf_header): Likewise.
   1594 	* output.h (Output_file_header): Remove const from member target_
   1595 	and corresponding constructor argument.
   1596 	* output.cc (Output_file_header::Output_file_header): Update prototype.
   1597 	(Output_file_header::do_sized_write): Use this->target_ in place
   1598 	of parameters()->target().
   1599 
   1600 	* testsuite/undef_symbol.cc (Foo::get_a): New method.
   1601 
   1602 	* configure.ac (MERGE_CONSTANTS_FLAG): New check.
   1603 	* configure: Regenerate.
   1604 	* Makefile.in: Regenerate.
   1605 	* testsuite/merge_string_literals_1.c: Renamed to have .cc suffix.
   1606 	* testsuite/merge_string_literals_2.c: Likewise.
   1607 	* testsuite/Makefile.am
   1608 	(merge_string_literals_1.o, merge_string_literals_2.o): Update deps.
   1609 	(AM_CFLAGS, AM_CXXFLAGS): Use $(MERGE_CONSTANTS_FLAG) in place of
   1610 	literal -fmerge-constants.
   1611 	* testsuite/Makefile.in: Regenerate.
   1612 
   1613 	* i386.cc (Target_i386): Remove unused member dynbss_.
   1614 	* arm.cc (Target_arm): Likewise.
   1615 	* powerpc.cc (Target_powerpc): Likewise.
   1616 	* sparc.cc (Target_sparc): Likewise.
   1617 	* tilegx.cc (Target_tilegx): Likewise.
   1618 	* x86_64.cc (Target_x86_64): Likewise.
   1619 	* dwarf_reader.h (Dwarf_info_reader): Remove unused members
   1620 	type_signature_, type_offset_.
   1621 	* plugin.h (Plugin_hook): Remove unused member layout_.
   1622 	* readsyms.h (Add_symbols): Remove unused members dirpath_, dirindex_,
   1623 	mapfile_.
   1624 	(Read_member): Remove unused members input_objects_, symtab_,
   1625 	mapfile_, layout_.
   1626 	(Check_library): Remove unused member symtab_.
   1627 	* archive.h (Lib_group): Remove unused member lib_.
   1628 	* archive.cc (Lib_group::Lib_group): Update initializer.
   1629 	* incremental.h	(Incremental_binary): Remove unused member target_.
   1630 	(Incremental_script_entry): Removed unused member script_.
   1631 	* layout.h (Write_symbols_task): Remove unused member input_objects_.
   1632 	* icf.h (Icf): Remove unused member num_tracked_relocs.
   1633 
   1634 	* gold-threads.h (Once): Conditionalize member was_run_lock_ on
   1635 	[ENABLE_THREADS && __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4], matching
   1636 	its only use.
   1637 	* gold-threads.cc (Once::Once): Likewise conditionalize initializer.
   1638 
   1639 	* archive.h: Use struct rather than class for forward declaration
   1640 	of Read_symbols_data.
   1641 
   1642 2013-10-07  Cary Coutant  <ccoutant (a] google.com>
   1643 
   1644 	PR gold/16010
   1645 	* testsuite/Makefile.am (icf_test): Fix dependencies.
   1646 	(icf_safe_test): Likewise.
   1647 	(icf_safe_so_test): Likewise.
   1648 	(large_symbol_alignment): Add empty _LDADD rule.
   1649 	* testsuite/Makefile.in: Regenerate.
   1650 
   1651 2013-09-03  Pavel Chupin  <pavel.v.chupin (a] intel.com>
   1652 
   1653 	PR gold/15927
   1654 	* x86_64.cc (Target_x86_64<size>::Scan::global): Use relative
   1655 	relocation for R_X86_64_32 on x32.
   1656 
   1657 2013-08-27  Roland McGrath  <mcgrathr (a] google.com>
   1658 
   1659 	* output.cc (Output_segment::set_section_addresses): Take new
   1660 	Target* argument.  If target->isolate_execinstr() and the segment
   1661 	is executable and starts at a target->abi_pagesize() boundary,
   1662 	pad its end out to a target->abi_pagesize() boundary with code fill.
   1663 	* output.h (Output_segment::set_section_addresses): Update decl.
   1664 	* layout.h (Layout::check_output_data_for_reset_values): Take new
   1665 	argument RELAX_OUTPUTS.
   1666 	(Layout): New member relax_output_list_.
   1667 	(Layout::add_relax_output): New method.
   1668 	* layout.cc (Layout::Layout): Update constructor.
   1669 	(Layout::reset_relax_output): New method.
   1670 	(Layout::clean_up_after_relaxation): Call it.
   1671 	(Layout::prepare_for_relaxation): Update caller.
   1672 	(Layout::set_segment_offsets): Update callers of set_section_addresses.
   1673 	Call reset_relax_output before re-processing segments for
   1674 	isolate_execinstr case.
   1675 	(Layout::write_data): Handle relax_output_list_.
   1676 	(Layout::Relaxation_debug_check::check_output_data_for_reset_values):
   1677 	Take new argument RELAX_OUTPUTS.  Assert it's an empty collection.
   1678 
   1679 2013-08-23  Yuri Chornoivan  <yurchor (a] ukr.net>
   1680 
   1681 	PR binutils/15834
   1682 	* object.h: Fix typos.
   1683 
   1684 2013-08-16  Roland McGrath  <mcgrathr (a] google.com>
   1685 
   1686 	* i386.cc (Target_i386_nacl::do_code_fill): New virtual function.
   1687 	* x86_64.cc (Target_x86_64_nacl::do_code_fill): New virtual function.
   1688 
   1689 2013-08-07  Cary Coutant  <ccoutant (a] google.com>
   1690 
   1691 	Revert support for v2 DWP files:
   1692 
   1693 	2013-03-01  Cary Coutant  <ccoutant (a] google.com>
   1694 
   1695 	    Add dwp support for v2 DWARF package file format.
   1696 	    * dwarf_reader.cc (Dwarf_info_reader::visit_type_unit): Add
   1697 	    tu_length parameter.  Adjust all callers.
   1698 	    * dwarf_reader.h (Dwarf_info_reader::visit_type_unit): Likewise.
   1699 	    * dwp.cc: Include dwarf.h.
   1700 	    (Section_bounds): New struct type.
   1701 	    (Unit_set): New struct type.
   1702 	    (Dwo_file::Dwo_file): Initialize new data member.
   1703 	    (Dwo_file::read_compunit_index, Dwo_file::read_typeunit_index):
   1704 	    Combine and rename to...
   1705 	    (Dwo_file::read_unit_index): ...this.
   1706 	    (Dwo_file::sized_read_compunit_index)
   1707 	    (Dwo_file::sized_read_typeunit_index): Combine and rename to...
   1708 	    (Dwo_file::sized_read_unit_index): ...this.
   1709 	    (Dwo_file::copy_section): Remove section_name, is_str_offsets
   1710 	    parameters; add section_id parameter.
   1711 	    (Dwo_file::add_cu_set, Dwo_file::add_tu_set): Combine and rename to...
   1712 	    (Dwo_file::add_unit_set): ...this.
   1713 	    (Dwo_file::shndx_map_): Remove.
   1714 	    (Dwo_file::sect_offsets_): New data member.
   1715 	    (Dwp_output_file::Dwp_output_file): Initialize new data members.
   1716 	    (Dwp_output_file::add_section): Rename to...
   1717 	    (Dwp_output_file::add_contribution): ...this.
   1718 	    (Dwp_output_file::add_cu_set): Combine parameters into a struct.
   1719 	    (Dwp_output_file::add_tu_set): Likewise.
   1720 	    (Dwp_output_file::Contribution): New type.
   1721 	    (Dwp_output_file::Section::contributions): New data member.
   1722 	    (Dwp_output_file::Cu_or_tu_set): Remove.
   1723 	    (Dwp_output_file::Section::Section): New ctor.
   1724 	    (Dwp_output_file::Dwp_index::Shndx_pool): Remove.
   1725 	    (Dwp_output_file::Dwp_index::Section_table): New type.
   1726 	    (Dwp_output_file::Dwp_index::Dwp_index): Initialize new data members.
   1727 	    (Dwp_output_file::Dwp_index::enter_set): Change type of "set"
   1728 	    parameter.
   1729 	    (Dwp_output_file::Dwp_index::shndx_pool): Remove.
   1730 	    (Dwp_output_file::Dwp_index::shndx_pool_end): Remove.
   1731 	    (Dwp_output_file::Dwp_index::section_table): New member function.
   1732 	    (Dwp_output_file::Dwp_index::section_table_end): New member function.
   1733 	    (Dwp_output_file::Dwp_index::shndx_pool_size): Remove.
   1734 	    (Dwp_output_file::Dwp_index::section_table_rows): New member function.
   1735 	    (Dwp_output_file::Dwp_index::section_table_cols): New member function.
   1736 	    (Dwp_output_file::Dwp_index::shndx_pool_): Remove.
   1737 	    (Dwp_output_file::Dwp_index::section_table_): New data member.
   1738 	    (Dwp_output_file::Dwp_index::section_mask_): New data member.
   1739 	    (Dwp_output_file::add_output_section): New member function.
   1740 	    (Dwp_output_file::write_new_section): New member function.
   1741 	    (Dwp_output_file::write_contributions): New member function.
   1742 	    (Dwp_output_file::section_id_map_): New data member.
   1743 	    (class Dwo_id_info_reader): Remove.
   1744 	    (class Unit_reader): New class.
   1745 	    (get_dwarf_section_name): New function.
   1746 	    (Dwo_file::read_executable): Adjust initializations of class data.
   1747 	    (Dwo_file::read): Add support for v2 package file format.
   1748 	    (Dwo_file::read_unit_index): Likewise.
   1749 	    (Dwo_file::sized_read_unit_index): Likewise.
   1750 	    (Dwo_file::copy_section): Likewise.
   1751 	    (Dwo_file::add_unit_set): Likewise.
   1752 	    (Dwp_output_file::add_output_section): Likewise.
   1753 	    (Dwp_output_file::add_contribution): Likewise.
   1754 	    (Dwp_output_file::Dwp_index::find_or_add): Use row index to check
   1755 	    for empty slot.
   1756 	    (Dwp_output_file::Dwp_index::enter_set): Add support for v2 package
   1757 	    file format.
   1758 	    (Dwp_output_file::Dwp_index::grow): Use row index to check for empty
   1759 	    slot.
   1760 	    (Dwp_output_file::initialize): Remove unused function.
   1761 	    (Dwp_output_file::finalize): Add support for v2 package file format.
   1762 	    (Dwp_output_file::write_index): Likewise.
   1763 	    * gdb-index.cc (Gdb_index_info_reader::visit_type_unit): Adjust
   1764 	    function prototype.
   1765 
   1766 2013-07-31  Cary Coutant  <ccoutant (a] google.com>
   1767 
   1768 	* object.cc (Sized_relobj::do_output_section_address): New function.
   1769 	(Sized_relobj): Instantiate explicitly.
   1770 	* object.h (Object::output_section_address): New function.
   1771 	(Object::do_output_section_address): New function.
   1772 	(Sized_relobj::do_output_section_address): New function.
   1773 	* powerpc.cc (Target_powerpc::symval_for_branch): Use it.
   1774 
   1775 2013-07-30  Cary Coutant  <ccoutant (a] google.com>
   1776 	    Sasa Stankovic  <Sasa.Stankovic (a] imgtec.com>
   1777 
   1778 	* parameters.cc (Parameters::entry): Return target-specific entry
   1779 	symbol name.
   1780 	* target.h (Target::entry_symbol_name): New function.
   1781 	(Target_info::entry_symbol_name): New data member.
   1782 
   1783 	* arm.cc (Target_arm::arm_info): Add entry_symbol_name.
   1784 	* i386.cc (Target_i386::i386_info): Likewise.
   1785 	(Target_i386_nacl::i386_nacl_info): Likewise.
   1786 	* sparc.cc (Target_sparc::sparc_info): Likewise.
   1787 	* tilegx.cc (Target_tilegx::tilegx_info): Likewise.
   1788 	* x86_64.cc: (Target_x86_64::x86_64_info) Likewise.
   1789 	(Target_x86_64_nacl::x86_64_nacl_info) Likewise.
   1790 	* testsuite/testfile.cc (Target_test::test_target_info): Likewise.
   1791 
   1792 2013-07-22  Sterling Augustine  <saugustine (a] google.com>
   1793 
   1794 	* dwarf_reader.cc (Dwarf_pubnames_table::read_section):
   1795 	Convert parameter shndx to local variable. Add parameters symtab
   1796 	and symtab_size.  Scan over section names.  Find relocation
   1797 	section corresponding to current section.  Create and initialize
   1798 	reloc_mapper_ and reloc_type_.
   1799 	(Dwarf_pubnames_table::read_header):  Add assertion.  Change
   1800 	unit_length to off_t.  Initialize member unit_length_.  Fill in field
   1801 	cu_offset_.
   1802 	* dwarf_reader.h (Dwarf_pubnames_table::Dwarf_pubnames_table):
   1803 	Initialize new fields unit_length_ and cu_offset_.
   1804 	(Dwarf_pubnames_table::read_section): Update prototype.
   1805 	(Dwarf_pubnames_table::cu_offset): New member function.
   1806 	(Dwarf_pubnames_table::subsection_size): Likewise.
   1807 	(Dwarf_pubnames_table::cu_offset_, Dwarf_pubnames_table::unit_length):
   1808 	New fields.
   1809 	(Dwarf_info_reader::symtab, Dwarf_info_reader::symtab_size): Make
   1810 	member functions public.
   1811 	* gdb_index.cc (Gdb_index_info_reader::read_pubnames_and_pubtypes):
   1812 	Update comment.  Rework logic.  Move repeated parts to...
   1813 	(Gdb_index_info_reader::read_pubtable): ...here. New function.
   1814 	(Gdb_index::Gdb_index): Initialize new fields, pubnames_table_,
   1815 	pubtypes_table_, and stmt_list_offset.
   1816 	(Gdb_index::map_pubtable_to_dies, Gdb_index::find_pubname_offset,
   1817 	Gdb_index::find_pubtype_offset,
   1818 	Gdb_index::map_pubnames_and_types_to_dies): Define new functions.
   1819 	(Gdb_index::pubnames_read): Update prototype and rework logic.
   1820 	* gdb_index.h (Gdb_index_info_reader, Dwarf_pubnames_table):
   1821 	Forward declare.
   1822 	(Gdb_index::map_pubtable_to_dies, Gdb_index::find_pubname_offset,
   1823 	Gdb_index::find_pubtype_offset, Gdb_index::pubnames_table)
   1824 	Gdb_index::pubtypes_table, Gdb_index::map_pubnames_and_types_to_dies,
   1825 	Gdb_index::map_pubtable_to_dies):
   1826 	Declare functions.
   1827 	(Gdb_index::pubnames_read): Update declaration.
   1828 	(Gdb_index::Pubname_offset_map): New type.
   1829 	(Gdb_index::cu_pubname_map_, Gdb_index::cu_pubtype_map_,
   1830 	Gdb_index::pubnames_table_, Gdb_index::pubtypes_table_,
   1831 	Gdb_index::stmt_list_offset): Declare.
   1832 	(Gdb_index::pubnames_shndx_, Gdb_index::pubnames_offet_,
   1833 	Gdb_index::pubtypes_object_, Gdb_index::pubtypes_shndx_)
   1834 	Gdb_index::pubtypes_offset_): Remove.
   1835 
   1836 2013-07-19  Roland McGrath  <mcgrathr (a] google.com>
   1837 
   1838 	* options.h (General_options): Add -Trodata-segment option.
   1839 	* parameters.cc (Parameters::check_rodata_segment): New function.
   1840 	(Parameters::set_target_once): Call it.
   1841 	* parameters.h (Parameters): Declare it (private member function).
   1842 	* layout.cc (load_seg_unusable_for_headers): New function, broken
   1843 	out of Layout::relaxation_loop_body.  If TARGET->isolate_execinstr()
   1844 	then validate rodata segment rather than text segment.
   1845 	(relaxation_loop_body): Call that.
   1846 	(is_text_segment): New function.  Don't admit a non-executable
   1847 	segment if TARGET->isolate_execinstr().
   1848 	(set_segment_offsets): Call it.  Honor -Trodata-segment option.
   1849 
   1850 2013-07-15  Shawn Landden  <shawnlandden (a] gmail.com>
   1851 
   1852 	PR gold/15070
   1853 	* fileread.h (File_read::get_view): Clarify comment about ALIGNED.
   1854 	* nacl.h (Sniff_file::View::View): Request aligned view.
   1855 
   1856 2013-07-11  Cary Coutant  <ccoutant (a] google.com>
   1857 
   1858 	* powerpc.cc (Target_powerpc::write_branch_lookup_table): Use
   1859 	correct BRLT entry size.
   1860 
   1861 2013-07-03  Alan Modra  <amodra (a] gmail.com>
   1862 
   1863 	* powerpc.cc (Target_powerpc::Relocate::relocate): Update self-call
   1864 	comment.
   1865 
   1866 2013-07-01  Cary Coutant  <ccoutant (a] google.com>
   1867 
   1868 	* dwarf_reader.cc (Dwarf_ranges_table::read_ranges_table): Save
   1869 	reloc_type_.
   1870 	(Dwarf_ranges_table::read_range_list): Call lookup_reloc.
   1871 	(Dwarf_ranges_table::lookup_reloc): New function.
   1872 	* dwarf_reader.h (Dwarf_ranges_table::Dwarf_ranges_table): Initialize
   1873 	reloc_type_.
   1874 	(Dwarf_ranges_table::lookup_reloc): New function.
   1875 	(Dwarf_ranges_table::reloc_type_): New data member.
   1876 
   1877 2013-06-27  Jing Yu  <jingyu (a] google.com>
   1878 
   1879 	PR gold/15662
   1880 	* powerpc.cc (Output_data_brlt_powerpc::reset_brlt_sizes): New
   1881 	function.
   1882 	(Output_data_brlt_powerpc::finalize_brlt_sizes): New function.
   1883 	(Target_powerpc::do_relax): Call the above.
   1884 
   1885 2013-06-27  Cary Coutant  <ccoutant (a] google.com>
   1886 
   1887 	* powerpc.cc (Target_powerpc::symval_for_branch): Don't assert
   1888 	on garbage collected .opd section.
   1889 
   1890 2013-06-27  Alan Modra  <amodra (a] gmail.com>
   1891 
   1892 	* powerpc.cc (Target_powerpc::do_gc_add_reference): Test dst_shndx
   1893 	is non-zero.
   1894 	(Target_powerpc::do_gc_mark_symbols): Likewise for sym->shndx().
   1895 	(Target_powerpc::do_function_location): Likewise for loc->shndx.
   1896 
   1897 2013-06-14  Cary Coutant  <ccoutant (a] google.com>
   1898 
   1899 	* resolve.cc (Symbol::override_base): Don't override st_type
   1900 	from plugin placeholder symbols.
   1901 	(Symbol_table::resolve): Likewise.
   1902 	(Symbol_table::should_override): Don't complain about TLS mismatch
   1903 	if the TO symbol is a plugin placeholder.
   1904 	* testsuite/Makefile.am (plugin_test_tls): New test.
   1905 	* testsuite/Makefile.in: Regenerate.
   1906 	* testsuite/plugin_test_tls.sh: New test script.
   1907 	* testsuite/two_file_test_2_tls.cc: New test source.
   1908 	* testsuite/two_file_test_tls.cc: New test source.
   1909 
   1910 2013-06-05  Alexander Ivchenko  <alexander.ivchenko (a] intel.com>
   1911 
   1912 	* layout.cc (Layout::set_segment_offsets): Taking care of the case when
   1913 	the maximum segment alignment is larger than the page size.
   1914 	* testsuite/Makefile.am (large_symbol_alignment): Test that Gold
   1915 	correctly aligns the symbols with large alignemnt.
   1916 	* testsuite/Makefile.in: Regenerate.
   1917 	* testsuite/large_symbol_alignment.cc: New file.
   1918 
   1919 2013-05-30  Alexander Ivchenko  <alexander.ivchenko (a] intel.com>
   1920 	    Sriraman Tallam  <tmsriram (a] google.com>
   1921 
   1922 	* options.h (sort_section): New option.
   1923 	* output.h (Input_section_sort_section_prefix_special_ordering_compare):
   1924 	Rename from Input_section_sort_section_name_special_ordering_compare.
   1925 	(Input_section_sort_section_name_compare): New struct.
   1926 	* output.cc (Output_section::Input_section_sort_section_name_compare::
   1927 	operator()): New function.
   1928 	(Output_section::sort_attached_input_sections): Use new sort function
   1929 	for .text if --sort-section=name is specified.
   1930 	* layout.cc (Layout::make_output_section):
   1931 	Add sorting by name when --sort-section=name is specified.
   1932 	* testsuite/Makefile.am (text_section_grouping): Test option
   1933 	--sort-section=name.
   1934 	* testsuite/Makefile.in: Regenerate.
   1935 	* testsuite/section_sorting_name.cc: New file.
   1936 	* testsuite/section_sorting_name.sh: New file.
   1937 
   1938 2013-05-21  Cary Coutant  <ccoutant (a] google.com>
   1939 
   1940 	* symtab.h (Symbol::is_cxx_vtable): New function.
   1941 	* target-reloc.h (relocate_section): Check for vtable symbol.
   1942 	* testsuite/Makefile.am (missing_key_func.sh): New test case.
   1943 	* testsuite/Makefile.in: Regenerate.
   1944 	* testsuite/missing_key_func.cc: New test source.
   1945 	* testsuite/missing_key_func.sh: New test script.
   1946 
   1947 2013-05-21  Cary Coutant  <ccoutant (a] google.com>
   1948 
   1949 	* object.cc (Sized_relobj_file::get_symbol_location_info): Set
   1950 	type of enclosing symbol.
   1951 	(Relocate_info::location): Check symbol type when describing symbol.
   1952 	* object.h (Symbol_location_info): Remove unused line_number;
   1953 	add enclosing_symbol_type.
   1954 	* testsuite/debug_msg.sh: Adjust expected output.
   1955 
   1956 2013-05-13  Cary Coutant  <ccoutant (a] google.com>
   1957 
   1958 	* configure.ac: Export DEFAULT_TARGET.
   1959 	* configure: Regenerate.
   1960 	* Makefile.in: Regenerate.
   1961 	* testsuite/Makefile.am: Add .EXPORT_ALL_VARIABLES.
   1962 	* testsuite/Makefile.in: Regenerate.
   1963 	* testsuite/debug_msg.sh: Delete duplicate tests.
   1964 	Don't check undef_int error message match for powerpc where the
   1965 	source file and line number aren't available.
   1966 
   1967 2013-05-10  Roland McGrath  <mcgrathr (a] google.com>
   1968 
   1969 	* options.h (General_options): Add --rosegment-gap option.
   1970 	* options.cc (finalize): --rosegment-gap implies --rosegment.
   1971 	* layout.cc (set_segment_offsets): Let user option override
   1972 	target->rosegment_gap().
   1973 
   1974 2013-05-10  Roland McGrath  <mcgrathr (a] google.com>
   1975 
   1976 	* options.h (General_options): Remove leading space from help
   1977 	messages for -nostdlib and --rosegment.
   1978 
   1979 2013-05-03  Maciej W. Rozycki  <macro (a] codesourcery.com>
   1980 
   1981 	PR ld/15365
   1982 	* layout.cc (Layout::finalize): Make __ehdr_start STV_HIDDEN.
   1983 
   1984 2013-05-03  Alan Modra  <amodra (a] gmail.com>
   1985 
   1986 	* merge.cc (Output_merge_string::do_add_input_section): Correct
   1987 	scan for number of strings.  Rename vars to avoid shadowing.
   1988 	Include missing terminator in input_size_.
   1989 
   1990 2013-05-01  H.J. Lu  <hongjiu.lu (a] intel.com>
   1991 
   1992 	* merge.cc (Output_merge_string<Char_type>::do_add_input_section):
   1993 	Restore empty string handling.
   1994 
   1995 2013-05-01  Cary Coutant  <ccoutant (a] google.com>
   1996 
   1997 	* stringpool.cc (Stringpool_template::new_key_offset): Fix
   1998 	uninitialized warning.
   1999 
   2000 2013-04-29  Alexander Ivchenko  <alexander.ivchenko (a] intel.com>
   2001 
   2002 	* output.cc (Output_section::add_merge_input_section): Allow
   2003 	to merge sections if the alignment is more than character size.
   2004 	* merge.h (Output_merge_string::Output_merge_string): Remove
   2005 	assert.
   2006 	* merge.cc (Output_merge_string<Char_type>::do_add_input_section): Count
   2007 	only not-null strings. Check the alignment of strings.
   2008 	* stringpool.h
   2009 	(Stringpool_template<Stringpool_char>::Stringpool_template): Add
   2010 	alignment as the argument.
   2011 	(Stringpool_template<Stringpool_char>::addralign_): New class member.
   2012 	* stringpool.cc (Stringpool_template<Stringpool_char>::new_key_offset):
   2013 	Align non-zero length strings according to the addralign_.
   2014 	(Stringpool_template<Stringpool_char>::set_string_offsets):
   2015 	Updating offsets according to the given alignment.
   2016 	* testsuite/Makefile.am (text_section_grouping): Test if string
   2017 	literals are getting merged.
   2018 	* testsuite/Makefile.in: Regenerate.
   2019 	* testsuite/merge_string_literals_1.c: New file.
   2020 	* testsuite/merge_string_literals_2.c: Ditto.
   2021 	* testsuite/merge_string_literals.sh: Ditto.
   2022 
   2023 2013-04-26  Ian Lance Taylor  <iant (a] google.com>
   2024 
   2025 	* target-reloc.h (relocate_section): If the reloc offset is out of
   2026 	range, pass VIEW as NULL to relocate.relocate.
   2027 	* arm.cc (Target_arm:Relocate::relocate): Check for a NULL view.
   2028 	* i386.cc (Target_i386::Relocate::relocate): Likewise.
   2029 	* powerpc.cc (Target_powerpc::Relocate::relocate): Likewise.
   2030 	* sparc.cc (Target_sparc::Relocate::relocate): Likewise.
   2031 	* tilegx.cc (Target_tilegx::Relocate::relocate): Likewise.
   2032 	* x86_64.cc (Target_x86_64::Relocate::relocate): Likewise.
   2033 
   2034 2013-04-26  Geoff Pike  <gpike (a] chromium.org>
   2035 
   2036 	* gold.cc (queue_final_tasks): invoke layout->queue_build_id_tasks().
   2037 	* layout.cc (Hash_task): New class.
   2038 	(Layout::queue_build_id_tasks): New function.
   2039 	(Layout::write_build_id): Handle single-thread portion of build ID
   2040 	computation.  (In some cases, all of it is single-threaded.)  Replace
   2041 	{sha1,md5}_process_bytes with {sha1,md5}_buffer to get the same
   2042 	functionality in fewer lines of code.
   2043 	* layout.h (Layout::queue_build_id_tasks): New function declaration.
   2044 	* options.h (General_options): make "--build-id" default to tree
   2045 	rather than sha1.  Add two new options related to --build-id=tree:
   2046 	--build-id-chunk-size-for-treehash and
   2047 	--build-id-min-file-size-for-treehash.
   2048 	* Makefile.am: add testing of --build-id=tree and related new options
   2049 	(these tests will be invoked by "make check").
   2050 	* Makefile.in: Regenerate.
   2051 
   2052 2013-04-25  Alan Modra  <amodra (a] gmail.com>
   2053 
   2054 	* configure.tgt: Add powerpcle and powerpc64le.
   2055 
   2056 2013-04-22  Alan Modra  <amodra (a] gmail.com>
   2057 
   2058 	PR gold/15355
   2059 	* layout.cc (Layout::segment_precedes): Allow more than one
   2060 	segment with the same type and flags.
   2061 
   2062 2013-04-15  Cary Coutant  <ccoutant (a] google.com>
   2063 
   2064 	* layout.cc (Layout::set_relocatable_section_offsets): Don't
   2065 	allocate space in file for BSS sections.
   2066 
   2067 2013-04-15  Cary Coutant  <ccoutant (a] google.com>
   2068 
   2069 	* script-sections.cc (Orphan_output_section): Reset address
   2070 	to zero after each orphaned section for relocatable links.
   2071 
   2072 2013-04-15  Cary Coutant  <ccoutant (a] google.com>
   2073 
   2074 	* symtab.cc (Symbol_table::sized_write_globals): Subtract
   2075 	section starting address for relocatable link.
   2076 	* testsuite/Makefile.am (script_test_11): New test.
   2077 	* testsuite/Makefile.in: Regenerate.
   2078 	* testsuite/script_test_11.c: New source file.
   2079 	* testsuite/script_test_11.t: New linker script.
   2080 
   2081 2013-04-13  Alan Modra  <amodra (a] gmail.com>
   2082 
   2083 	* powerpc.cc (Stub_control::can_add_to_stub_group): Don't set
   2084 	owner when sections are not adjacent and exceed group size.
   2085 	(Target_powerpc::group_sections): Handle corner case.
   2086 	(Target_powerpc::Branch_info::make_stub): Handle case where
   2087 	stub table doesn't exist due to branches in non-exec sections.
   2088 	(Target_powerpc::Relocate::relocate): Likewise.
   2089 
   2090 2013-04-11  Alan Modra  <amodra (a] gmail.com>
   2091 
   2092 	PR gold/15354
   2093 	* powerpc.cc (Target_powerpc::make_brlt_section): Name section
   2094 	.branch_lt to match bfd ld.  Adjust comments throughout file.
   2095 
   2096 2013-04-04  Ian Lance Taylor  <iant (a] google.com>
   2097 
   2098 	GCC PR c++/56840
   2099 	* object.cc (do_layout_deferred_sections): Handle .eh_frame
   2100 	sections before checking whether they are included in the link.
   2101 
   2102 2013-03-29  Sriraman Tallam  <tmsriram (a] google.com>
   2103 
   2104 	* archive.cc (Archive::get_elf_object_for_member):  Create the elf
   2105 	object before calling the plugin claim_file handler.  Pass the elf
   2106 	object of the archive to the plugin. Delete the elf object if the
   2107 	plugin claims the file.
   2108 
   2109 2013-03-21  Alan Modra  <amodra (a] gmail.com>
   2110 
   2111 	* layout.cc (Layout::set_segment_offsets): Accept writable .text
   2112 	segment when omagic.
   2113 
   2114 2013-03-21  Alan Modra  <amodra (a] gmail.com>
   2115 
   2116 	* dwp.cc (Dwp_output_file::add_contribution): Avoid signed/unsigned
   2117 	comparison warning.
   2118 	* layout.cc (Layout::create_dynamic_symtab): Avoid "may be used
   2119 	uninitialized" warning.
   2120 
   2121 2013-03-20  Alan Modra  <amodra (a] gmail.com>
   2122 
   2123 	* symtab.h (Symbol::clear_version): New function.
   2124 	* symtab.cc (Symbol_table::set_dynsym_indexes): Don't set object
   2125 	is_needed by weak references.  Clear version for symbols defined
   2126 	in as-needed objects that are not needed.
   2127 
   2128 2013-03-15  Alan Modra  <amodra (a] gmail.com>
   2129 
   2130 	* powerpc.cc (Target_powerpc::Scan::reloc_needs_plt_for_ifunc): Make
   2131 	static and public.  Add report_err param.  Return false for data refs.
   2132 	(Target_powerpc::rela_dyn_section): New overloaded function.
   2133 	(Target_powerpc::plt_, iplt_): Elucidate.
   2134 	(Output_data_plt_powerpc::entry_count): Handle current_data_size()==0.
   2135 	(Output_data_plt_powerpc::do_write): Don't write .iplt.
   2136 	(Output_data_plt_powerpc::plt_entry_count): Don't add .iplt entries.
   2137 	(Target_powerpc::Scan::local, global): Adjust reloc_needs_plt_for_ifunc
   2138 	calls.  Put ifunc dynamic relocs in irela_dyn_section.  Only
   2139 	push_branch and make_plt_entry for ifunc syms when
   2140 	reloc_needs_plt_for_ifunc.
   2141 	(Target_powerpc::Relocate::relocate): Don't use plt entry value
   2142 	for ifunc unless reloc_needs_plt_for_ifunc.
   2143 
   2144 2013-03-15  Alan Modra  <amodra (a] gmail.com>
   2145 
   2146 	* gc.h (gc_process_relocs): Don't look through function descriptors.
   2147 	* icf.cc (get_section_contents): Do so here instead.
   2148 
   2149 2013-03-13  Alan Modra  <amodra (a] gmail.com>
   2150 
   2151 	* powerpc.cc (is_branch_reloc): Forward declare.
   2152 	(Target_powerpc::do_can_check_for_function_pointers): New predicate.
   2153 	(Target_powerpc::Scan::local_reloc_may_be_function_pointer): Return
   2154 	false for 64-bit, true for 32-bit non-branch relocs.
   2155 	(Target_powerpc::Scan::global_reloc_may_be_function_pointer): Likewise.
   2156 	* testsuite/Makefile.am (icf_test): Use linker map file instead of
   2157 	nm output.
   2158 	(icf_safe_test): Generate linker map file as well as nm output.
   2159 	(icf_safe_so_test): Likewise.
   2160 	* testsuite/Makefile.in: Regenerate.
   2161 	* testsuite/icf_test.sh: Parse linker map file to determine
   2162 	section folding.
   2163 	* testsuite/icf_safe_test.sh: Likewise.  Expect folding for PowerPC.
   2164 	* testsuite/icf_safe_so_test.sh: Likewise.
   2165 	(X86_32_or_ARM_specific_safe_fold): Merge into..
   2166 	(arch_specific_safe_fold): ..this.
   2167 	(X86_64_specific_safe_fold): Delete unused function.
   2168 
   2169 2013-03-12  Alan Modra  <amodra (a] gmail.com>
   2170 
   2171 	* gc.h (gc_process_relocs): Look through function descriptors
   2172 	to determine shndx, symvalue and addend used by ICF.  Tidy
   2173 	variable duplication.
   2174 
   2175 2013-03-11  Alan Modra  <amodra (a] gmail.com>
   2176 
   2177 	* gold.cc (queue_middle_tasks): Move detect_odr_violations..
   2178 	* layout.cc (Layout_task_runner::run): ..to here.
   2179 	* symtab.h (struct Symbol_location): Extract from..
   2180 	(class Symbol_table): ..here.
   2181 	* symtab.cc (Symbol_table::linenos_from_loc): Invoke function_location.
   2182 	* target.h (class Target): Add function_location and
   2183 	do_function_location functions.
   2184 	(class Sized_target): Add do_function_location.
   2185 	* object.h (class Sized_relobj_file): Move find_shdr..
   2186 	(class Object): ..to here.
   2187 	* object.cc: Likewise.  Update to suit.  Instantiate.
   2188 	(Sized_relobj_file::find_eh_frame): Update find_shdr call.
   2189 	* powerpc.cc (class Powerpc_dynobj): New.
   2190 	(Target_powerpc::do_function_location): New function.
   2191 	(Powerpc_relobj::do_find_special_sections): Update find_shdr call.
   2192 	(Powerpc_dynobj::do_read_symbols): New function.
   2193 	(Target_powerpc::do_make_elf_object): Make a Powerpc_dynobj.
   2194 
   2195 2013-03-08  Ian Lance Taylor  <iant (a] google.com>
   2196 
   2197 	* options.cc (General_options::string_to_object_format): Accept
   2198 	"default".
   2199 
   2200 2013-03-08  Alan Modra  <amodra (a] gmail.com>
   2201 
   2202 	* ehframe.h (Post_fdes) Make it a vector of Post_fde rather than
   2203 	pointer to Post_fde.
   2204 	(struct Post_fde): Move definition to here..
   2205 	* ehframe.cc (struct Post_fde): ..from here.
   2206 	(Cie::write): Don't alloc Post_fde.
   2207 	(Eh_frame::do_sized_write): Update.  Don't free Post_fde.
   2208 
   2209 2013-03-07  Alan Modra  <amodra (a] gmail.com>
   2210 
   2211 	* testsuite/discard_locals_relocatable_test.c: Add a powerpc
   2212 	relocation referencing .LC0.
   2213 	* testsuite/discard_locals_test.sh: Remove FIXMEs.
   2214 
   2215 2013-03-07  Alan Modra  <amodra (a] gmail.com>
   2216 
   2217 	* testsuite/ifunc-sel.h (ifunc_sel, ifunc_one): Mark
   2218 	always_inline.  Add assembly for powerpc to avoid GOT.
   2219 
   2220 2013-03-07  Alan Modra  <amodra (a] gmail.com>
   2221 
   2222 	* testsuite/script_test_10.sh: Don't test .bss section
   2223 	header number.
   2224 
   2225 2013-03-06  Alan Modra  <amodra (a] gmail.com>
   2226 
   2227 	* powerpc.cc (class Powerpc_relobj): Move some member functions.
   2228 	(Target_powerpc::symval_for_branch):  Add symtab param.  Update
   2229 	all callers.  Handle folded sections.
   2230 	(Target_powerpc::do_gc_add_reference): Don't cast dynamic object
   2231 	to Powerpc_relobj.
   2232 	(Global_symbol_visitor_opd::operator()): Likewise.
   2233 
   2234 2013-03-04  Alan Modra  <amodra (a] gmail.com>
   2235 
   2236 	* testsuite/Makefile.am (final_layout_script.lds): Add .sbss.
   2237 	* testsuite/Makefile.in: Regenerate.
   2238 
   2239 2013-03-01  Cary Coutant  <ccoutant (a] google.com>
   2240 
   2241 	Add dwp support for v2 DWARF package file format.
   2242 	* dwarf_reader.cc (Dwarf_info_reader::visit_type_unit): Add
   2243 	tu_length parameter.  Adjust all callers.
   2244 	* dwarf_reader.h (Dwarf_info_reader::visit_type_unit): Likewise.
   2245 	* dwp.cc: Include dwarf.h.
   2246 	(Section_bounds): New struct type.
   2247 	(Unit_set): New struct type.
   2248 	(Dwo_file::Dwo_file): Initialize new data member.
   2249 	(Dwo_file::read_compunit_index, Dwo_file::read_typeunit_index):
   2250 	Combine and rename to...
   2251 	(Dwo_file::read_unit_index): ...this.
   2252 	(Dwo_file::sized_read_compunit_index)
   2253 	(Dwo_file::sized_read_typeunit_index): Combine and rename to...
   2254 	(Dwo_file::sized_read_unit_index): ...this.
   2255 	(Dwo_file::copy_section): Remove section_name, is_str_offsets
   2256 	parameters; add section_id parameter.
   2257 	(Dwo_file::add_cu_set, Dwo_file::add_tu_set): Combine and rename to...
   2258 	(Dwo_file::add_unit_set): ...this.
   2259 	(Dwo_file::shndx_map_): Remove.
   2260 	(Dwo_file::sect_offsets_): New data member.
   2261 	(Dwp_output_file::Dwp_output_file): Initialize new data members.
   2262 	(Dwp_output_file::add_section): Rename to...
   2263 	(Dwp_output_file::add_contribution): ...this.
   2264 	(Dwp_output_file::add_cu_set): Combine parameters into a struct.
   2265 	(Dwp_output_file::add_tu_set): Likewise.
   2266 	(Dwp_output_file::Contribution): New type.
   2267 	(Dwp_output_file::Section::contributions): New data member.
   2268 	(Dwp_output_file::Cu_or_tu_set): Remove.
   2269 	(Dwp_output_file::Section::Section): New ctor.
   2270 	(Dwp_output_file::Dwp_index::Shndx_pool): Remove.
   2271 	(Dwp_output_file::Dwp_index::Section_table): New type.
   2272 	(Dwp_output_file::Dwp_index::Dwp_index): Initialize new data members.
   2273 	(Dwp_output_file::Dwp_index::enter_set): Change type of "set"
   2274 	parameter.
   2275 	(Dwp_output_file::Dwp_index::shndx_pool): Remove.
   2276 	(Dwp_output_file::Dwp_index::shndx_pool_end): Remove.
   2277 	(Dwp_output_file::Dwp_index::section_table): New member function.
   2278 	(Dwp_output_file::Dwp_index::section_table_end): New member function.
   2279 	(Dwp_output_file::Dwp_index::shndx_pool_size): Remove.
   2280 	(Dwp_output_file::Dwp_index::section_table_rows): New member function.
   2281 	(Dwp_output_file::Dwp_index::section_table_cols): New member function.
   2282 	(Dwp_output_file::Dwp_index::shndx_pool_): Remove.
   2283 	(Dwp_output_file::Dwp_index::section_table_): New data member.
   2284 	(Dwp_output_file::Dwp_index::section_mask_): New data member.
   2285 	(Dwp_output_file::add_output_section): New member function.
   2286 	(Dwp_output_file::write_new_section): New member function.
   2287 	(Dwp_output_file::write_contributions): New member function.
   2288 	(Dwp_output_file::section_id_map_): New data member.
   2289 	(class Dwo_id_info_reader): Remove.
   2290 	(class Unit_reader): New class.
   2291 	(get_dwarf_section_name): New function.
   2292 	(Dwo_file::read_executable): Adjust initializations of class data.
   2293 	(Dwo_file::read): Add support for v2 package file format.
   2294 	(Dwo_file::read_unit_index): Likewise.
   2295 	(Dwo_file::sized_read_unit_index): Likewise.
   2296 	(Dwo_file::copy_section): Likewise.
   2297 	(Dwo_file::add_unit_set): Likewise.
   2298 	(Dwp_output_file::add_output_section): Likewise.
   2299 	(Dwp_output_file::add_contribution): Likewise.
   2300 	(Dwp_output_file::Dwp_index::find_or_add): Use row index to check
   2301 	for empty slot.
   2302 	(Dwp_output_file::Dwp_index::enter_set): Add support for v2 package
   2303 	file format.
   2304 	(Dwp_output_file::Dwp_index::grow): Use row index to check for empty
   2305 	slot.
   2306 	(Dwp_output_file::initialize): Remove unused function.
   2307 	(Dwp_output_file::finalize): Add support for v2 package file format.
   2308 	(Dwp_output_file::write_index): Likewise.
   2309 	* gdb-index.cc (Gdb_index_info_reader::visit_type_unit): Adjust
   2310 	function prototype.
   2311 
   2312 2013-03-01  Cary Coutant  <ccoutant (a] google.com>
   2313 
   2314 	* dwarf_reader.cc (Dwarf_info_reader::check_buffer): Move
   2315 	function into class definition in header file.
   2316 	(Dwarf_info_reader::warn_corrupt_debug_section): New function.
   2317 	* dwarf_reader.h (Dwarf_info_reader::warn_corrupt_debug_section):
   2318 	New function.
   2319 	(Dwarf_info_reader::check_buffer): Move here from .cc file.
   2320 
   2321 2013-02-28  Alan Modra  <amodra (a] gmail.com>
   2322 
   2323 	* target.h (Target::plt_fde_location, do_plt_fde_location): Declare.
   2324 	* target.cc (Target::do_plt_fde_location): New function.
   2325 	* ehframe.h (class FDE): Add post_map field to u_.from_linker,
   2326 	accessor function, and constructor param.
   2327 	(struct Post_fde, Post_fdes): Declare.
   2328 	(Cie::write): Add post_fdes param.
   2329 	* ehframe.cc (Fde::write): Use plt_fde_location.
   2330 	(struct Post_fde): Define.
   2331 	(Cie::write): Stash FDEs added post merge mapping.
   2332 	(Eh_frame::add_ehframe_for_plt): Assert no new CIEs after mapping.
   2333 	Adjust Fde constructor call.  Bump final_data_size_ for post map FDEs.
   2334 	(Eh_frame::do_sized_write): Arrange to write post map FDES after
   2335 	other FDEs.
   2336 	* powerpc.cc (Target_powerpc::do_plt_fde_location): New function.
   2337 	(Target_powerpc::has_glink): New function.
   2338 	(Target_powerpc::do_relax): Add eh_frame info for stubs.
   2339 	(struct Eh_cie, eh_frame_cie, glink_eh_frame_fde_64,
   2340 	glink_eh_frame_fde_32, default_fde): New data.
   2341 	(Stub_table::eh_frame_added_): New var.
   2342 	(Stub_table::find_long_branch_entry, stub_address, stub_offset):
   2343 	Make const.
   2344 	(Stub_table::add_eh_frame): New function.
   2345 	(Output_data_glink::add_eh_frame): New function.
   2346 	(Target_powerpc::make_glink_section): Call add_eh_frame.
   2347 
   2348 2013-02-15  Ian Lance Taylor  <iant (a] google.com>
   2349 
   2350 	* options.h (DEFINE_uint64_alias): Define.
   2351 	(class General_options): Add -Ttext-segment as an alias for
   2352 	-Ttext.
   2353 
   2354 2013-02-15  Alan Modra  <amodra (a] gmail.com>
   2355 
   2356 	* powerpc.cc (Stub_table::plt_off): New function, extracted from..
   2357 	(Stub_table::do_write): ..here, two places.
   2358 	(Stub_table::plt_call_size): Use it here too.
   2359 
   2360 2013-02-11  Ian Lance Taylor  <iant (a] google.com>
   2361 
   2362 	* descriptors.cc (Descriptors::close_all): New function.
   2363 	* descriptors.h (class Descriptors): Declare close_all.
   2364 	(close_all_descriptors): New inline function.
   2365 	* plugin.cc: Include "descriptors.h".
   2366 	(Plugin_manager::cleanup): Call close_all_descriptors.
   2367 
   2368 2013-02-06  Alan Modra  <amodra (a] gmail.com>
   2369 
   2370 	* README: Update coding style link.
   2371 
   2372 2013-01-28  Cary Coutant  <ccoutant (a] google.com>
   2373 
   2374 	* dwp.cc (File_list): New typedef.
   2375 	(Dwo_name_info_reader): New class.
   2376 	(Dwo_id_info_reader::Dwo_id_info_reader): Remove unused parameters.
   2377 	(Dwo_id_info_reader::visit_top_die): Remove unused member function.
   2378 	(Dwo_file::~Dwo_file): Delete input_file_ after obj_.
   2379 	(Dwo_file::read_executable): New function.
   2380 	(Dwo_file::read): Move common setup code to ...
   2381 	(Dwo_file::make_object): ... here.
   2382 	(dwp_options): Add --exec/-e.
   2383 	(usage): Likewise.
   2384 	(main): Likewise.
   2385 
   2386 2013-01-24  Sriraman Tallam  <tmsriram (a] google.com>
   2387 
   2388 	* layout.cc (Layout::layout): Check for option text_reorder.
   2389 	(Layout::make_output_section): Ditto.
   2390 	* options.h (text_reorder): New option.
   2391 	* output.cc (Input_section_sort_compare): Remove special ordering
   2392 	of section names.
   2393 	(Output_section::
   2394 	 Input_section_sort_section_name_special_ordering_compare::
   2395 	 operator()): New function.
   2396 	(Output_section::sort_attached_input_sections): Use new sort function
   2397 	for .text.
   2398 	* output.h (Input_section_sort_section_name_special_ordering_compare):
   2399 	New struct.
   2400 	* testsuite/Makefile.am (text_section_grouping): Test option
   2401 	--no-text-reorder
   2402 	* testsuite/Makefile.in: Regenerate.
   2403 	* testsuite/text_section_grouping.sh: Check order of functions without
   2404 	default text reordering.
   2405 
   2406 2013-01-18  Mike Frysinger  <vapier (a] gentoo.org>
   2407 
   2408 	* options.h (General_options): Change default to true for new_dtags.
   2409 
   2410 2013-01-18  Mike Frysinger  <vapier (a] gentoo.org>
   2411 
   2412 	* layout.cc (Layout::finish_dynamic_section): Only add DT_RPATH
   2413 	when enable_new_dtags is false.  Only add DT_RUNPATH when
   2414 	enable_new_dtags is true.
   2415 
   2416 2013-01-17  Serge Pavlov  <serge.v.pavlov (a] gmail.com>
   2417 
   2418 	* powerpc.cc (Stub_table::find_plt_call_entry): Make types
   2419 	used in declaration and definition consistent.
   2420 	(Target_powerpc::symval_for_branch): Ditto.
   2421 
   2422 2013-01-16  Sriraman Tallam  <tmsriram (a] google.com>
   2423 
   2424 	* testsuite/plugin_final_layout.cc: Fix comment.
   2425 
   2426 2013-01-16  Sriraman Tallam  <tmsriram (a] google.com>
   2427 
   2428 	* layout.cc (Layout::layout): Do not do default sorting for
   2429 	text sections when section ordering is specified.
   2430 	(make_output_section): Ditto.
   2431 	* testsuite/plugin_final_layout.cc: Name the function sections
   2432 	to catch reordering issues.
   2433 
   2434 2013-01-15  Alan Modra  <amodra (a] gmail.com>
   2435 
   2436 	* powerpc.cc (Target_powerpc::do_relax): Default shared libs to
   2437 	plt-thread-safe.
   2438 
   2439 2013-01-15  Alan Modra  <amodra (a] gmail.com>
   2440 
   2441 	* testsuite/Makefile.am (final_layout_script.lds): Handle .got section.
   2442 	* testsuite/Makefile.in: Regenerate.
   2443 
   2444 2013-01-14  Alan Modra  <amodra (a] gmail.com>
   2445 
   2446 	* testsuite/Makefile.am (MOSTLYCLEANFILES): Add various output files.
   2447 	* testsuite/Makefile.in: Regenerate.
   2448 
   2449 2013-01-11  Pavel Chupin  <pavel.v.chupin (a] intel.com>
   2450 
   2451 	PR bfd/14430
   2452 	Fix mingw gold build with plugins enabled
   2453 	* Makefile.am: Replace -ldl with @DLOPEN_LIBS@.
   2454 	* configure.ac: Export DLOPEN_LIBS and add headers check.
   2455 	* plugin.cc: Handle non-dlfcn case.
   2456 	* Makefile.in: Regenerate.
   2457 	* config.in: Regenerate.
   2458 	* configure: Regenerate.
   2459 	* testsuite/Makefile.in: Regenerate.
   2460 
   2461 2013-01-09  Sriraman Tallam  <tmsriram (a] google.com>
   2462 
   2463 	* output.h (sort_attached_input_sections): Change to be public.
   2464 	* script-sections.cc
   2465 	(Output_section_definition::set_section_addresses): Sort
   2466 	attached input sections according to section order before linker
   2467 	script assigns section addresses.
   2468 	(Orphan_output_section::set_section_addresses): Sort
   2469 	attached input sections according to section order before linker
   2470 	script assigns section addresses.
   2471 	* Makefile.am (final_layout.sh): Use a simple linker script to
   2472 	check if section ordering still works.
   2473 	* Makefile.in: Regenerate.
   2474 
   2475 2013-01-09  Ben Cheng  <bccheng (a] google.com>
   2476 
   2477 	* arm.cc (Target_arm::attributes_accept_div): New function.
   2478 	(Target_arm::attributes_forbid_div): New function.
   2479 	(Target_arm::merge_object_attributes): Merge the Tag_DIV_use
   2480 	attribute using the same new functions as what bfd/elf32_arm.c
   2481 	does.
   2482 
   2483 2013-01-07  Cary Coutant  <ccoutant (a] google.com>
   2484 
   2485 	PR gold/14993
   2486 	* output.cc (Output_section::add_input_section): For incremental
   2487 	updates, don't track input sections that are allocated from patch
   2488 	space.
   2489 
   2490 2013-01-07  H.J. Lu  <hongjiu.lu (a] intel.com>
   2491 	    Ian Lance Taylor  <iant (a] google.com>
   2492 
   2493 	PR gold/14897
   2494 	* configure.ac (--enable-ld): Removed.
   2495 	(install_as_default): Set to yes only for --enable-gold=default
   2496 	or --disable-ld.
   2497 	* configure: Regenerated.
   2498 
   2499 2013-01-07  H.J. Lu  <hongjiu.lu (a] intel.com>
   2500 
   2501 	* options.h (General_options): Add -fuse-ld= for GCC linker
   2502 	option compatibility.
   2503 
   2504 2013-01-04  Cary Coutant  <ccoutant (a] google.com>
   2505 
   2506 	* configure.ac: Fix typo restoring CXXFLAGS.
   2507 	* configure: Regenerate.
   2508 
   2509 2013-01-04  Cary Coutant  <ccoutant (a] google.com>
   2510 
   2511 	* testsuite/Makefile.am (CXXLINK_S): New macro.
   2512 	(debug_msg_so.err, debug_msg_ndebug.err): Use CXXLINK_S.
   2513 	* testsuite/Makefile.in: Regenerate.
   2514 
   2515 2013-01-02  H.J. Lu  <hongjiu.lu (a] intel.com>
   2516 
   2517 	* version.cc (print_version): Update copyright year to 2013.
   2518 
   2519 2012-12-20  Ian Lance Taylor  <iant (a] google.com>
   2520 
   2521 	* layout.cc (Layout::special_ordering_of_input_section): New
   2522 	function.
   2523 	(Layout::layout): If input section requires special ordering, must
   2524 	sort input sections.
   2525 	(Layout::make_output_section): May sort .text input sections.
   2526 	(Layout::is_section_name_prefix_grouped): Remove.
   2527 	* layout.h (class Layout): Declare
   2528 	special_ordering_of_input_section.  Don't declare
   2529 	is_section_name_prefix_grouped.
   2530 	* output.cc (Output_section::add_input_section): Revert last
   2531 	change.
   2532 	(Output_section::Input_section_sort::match_file_name): Don't crash
   2533 	if called on output section data.
   2534 	(Output_section::Input_section_sort_compare): Sort based on
   2535 	special ordering.
   2536 	(Output_section::Input_section_sort_section_order_index_compare):
   2537 	Revert last patch.
   2538 	(Output_section::sort_attached_input_sections): Likewise.
   2539 
   2540 2012-12-18  Sriraman Tallam  <tmsriram (a] google.com>
   2541 
   2542 	* layout.cc (Layout::is_section_name_prefix_grouped): New function.
   2543 	* layout.h (Layout::is_section_name_prefix_grouped): New function.
   2544 	* output.cc (Output_section::add_input_section): Check if section
   2545 	name contains special prefix.  Keep input sections to sort such
   2546 	sections.
   2547 	(Output_section::Input_section_sort_section_order_index_compare
   2548 	 ::operator()): Group sections according to prefixes.
   2549 	(Output_section::sort_attached_input_sections): Add condition to
   2550 	Input_section_entry constructor call.
   2551 	* testsuite/Makefile.am (text_section_grouping): New test.
   2552 	* testsuite/Makefile.in: Regenerate.
   2553 	* testsuite/text_section_grouping.cc: New file.
   2554 	* testsuite/text_section_grouping.sh: New file.
   2555 
   2556 2012-12-17  Nick Clifton  <nickc (a] redhat.com>
   2557 
   2558 	* Makefile.am: Add copyright notice.
   2559 	* NEWS: Likewise.
   2560 	* README: Likewise.
   2561 	* configure.ac: Likewise.
   2562 	* ftruncate.c: Likewise.
   2563 	* Makefile.in: Regenerate.
   2564 
   2565 2012-12-14  Cary Coutant  <ccoutant (a] google.com>
   2566 
   2567 	* testsuite/Makefile.am (exception_separate_shared_12_test): Add
   2568 	--no-as-needed flag.
   2569 	(exception_separate_shared_12_test): Likewise.
   2570 	(incremental_copy_test): Likewise.
   2571 	* testsuite/Makefile.in: Regenerate.
   2572 
   2573 2012-12-14  Cary Coutant  <ccoutant (a] google.com>
   2574 
   2575 	* dwp.cc (Dwp_output_file::add_cu_set): Check for duplicate CUs.
   2576 	(Dwp_output_file::Dwp_index::enter_set): Add assert.
   2577 
   2578 2012-12-12  Alan Modra  <amodra (a] gmail.com>
   2579 
   2580 	* powerpc.cc (class Track_tls): New.
   2581 	(class Relocate, class Scan): Inherit Track_tls.
   2582 	(Target_powerpc::Scan::local, global): Track tls optimization
   2583 	and avoid creating plt entry for __tls_get_addr if all uses
   2584 	are optimized away.
   2585 	(Target_powerpc::Relocate::relocate): Update to use Track_tls.
   2586 
   2587 2012-12-12  Alan Modra  <amodra (a] gmail.com>
   2588 
   2589 	* options.h (General_options): Add --toc-sort/--no-toc-sort.
   2590 	Replace no_toc_optimize with toc_optimize.
   2591 	* output.h (Output_section::input_sections): Provide non-const variant.
   2592 	* powerpc.cc (Powerpc_relobj::has_small_toc_reloc_,
   2593 	set_has_small_toc_reloc, has_small_toc_reloc): New variable and
   2594 	accessors.
   2595 	(Target_powerpc::Scan::local, global): Call set_has_small_toc_reloc.
   2596 	(class Sort_toc_sections): New.
   2597 	(Target_powerpc::do_finalize_sections): Sort toc sections.
   2598 	(Target_powerpc::Relocate::relocate): Update toc_optimize test.
   2599 
   2600 2012-12-10  Roland McGrath  <mcgrathr (a] google.com>
   2601 
   2602 	* testsuite/binary_unittest.cc (read_all): New function.
   2603 	(Sized_binary_test): Use it instead of ::read.
   2604 	* fileread.cc (do_read): Don't assume pread always reads the whole
   2605 	amount in a single call.
   2606 
   2607 2012-12-10  Alan Modra  <amodra (a] gmail.com>
   2608 
   2609 	* powerpc.cc (Target_selector_powerpc::Target_selector_powerpc):
   2610 	Set EM_PPC64 or EM_PPC here.
   2611 	(Target_selector_powerpc::do_recognize): Delete.
   2612 
   2613 2012-12-10  Alan Modra  <amodra (a] gmail.com>
   2614 
   2615 	* powerpc.cc (Powerpc_relobj::Powerpc_relobj): Init has14_ and
   2616 	stub_table_.
   2617 	(Target_powerpc::Branch_info::make_stub): Don't omit addend.
   2618 
   2619 2012-12-07  Roland McGrath  <mcgrathr (a] google.com>
   2620 
   2621 	* testsuite/binary_unittest.cc (Sized_binary_test):
   2622 	Use open_descriptor rather than ::open.
   2623 
   2624 2012-12-07  Alan Modra  <amodra (a] gmail.com>
   2625 
   2626 	* powerpc.cc (Stub_table::do_write): Delete redundant Address
   2627 	typedef and invalid_address constant.
   2628 	(Output_data_glink, Stub_table, Target_powerpc): Explicitly
   2629 	instantiate constants.
   2630 
   2631 2012-12-06  Roland McGrath  <mcgrathr (a] google.com>
   2632 
   2633 	* configure.ac (HAVE_ZLIB): Use AM_ZLIB instead of AC_SEARCH_LIBS.
   2634 	Use $ac_cv_header_zlib_h = yes as the condition in AM_CONDITIONAL.
   2635 	* aclocal.m4: Regenerate.
   2636 	* configure: Regenerate.
   2637 	* Makefile.in: Regenerate.
   2638 	* testsuite/Makefile.in: Regenerate.
   2639 
   2640 2012-12-07  Alan Modra  <amodra (a] gmail.com>
   2641 
   2642 	* options.h (General_options): Add no_toc_optimize.
   2643 	* powerpc.cc (ok_lo_toc_insn): New function.
   2644 	(Target_powerpc::Relocate::relocate): Optimize toc access sequences.
   2645 
   2646 2012-12-06  Alan Modra  <amodra (a] gmail.com>
   2647 
   2648 	* options.h (General_options): Add plt_align, plt_static_chain,
   2649 	plt_thread_safe.  Update stub_group_size help text.
   2650 	* powerpc.cc (Target_powerpc::plt_thread_safe): New access function
   2651 	for new plt_thread_safe_ var.
   2652 	(use_plt_offset): Correct comments.
   2653 	(Target_powerpc::do_relax): Look for thread creation symbols to
   2654 	determine default plt_thread_safe value.  Clear plt call stubs
   2655 	as well as branch stubs each iteration.
   2656 	(add_2_2_11, add_12_12_11, bnectr_p4, cmpldi_2_0, xor_11_11_11): New
   2657 	insn constants.
   2658 	(l, hi, ha, write_insn): Move earlier.
   2659 	(Stub_table): Delete prev_size, add last_plt_size and last_branch_size.
   2660 	(Stub_table::clear_stubs): Rename from clear_long_branch_stubs, clear
   2661 	plt stubs too.
   2662 	(Stub_table::update_size): Adjust.
   2663 	(Stub_table::prev_size, set_prev_size): Delete.
   2664 	(Stub_table::stub_align): Let --plt-align affect result.
   2665 	(Stub_table::plt_call_size): Calculate sizes for various stubs.
   2666 	(Stub_table::branch_stub_size): Use last_plt_size in address calc.
   2667 	(Stub_table::add_plt_call_stub): Pass iterator to plt_call_size.
   2668 	(Stub_table::do_write): Support more stub variants.
   2669 
   2670 2012-12-04  Alan Modra  <amodra (a] gmail.com>
   2671 
   2672 	* powerpc.cc (Powerpc_relobj::do_scan_relocs): Delete.
   2673 	(Target_powerpc::do_define_standard_symbols): New function.
   2674 
   2675 2012-12-03  Alan Modra  <amodra (a] gmail.com>
   2676 
   2677 	* output.h: Formatting, whitespace.
   2678 
   2679 2012-12-03  Alan Modra  <amodra (a] gmail.com>
   2680 
   2681 	* layout.h (Layout::get_executable_sections): Declare.
   2682 	* layout.cc (Layout::get_executable_sections): New function.
   2683 	* arm.cc (Target_arm::group_sections): Use it.
   2684 	(Arm_output_section::group_sections): Delete now redundant test.
   2685 	* output.cc (Output_reloc::Output_reloc): Add is_relative.
   2686 	param to handle relative relocs.
   2687 	* output.h (Output_reloc::Output_reloc <absolute reloc>): Likewise.
   2688 	(Output_data_reloc::add_absolute): Adjust.
   2689 	(Output_data_reloc::add_relative): New function.
   2690 	(Output_data::reset_data_size): New function.
   2691 	(Output_relaxed_input_section::set_relobj, set_shndx): New functions.
   2692 	(Output_section::set_addralign): New function.
   2693 	(Output_section::checkpoint_set_addralign): New function.
   2694 	(Output_section::clear_section_offsets_need_adjustment): New function.
   2695 	(Output_section::input_sections): Make public.
   2696 	* powerpc.cc (class Output_data_brlt_powerpc): New.
   2697 	(class Stub_table, class Stub_control): New.
   2698 	(Powerpc_relobj::has14_, set_has_14bit_branch, has_14bit_branch,
   2699 	stub_table_, set_stub_table, stub_table): New vectors and accessor
   2700 	functions.
   2701 	(Target_powerpc::do_may_relax, do_relax, push_branch,
   2702 	new_stub_table, stub_tables, brlt_section, group_sections,
   2703 	add_branch_lookup_table, find_branch_lookup_table,
   2704 	write_branch_lookup_table, make_brlt_section): New functions.
   2705 	(Target_powerpc::struct Sort_sections, class Branch_info): New.
   2706 	(Target_powerpc::brlt_section_, stub_tables_, branch_lookup_table_,
   2707 	branch_info_): New vars.
   2708 	(Target_powerpc::make_plt_entry, make_local_ifunc_plt_entry): Don't
   2709 	make call stubs here.
   2710 	(Output_data_glink): Remove all call stub handling from this class.
   2711 	(Target_powerpc::Scan::local, global): Save interesting branch
   2712 	relocs and relocs for ifunc.  Adjust calls to plt entry functions.
   2713 	(Target_powerpc::do_finalize_sections): Only make reg save/restore
   2714 	functions on final link.
   2715 	(Target_powerpc::Relocate::relocate): Adjust lookup of call stubs.
   2716 	Handle long branch destinations too.
   2717 	(Target_powerpc::do_dynsym_value, do_plt_address_for_global,
   2718 	do_plt_address_for_local): Adjust lookup of plt call stubs.
   2719 
   2720 2012-11-30  Alan Modra  <amodra (a] gmail.com>
   2721 
   2722 	* powerpc.c (Target_powerpc::Scan::global): Don't emit relative
   2723 	relocs against protected symbols when building 32-bit shared libs.
   2724 
   2725 2012-11-30  Alan Modra  <amodra (a] gmail.com>
   2726 
   2727 	* powerpc.cc (Target_powerpc::make_plt_section): Add symtab
   2728 	param.  Call got_section() to make .got.  Update all callers
   2729 	and their callers and so on.
   2730 
   2731 2012-11-30  Alan Modra  <amodra (a] gmail.com>
   2732 
   2733 	* powerpc.cc (Powerpc_relobj::do_scan_relocs): Make STB_LOCAL
   2734 	_GLOBAL_OFFSET_TABLE_ rather than STB_WEAK.
   2735 	(Output_data_got_powerpc::make_header): Update _GLOBAL_OFFSET_TABLE_
   2736 	value if it already exists.
   2737 
   2738 2012-11-19  H.J. Lu  <hongjiu.lu (a] intel.com>
   2739 
   2740 	PR gold/14858
   2741 	* x86_64.cc (Relocate::tls_ld_to_le): Support x32.
   2742 
   2743 2012-11-14  Roland McGrath  <mcgrathr (a] google.com>
   2744 
   2745 	* arm.cc (Output_data_plt_arm_nacl::first_plt_entry): Use bic rather
   2746 	than bfc instruction for data sandboxing.
   2747 
   2748 2012-11-08  Alan Modra  <amodra (a] gmail.com>
   2749 
   2750 	* po/POTFILES.in: Regenerate.
   2751 
   2752 2012-11-05  Alan Modra  <amodra (a] gmail.com>
   2753 
   2754 	* configure.ac: Apply 2012-09-10 change to config.in here.
   2755 	* configure: Regenerate.
   2756 
   2757 2012-11-05  Alan Modra  <amodra (a] gmail.com>
   2758 
   2759 	* powerpc.cc (Powerpc_relobj): Delete "Offset" typedef.
   2760 	(struct Opd_ent): Use "Address" rather than "Offset".
   2761 	(Output_data_got_powerpc::got_base_offset): Return Valtype.
   2762 	(Target_powerpc::got_section): Make public.
   2763 	(Target_powerpc::scan_relocs): Move code setting symbols..
   2764 	(Powerpc_relobj::do_scan_relocs): ..to here, new function.
   2765 	Create _SDA_BASE_ only when referenced.
   2766 
   2767 2012-11-02  Roland McGrath  <mcgrathr (a] google.com>
   2768 
   2769 	* i386.cc (Target_i386::relocate_relocs): Remove extraneous typename
   2770 	from last change.
   2771 
   2772 2012-11-01  Roland McGrath  <mcgrathr (a] google.com>
   2773 
   2774 	* target.h (Sized_target::relocate_relocs): Use Elf_Off
   2775 	for offset_in_output_section parameter.
   2776 	(Sized_target::relocate_special_relocatable): Likewise.
   2777 	* arm.cc (Target_arm::relocate_relocs): Likewise.
   2778 	(Target_arm::relocate_special_relocatable): Likewise.
   2779 	* i386.cc (Target_i386::relocate_relocs): Likewise.
   2780 	* powerpc.cc (Target_powerpc::relocate_relocs): Likewise.
   2781 	* sparc.cc (Target_sparc::relocate_relocs): Likewise.
   2782 	* target-reloc.h (relocate_relocs): Likewise.
   2783 	* testsuite/testfile.cc (Target_test): Likewise.
   2784 	* tilegx.cc (Target_tilegx::relocate_relocs): Likewise.
   2785 	* x86_64.cc (Target_x86_64::relocate_relocs): Likewise.
   2786 
   2787 	* system.h: Move inclusion of <clocale> to after <libintl.h> in
   2788 	[ENABLE_NLS] section, and separately at top of [!ENABLE_NLS] section.
   2789 
   2790 	* descriptors.cc (set_close_on_exec): Add ATTRIBUTE_UNUSED to the
   2791 	parameter, which is unused in the [!F_SETFD] case.
   2792 
   2793 	* dwarf_reader.cc (Sized_elf_reloc_mapper::symbol_section): Cast
   2794 	SYMNDX to off_t before comparing it to this->data_size().
   2795 	* output.cc (Output_symtab_xindex::endian_do_write): Likewise.
   2796 	* incremental.cc (Output_section_incremental_inputs::do_write):
   2797 	Cast GLOBAL_SYM_COUNT to off_t before comparing it to SYMTAB_SIZE.
   2798 
   2799 	* nacl.cc: Include "libiberty.h" for vasprintf declaration.
   2800 
   2801 2012-10-30  Steve McIntyre  <steve.mcintyre (a] linaro.org>
   2802 
   2803 	* gold.cc (Target_arm::do_adjust_elf_header): Add the
   2804 	hard-float/soft-float ABI flag as appropriate for ET_DYN/ET_EXEC
   2805 	in EABI_VER5.
   2806 
   2807 2012-10-29  Cary Coutant  <ccoutant (a] google.com>
   2808 
   2809 	* dwp.cc (usage): Add file and exit status parameters;
   2810 	add --help and --version options.
   2811 	(print_version): New function.
   2812 	(main): Add --help and --version options.
   2813 
   2814 2012-10-25  H.J. Lu  <hongjiu.lu (a] intel.com>
   2815 
   2816 	* testsuite/Makefile.am (MOSTLYCLEANFILES): Add
   2817 	final_layout_sequence.txt.
   2818 	* testsuite/Makefile.in: Regenerated.
   2819 
   2820 2012-10-25  H.J. Lu  <hongjiu.lu (a] intel.com>
   2821 
   2822 	* testsuite/Makefile.am (COMPILE1): New variable. Renamed from
   2823 	COMPILE generated by automake.
   2824 	(LINK1): Likewise.
   2825 	(CXXCOMPILE1): Likewise.
   2826 	(CXXLINK1): Likewise.
   2827 	(COMPILE): Strip out -Wp,-D_FORTIFY_SOURCE= from COMPILE1.
   2828 	(LINK): Likewise.
   2829 	(CXXCOMPILE): Likewise.
   2830 	(CXXLINK): Likewise.
   2831 	* testsuite/Makefile.in: Regenerated.
   2832 
   2833 2012-10-25  H.J. Lu  <hongjiu.lu (a] intel.com>
   2834 
   2835 	* dwp.cc (Dwo_file::record_target_info): Issue a fatal error
   2836 	on bad fwrite return.
   2837 
   2838 2012-10-25  H.J. Lu  <hongjiu.lu (a] intel.com>
   2839 
   2840 	* dwp.cc (Dwo_file::remap_str_offset): Use section_offset_type
   2841 	on val.
   2842 
   2843 2012-10-23  Cary Coutant  <ccoutant (a] google.com>
   2844 
   2845 	* testsuite/Makefile.am (TEST_OBJCOPY): New macro.
   2846 	* testsuite/Makefile.in: Regenerate.
   2847 	* testsuite/dwp_test.h: New source file.
   2848 	* testsuite/dwp_test_1.cc: New source file.
   2849 	* testsuite/dwp_test_1.s: New source file.
   2850 	* testsuite/dwp_test_1.sh: New source file.
   2851 	* testsuite/dwp_test_1b.cc: New source file.
   2852 	* testsuite/dwp_test_1b.s: New source file.
   2853 	* testsuite/dwp_test_2.cc: New source file.
   2854 	* testsuite/dwp_test_2.s: New source file.
   2855 	* testsuite/dwp_test_2.sh: New source file.
   2856 	* testsuite/dwp_test_main.cc: New source file.
   2857 	* testsuite/dwp_test_main.s: New source file.
   2858 
   2859 2012-10-23  Cary Coutant  <ccoutant (a] google.com>
   2860 
   2861 	* dwp.h: New header file.
   2862 	* dwp.cc: New source file.
   2863 	* gold.h: Move shared declarations to system.h.
   2864 	* system.h: New header file.
   2865 	* Makefile.am: Add dwp.
   2866 	* Makefile.in: Regenerate.
   2867 
   2868 2012-10-23  Cary Coutant  <ccoutant (a] google.com>
   2869 
   2870 	* dwarf_reader.cc (Dwarf_ranges_table::read_range_list): Call
   2871 	Dwarf_info_reader::read_from_pointer.
   2872 	(Dwarf_pubnames_table::read_header): Likewise.
   2873 	(Dwarf_pubnames_table::next_name): Likewise.
   2874 	(Dwarf_die::read_attributes): Likewise.
   2875 	(Dwarf_die::skip_attributes): Likewise.
   2876 	(Dwarf_info_reader::read_from_pointer): New function template.
   2877 	* dwarf_reader.h (Dwarf_ranges_table): Add dwinfo_.
   2878 	(Dwarf_pubnames_table): Likewise.
   2879 	(Dwarf_info_reader::read_from_pointer): New function template.
   2880 	* gdb-index.cc (Gdb_index_info_reader): Adjust call to
   2881 	Dwarf_pubnames_table ctor.
   2882 
   2883 2012-10-23  Cary Coutant  <ccoutant (a] google.com>
   2884 
   2885 	* dwarf_reader.cc (Dwarf_info_reader::do_parse): Use stored
   2886 	abbrev_shndx.
   2887 	* dwarf_reader.h (Dwarf_info_reader::Dwarf_info_reader): Initialize
   2888 	abbrev_shndx_.
   2889 	(Dwarf_info_reader::set_abbrev_shndx): New method.
   2890 	(Dwarf_info_reader::abbrev_shndx_): New data member.
   2891 
   2892 2012-10-23  Cary Coutant  <ccoutant (a] google.com>
   2893 
   2894 	* dwarf_reader.cc (make_elf_reloc_mapper): Check size and endianness
   2895 	from object, not parameters.
   2896 	(Dwarf_info_reader::parse): Likewise.
   2897 	* object.h (Relobj::elfsize, Relobj::is_big_endian): New methods.
   2898 	(Relobj::do_elfsize, Relobj::do_is_big_endian): New methods.
   2899 	(Sized_relobj::do_elfsize, Sized_relobj::do_is_big_endian): New
   2900 	methods.
   2901 
   2902 2012-10-23  Cary Coutant  <ccoutant (a] google.com>
   2903 
   2904 	* fileread.cc (Input_file::Input_file): New constructor.
   2905 	* fileread.h (class Input_file): Add new constructor.
   2906 
   2907 2012-10-18  Alan Modra  <amodra (a] gmail.com>
   2908 
   2909 	PR gold/14727
   2910 	* object.cc (Relobj::is_section_name_included): Also match
   2911 	.sdata personality section.
   2912 
   2913 2012-10-18  Alan Modra  <amodra (a] gmail.com>
   2914 
   2915 	* target-reloc.h (class Default_comdat_behavior): New, package up..
   2916 	(get_comdat_behaviour): ..this.
   2917 	(relocate_section): Add Relocate_comdat_behavior template arg,
   2918 	adjust code to suit.
   2919 	* arm.cc (Target_arm::relocate_section): Adjust to suit.
   2920 	(Target_arm::scan_reloc_section): Likewise.
   2921 	* i386.cc (Target_i386::relocate_section): Likewise.
   2922 	* sparc.cc (Target_sparc::relocate_section): Likewise.
   2923 	* tilegx.cc (Target_tilegx::relocate_section): Likewise.
   2924 	* x86_64.cc (Target_x86_64::relocate_section): Likewise.
   2925 	* powerpc.cc (class Relocate_comdat_behavior): New.
   2926 	(Target_powerpc::relocate_section): Don't zap opd relocs.  Supply
   2927 	gold::relocate_section with new template arg.
   2928 
   2929 2012-10-18  Alan Modra  <amodra (a] gmail.com>
   2930 
   2931 	* powerpc.cc (Target_powerpc::Scan::local, global): Always emit
   2932 	dynamic relocs for GOT_TPREL got entries, without symbol if
   2933 	resolving locally.
   2934 	(Target_powerpc::do_gc_add_reference): Don't add for dynamic objects.
   2935 	(Target_powerpc::scan_relocs): Define _GLOBAL_OFFSET_TABLE_ early.
   2936 	(Target_powerpc::Relocate:relocate): REL32 reloc may be unaligned.
   2937 
   2938 2012-10-17  Alan Modra  <amodra (a] gmail.com>
   2939 
   2940 	PR gold/14726
   2941 	* gold.cc (queue_middle_tasks): Call gc_mark_symbol on _init and _fini.
   2942 
   2943 2012-10-16  Sriraman Tallam  <tmsriram (a] google.com>
   2944 
   2945 	* layout.cc (Layout::include_section): Keep sections marked
   2946 	SHF_EXCLUDE when doing relocatable links.
   2947 
   2948 2012-10-16  Alan Modra  <amodra (a] gmail.com>
   2949 
   2950 	* powerpc.cc (Target_powerpc::define_save_restore_funcs): New func.
   2951 	(Target_powerpc::do_finalize_sections): Call it.
   2952 	(Output_data_save_res): New class and supporting functions.
   2953 	(Target_powerpc::symval_for_branch): Only look up .opd entry for
   2954 	normal symbols defined in object files.
   2955 
   2956 2012-10-12  Alan Modra  <amodra (a] gmail.com>
   2957 
   2958 	* powerpc.cc (Powerpc_relobj::add_gc_mark, process_gc_mark): New.
   2959 	(struct Opd_ent): Make "discard" a bit field.  Add "gc_mark".
   2960 	(Target_powerpc::do_gc_mark_symbol): Delay marking function code
   2961 	section if scan_opd_relocs not yet called.
   2962 	(Target_powerpc::gc_process_relocs): Call process_gc_mark.
   2963 
   2964 2012-10-12  Alan Modra  <amodra (a] gmail.com>
   2965 
   2966 	* powerpc.cc (Output_data_plt_powerpc::add_entry, add_ifunc_entry,
   2967 	add_local_ifunc_entry): Revert last change.
   2968 	(Target_powerpc::make_plt_entry, make_local_ifunc_plt_entry): Likewise.
   2969 
   2970 2012-10-05  Alan Modra  <amodra (a] gmail.com>
   2971 
   2972 	* powerpc.cc (Target_powerpc::do_plt_address_for_local,
   2973 	do_plt_address_for_global): New functions.
   2974 	(Output_data_got_powerpc::do_write): Don't segfault when linking
   2975 	statically.
   2976 	(Output_data_plt_powerpc::add_entry, add_ifunc_entry,
   2977 	add_local_ifunc_entry): Return true on adding entry..
   2978 	(Target_powerpc::make_plt_entry): ..use to avoid unnecessary
   2979 	glink->add_entry call.  Remove unused symtab param.  Adjust calls.
   2980 	(Target_powerpc::make_local_ifunc_plt_entry): Likewise.
   2981 	(Target_powerpc::make_iplt_section): Remove symtab param.  Don't
   2982 	set up symbols here.
   2983 	(Target_powerpc::do_finalize_sections): Instead set up __rela_iplt
   2984 	syms here.  Do so even when no .iplt.  Don't segfault when linking
   2985 	statically.
   2986 	(Output_data_glink::add_entry, find_entry): Rearrange params.  Add
   2987 	new variants without reloc param.
   2988 	(Glink_sym_ent::Glink_sym_ent): Likewise.
   2989 	(Target_powerpc::Scan::reloc_needs_plt_for_ifunc): Accept any
   2990 	reloc when refs will resolve to plt call stub.
   2991 	(Target_powerpc::Scan::local): Correct ifunc handling.  Allow
   2992 	R_PPC_PLTREL24 to resolve locally.
   2993 	(Target_powerpc::Scan::global): Correct ifunc handling.
   2994 	(Target_powerpc::Relocate::relocate): Correct local sym glink
   2995 	lookup.  Don't destroy "value" when we have a plt call stub,
   2996 	and when checking plt call validity.
   2997 	(Target_powerpc::do_dynsym_value): Simplify.
   2998 
   2999 2012-10-05  Alan Modra  <amodra (a] gmail.com>
   3000 
   3001 	* i386.cc (Output_data_plt_i386::address_for_global,
   3002 	address_for_local): Add plt offset to returned value.  Adjust uses.
   3003 	* sparc.cc (Output_data_plt_sparc::address_for_global,
   3004 	address_for_local): Likewise.
   3005 	* tilegx.cc (Output_data_plt_tilegx::address_for_global,
   3006 	address_for_local): Likewise.
   3007 	* x86_64.cc (Output_data_plt_x86_64::address_for_global,
   3008 	address_for_local): Likewise.
   3009 	* target.h (Target::plt_address_for_global, plt_address_for_local):
   3010 	Update comment.
   3011 	* output.cc (Output_reloc::symbol_value): Don't add plt offset here.
   3012 	(Output_data_got::Got_entry::write): Nor here.
   3013 	* output.h: Comment fix.
   3014 
   3015 2012-10-02  Jiong Wang  <jiwang (a] tilera.com>
   3016 
   3017 	* tilegx.cc (Target_tilegx::do_finalize_sections): Adjust
   3018 	global_offset_table_ value for larget got.
   3019 	(Target_tilegx::Relocate::relocate): Handle adjusted got value.
   3020 
   3021 2012-09-29  Alan Modra  <amodra (a] gmail.com>
   3022 
   3023 	* powerpc.cc (Target_powerpc::iplt_): New output section.
   3024 	(Target_powerpc::iplt_section, make_iplt_section,
   3025 	reloc_needs_plt_for_ifunc, make_local_ifunc_plt_entry): New functions.
   3026 	(Target_powerpc::make_plt_entry): Handle ifunc syms.
   3027 	Target_powerpc::plt_entry_count): Count iplt entries too.
   3028 	(Output_data_plt_powerpc::Output_data_plt_powerpc): Don't create
   3029 	reloc section in constructor.  New params.
   3030 	(Target_powerpc::make_plt_section): Create reloc section here instead.
   3031 	(Output_data_plt_powerpc::add_ifunc_entry, add_local_ifunc_entry): New
   3032 	functions.
   3033 	(Output_data_plt_powerpc::initial_plt_entry_size_, name_): New vars.
   3034 	(Output_data_glink::add_entry, find_entry): New functions to
   3035 	deal with local syms.
   3036 	(Glink_sym_ent): Add support for local syms.
   3037 	(Output_data_glink::do_write): Handle ifunc plt entries.
   3038 	(Target_powerpc::Scan::get_reference_flags): Handle more relocs.
   3039 	(Target_powerpc::Scan::local, global): Handle ifunc syms.
   3040 	(Target_powerpc::Relocate::relocate): Likewise.
   3041 	(Target_powerpc::do_dynsym_value): Use glink stub, not plt entry.
   3042 
   3043 2012-09-25  Alan Modra  <amodra (a] gmail.com>
   3044 
   3045 	* object.h (Sized_relobj_file::adjust_local_symbol,
   3046 	do_adjust_local_symbol): New functions.
   3047 	* object.cc (Sized_relobj_file::do_count_local_symbols): Use the above.
   3048 	* powerpc.cc (Powerpc_relobj::do_adjust_local_symbol): New function.
   3049 	(Powerpc_relobj::scan_opd_relocs): Warn on unexpected opd relocs
   3050 	and irregular opd entry spacing.
   3051 	(Powerpc_relobj::do_read_relocs): Add opd size checks.
   3052 	(Global_symbol_visitor_opd): New functor.
   3053 	(Target_powerpc::do_finalize_sections): Omit global symbols defined
   3054 	on deleted opd entries.
   3055 
   3056 2012-09-15  Jiong Wang  <jiwang (a] tilera.com>
   3057 
   3058 	* tilegx.cc: New file.
   3059 	* Makefile.am (TARGETSOURCES): Add tilegx.cc
   3060 	(ALL_TARGETOBJS): Add tilegx.$(OBJEXT)
   3061 	* configure.tgt: Add entries for tilegx*.
   3062 	* configure.ac: Likewise.
   3063 	* Makefile.in: Rebuild.
   3064 	* configure: Likewise.
   3065 	* testsuite/icf_safe_test.sh (arch_specific_safe_fold): Handle
   3066 	tilegx.
   3067 
   3068 2012-09-13  Alan Modra  <amodra (a] gmail.com>
   3069 
   3070 	* target-reloc.h (scan_relocs): Call scan.local for relocs
   3071 	against symbols in discarded sections.  Pass is_discarded
   3072 	param.
   3073 	* arm.cc, * i386.cc, * sparc.cc, * x86_64.cc (Target_*::Scan::local):
   3074 	Add is_discarded param.
   3075 	* powerpc (Target_powerpc::Scan::local): Likewise.  Use
   3076 	is_discarded to flag opd entry as discarded.  Don't emit dyn
   3077 	relocs on such entries.
   3078 	(Target_powerpc::Scan::global): Similarly detect and handle
   3079 	such opd entries.
   3080 	(Powerpc_relobj): Replace opd_ent_shndx_ and opd_ent_off_ with
   3081 	opd_ent_.  Update all uses.
   3082 	(Powerpc_relobj::get_opd_discard, set_opd_discard): New functions.
   3083 	(Target_powerpc::relocate_section): Zero out discarded opd
   3084 	entry relocs.
   3085 
   3086 2012-09-12  Ian Lance Taylor  <iant (a] google.com>
   3087 
   3088 	PR gold/14570
   3089 	* output.cc: Rename Output_data_got template parameter from size
   3090 	to got_size for all functions.  Compile all variants of
   3091 	Output_data_got.
   3092 	(Output_data_got::Got_entry::write): Correct use of size for
   3093 	symbol value.  Use local_is_tls rather than casting to
   3094 	Sized_relobj_file.
   3095 	* object.h (class Object): Add local_is_tls and do_local_is_tls.
   3096 	(class Sized_relobj_file): Add do_local_is_tls.
   3097 	* incremental.h (class Sized_relobj_incr): Add do_local_is_tls.
   3098 
   3099 2012-09-11  Alan Modra  <amodra (a] gmail.com>
   3100 
   3101 	PR gold/14566
   3102 	* layout.cc (Layout::set_segment_offsets): When using
   3103 	common-page-size alignment, ensure we are on a new max-page-size
   3104 	page.
   3105 	* output.cc (Output_segment::set_section_addresses): Use
   3106 	abi_pagesize, not common_pagesize for relro boundary.
   3107 	(Output_segment::set_offset): Likewise.
   3108 
   3109 2012-09-11  Alan Modra  <amodra (a] gmail.com>
   3110 
   3111 	* output.h (Output_data_got::add_global_tls, add_local_tls,
   3112 	add_local_tls_pair): New functions.
   3113 	(Output_data_got::add_local_pair_with_rel): Remove second
   3114 	reloc param.  Expand comment.
   3115 	(Output_data_got::Got_entry): Rename use_plt_offset_ to
   3116 	use_plt_or_tls_offset_, similarly for constructor param.
   3117 	(Output_data_got::Got_entry::write): Add got_index param.
   3118 	* output.cc (Output_data_got::add_global_tls, add_local_tls,
   3119 	add_local_tls_pair): New functions.
   3120 	(Output_data_got::Got_entry::write): Handle tls symbols
   3121 	with use_plt_or_tls_offset_ set specially.
   3122 	(Output_data_got::add_local_pair_with_rel): Only one reloc.
   3123 	(Output_data_got::do_write): Replace iterator with index, pass
   3124 	index to entry write function.
   3125 	* target.h (Target::tls_offset_for_local, tls_offset_for_global,
   3126 	do_tls_offset_for_local, do_tls_offset_for_global): New functions.
   3127 	* arm.cc (Target_arm::Scan::local): Update add_local_pair_with_rel
   3128 	call.
   3129 	* i386.cc (Target_i386::Scan::local): Likewise.
   3130 	* sparc.cc (Target_sparc::Scan::local): Likewise.
   3131 	* x86_64.cc (Target_x86_64::Scan::local): Likewise.
   3132 	* powerpc.cc (Target_powerpc::do_tls_offset_for_local,
   3133 	do_tls_offset_for_global): New functions.
   3134 	(Target_powerpc::Scan::local): Correct TLS relocations and got
   3135 	entry values.
   3136 	(Target_powerpc::Scan::global): Don't emit unnecessary
   3137 	dynamic relocations on TLS GOT entries.
   3138 
   3139 2012-09-10  Matthias Klose  <doko (a] ubuntu.com>
   3140 
   3141 	* config.in: Disable sanity check for kfreebsd.
   3142 
   3143 2012-09-10  Sterling Augustine  <saugustine (a] google.com>
   3144 
   3145 	* gdb-index.cc (Gdb_index::pubnames_read): New parameter.
   3146 	(Gdb_index::pubtypes_read): New parameter.
   3147 	(Gdb_index_info_reader::read_pubnames_and_pubtypes): Add parameters
   3148 	to calls.
   3149 	* gdb-index.h (Gdb_index): New fields pubnames_object_ and
   3150 	pubtypes_object_.
   3151 
   3152 2012-09-09  Alan Modra  <amodra (a] gmail.com>
   3153 
   3154 	* target.h (Target::gc_mark_symbol, do_gc_mark_symbol): New functions.
   3155 	(Sized_target::gc_add_reference, do_gc_add_reference): New functions.
   3156 	* gc.h (gc_process_relocs): Call target gc_add_reference.
   3157 	* gold.cc (queue_middle_tasks): Use gc_mark_symbol on start sym.
   3158 	* symtab.cc (Symbol_table::gc_mark_undef_symbols): Use gc_mark_symbol.
   3159 	(Symbol_table::gc_mark_symbol): Call target gc_mark_symbol. Remove
   3160 	unnecessary cast.
   3161 	* powerpc.cc (Powerpc_relobj::get_opd_ent): Rearrange parameters
   3162 	to cater for when we don't need code offset.  Update use.
   3163 	(Powerpc_relobj::access_from_map_, opd_valid_): New vars.
   3164 	(Powerpc_relobj::access_from_map, add_reference, opd_valid,
   3165 	set_opd_valid): New functions.
   3166 	(Target_powerpc::do_gc_add_reference): New function.
   3167 	(Target_powerpc::gc_process_relocs): Call gc()->add_reference on
   3168 	stashed refs.
   3169 	(Target_powerpc::do_gc_mark_symbol): New function.
   3170 
   3171 2012-09-06  Cary Coutant  <ccoutant (a] google.com>
   3172 
   3173 	* dwarf_reader.cc (Dwarf_die::read_attributes): Add
   3174 	DW_FORM_GNU_addr_index and DW_FORM_GNU_str_index.
   3175 	(Dwarf_die::skip_attributes): Likewise.
   3176 	* object.cc (Read_symbols_data::~Read_symbols_data): Update comment.
   3177 	* testsuite/gdb_index_test.cc (inline_func_1): New function.
   3178 	(main): Call it.
   3179 	* testsuite/gdb_index_test_comm.sh: Check index for inline function.
   3180 
   3181 2012-09-05  H.J. Lu  <hongjiu.lu (a] intel.com>
   3182 
   3183 	* testsuite/script_test_3.t: Add .got.plt output section
   3184 	statement.
   3185 	* testsuite/script_test_4.t: Likewise.
   3186 
   3187 2012-09-05  Alan Modra  <amodra (a] gmail.com>
   3188 
   3189 	* powerpc.cc (Powerpc_relocate_functions): Upcase enum values,
   3190 	update all uses and lose "enum" when using type.
   3191 
   3192 2012-09-05  Alan Modra  <amodra (a] gmail.com>
   3193 
   3194 	* configure.ac (FN_PTRS_IN_SO_WITHOUT_PIC): False for powerpc.
   3195 	* configure: Regenerate.
   3196 	* testsuite/Makefile.am (final_layout.stdout): Pass --synthetic to nm.
   3197 	(plugin_final_layout.stdout): Likewise.
   3198 	(memory_test): Set page sizes to 0x1000.
   3199 	* testsuite/Makefile.in: Regenerate.
   3200 	* testsuite/discard_locals_test.sh: Add FIXME comment.
   3201 	* testsuite/justsyms_exec.c: Disable function test for powerpc64.
   3202 	* testsuite/pr14265.t: Add .got output section statement.
   3203 	* testsuite/script_test_2.t: Likewise.
   3204 	* testsuite/script_test_3.t: Likewise.
   3205 	* testsuite/script_test_4.t: Likewise.
   3206 	* testsuite/script_test_5.t: Likewise.
   3207 	* testsuite/script_test_6.t: Likewise.
   3208 	* testsuite/script_test_7.t: Likewise.
   3209 	* testsuite/script_test_9.t: Likewise.
   3210 
   3211 2012-09-05  Alan Modra  <amodra (a] gmail.com>
   3212 
   3213 	* powerpc.cc (Powerpc_relobj::get_opd_ent): Make const.
   3214 	(Powerpc_relocate_functions::Status): New typedef.
   3215 	(Target_powerpc::Scan::get_reference_flags): Handle more relocs.
   3216 	(Target_powerpc::Scan::local): Handle REL64.
   3217 	(Target_powerpc::Scan::global): Likewise, and dynamic relocs
   3218 	for REL32 and REL64.
   3219 	(Target_powerpc::symval_for_branch): New function, extracted from..
   3220 	(Target_powerpc::Relocate::relocate): ..here.  Correct plt call
   3221 	checks.  Report overflow errors.
   3222 
   3223 2012-09-05  Alan Modra  <amodra (a] gmail.com>
   3224 
   3225 	* object.h (Sized_relobj_file::emit_relocs): Delete.
   3226 	(Sized_relobj_file::emit_relocs_reltype): Delete.
   3227 	* reloc.cc (Sized_relobj_file::do_relocate_sections): Call target
   3228 	relocate_relocs for --emit-relocs.
   3229 	(Sized_relobj_file::emit_relocs, emit_relocs_reltype): Delete.
   3230 	* output.h: Update comment.
   3231 	(Output_segment::first_section): New function.
   3232 	(Output_segment::first_section_load_address): Use first_section.
   3233 	* output.cc (Output_segment::first_section): New function extracted..
   3234 	(Output_segment::first_section_load_address): ..from here.  Delete.
   3235 	* target-reloc.h (relocate_for_relocatable): Rename to relocate_relocs.
   3236 	* target.h (Sized_target::relocate_for_relocatable): Likewise.
   3237 	* arm.cc (Target_arm::relocate_for_relocatable): Likewise, and
   3238 	adjust call to target.h function.
   3239 	* i386.cc (Target_i386): Likewise.
   3240 	* sparc.cc (Target_sparc): Likewise.
   3241 	* x86_64.cc (Target_x86_64): Likewise.
   3242 	* powerpc.cc (Target_powerpc): Likewise.
   3243 	(Target_powerpc::Scan::local, global): Handle R_POWERPC_TLS.  Ensure
   3244 	first tls section has section symbol for optimised local dynamic
   3245 	output relocs.
   3246 	(Target_powerpc::Relocate::relocate): Correct local dynamic value.
   3247 	(Target_powerpc::relocate_relocs): Adjust relocs emitted for
   3248 	optimised tls code.
   3249 	* testsuite/testfile.cc (Target_test::relocate_for_relocatable):
   3250 	Rename to relocate_relocs.  Update error message.
   3251 
   3252 2012-09-04  Andreas Schwab  <schwab (a] linux-m68k.org>
   3253 
   3254 	* powerpc.cc (do_make_elf_object): Allow ET_EXEC files with
   3255 	--just-symbols.
   3256 
   3257 2012-08-31  Alan Modra  <amodra (a] gmail.com>
   3258 
   3259 	* powerpc.cc (Powerpc_relobj): Add and use Address typedef.
   3260 	(Powerpc_relobj::toc_base_offset): New stub function.
   3261 	(Target_powerpc): Add tp_offset, dtp_offset.  Rename
   3262 	got_mod_index_offset to tlsld_got_offset.  Update all refs.
   3263 	(Target_powerpc::Relocate::enum skip_tls): New.
   3264 	(Target_powerpc::call_tls_get_addr_): New var.
   3265 	(Target_powerpc::is_branch_reloc): Move to file scope.
   3266 	(Target_powerpc::relocate_tls, optimize_tls_reloc): Delete.
   3267 	(Target_powerpc::optimize_tls_gd, optimize_tls_ld, optimize_tls_ie):
   3268 	New functions.
   3269 	(Target_powerpc::enum Got_type): Delete old values, add new ones.
   3270 	(powerpc_info): Correct common_pagesize for ppc64.
   3271 	(at_tls_transform, needs_dynamic_reloc, use_plt_offset): New functions.
   3272 	(Powerpc_relocate_functions): Add overflow check enums and functions.
   3273 	Add non-shift version of rela, rela_ua.  Delete all rel public
   3274 	functions.  Delete addr16_lo.  Add addr64, addr64_u, addr32,
   3275 	addr32_u, addr24, addr16_u, addr16_hi2, addr16_ha2, addr16_hi3,
   3276 	addr16_ha3, addr14 functions.
   3277 	(Output_data_got_powerpc::add_constant_pair): New function.
   3278 	(Output_data_got_powerpc::got_base_offset): Likewise.
   3279 	(Output_data_got_powerpc::do_write): Correct 64-bit got header.
   3280 	(instruction constants): Sort, add some more.
   3281 	(Output_data_glink::do_write): Add and use Address typedef.  Use
   3282 	object->toc_base_offset() stub for 64-bit.
   3283 	(Target_powerpc::tlsld_got_offset): Use add_constant_pair.
   3284 	(Target_powerpc::Scan::get_reference_flags): Handle more relocs.
   3285 	(Target_powerpc::Scan::local, global): Emit relative dynamic reloc
   3286 	for R_PPC64_TOC.  Handle more relocs.  Generate got entries for TLS.
   3287 	Always treat .opd relocs as against locally defined symbol.
   3288 	Correct condition for RELATIVE relocs.
   3289 	(Target_powerpc::do_finalize_sections): Test for NULL sections.
   3290 	(Target_powerpc::Relocate::relocate): Use plt call stub as value
   3291 	for 32-bit syms with a plt entry.  Correct ppc64 toc base
   3292 	calculations.  Handle TLS relocs, and more.  Add overflow
   3293 	checking and adjust for Powerpc_relocate_functions changes.
   3294 	(Target_powerpc::relocate_for_relocatable): Handle zero r_sym.
   3295 	Reinstate --emit-relocs code with FIXME.
   3296 
   3297 2012-08-30  Alan Modra  <amodra (a] gmail.com>
   3298 
   3299 	* layout.cc (Layout::set_segment_offsets): Set p_align to
   3300 	abi_pagesize, not common_pagesize.
   3301 	(Layout::relaxation_loop_body): Similarly use abi_pagesize
   3302 	to determine whether file header can go in segment.
   3303 
   3304 2012-08-30  Alan Modra  <amodra (a] gmail.com>
   3305 
   3306 	* output.h (Output_reloc::Output_reloc <output section>): Add
   3307 	is_relative param.  Adjust calls.
   3308 	(Output_reloc::add_output_section_relative): New functions.
   3309 	* output.cc (Output_reloc::Output_reloc <output section>): Handle
   3310 	is_relative.
   3311 	(Output_reloc::symbol_value): Handle SECTION_CODE.
   3312 
   3313 2012-08-24  Sriraman Tallam  <tmsriram (a] google.com>
   3314 
   3315 	* gold.cc (queue_middle_tasks): Call layout again when unique
   3316 	segments for sections is desired.
   3317 	* layout.cc (Layout::Layout): Initialize new members.
   3318 	(Layout::get_output_section_flags): New function.
   3319 	(Layout::choose_output_section): Call get_output_section_flags.
   3320 	(Layout::layout): Make output section for mapping to a unique segment.
   3321 	(Layout::insert_section_segment_map): New function.
   3322 	(Layout::attach_allocated_section_to_segment): Make unique segment for
   3323 	output sections marked so.
   3324 	(Layout::segment_precedes): Check for unique segments when sorting.
   3325 	* layout.h (Layout::Unique_segment_info): New struct.
   3326 	(Layout::Section_segment_map): New typedef.
   3327 	(Layout::insert_section_segment_map): New function.
   3328 	(Layout::get_output_section_flags): New function.
   3329 	(Layout::is_unique_segment_for_sections_specified): New function.
   3330 	(Layout::set_unique_segment_for_sections_specified): New function.
   3331 	(Layout::unique_segment_for_sections_specified_): New member.
   3332 	(Layout::section_segment_map_): New member.
   3333 	* object.cc (Sized_relobj_file<size, big_endian>::do_layout):
   3334 	Rename is_gc_pass_one to is_pass_one.
   3335 	Rename is_gc_pass_two to is_pass_two.
   3336 	Rename is_gc_or_icf to is_two_pass.
   3337 	Check for which pass based on whether symbols data is present.
   3338 	Make it two pass when unique segments for sections is desired.
   3339 	* output.cc (Output_section::Output_section): Initialize new
   3340 	members.
   3341 	* output.h (Output_section::is_unique_segment): New function.
   3342 	(Output_section::set_is_unique_segment): New function.
   3343 	(Output_section::is_unique_segment_): New member.
   3344 	(Output_section::extra_segment_flags): New function.
   3345 	(Output_section::set_extra_segment_flags): New function.
   3346 	(Output_section::extra_segment_flags_): New member.
   3347 	(Output_section::segment_alignment): New function.
   3348 	(Output_section::set_segment_alignment): New function.
   3349 	(Output_section::segment_alignment_): New member.
   3350 	(Output_segment::Output_segment): Initialize is_unique_segment_.
   3351 	(Output_segment::is_unique_segment): New function.
   3352 	(Output_segment::set_is_unique_segment): New function.
   3353 	(Output_segment::is_unique_segment_): New member.
   3354 	* plugin.cc (allow_unique_segment_for_sections): New function.
   3355 	(unique_segment_for_sections): New function.
   3356 	(Plugin::load): Add new functions to transfer vector.
   3357 	* Makefile.am (plugin_final_layout.readelf.stdout): Add readelf output.
   3358 	* Makefile.in: Regenerate.
   3359 	* testsuite/plugin_final_layout.sh: Check if unique segment
   3360 	functionality works.
   3361 	* testsuite/plugin_section_order.c (onload): Check if new interfaces
   3362 	are available.
   3363 	(allow_unique_segment_for_sections): New global.
   3364 	(unique_segment_for_sections): New global.
   3365 	(claim_file_hook): Call allow_unique_segment_for_sections.
   3366 	(all_symbols_read_hook): Call unique_segment_for_sections.
   3367 
   3368 2012-08-22  Cary Coutant  <ccoutant (a] google.com>
   3369 
   3370 	* layout.cc (Layout::include_section): Don't assert on GROUP
   3371 	sections with --emit-relocs.
   3372 
   3373 2012-08-21  Cary Coutant  <ccoutant (a] google.com>
   3374 
   3375 	* symtab.cc (Symbol_table::gc_mark_undef_symbols): Don't assert
   3376 	if --export-dynamic-symbol names an undef symbol.
   3377 
   3378 2012-08-18  Alan Modra  <amodra (a] gmail.com>
   3379 
   3380 	* powerpc.cc: Formatting and white space.
   3381 	(Powerpc_relobj): Rename got2_section_ to special_.
   3382 	Add opd_ent_shndx_ and opd_ent_off_ vectors.
   3383 	(Powerpc_relobj::opd_shndx, init_opd, get_opd_ent, set_opd_ent,
   3384 	scan_opd_relocs, do_read_relocs, opd_ent_ndx): New functions.
   3385 	(Target_powerpc): Add Address typedef and invalid_address.  Use
   3386 	throughout.
   3387 	(Target_powerpc::is_branch_reloc): New function.
   3388 	(Powerpc_relocate_functions): Add Address typedef, use throughout.
   3389 	(Powerpc_relocate_functions:rela, rela_ua): Correct type used
   3390 	for dst_mask, value and addend.
   3391 	(Powerpc_relobj::do_find_special_sections): Find .opd for 64-bit.
   3392 	(ld_2_1, cror_15_15_15, cror_31_31_31): New insn constants.
   3393 	(Output_data_glink::do_write): Correct toc base.  Don't try to use
   3394 	uint16_t for 24-bit offset.  Use get_output_section_offset and
   3395 	check return.
   3396 	(Target_powerpc::Scan::local): Handle more relocs.
   3397 	(Target_powerpc::do_finalize_sections): Set up DT_PPC64_GLINK.
   3398 	(Target_powerpc::Relocate::relocate): Correct toc base calculation.
   3399 	Plug in toc restoring insn after plt calls.  Translate branches
   3400 	to function descriptor symbols to corresponding entry point.
   3401 	(Target_powerpc::relocate_for_relocatable): Check return from
   3402 	get_output_section_offset.
   3403 	* symtab.h: Comment typo.
   3404 
   3405 2012-08-14  Ian Lance Taylor  <iant (a] google.com>
   3406 
   3407 	* x86_64.cc (Target_x86_64::Scan::global): Fix erroneous call to
   3408 	unsupported_relocal_local to call unsupported_reloc_global.
   3409 
   3410 2012-08-14  Nick Clifton  <nickc (a] redhat.com>
   3411 
   3412 	PR ld/14265
   3413 	* script-sections.cc (Sections_element::output_section_name): Add
   3414 	keep return parameter.
   3415 	(Output_section_element::match_name): Add keep return parameter.
   3416 	Return the value of the keep_ member.
   3417 	* script-sections.h (class Output_section): Update
   3418 	output_section_name prototype.
   3419 	* layout.cc (Layout::keep_input_section): New public member
   3420 	function.
   3421 	(Layout::choose_output_section): Pass keep parameter to
   3422 	output_section_name.
   3423 	* layout.h (class Layout): Add keep_input_section.
   3424 	* object.cc (Sized_relobj_file::do_layout): Check for kept input
   3425 	sections.
   3426 	* testsuite/Makefile.am: Add a test.
   3427 	* testsuite/Makefile.in: Regenerate.
   3428 	* testsuite/pr14265.c: Source file for the test.
   3429 	* testsuite/pr14265.t: Linker script for the test.
   3430 	* testsuite/pr14265.sh: Shell script for the test.
   3431 
   3432 2012-08-14  Alan Modra  <amodra (a] gmail.com>
   3433 
   3434 	* target.h (Target::output_section_name): New function.
   3435 	(Target::do_output_section_name): New function.
   3436 	* layout.cc (Layout::choose_output_section): Call the above.
   3437 	* powerpc.cc (Target_powerpc::do_output_section_name): New function.
   3438 
   3439 2012-08-14  Alan Modra  <amodra (a] gmail.com>
   3440 
   3441 	* powerpc.cc: Update for renamed R_PPC_REL16 relocs.
   3442 	(Output_data_got_powerpc::do_write): Don't rely on base class lookup
   3443 	for replace_constant call.
   3444 	(Output_data_plt_powerpc::do_print_to_mapfile): New function.
   3445 	(Output_data_glink::do_print_to_mapfile): New function.
   3446 	(Target_powerpc::Scan::local): Ignore R_PPC64_TOCSAVE.
   3447 	(Target_powerpc::Relocate::relocate): Likewise.
   3448 
   3449 2012-08-14  Alan Modra  <amodra (a] gmail.com>
   3450 
   3451 	* powerpc.cc (Powerpc_relobj::set_got2_shndx): Delete.
   3452 	(Powerpc_relobj::do_find_special_sections): Don't use set_got2_shndx.
   3453 	(Output_data_glink::add_entry,find_entry): Remove shndx param.
   3454 	(class Glink_sym_ent): Rename from struct Glink_sym_ent.  Remove
   3455 	all references to shndx_.  Handle special case for R_PPC_PLTREL24
   3456 	here.
   3457 	(class Glink_sym_ent_hash): Rename from struct Glink_sym_ent_hash.
   3458 	(Output_data_glink::do_write): Retrieve got2_shdnx from object.
   3459 	(Target_powerpc::make_plt_entry): Don't special case R_PPC_PLTREL24
   3460 	here.
   3461 	(Target_powerpc::Scan::global): Nor on make_plt_entry call.
   3462 	(Target_powerpc::Relocate::relocate): Nor on glink->find_entry call.
   3463 
   3464 2012-08-12  Alan Modra  <amodra (a] gmail.com>
   3465 
   3466 	* powerpc.cc: Whitespace fixes.  Wrap overly long lines.
   3467 	(glink insn constants): Use uint32_t.
   3468 	(Output_data_glink::add_entry): Use insert, not [] operator.
   3469 
   3470 2012-08-11  Alan Modra  <amodra (a] gmail.com>
   3471 
   3472 	* object.h (Sized_relobj_file::find_shdr): New function.
   3473 	(Sized_relobj_file::find_special_sections): New function.
   3474 	* object.cc (Sized_relobj_file::find_shdr): New function.
   3475 	(Sized_relobj_file::find_eh_frame): Use find_shdr.
   3476 	(Sized_relobj_file::find_special_sections): New function, split out..
   3477 	(Sized_relobj_file::do_read_symbols): ..from here.
   3478 	* output.h (Output_data_got::replace_constant): New function.
   3479 	(Output_data_got::num_entries): New function.
   3480 	(Output_data_got::last_got_offset,set_got_size): Use num_entries.
   3481 	(Output_data_got::got_offset): Protected rather than private.
   3482 	(Output_data_got::replace_got_entry): New function.
   3483 	* output.cc (Output_data_got::replace_got_entry): New function.
   3484 	* powerpc.cc (class Powerpc_relobj): New.
   3485 	(class Powerpc_relocate_functions): Delete all psymval variants or
   3486 	convert to value,addend type.  Delete pcrela, pcrela_unaligned.
   3487 	Implement _ha functions using corresponding _hi function.
   3488 	(Powerpc_relobj::find_special_sections): New function.
   3489 	(Target_powerpc::do_make_elf_object): New function.
   3490 	(class Output_data_got_powerpc): New.
   3491 	(class Output_data_glink): New.
   3492 	(class Powerpc_scan_relocatable_reloc): New.
   3493 	Many more changes througout file.
   3494 
   3495 2012-08-09  Nick Clifton  <nickc (a] redhat.com>
   3496 
   3497 	* po/vi.po: Updated Vietnamese translation.
   3498 
   3499 2012-08-07  Ian Lance Taylor  <iant (a] google.com>
   3500 
   3501 	* layout.cc (Layout::add_target_dynamic_tags): If
   3502 	dynrel_includes_plt but no dyn_rel, emit dynamic reloc tags for
   3503 	plt_rel.
   3504 
   3505 2012-07-30  Nick Clifton  <nickc (a] redhat.com>
   3506 
   3507 	* po/gold.pot: Updated template.
   3508 	* po/es.po: Updated Spanish translation.
   3509 
   3510 2012-07-18  Cary Coutant  <ccoutant (a] google.com>
   3511 
   3512 	PR gold/14344
   3513 	* configure.ac: Add check for -gpubnames support.
   3514 	* configure: Regenerate.
   3515 	* testsuite/Makefile.am (gdb_index_test_1): Add check for -gpubnames
   3516 	support; force -gno-pubnames.
   3517 	(gdb_index_test_2, gdb_index_test_3): Add check for -gpubnames
   3518 	support.
   3519 	(gdb_index_test_4): New test.
   3520 	* testsuite/Makefile.in: Regenerate.
   3521 	* testsuite/gdb_index_test_1.sh: Refactor code into common file.
   3522 	* testsuite/gdb_index_test_2.sh: Likewise.
   3523 	* testsuite/gdb_index_test_3.sh: Don't look for space after colon.
   3524 	* testsuite/gdb_index_test_4.sh: New script.
   3525 	* testsuite/gdb_index_test_comm.sh: New script with common code;
   3526 	don't look for space after colon.
   3527 
   3528 2012-07-16  Sriraman Tallam  <tmsriram (a] google.com>
   3529 
   3530 	* gold.cc (queue_middle_tasks): Update function order only after
   3531 	deferred objects due to plugins are processed.
   3532 
   3533 2012-07-11  Ian Lance Taylor  <iant (a] google.com>
   3534 
   3535 	* arm.cc (Arm_relocate_functions::abs16): Remove unused typedef.
   3536 	(Arm_exidx_cantunwind::do_fixed_endian_write): Likewise.
   3537 	(Target_arm::scan_reloc_for_stub): Likewise.
   3538 	* common.cc (Symbol_table::do_allocate_commons_list): Likewise.
   3539 	* dwarf_reader.cc (Dwarf_die::skip_attributes): Likewise.
   3540 	* ehframe.cc (Eh_frame::do_add_ehframe_input_section): Likewise.
   3541 	* incremental.cc (Sized_incr_dynobj::do_add_symbols): Likewise.
   3542 	* powerpc.cc (Target_powerpc::relocate_tls): Likewise.
   3543 
   3544 2012-07-10  Dodji Seketeli  <dodji (a] redhat.com>
   3545 	    Ian Lance Taylor  <iant (a] google.com>
   3546 
   3547 	PR gold/14309
   3548 	* configure.ac: Test whether std::tr1::hash<off_t> works.
   3549 	* gold.h: Add a specialization for std::tr1::hash<off_t> if
   3550 	needed.
   3551 	* output.h (class Output_fill): Add virtual destructor.
   3552 	* configure, config.in: Rebuild.
   3553 
   3554 2012-06-22  Roland McGrath  <mcgrathr (a] google.com>
   3555 
   3556 	* layout.cc (finalize): Define __ehdr_start symbol if applicable.
   3557 
   3558 2012-06-12  Rafael vila de Espndola <respindola (a] mozilla.com>
   3559 
   3560 	* plugin.cc (Plugin::load): Handle position independent executables.
   3561 
   3562 2012-06-06  Cary Coutant  <ccoutant (a] google.com>
   3563 
   3564 	* layout.cc (gdb_sections): Remove ".debug_" prefixes,
   3565 	add .debug_macro.
   3566 	(lines_only_debug_sections): Likewise.
   3567 	(gdb_fast_lookup_sections): New static array.
   3568 	(is_gdb_debug_section): Rename formal parameter.
   3569 	(is_lines_only_debug_section): Likewise.
   3570 	(is_gdb_fast_lookup_section): New function.
   3571 	(Layout::include_section): Check for ".zdebug_" prefix; pass
   3572 	section name suffix to is_gdb_debug_section, et al.; check for
   3573 	fast-lookup sections when building .gdb_index.
   3574 	* options.h (--strip-debug-gdb): Update GDB version number.
   3575 
   3576 2012-06-06  Cary Coutant  <ccoutant (a] google.com>
   3577 
   3578 	* configure.ac: Add check for fallocate.
   3579 	* configure: Regenerate.
   3580 	* config.in: Regenerate.
   3581 
   3582 	* options.h (class General_options): Add --mmap-output-file and
   3583 	--posix-fallocate options.
   3584 	* output.cc: (posix_fallocate): Remove; replace with...
   3585 	(gold_fallocate): New function.
   3586 	(Output_file::map_no_anonymous): Call gold_fallocate.
   3587 	(Output_file::map): Check --mmap-output-file option.
   3588 
   3589 2012-06-05  Jing Yu  <jingyu (a] google.com>
   3590 
   3591 	* gold.h (textdomain): Add do {} to empty while(0).
   3592 	(bindtextdomain): Likewise.
   3593 
   3594 2012-06-04  Cary Coutant  <ccoutant (a] google.com>
   3595 
   3596 	* dynobj.cc (Sized_dynobj::do_get_global_symbol_counts): Call
   3597 	has_dynsym_index.
   3598 
   3599 2012-05-25  Sriraman Tallam  <tmsriram (a] google.com>
   3600 
   3601 	* symtab.cc (Symbol_table::define_special_symbol):
   3602 	Initialize *poldsym to prevent uninitialized variable errors.
   3603 
   3604 2012-05-23  Cary Coutant  <ccoutant (a] google.com>
   3605 
   3606 	* layout.cc (Layout::section_name_mapping): Add rules to handle
   3607 	exact match on .data.rel.ro.local or .data.rel.ro.
   3608 	(Layout::output_section_name): Check for exact matches.
   3609 
   3610 2012-05-23  Cary Coutant  <ccoutant (a] google.com>
   3611 
   3612 	* layout.cc (Layout::section_name_mapping): Match .data.rel.ro.*
   3613 	more carefully.
   3614 
   3615 2012-05-22  Cary Coutant  <ccoutant (a] google.com>
   3616 
   3617 	* symtab.cc (Symbol::should_add_dynsym_entry): Check for relocatable
   3618 	object before exporting symbol.
   3619 
   3620 2012-05-21  H.J. Lu  <hongjiu.lu (a] intel.com>
   3621 
   3622 	* testsuite/tls_test.cc: Include "config.h" first.
   3623 	* testsuite/tls_test_c.c: Likewise.
   3624 
   3625 2012-05-17  Daniel Richard G.  <skunk (a] iskunk.org>
   3626 	    Nick Clifton  <nickc (a] redhat.com>
   3627 
   3628 	PR 14072
   3629 	* configure.in: Add check that sysdep.h has been included before
   3630 	any system header files.
   3631 	* configure: Regenerate.
   3632 	* config.in: Regenerate.
   3633 
   3634 2012-05-14  Cary Coutant  <ccoutant (a] google.com>
   3635 
   3636 	* layout.cc (Layout::make_output_section): Mark .tdata section
   3637 	as RELRO.
   3638 	* testsuite/relro_test.cc: Add a TLS variable.
   3639 
   3640 2012-05-10  H.J. Lu  <hongjiu.lu (a] intel.com>
   3641 
   3642 	PR gold/14091
   3643 	* x86_64.cc (Target_x86_64::Scan::local): For x32, generate
   3644 	R_X86_64_RELATIVE64 instead of R_X86_64_RELATIVE in case of
   3645 	R_X86_64_64.
   3646 
   3647 2012-05-08  Cary Coutant  <ccoutant (a] google.com>
   3648 
   3649 	* layout.cc (gdb_sections): Update GDB version, add .debug_addr.
   3650 	(lines_only_debug_sections): Likewise.
   3651 
   3652 2012-05-02  Roland McGrath  <mcgrathr (a] google.com>
   3653 
   3654 	* nacl.cc: New file.
   3655 	* nacl.h: New file.
   3656 	* Makefile.am (CCFILES, HFILES): Add them.
   3657 	* Makefile.in: Regenerate.
   3658 	* i386.cc (Output_data_plt_i386_nacl): New class.
   3659 	(Output_data_plt_i386_nacl_exec): New class.
   3660 	(Output_data_plt_i386_nacl_dyn): New class.
   3661 	(Target_i386_nacl): New class.
   3662 	(Target_selector_i386_nacl): New class.
   3663 	(target_selector_i386): Use it instead of Target_selector_i386.
   3664 	* x86_64.cc (Output_data_plt_x86_64_nacl): New class.
   3665 	(Target_x86_64_nacl): New class.
   3666 	(Target_selector_x86_64_nacl): New class.
   3667 	(target_selector_x86_64, target_selector_x32): Use it instead of
   3668 	Target_selector_x86_64.
   3669 	* arm.cc (Output_data_plt_arm_nacl): New class.
   3670 	(Target_arm_nacl): New class.
   3671 	(Target_selector_arm_nacl): New class.
   3672 	(target_selector_arm, target_selector_armbe): Use it instead of
   3673 	Target_selector_arm.
   3674 
   3675 	* target-select.cc (select_target): Take new Input_file* and off_t
   3676 	arguments, pass them on to recognize method of selector.
   3677 	* object.cc (make_elf_sized_object): Update caller.
   3678 	* parameters.cc (parameters_force_valid_target): Likewise.
   3679 	* incremental.cc (make_sized_incremental_binary): Likewise.
   3680 	* target-select.h: Update decl.
   3681 	(Target_selector::recognize): Take new Input_file* argument,
   3682 	pass it on to do_recognize.
   3683 	(Target_selector::do_recognize): Take new Input_file* argument.
   3684 	* freebsd.h (Target_selector_freebsd::do_recognize): Likewise.
   3685 	* powerpc.cc (Target_selector_powerpc::do_recognize): Likewise.
   3686 	* sparc.cc (Target_selector_sparc::do_recognize): Likewise.
   3687 	* testsuite/testfile.cc (Target_selector::do_recognize): Likewise.
   3688 
   3689 	* target.h (Target::Target_info): New members isolate_execinstr
   3690 	and rosegment_gap.
   3691 	(Target::isolate_execinstr, Target::rosegment_gap): New methods.
   3692 	* arm.cc (Target_arm::arm_info): Update initializer.
   3693 	* i386.cc (Target_i386::i386_info): Likewise.
   3694 	* powerpc.cc (Target_powerpc::powerpc_info): Likewise.
   3695 	* sparc.cc (Target_sparc::sparc_info): Likewise.
   3696 	* x86_64.cc (Target_x86_64::x86_64_info): Likewise.
   3697 	* testsuite/testfile.cc (Target_test::test_target_info): Likewise.
   3698 	* layout.cc (Layout::attach_allocated_section_to_segment):
   3699 	Take new const Target* argument.  If target->isolate_execinstr(), act
   3700 	like --rosegment.
   3701 	(Layout::find_first_load_seg): Take new const Target* argument;
   3702 	if target->isolate_execinstr(), reject PF_X segments.
   3703 	(Layout::relaxation_loop_body): Update caller.
   3704 	(Layout::set_segment_offsets): If target->isolate_execinstr(),
   3705 	reset file offset to zero when we hit LOAD_SEG, and then do a second
   3706 	loop over the segments before LOAD_SEG to reassign offsets after
   3707 	addresses have been determined.  Handle target->rosegment_gap().
   3708 	(Layout::attach_section_to_segment): Take new const Target* argument;
   3709 	pass it to attach_allocated_section_to_segment.
   3710 	(Layout::make_output_section): Update caller.
   3711 	(Layout::attach_sections_to_segments): Take new const Target* argument;
   3712 	pass it to attach_section_to_segment.
   3713 	* gold.cc (queue_middle_tasks): Update caller.
   3714 	* layout.h (Layout): Update method decls with new arguments.
   3715 
   3716 	* arm.cc (Target_arm::Target_arm): Take optional argument for the
   3717 	Target_info pointer to use.
   3718 	(Target_arm::do_make_data_plt): New virtual method.
   3719 	(Target_arm::make_data_plt): New method that calls it.
   3720 	(Target_arm::make_plt_entry): Use it.
   3721 	(Output_data_plt_arm::Output_data_plt_arm): Take additional argument
   3722 	for the section alignment.
   3723 	(Output_data_plt_arm::do_first_plt_entry_offset): New abstract virtual
   3724 	method.
   3725 	(Output_data_plt_arm::first_plt_entry_offset): Call it.
   3726 	(Output_data_plt_arm::do_get_plt_entry_size): New abstract virtual
   3727 	method.
   3728 	(Output_data_plt_arm::get_plt_entry_size): Call it.
   3729 	(Output_data_plt_arm::do_fill_plt_entry): New abstract virtual method.
   3730 	(Output_data_plt_arm::fill_plt_entry): New method that calls it.
   3731 	(Output_data_plt_arm::do_fill_first_plt_entry): New abstract virtual
   3732 	method.
   3733 	(Output_data_plt_arm::fill_first_plt_entry): New method that calls it.
   3734 	(Output_data_plt_arm::set_final_data_size): Use get_plt_entry_size
   3735 	method instead of sizeof(plt_entry).
   3736 	(Output_data_plt_arm::add_entry): Likewise.
   3737 	Use first_plt_entry_offset method instead of sizeof(first_plt_entry).
   3738 	(Target_arm::first_plt_entry_offset): Call method on this->plt_ rather
   3739 	than static method.
   3740 	(Target_arm::plt_entry_size): Likewise.
   3741 	(Output_data_plt_arm::first_plt_entry, Output_data_plt_arm::plt_entry):
   3742 	Move to ...
   3743 	(Output_data_plt_arm_standard): ... here, new class.
   3744 	(Output_data_plt_arm::do_write): Move guts of PLT filling to...
   3745 	(Output_data_plt_arm_standard::do_fill_first_plt_entry): ... here ...
   3746 	(Output_data_plt_arm_standard::do_fill_plt_entry): ... and here.
   3747 
   3748 	* x86_64.cc (Output_data_plt_x86_64::Output_data_plt_x86_64):
   3749 	Take additional argument for the PLT entry size.
   3750 	(Output_data_plt_x86_64::get_tlsdesc_plt_offset):
   3751 	Use get_plt_entry_size method rather than plt_entry_size variable.
   3752 	(Output_data_plt_x86_64::reserve_slot): Likewise.
   3753 	(Output_data_plt_x86_64::do_adjust_output_section): Likewise.
   3754 	(Output_data_plt_x86_64::add_entry): Likewise.
   3755 	(Output_data_plt_x86_64::add_local_ifunc_entry): Likewise.
   3756 	(Output_data_plt_x86_64::address_for_global): Likewise.
   3757 	(Output_data_plt_x86_64::address_for_local): Likewise.
   3758 	(Output_data_plt_x86_64::set_final_data_size): Likewise.
   3759 	(Output_data_plt_x86_64::first_plt_entry_offset): Likewise.
   3760 	Make method non-static.
   3761 	(Output_data_plt_x86_64::do_get_plt_entry_size): New abstract virtual
   3762 	method.
   3763 	(Output_data_plt_x86_64::get_plt_entry_size): Just call that.
   3764 	(Output_data_plt_x86_64::do_add_eh_frame): New abstract virtual method.
   3765 	(Output_data_plt_x86_64::add_eh_frame): New method to call it.
   3766 	(Output_data_plt_x86_64::do_fill_first_plt_entry): New abstract
   3767 	virtual method.
   3768 	(Output_data_plt_x86_64::fill_first_plt_entry): New method to call it.
   3769 	(Output_data_plt_x86_64::do_fill_plt_entry): New abstract
   3770 	virtual method.
   3771 	(Output_data_plt_x86_64::fill_plt_entry): New method to call it.
   3772 	(Output_data_plt_x86_64::do_fill_tlsdesc_entry): New abstract
   3773 	virtual method.
   3774 	(Output_data_plt_x86_64::fill_tlsdesc_entry): New method to call it.
   3775 	(Output_data_plt_x86_64::plt_entry_size)
   3776 	(Output_data_plt_x86_64::first_plt_entry)
   3777 	(Output_data_plt_x86_64::plt_entry)
   3778 	(Output_data_plt_x86_64::tlsdesc_plt_entry)
   3779 	(Output_data_plt_x86_64::plt_eh_frame_fde_size)
   3780 	(Output_data_plt_x86_64::plt_eh_frame_fde): Move to ...
   3781 	(Output_data_plt_x86_64_standard): ... here, new class.
   3782 	(Target_x86_64::Target_x86_64): Take optional argument for the
   3783 	Target_info pointer to use.
   3784 	(Target_x86_64::do_make_data_plt): New virtual method.
   3785 	(Target_x86_64::make_data_plt): New method to call it.
   3786 	(Target_x86_64::init_got_plt_for_update): Use that.
   3787 	Call this->plt_->add_eh_frame method here.
   3788 	(Output_data_plt_x86_64::init):	Don't do add_eh_frame_for_plt here.
   3789 	(Target_x86_64::first_plt_entry_offset): Call method on this->plt_
   3790 	rather than static method.
   3791 	(Target_x86_64::plt_entry_size): Likewise.
   3792 	(Output_data_plt_x86_64::do_write): Use get_plt_entry_size method
   3793 	rather than plt_entry_size variable.  Move guts of PLT filling to...
   3794 	(Output_data_plt_x86_64_standard::do_fill_first_plt_entry): ... here ...
   3795 	(Output_data_plt_x86_64_standard::do_fill_plt_entry): ... and here ...
   3796 	(Output_data_plt_x86_64_standard::do_fill_tlsdesc_entry): ... and here.
   3797 
   3798 	* i386.cc (Output_data_plt_i386::Output_data_plt_i386): Take
   3799 	additional argument for the section alignment.
   3800 	Don't do add_eh_frame_for_plt here.
   3801 	(Output_data_plt_i386::first_plt_entry_offset): Make the method
   3802 	non-static.  Use get_plt_entry_size method rather than plt_entry_size
   3803 	variable.
   3804 	(Output_data_plt_i386::do_get_plt_entry_size): New abstract virtual
   3805 	method.
   3806 	(Output_data_plt_i386::get_plt_entry_size): Call it.
   3807 	(Output_data_plt_i386::do_add_eh_frame): New abstract virtual method.
   3808 	(Output_data_plt_i386::add_eh_frame): New method to call it.
   3809 	(Output_data_plt_i386::do_fill_first_plt_entry): New abstract virtual
   3810 	method.
   3811 	(Output_data_plt_i386::fill_first_plt_entry): New method to call it.
   3812 	(Output_data_plt_i386::do_fill_plt_entry): New abstract virtual
   3813 	method.
   3814 	(Output_data_plt_i386::fill_plt_entry): New method to call it.
   3815 	(Output_data_plt_i386::set_final_data_size): Use get_plt_entry_size
   3816 	method instead of plt_entry_size.
   3817 	(Output_data_plt_i386::plt_entry_size)
   3818 	(Output_data_plt_i386::plt_eh_frame_fde_size)
   3819 	(Output_data_plt_i386::plt_eh_frame_fde): Move to ...
   3820 	(Output_data_plt_i386_standard): ... here, new class.
   3821 	(Output_data_plt_i386_exec): New class.
   3822 	(Output_data_plt_i386::exec_first_plt_entry): Move to ...
   3823 	(Output_data_plt_i386_exec::first_plt_entry): ... here.
   3824 	(Output_data_plt_i386::exec_plt_entry): Move to ...
   3825 	(Output_data_plt_i386_exec::plt_entry): ... here.
   3826 	(Output_data_plt_i386_dyn): New class.
   3827 	(Output_data_plt_i386::first_plt_entry): Move to ...
   3828 	(Output_data_plt_i386_dyn::first_plt_entry): ... here.
   3829 	(Output_data_plt_i386::dyn_plt_entry): Move to ...
   3830 	(Output_data_plt_i386_dyn::plt_entry): ... here.
   3831 	(Target_i386::Target_i386): Take optional argument for the Target_info
   3832 	pointer to use.
   3833 	(Target_i386::do_make_data_plt): New virtual method.
   3834 	(Target_i386::make_data_plt): New method to call it.
   3835 	(Target_i386::make_plt_section): Use that.
   3836 	Call this->plt_->add_eh_frame method here.
   3837 	(Output_data_plt_i386::add_entry): Use get_plt_entry_size method
   3838 	rather than plt_entry_size variable.
   3839 	(Output_data_plt_i386::add_local_ifunc_entry): Likewise.
   3840 	(Output_data_plt_i386::address_for_local): Likewise.
   3841 	(Output_data_plt_i386::do_write): Likewise.
   3842 	Move guts of PLT filling to...
   3843 	(Output_data_plt_i386_exec::do_fill_first_plt_entry): ... here ...
   3844 	(Output_data_plt_i386_exec::do_fill_plt_entry): ... and here ...
   3845 	(Output_data_plt_i386_dyn::do_fill_first_plt_entry): ... and here ...
   3846 	(Output_data_plt_i386_dyn::do_fill_plt_entry): ... and here.
   3847 
   3848 2012-05-01  Cary Coutant  <ccoutant (a] google.com>
   3849 
   3850 	* dwarf_reader.cc (Dwarf_die::read_attributes)
   3851 	(Dwarf_die::skip_attributes, Dwarf_die::int_attribute)
   3852 	(Dwarf_die::uint_attribute): Remove DW_FORM_null.
   3853 	* reduced_debug_output.cc
   3854 	(Output_reduced_debug_info_section::get_die_end): Remove
   3855 	DW_FORM_GNU_ref_index.  Add default case.
   3856 
   3857 2012-04-26  Mark Wielaard  <mjw (a] redhat.com>
   3858 
   3859 	* dwarf_reader.cc (Dwarf_die::address_attribute): New function.
   3860 	* dwarf_reader.h (Dwarf_die::address_attribute): Likewise.
   3861 	* gdb-index.cc (Gdb_index_info_reader::record_cu_ranges): Handle
   3862 	DW_AT_high_pc as offset from DW_AT_low_pc.
   3863 
   3864 	* testsuite/Makefile.am (gdb_index_test_3.sh): New test case.
   3865 	* testsuite/Makefile.in: Regenerate.
   3866 	* testsuite/gdb_index_test_3.c: New test source file.
   3867 	* testsuite/gdb_index_test_3.sh: New test source file.
   3868 
   3869 2012-04-25  Ian Lance Taylor  <iant (a] google.com>
   3870 
   3871 	* arm.cc (Target_arm::do_is_defined_by_abi): Make sym a const
   3872 	pointer.
   3873 	(Stub_addend_reader::operator()): Declare Arm_relocate_functions
   3874 	as a class, not a struct.
   3875 	(Target_arm::scan_span_for_cortex_a8_erratum): Likewise.
   3876 	(Target_arm::apply_cortex_a8_workaround): Likewise.
   3877 	* gc.h: Declare Reloc_types as a struct, not a class.
   3878 	* object.h: Declare Symbols_data as a struct.
   3879 	* reloc.h: Declare Read_relocs_data as a struct.
   3880 	* target.h: Declare Relocate_info as a struct.
   3881 
   3882 2012-04-24  David S. Miller  <davem (a] davemloft.net>
   3883 
   3884 	* sparc.cc (Target_sparc::Relocate::relax_call): New function.
   3885 	(Target_sparc::Relocate::relocate): Call it for R_SPARC_WDISP30
   3886 	and R_SPARC_WPLT30.
   3887 
   3888 2012-04-24  Cary Coutant  <ccoutant (a] google.com>
   3889 
   3890 	* incremental-dump.cc (find_input_containing_global): Replace
   3891 	magic number with symbolic constant.
   3892 	(dump_incremental_inputs): Update version number.
   3893 	* incremental.cc (Output_section_incremental_inputs): Update version
   3894 	number; import symbolic constants from Incremental_inputs_reader.
   3895 	(Incremental_inputs::create_data_sections): Align relocations
   3896 	section correctly for 64-bit targets.
   3897 	(Output_section_incremental_inputs::set_final_data_size): Use symbolic
   3898 	constants; add padding.
   3899 	(Output_section_incremental_inputs::write_header): Add assert for
   3900 	header_size.
   3901 	(Output_section_incremental_inputs::write_input_files): Add assert
   3902 	for input_entry_size.
   3903 	(Output_section_incremental_inputs::write_info_blocks): Add padding;
   3904 	add assert for object_info_size, input_section_entry_size,
   3905 	global_sym_entry_size.
   3906 	* incremental.h (Incremental_inputs_reader): Add symbolic constants
   3907 	for data structure sizes; use them.
   3908 	(Incremental_input_entry_reader): Import symbolic constants from
   3909 	Incremental_inputs_reader; use them.
   3910 
   3911 2012-04-23  David S. Miller  <davem (a] davemloft.net>
   3912 
   3913 	* sparc.cc (class Target_sparc): Add elf_machine_, elf_flags_,
   3914 	and elf_flags_set_.
   3915 	(Target_sparc::Target_sparc): Initialize new fields.
   3916 	(Target_sparc::do_make_elf_object): New function.
   3917 	(Target_sparc::do_adjust_elf_header): New function.
   3918 
   3919 2012-04-23  Cary Coutant  <ccoutant (a] google.com>
   3920 
   3921 	* gdb-index.cc (Gdb_index::do_write): Use Swap_aligned32 for writing
   3922 	CU range table of gdb index.
   3923 
   3924 2012-04-20  David S. Miller  <davem (a] davemloft.net>
   3925 
   3926 	* target.cc (Sized_target::do_adjust_elf_header): Use big_endian
   3927 	instead of false.
   3928 
   3929 2012-04-16  David S. Miller  <davem (a] davemloft.net>
   3930 
   3931 	* sparc.cc (Target_sparc::got_address): New function.
   3932 	(Sparc_relocate_functions::gdop_hix22): New function.
   3933 	(Sparc_relocate_functions::gdop_lox10): New function.
   3934 	(Target_sparc::Scan::local): Do not emit a GOT entry for GOTDATA
   3935 	relocs.
   3936 	(Target_sparc::Scan::local): Likewise if the global symbol is not
   3937 	preemptible and is not IFUNC.
   3938 	(Target_sparc::Relocate::relocate): Perform GOTDATA code
   3939 	transformations for local and non-preemptible non-IFUNC global
   3940 	symbols.
   3941 
   3942 	* gdb-index.cc (Gdb_index::do_write): Use Swap_unaligned when
   3943 	writing out 64-bit part of ranges.
   3944 
   3945 	* Makefile.am: Build IFUNC tests with -fPIC and -fPIE instead of
   3946 	-fpic and -fpie respectively.
   3947 	* Makefile.in: Regenerate.
   3948 
   3949 	* sparc.cc (class Target_sparc): Add rela_ifunc_.
   3950 	(Target_sparc::Target_sparc): Initialize new field.
   3951 	(Target_sparc::do_plt_section_for_global): New function.
   3952 	(Target_sparc::do_plt_section_for_local): New function.
   3953 	(Target_sparc::reloc_needs_plt_for_ifunc): New function.
   3954 	(Target_sparc::make_plt_section): New function, broken out of
   3955 	make_plt_entry.  Use ORDER_NON_RELRO_FIRST for ".plt".
   3956 	(Target_sparc::make_plt_entry): Call make_plt_section.
   3957 	(Target_sparc::make_local_ifunc_plt_entry): New function.
   3958 	(Target_sparc::rela_ifunc_section): New function.
   3959 	(Target_sparc::plt_section): Remove const.
   3960 	(Output_data_plt_sparc): Update declarations.  Define Global_ifunc
   3961 	and Local_ifunc types.  Add global_ifuncs_, local_ifuncs_, ifunc_rel_,
   3962 	and ifunc_count_ fields.
   3963 	(Output_data_plt_sparc::Output_data_plt_sparc): Initialize new fields.
   3964 	(Output_data_plt_sparc::add_entry): Handle IFUNC symbols.
   3965 	(Output_data_plt_sparc::add_local_ifunc_entry): New function.
   3966 	(Output_data_plt_sparc::rela_ifunc): New function.
   3967 	(Output_data_plt_sparc::emit_pending_ifunc_relocs): New function.
   3968 	(Output_data_plt_sparc::has_ifunc_section): New function.
   3969 	(Output_data_plt_sparc::entry_count): Include ifunc_count_.
   3970 	(Output_data_plt_sparc::address_for_global): New function.
   3971 	(Output_data_plt_sparc::address_for_local): New function.
   3972 	(Output_data_plt_sparc::plt_index_to_offset): New function.
   3973 	(Output_data_plt_sparc::set_final_data_size): Use plt_index_to_offset
   3974 	and entry_count.
   3975 	(Output_data_plt_sparc::do_write): Use first_plt_entry_offset and
   3976 	entry_count.
   3977 	(Target_sparc::Scan::get_reference_flags): Add R_SPARC_IRELATIVE and
   3978 	R_SPARC_JMP_IREL to switch.
   3979 	(Target_sparc::Scan::check_non_pic): Likewise.
   3980 	(Target_sparc::Scan::local): Handle IFUNC symbols.
   3981 	(Target_sparc::Scan::local): Likewise.
   3982 	(Target_sparc::Relocate::relocate): Likewise, use plt_address_for_global
   3983 	and plt_address_for_local.
   3984 	(Target_sparc::do_finalize_sections): Call emit_pending_ifunc_relocs.
   3985 	Define __rel_iplt_start and __rel_iplt_end if doing a static link.
   3986 
   3987 	* output.h (Output_reloc): Allow use_plt_offset for global relocs too.
   3988 	(class Output_data_reloc): Adjust calls to Output_reloc_type.
   3989 	(Output_data_reloc::add_global_relative): (RELA only) Add use_plt_offset.
   3990 	* output.cc (Output_reloc::Output_reloc): Add use_plt_offset flag for
   3991 	global relocs too.
   3992 	(Output_reloc::symbol_value): Respect use_plt_offset_ for global symbols.
   3993 	* powerpc.cc (Target_powerpc::Scan::global): Adjust add_global_relative
   3994 	calls.
   3995 	* sparc.cc (Target_sparc::Scan::global): Likewise.
   3996 	* x86_64.cc (Target_x86_64::Scan::global): Likewise.
   3997 
   3998 2012-04-16  Cary Coutant  <ccoutant (a] google.com>
   3999 
   4000 	* archive.cc (Library_base::should_include_member): Check for
   4001 	--export-dynamic-symbol.
   4002 	* options.h (class General_options): Add --export-dynamic-symbol.
   4003 	* symtab.cc (Symbol::should_add_dynsym_entry): Check for
   4004 	--export-dynamic-symbol.
   4005 	(Symbol_table::gc_mark_undef_symbols): Likewise.
   4006 	(Symbol_table::do_add_undefined_symbols_from_command_line): Likewise.
   4007 
   4008 2012-04-12  David S. Miller  <davem (a] davemloft.net>
   4009 
   4010 	* sparc.cc (Reloc::wdisp10): New relocation method.
   4011 	(Reloc::h34): Likewise.
   4012 	(Target_sparc::Scan::check_non_pic): Handle R_SPARC_H34.
   4013 	(Target_sparc::Scan::get_reference_flags): Handle R_SPARC_H34 and
   4014 	R_SPARC_WDISP10.
   4015 	(Target_sparc::Scan::local): Likewise.
   4016 	(Target_sparc::Scan::global): Likewise.
   4017 	(Target_sparc::Relocate::relocate): Likewise.
   4018 
   4019 2012-04-09  Cary Coutant  <ccoutant (a] google.com>
   4020 
   4021 	* gdb-index.cc (Gdb_index_info_reader::record_cu_ranges): Allow
   4022 	low_pc == 0.
   4023 
   4024 2012-04-06  Ian Lance Taylor  <iant (a] google.com>
   4025 
   4026 	* timer.cc: #include <unistd.h>.
   4027 
   4028 2012-04-06  Roland McGrath  <mcgrathr (a] google.com>
   4029 
   4030 	* configure.in (AC_CHECK_HEADERS): Add locale.h.
   4031 	* config.in: Regenerate.
   4032 	* configure: Regenerate.
   4033 
   4034 2012-04-05  Nick Clifton  <nickc (a] redhat.com>
   4035 
   4036 	* configure.ac (AC_CHECK_FUNCS): Add setlocale.
   4037 	(AM_LC_MESSAGES): Add.
   4038 	* aclocal.m4: Regenerate.
   4039 	* config.in: Regenerate.
   4040 	* configure: Regenerate.
   4041 
   4042 2012-03-21  Cary Coutant  <ccoutant (a] google.com>
   4043 
   4044 	* Makefile.am: Add gdb-index.cc, gdb-index.h.
   4045 	* Makefile.in: Regenerate.
   4046 	* dwarf_reader.cc (Sized_elf_reloc_mapper::do_initialize): New function.
   4047 	(Sized_elf_reloc_mapper::symbol_section): New function.
   4048 	(Sized_elf_reloc_mapper::do_get_reloc_target): New function.
   4049 	(make_elf_reloc_mapper): New function.
   4050 	(Dwarf_abbrev_table::clear_abbrev_codes): New function.
   4051 	(Dwarf_abbrev_table::do_read_abbrevs): New function.
   4052 	(Dwarf_abbrev_table::do_get_abbrev): New function.
   4053 	(Dwarf_ranges_table::read_ranges_table): New function.
   4054 	(Dwarf_ranges_table::read_range_list): New function.
   4055 	(Dwarf_pubnames_table::read_section): New function.
   4056 	(Dwarf_pubnames_table::read_header): New function.
   4057 	(Dwarf_pubnames_table::next_name): New function.
   4058 	(Dwarf_die::Dwarf_die): New function.
   4059 	(Dwarf_die::read_attributes): New function.
   4060 	(Dwarf_die::skip_attributes): New function.
   4061 	(Dwarf_die::set_name): New function.
   4062 	(Dwarf_die::set_linkage_name): New function.
   4063 	(Dwarf_die::attribute): New function.
   4064 	(Dwarf_die::string_attribute): New function.
   4065 	(Dwarf_die::int_attribute): New function.
   4066 	(Dwarf_die::uint_attribute): New function.
   4067 	(Dwarf_die::ref_attribute): New function.
   4068 	(Dwarf_die::child_offset): New function.
   4069 	(Dwarf_die::sibling_offset): New function.
   4070 	(Dwarf_info_reader::check_buffer): New function.
   4071 	(Dwarf_info_reader::parse): New function.
   4072 	(Dwarf_info_reader::do_parse): New function.
   4073 	(Dwarf_info_reader::do_read_string_table): New function.
   4074 	(Dwarf_info_reader::lookup_reloc): New function.
   4075 	(Dwarf_info_reader::get_string): New function.
   4076 	(Dwarf_info_reader::visit_compilation_unit): New function.
   4077 	(Dwarf_info_reader::visit_type_unit): New function.
   4078 	(Sized_dwarf_line_info::Sized_dwarf_line_info): Use
   4079 	Sized_elf_reloc_mapper.
   4080 	(Sized_dwarf_line_info::symbol_section): Remove function.
   4081 	(Sized_dwarf_line_info::read_relocs): Use Sized_elf_reloc_mapper.
   4082 	(Sized_dwarf_line_info::read_line_mappings): Remove object
   4083 	parameter, adjust callers.
   4084 	(Sized_dwarf_line_info::format_file_lineno): Fix type of cast.
   4085 	* dwarf_reader.h: Include <sys/types.h>.
   4086 	(class Track_relocs): Remove forward declaration.
   4087 	(class Elf_reloc_mapper): New class.
   4088 	(class Sized_elf_reloc_mapper): New class.
   4089 	(class Dwarf_abbrev_table): New class.
   4090 	(class Dwarf_range_list): New class.
   4091 	(class Dwarf_ranges_table): New class.
   4092 	(class Dwarf_pubnames_table): New class.
   4093 	(class Dwarf_die): New class.
   4094 	(class Dwarf_info_reader): New class.
   4095 	(Sized_dwarf_line_info::read_line_mappings): Remove object parameter.
   4096 	(Sized_dwarf_line_info::symbol_section): Remove member function.
   4097 	* dynobj.h (Sized_dynobj::do_section_contents): Refactor code from
   4098 	base class.
   4099 	* gdb-index.cc: New source file.
   4100 	* gdb-index.h: New source file.
   4101 	* incremental.cc (Sized_relobj_incr::do_layout): Track .debug_info
   4102 	and .debug_types sections, call Layout::add_to_gdb_index.
   4103 	(Sized_relobj_incr::do_section_name): Implement.
   4104 	(Sized_relobj_incr::do_section_contents): Adjust parameter list and
   4105 	return type; Implement.
   4106 	(Sized_incr_dynobj::do_section_contents): Adjust parameter list and
   4107 	return type.
   4108 	* incremental.h (Sized_relobj_incr::do_section_contents): Adjust
   4109 	parameter list and return type.
   4110 	(Sized_incr_dynobj::do_section_contents): Likewise.
   4111 	* layout.cc: Include gdb-index.h.
   4112 	(Layout::Layout): Initialize gdb_index_data_.
   4113 	(Layout::init_fixed_output_section): Check for .gdb_index section.
   4114 	(Layout::add_to_gdb_index): New function. Instantiate.
   4115 	* layout.h: Add forward declaration for class Gdb_index.
   4116 	(Layout::add_to_gdb_index): New member function.
   4117 	(Layout::gdb_index_data_): New data member.
   4118 	* main.cc: Include gdb-index.h.
   4119 	(main): Print statistics for gdb index.
   4120 	* object.cc (Object::section_contents): Move code into
   4121 	do_section_contents.
   4122 	(need_decompressed_section): Check for sections needed when building
   4123 	gdb index.
   4124 	(build_compressed_section_map): Likewise.
   4125 	(Sized_relobj_file::do_read_symbols): Need local symbols when building
   4126 	gdb index.
   4127 	(Sized_relobj_file::do_layout): Track .debug_info and .debug_types
   4128 	sections; call Layout::add_to_gdb_index.
   4129 	(Sized_relobj_file::do_decompressed_section_contents): Call
   4130 	do_section_contents directly.
   4131 	* object.h (Object::do_section_contents): Adjust parameter list and
   4132 	return type.
   4133 	(Object::do_decompressed_section_contents): Call do_section_contents
   4134 	directly.
   4135 	(Sized_relobj_file::do_section_contents): Adjust parameter list and
   4136 	return type.
   4137 	* options.h (class General_options): Add --gdb-index option.
   4138 	* plugin.cc (Sized_pluginobj::do_section_contents): Adjust parameter
   4139 	list and return type.
   4140 	* plugin.h (Sized_pluginobj::do_section_contents): Likewise.
   4141 	* reloc.h (Track_relocs::checkpoint): New function.
   4142 	(Track_relocs::reset): New function.
   4143 
   4144 	* testsuite/Makefile.am (gdb_index_test_1.sh, gdb_index_test_2.sh):
   4145 	New test cases.
   4146 	* testsuite/Makefile.in: Regenerate.
   4147 	* testsuite/gdb_index_test.cc: New test source file.
   4148 	* testsuite/gdb_index_test_1.sh: New test source file.
   4149 	* testsuite/gdb_index_test_2.sh: New test source file.
   4150 
   4151 2012-03-19  Doug Kwan  <dougkwan (a] google.com>
   4152 
   4153 	* arm.cc (Target_arm::do_define_standard_symbols): New method.
   4154 	(Target_arm::do_finalize_sections): Remove code which defines
   4155 	__exidx_start and __exidx_end.  Make symbol table parameter
   4156 	anonymous as it is not used.
   4157 	* gold.cc (queue_middle_tasks): Call target hook to define any
   4158 	target-specific symbols.
   4159 	* target.h (Target::define_standard_symbols): New method.
   4160 	(Target::do_define_standard_symbols): Same.
   4161 	* testsuite/Makefile.am (arm_exidx_test): Dump relocations also.
   4162 	* testsuite/Makefile.in: Regenerate.
   4163 	* testsuite/arm_exidx.s: Generate data relocations for __exidx_start
   4164 	and __exidx_end.
   4165 	* testsuite/arm_exidx_test.sh: Check that no unused dynamic
   4166 	relocations are generated for __exidx_start and __exidx_end.
   4167 
   4168 2012-03-16  Doug Kwan  <dougkwan (a] google.com>
   4169 
   4170 	* testsuite/Makefile.am: Disable test initpri3b.
   4171 	* testsuite/Makefile.in: Regenerate.
   4172 
   4173 2012-03-15  Doug Kwan  <dougkwan (a] google.com>
   4174 
   4175 	* arm.cc (Target_arm::got_section): Make .got section read-only
   4176 	if -z now is given.
   4177 
   4178 2012-03-15  Ian Lance Taylor  <iant (a] google.com>
   4179 
   4180 	PR gold/13850
   4181 	* layout.cc (Layout::make_output_section): Correctly mark
   4182 	SHT_INIT_ARRAY, et. al., as relro.
   4183 
   4184 2012-03-14  Doug Kwan  <dougkwan (a] google.com>
   4185 
   4186 	* gold/arm.cc (Target_arm::Scan::global): Generate R_ARM_GLOB_DAT
   4187 	dynamic relocations for protected symbols in shared objects.
   4188 
   4189 2012-03-13  Ian Lance Taylor  <iant (a] google.com>
   4190 
   4191 	* resolve.cc (Symbol_table::resolve): When merging common symbols,
   4192 	keep the larger alignment.
   4193 
   4194 2012-03-12  Cary Coutant  <ccoutant (a] google.com>
   4195 
   4196 	* dwarf_reader.cc (Sized_dwarf_line_info::process_one_opcode): Fix
   4197 	handling of DW_LNE_define_file.
   4198 
   4199 2012-03-12  Cary Coutant  <ccoutant (a] google.com>
   4200 
   4201 	* reduced_debug_output.cc
   4202 	(Output_reduced_debug_info_section::get_die_end): Add new FORM
   4203 	codes to switch.
   4204 
   4205 2012-02-29  Cary Coutant  <ccoutant (a] google.com>
   4206 
   4207 	* object.cc (need_decompressed_section): Add #ifdef ENABLE_THREADS.
   4208 
   4209 2012-02-29  Cary Coutant  <ccoutant (a] google.com>
   4210 
   4211 	* dwarf_reader.cc (Sized_dwarf_line_info::Sized_dwarf_line_info):
   4212 	Call Object::decompressed_section_contents.
   4213 	* dwarf_reader.h (Sized_dwarf_line_info::~Sized_dwarf_line_info):
   4214 	New dtor.
   4215 	(Sized_dwarf_line_info::buffer_start_): New data member.
   4216 	* merge.cc (Output_merge_data::do_add_input_section): Call
   4217 	Object::decompressed_section_contents.
   4218 	(Output_merge_string::do_add_input_section): Likewise.
   4219 	* object.cc (need_decompressed_section): New function.
   4220 	(build_compressed_section_map): Decompress sections needed later.
   4221 	(Sized_relobj_file::do_decompressed_section_contents): New function.
   4222 	(Sized_relobj_file::do_discard_decompressed_sections): New function.
   4223 	* object.h (Object::decompressed_section_contents): New function.
   4224 	(Object::discard_decompressed_sections): New function.
   4225 	(Object::do_decompressed_section_contents): New function.
   4226 	(Object::do_discard_decompressed_sections): New function.
   4227 	(Compressed_section_info): New type.
   4228 	(Compressed_section_map): Include decompressed section contents.
   4229 	(Sized_relobj_file::do_decompressed_section_contents): New function.
   4230 	(Sized_relobj_file::do_discard_decompressed_sections): New function.
   4231 
   4232 2012-02-16  Cary Coutant  <ccoutant (a] google.com>
   4233 
   4234 	* testsuite/Makefile.am (initpri2): Add --ctors-in-init-array option.
   4235 	* testsuite/Makefile.in: Regenerate.
   4236 
   4237 2012-02-14  Cary Coutant  <ccoutant (a] google.com>
   4238 
   4239 	* options.cc (General_options::finalize): Disallow -pie and -static.
   4240 
   4241 2012-02-03  Doug Kwan  <dougkwan (a] google.com>
   4242 
   4243 	* arm.cc (Arm_relocate_functions::abs8,
   4244 	Arm_relocate_functions::abs16): Use
   4245 	Bits::has_signed_unsigned_overflow32.
   4246 	(Arm_relocate_functions::thm_abs8): Correct range of
   4247 	overflow check.
   4248 	* reloc.h (Bits class): Change minimum number of bits from 0 to 1
   4249 	in assertions.
   4250 
   4251 2012-02-02  Doug Kwan  <dougkwan (a] google.com>
   4252 
   4253 	* arm.cc (Reloc_stub::stub_type_for_reloc): Use PIC stubs in all
   4254 	position independent outputs, not just shared objects.
   4255 
   4256 2012-01-30  H.J. Lu  <hongjiu.lu (a] intel.com>
   4257 
   4258 	* configure.ac: Check if -fpic -mtls-dialect=gnu2 works.
   4259 	* configure: Regenerated.
   4260 
   4261 2012-01-27  Ian Lance Taylor  <iant (a] google.com>
   4262 
   4263 	* reloc.h (Bits): New class with static functions, copied from
   4264 	namespace utils in arm.cc.
   4265 	* arm.cc (namespace utils): Remove.  Rewrite all uses to use Bits
   4266 	instead.
   4267 
   4268 2012-01-27  H.J. Lu  <hongjiu.lu (a] intel.com>
   4269 
   4270 	* incremental.cc (write_info_blocks): Correct relocation offset.
   4271 
   4272 2012-01-27  H.J. Lu  <hongjiu.lu (a] intel.com>
   4273 
   4274 	* x86_64.cc (Relocate::tls_gd_to_ie): Support x32.
   4275 	(Relocate::tls_gd_to_le): Likewise.
   4276 
   4277 2012-01-27  H.J. Lu  <hongjiu.lu (a] intel.com>
   4278 
   4279 	* x86_64.cc (Scan::global): Support x32 IFUNC function pointer.
   4280 
   4281 2012-01-27  H.J. Lu  <hongjiu.lu (a] intel.com>
   4282 
   4283 	* configure.ac: Check if -mcmodel=medium works.
   4284 	* configure: Regenerated.
   4285 
   4286 2012-01-24  Cary Coutant  <ccoutant (a] google.com>
   4287 
   4288 	* int_encoding.cc (read_unsigned_LEB_128): Replaced with inline
   4289 	definition and ...
   4290 	(read_unsigned_LEB_128_x): ... this new function.
   4291 	(read_signed_LEB_128): Replaced with inline definition and ...
   4292 	(read_signed_LEB_128_x): ... this new function.
   4293 	* int_encoding.h  (read_unsigned_LEB_128_x): New function.
   4294 	(read_unsigned_LEB_128): Add inline definition.
   4295 	(read_signed_LEB_128_x): New function.
   4296 	(read_signed_LEB_128): Add inline definition.
   4297 	* testsuite/Makefile.am (leb128_unittest): New unit test.
   4298 	* testsuite/Makefile.in: Regenerate.
   4299 	* testsuite/leb128_unittest.cc: New unit test.
   4300 
   4301 2012-01-23  Ian Lance Taylor  <iant (a] google.com>
   4302 
   4303 	PR gold/13617
   4304 	* i386.cc (Target_i386::do_code_fill): When using a jmp
   4305 	instruction, pad with nop instructions.
   4306 	* x86_64.cc (Target_x86_64::do_code_fill): Likewise.
   4307 
   4308 2012-01-22  H.J. Lu  <hongjiu.lu (a] intel.com>
   4309 
   4310 	* x86_64.cc (gc_process_relocs): Add typename on types used in
   4311 	template.
   4312 	(scan_relocs): Likewise.
   4313 	(relocate_section): Likewise.
   4314 	(apply_relocation): Likewise.
   4315 
   4316 2012-01-10  H.J. Lu  <hongjiu.lu (a] intel.com>
   4317 
   4318 	* x86_64.cc (Scan::check_non_pic): Allow R_X86_64_32 for x32.
   4319 	(Scan::local): Use R_X86_64_RELATIVE relocation for R_X86_64_32
   4320 	under x32.
   4321 
   4322 2012-01-09  H.J. Lu  <hongjiu.lu (a] intel.com>
   4323 
   4324 	* x86_64.cc: Initial support for x32.
   4325 
   4326 2012-01-03  Cary Coutant  <ccoutant (a] google.com>
   4327 
   4328 	* gold/incremental.cc (Sized_incremental_binary::do_process_got_plt):
   4329 	Use abstract base class for GOT.
   4330 	* gold/output.h (class Output_data_got_base): New abstract base class.
   4331 	(class Output_data_got): Derive from new base class, adjust ctors.
   4332 	(Output_data_got::reserve_slot): Make virtual; rename to
   4333 	do_reserve_slot; Adjust callers.
   4334 	* gold/target.h (Sized_target::init_got_plt_for_update): Return
   4335 	pointer to abstract base class.
   4336 	* gold/x86_64.cc (Target_x86_64::init_got_plt_for_update): Likewise.
   4337 
   4338 2011-12-18  Ian Lance Taylor  <iant (a] google.com>
   4339 
   4340 	* object.h (Relobj::local_symbol_value): New function.
   4341 	(Relobj::local_plt_offset): New function.
   4342 	(Relobj::local_has_got_offset): New function.
   4343 	(Relobj::local_got_offset): New function.
   4344 	(Relobj::set_local_got_offset): New function.
   4345 	(Relobj::do_local_symbol_value): New pure virtual function.
   4346 	(Relobj::do_local_plt_offset): Likewise.
   4347 	(Relobj::do_local_has_got_offset): Likewise.
   4348 	(Relobj::do_local_got_offset): Likewise.
   4349 	(Relobj::do_set_local_got_offset): Likewise.
   4350 	(Sized_relobj::do_local_has_got_offset): Rename from
   4351 	local_has_got_offset.
   4352 	(Sized_relobj::do_local_got_offset): Rename from local_got_offset.
   4353 	(Sized_relobj::do_set_local_got_offset): Rename from
   4354 	set_local_got_offset.
   4355 	(Sized_relobj_file::do_local_plt_offset): Rename from
   4356 	local_plt_offset.
   4357 	(Sized_relobj_file::do_local_symbol_value): New function.
   4358 	* object.cc (Sized_relobj_file::do_local_plt_offset): Rename from
   4359 	local_plt_offset.
   4360 	* output.cc (Output_data_got::Got_entry::write): Change object to
   4361 	Relobj.  Use local_symbol_value.
   4362 	(Output_data_got::add_global_with_rel): Change rel_dyn to
   4363 	Output_data_reloc_generic*.  Use add_global_generic.
   4364 	(Output_data_got::add_global_with_rela): Remove.  Change all
   4365 	callers to use add_global_with_rel.
   4366 	(Output_data_got::add_global_pair_with_rel): Change rel_dyn to
   4367 	Output_data_reloc_generic*.  Use add_global_generic.
   4368 	(Output_data_got::add_global_pair_with_rela): Remove.  Change all
   4369 	callers to use add_global_pair_with_rel.
   4370 	(Output_data_got::add_local): Change object to Relobj*.
   4371 	(Output_data_got::add_local_plt): Likewise.
   4372 	(Output_data_got::add_local_with_rel): Change object to Relobj*,
   4373 	change rel_dyn to Output_data_reloc_generic*.  Use
   4374 	add_local_generic.
   4375 	(Output_data_got::add_local_with_rela): Remove.  Change all
   4376 	callers to use all_local_with_rel.
   4377 	(Output_data_got::add_local_pair_with_rel): Change object to
   4378 	Relobj*, change rel_dyn to Output_data_reloc_generic*.  Use
   4379 	add_output_section_generic.
   4380 	(Output_data_got::add_local_pair_with_rela): Remove.  Change all
   4381 	callers to use add_local_pair_with_rel.
   4382 	(Output_data_got::reserve_local): Change object to Relobj*.
   4383 	* output.h: (class Output_data_reloc_generic): Add pure virtual
   4384 	declarations for add_global_generic, add_local_generic,
   4385 	add_output_section_generic.
   4386 	(class Output_data_reloc) [SHT_REL, SHT_RELA]: Implement new
   4387 	functions for Output_data_reloc_generic.  Update declarations for
   4388 	changes listed in output.cc.
   4389 	(class Output_data_got): Change template parameter to got_size.
   4390 	Don't define Rel_dyn or Rela_dyn.  Update declarations per above.
   4391 	* incremental.h (Sized_relobj_incr::do_local_symbol_value): New
   4392 	function.
   4393 	(Sized_relobj_incr::do_local_plt_offset): New function.
   4394 	* copy-relocs.cc (Copy_relocs::Copy_reloc_entry::emit): Call
   4395 	add_global_generic.
   4396 
   4397 2011-12-17  Cary Coutant  <ccoutant (a] google.com>
   4398 
   4399 	* dwarf_reader.cc (Sized_dwarf_line_info::read_lines): Add casts.
   4400 	* resolve.cc (Symbol_table::resolve): Likewise.
   4401 	* i386.cc (Target_i386::do_code_fill): Use char constants for nop
   4402 	arrays.
   4403 	* x86_64.cc (Target_x86_64::do_code_fill): Likewise.
   4404 
   4405 2011-12-16  Ian Lance Taylor  <iant (a] google.com>
   4406 
   4407 	* output.h (Output_data_reloc_generic::add): Only call
   4408 	add_dynamic_reloc if this is a dynamic reloc section.
   4409 
   4410 2011-12-15  H.J. Lu  <hongjiu.lu (a] intel.com>
   4411 
   4412 	PR gold/13505
   4413 	* target-reloc.h (apply_relocation): Replace <64, false> with
   4414 	<size, big_endian>.
   4415 
   4416 2011-11-25  Nick Clifton  <nickc (a] redhat.com>
   4417 
   4418 	* po/it.po: New Italian translation.
   4419 
   4420 2011-11-17  Sterling Augustine  <saugustine (a] google.com>
   4421 
   4422 	* script.cc (script_include_directive): Implement.
   4423 	(read_script_file): New local variables name and search_path. Update
   4424 	comment. Call IS_ABSOLUTE_PATH and Dirsearch::find_file_in_dir_list.
   4425 	* dirsearch.h (Dirsearch::find_file_in_dir_list): Declare new method.
   4426 	* dirsearch.cc (Dirsearch::find_file_in_dir_list): Implement it.
   4427 
   4428 2011-11-11  Sterling Augustine  <saugustine (a] google.com>
   4429 
   4430 	* yyscript.y (section_cmd): Add support for INCLUDE directive.
   4431 	(file_or_sections_cmd): Likewise.
   4432 
   4433 2011-11-11  Doug Kwan  <dougkwan (a] google.com>
   4434 
   4435 	* arm.cc (Target_arm::do_make_elf_object): Allow executable also
   4436 	if --just-symbols is given.
   4437 
   4438 2011-11-10  Doug Kwan  <dougkwan (a] google.com>
   4439 
   4440 	PR gold/13362
   4441 	* arm.cc (Target_arm::Relocate::relocate_tls): Do unaligned accesses
   4442 	when processing data relocs.
   4443 	* reloc.h (Relocate_functions::rel_unaligned): New method.
   4444 	(Relocate_functions::pcrel_unaligned): Ditto.
   4445 	(Relocate_functions::rel32_unaligned): Ditto.
   4446 	(Relocate_functions::pcrel32_unaligned): Ditto.
   4447 
   4448 2011-11-09  Doug Kwan  <dougkwan (a] google.com>
   4449 
   4450 	PR gold/13362
   4451 	* arm.cc (Arm_scan_relocatable_relocs::Default_scan_relocatable_relocs):
   4452 	Use unaligned 4-byte relocs for static 32-bit data as required by EABI.
   4453 	* reloc.h (Relocatable_relocs::Reloc_strategy): New enum
   4454 	RELOC_ADJUST_FOR_SECTION_4_UNALIGNED.
   4455 	(Relocate_functions::rel_unaligned): New.
   4456 	(Relocate_functions::rel32_unaligned): New.
   4457 	* target-reloc.h (relocate_for_relocatable): Add code to handle
   4458 	RELOC_ADJUST_FOR_SECTION_4_UNALIGNED.
   4459 	* testsuite/Makefile.am (arm_unaligned_reloc_r.stdout,
   4460 	arm_unaligned_reloc_r): New targets.
   4461 	* testsuite/Makefile.in: Regenerate.
   4462 	* arm_unaligned_reloc.sh: Check unaligned relocs in relocatable
   4463 	linking.
   4464 
   4465 2011-11-02  Ian Lance Taylor  <iant (a] google.com>
   4466 
   4467 	* configure.ac: Add --with-lib-path option.  Define LIB_PATH and
   4468 	NATIVE_LINKER.
   4469 	* Makefile.am (AM_CPPFLAGS): Define TOOLLIBDIR.
   4470 	* options.cc (General_options::finalize): Use library search path
   4471 	from configure script if specified.  If not native and no sysroot,
   4472 	only search TOOLLIBDIR.
   4473 	* options.h (Search_directory::Search_directory): Change name to
   4474 	const std::string&.
   4475 	(General_options::add_to_library_path_with_sysroot): Change arg to
   4476 	const std::string&.
   4477 	* configure, Makefile.in, config.in: Rebuild.
   4478 
   4479 2011-11-02  Matthew Gretton-Dann  <matthew.gretton-dann (a] arm.com>
   4480 
   4481 	* arm.cc (Target_arm::may_use_v5t_interworking): Check whether
   4482 	we are working around the ARM1176 Erratum.
   4483 	* options.h (General_options::fix_arm1176): Add option.
   4484 	* testsuite/Makefile.am: Add testcases, and keep current ones
   4485 	working.
   4486 	* testsuite/Makefile.in: Regenerate.
   4487 	* testsuite/arm_fix_1176.s: New file.
   4488 	* testsuite/arm_fix_1176.sh: Likewise.
   4489 
   4490 2011-11-02  Matthew Gretton-Dann  <matthew.gretton-dann (a] arm.com>
   4491 
   4492 	* arm.cc (Target_arm::Target_arm): Remove initialisation of
   4493 	may_use_blx_.
   4494 	(Target_arm::may_use_blx): Remove method.
   4495 	(Target_arm::set_may_use_blx): Likewise.
   4496 	(Target_arm::may_use_v4t_interworking): New method.
   4497 	(Target_arm::may_use_v5t_interworking): Likewise.
   4498 	(Target_arm::may_use_blx_): Remove member variable.
   4499 	(Arm_relocate_functions::arm_branch_common): Check for v5T
   4500 	interworking.
   4501 	(Arm_relocate_functions::thumb_branch_common): Likewise.
   4502 	(Reloc_stub::stub_type_for_reloc): Likewise.
   4503 	(Target_arm::do_finalize_sections): Correct interworking checks.
   4504 	* testsuite/Makefile.am: Add new tests.
   4505 	* testsuite/Makefile.in: Regenerate.
   4506 	* testsuite/arm_farcall_arm_arm.s: New test.
   4507 	* testsuite/arm_farcall_arm_arm.sh: Likewise.
   4508 	* testsuite/arm_farcall_arm_thumb.s: Likewise.
   4509 	* testsuite/arm_farcall_arm_thumb.sh: Likewise.
   4510 	* testsuite/arm_farcall_thumb_arm.s: Likewise.
   4511 	* testsuite/arm_farcall_thumb_arm.sh: Likewise.
   4512 	* testsuite/arm_farcall_thumb_thumb.s: Likewise.
   4513 	* testsuite/arm_farcall_thumb_thumb.sh: Likewise.
   4514 
   4515 2011-10-31  Cary Coutant  <ccoutant (a] google.com>
   4516 
   4517 	PR gold/13023
   4518 	* expression.cc (Expression::eval_with_dot): Add
   4519 	is_section_dot_assignment parameter.
   4520 	(Expression::eval_maybe_dot): Likewise.  Adjust value when rhs is
   4521 	absolute and assigning to dot within a section.
   4522 	* script-sections.cc
   4523 	(Output_section_element_assignment::set_section_addresses): Pass
   4524 	dot_section to set_if_absolute.
   4525 	(Output_section_element_dot_assignment::finalize_symbols): Pass TRUE
   4526 	as is_section_dot_assignment flag to eval_with_dot.
   4527 	(Output_section_element_dot_assignment::set_section_addresses):
   4528 	Likewise.
   4529 	* script.cc (Symbol_assignment::set_if_absolute): Add dot_section
   4530 	parameter.  Also set value if relative to dot_section; set the
   4531 	symbol's output_section.
   4532 	* script.h (Expression::eval_with_dot): Add is_section_dot_assignment
   4533 	parameter.  Adjust all callers.
   4534 	(Expression::eval_maybe_dot): Likewise.
   4535 	(Symbol_assignment::set_if_absolute): Add dot_section parameter.
   4536 	Adjust all callers.
   4537 	* testsuite/script_test_2.t: Test assignment of an absolute value
   4538 	to dot within an output section element.
   4539 
   4540 2011-10-31  Cary Coutant  <ccoutant (a] google.com>
   4541 
   4542 	* options.h (class General_options): Add --[no-]gnu-unique options.
   4543 	* symtab.cc (Symbol_table::sized_write_globals): Convert
   4544 	STB_GNU_UNIQUE to STB_GLOBAL if --no-gnu-unique.
   4545 
   4546 2011-10-31  Cary Coutant  <ccoutant (a] google.com>
   4547 
   4548 	PR gold/13359
   4549 	* i386.cc (Target_i386::Relocate::relocate_tls): Remove
   4550 	unnecessary assertion.
   4551 	* x86_64.cc (Target_x86_64::Relocate::relocate_tls): Likewise.
   4552 
   4553 2011-10-31 Sriraman Tallam  <tmsriram (a] google.com>
   4554 
   4555 	* symtab.h (Symbol_table::gc_mark_symbol_for_shlib): Rename to
   4556 	gc_mark_symbol.
   4557 	* symtab.cc (Symbol_table::gc_mark_symbol_for_shlib): Rename to
   4558 	gc_mark_symbol.
   4559 	Change to just keep the section associated with symbol.
   4560 	(Symbol_table::add_from_relobj): Mark symbols as not garbage when
   4561 	they are externally visible and --export-dynamic is turned on.
   4562 	(Symbol_table::gc_mark_dyn_syms): Call gc_mark_symbol.
   4563 
   4564 2011-10-19  Ian Lance Taylor  <iant (a] google.com>
   4565 
   4566 	PR gold/13163
   4567 	* script-sections.cc
   4568 	(Output_section_element_dot_assignment::needs_output_section): New
   4569 	function.
   4570 
   4571 2011-10-19  Ian Lance Taylor  <iant (a] google.com>
   4572 
   4573 	PR gold/13204
   4574 	* layout.cc (Layout::segment_precedes): Don't assert failure if a
   4575 	--section-start option was seen.
   4576 	* options.h (General_options::any_section_start): New function.
   4577 
   4578 2011-10-18  David S. Miller  <davem (a] davemloft.net>
   4579 
   4580 	PR binutils/13301
   4581 	* sparc.cc (Target_sparc::Relocate::reloc_adjust_addr_): New
   4582 	member to track relocation locations that have moved during TLS
   4583 	reloc optimizations.
   4584 	(Target_sparc::Relocate::Relocate): Initialize to NULL.
   4585 	(Target_sparc::Relocate::relocate): Adjust view down by 4
   4586 	bytes if it matches reloc_adjust_addr_.
   4587 	(Target_sparc::Relocate::relocate_tls): Always move the
   4588 	__tls_get_addr call delay slot instruction forward 4 bytes when
   4589 	performing relaxation.
   4590 
   4591 2011-10-18  Cary Coutant  <ccoutant (a] google.com>
   4592 
   4593 	* output.cc (posix_fallocate): Return 0 on success, errno on failure.
   4594 	(Output_file::map_no_anonymous): Check for non-zero
   4595 	return code from posix_fallocate.
   4596 
   4597 2011-10-17  Cary Coutant  <ccoutant (a] google.com>
   4598 
   4599 	PR gold/13245
   4600 	* plugin.cc (is_visible_from_outside): Check for symbols
   4601 	referenced from dynamic objects.
   4602 	* resolve.cc (Symbol_table::resolve): Don't count references
   4603 	from dynamic objects as references from real ELF files.
   4604 	* testsuite/plugin_test_2.sh: Adjust expected result.
   4605 
   4606 2011-10-17  Cary Coutant  <ccoutant (a] google.com>
   4607 
   4608 	* gold.cc: Include timer.h.
   4609 	(queue_middle_tasks): Stamp time.
   4610 	(queue_final_tasks): Likewise.
   4611 	* main.cc (main): Store timer in parameters.  Print timers
   4612 	for each pass.
   4613 	* parameters.cc (Parameters::Parameters): Initialize timer_.
   4614 	(Parameters::set_timer): New function.
   4615 	(set_parameters_timer): New function.
   4616 	* parameters.h (Parameters::set_timer): New function.
   4617 	(Parameters::timer): New function.
   4618 	(Parameters::timer_): New data member.
   4619 	(set_parameters_timer): New function.
   4620 	* timer.cc (Timer::stamp): New function.
   4621 	(Timer::get_pass_time): New function.
   4622 	* timer.h (Timer::stamp): New function.
   4623 	(Timer::get_pass_time): New function.
   4624 	(Timer::pass_times_): New data member.
   4625 
   4626 2011-10-17  Cary Coutant  <ccoutant (a] google.com>
   4627 
   4628 	* readsyms.cc (Read_symbols::run): Don't queue an unblocker
   4629 	task for members of lib groups.
   4630 
   4631 2011-10-17  Cary Coutant  <ccoutant (a] google.com>
   4632 
   4633 	PR gold/13288
   4634 	* fileread.cc (File_read::find_view): Add assert.
   4635 	(File_read::make_view): Move bounds check (replace with assert)...
   4636 	(File_read::find_or_make_view): ... to here.
   4637 
   4638 2011-10-12  Cary Coutant  <ccoutant (a] google.com>
   4639 
   4640 	* output.cc (Output_file::open_base_file): Handle case where
   4641 	::read returns less than requested size.
   4642 
   4643 2011-10-10  Cary Coutant  <ccoutant (a] google.com>
   4644 
   4645 	* incremental.cc (Sized_relobj_incr::Sized_relobj_incr):
   4646 	Initialize defined_count_.
   4647 	(Sized_relobj_incr::do_add_symbols): Count defined symbols.
   4648 	(Sized_relobj_incr::do_get_global_symbol_counts): Rewrite.
   4649 	(Sized_incr_dynobj::Sized_incr_dynobj): Initialize defined_count_.
   4650 	(Sized_incr_dynobj::do_add_symbols): Count defined symbols.
   4651 	(Sized_incr_dynobj::do_get_global_symbol_counts): Rewrite.
   4652 	* incremental.h (Sized_relobj_incr::defined_count_): New data
   4653 	member.
   4654 	(Sized_incr_dynobj::defined_count_): New data member.
   4655 	* plugin.cc (Sized_pluginobj::do_get_global_symbol_counts):
   4656 	Return zeroes instead of internal error.
   4657 
   4658 2011-10-10  Cary Coutant  <ccoutant (a] google.com>
   4659 
   4660 	PR gold/13249
   4661 	* output.cc (Output_reloc::Output_reloc): Add use_plt_offset flag.
   4662 	(Output_reloc::symbol_value): Return PLT offset if flag is set.
   4663 	* output.h (class Output_reloc): Add use_plt_offset flag.
   4664 	(Output_reloc::type_): Adjust size of bit field.
   4665 	(Output_reloc::use_plt_offset_): New bit field.
   4666 	(class Output_data_reloc): Adjust all calls to Output_reloc_type.
   4667 	(Output_data_reloc::add_local_relative): (RELA only) Add use_plt_offset
   4668 	flag.  Adjust all callers.
   4669 	* x86_64.cc (Target_x86_64::Scan::local): Check for IFUNC when
   4670 	creating RELATIVE relocations.
   4671 
   4672 2011-10-10  Nick Clifton  <nickc (a] redhat.com>
   4673 
   4674 	* po/es.po: Updated Spanish translation.
   4675 	* po/fi.po: Updated Finnish translation.
   4676 
   4677 2011-10-03   Diego Novillo  <dnovillo (a] google.com>
   4678 
   4679 	* options.cc (parse_uint): Fix dereference of RETVAL.
   4680 
   4681 2011-09-29  Sriraman Tallam  <tmsriram (a] google.com>
   4682 
   4683 	* layout.h (section_order_map_): New member.
   4684 	(get_section_order_map): New member function.
   4685 	* output.cc (Output_section::add_input_section): Check for patterns
   4686 	only when --section-ordering-file is specified.
   4687 	* gold.cc (queue_middle_tasks): Delay updating order of sections till
   4688 	output_sections have been formed.
   4689 	* layout.cc (Layout_Layout): Initialize section_order_map_.
   4690 	* plugin.cc (update_section_order): Store order in order_map. Do not
   4691 	update the order.
   4692 	* testsuite/Makefile.am: Add test case for plugin_final_layout.
   4693 	* testsuite/Makefile.in: Regenerate.
   4694 	* testsuite/plugin_section_order.c: New file.
   4695 	* testsuite/plugin_final_layout.cc: New file.
   4696 	* testsuite/plugin_final_layout.sh: New file.
   4697 
   4698 2011-09-29  Cary Coutant  <ccoutant (a] google.com>
   4699 
   4700 	* incremental.cc (Sized_incremental_binary::do_process_got_plt):
   4701 	Check for NULL.
   4702 	* symtab.cc (Symbol_table::add_from_relobj): Ignore version
   4703 	symbols during incremental update.
   4704 	(Symbol_table::add_from_dynobj): Likewise.
   4705 
   4706 2011-09-27  Viktor Kutuzov  <vkutuzov (a] accesssoftek.com>
   4707 	    Ian Lance Taylor  <iant (a] google.com>
   4708 
   4709 	* symtab.cc (Symbol_table::define_special_symbol): Always
   4710 	canonicalize version string.
   4711 
   4712 2011-09-26  Cary Coutant  <ccoutant (a] google.com>
   4713 
   4714 	* gold.cc (queue_initial_tasks): Move option checks ...
   4715 	* options.cc (General_options::finalize): ... to here. Disable
   4716 	some options; make others fatal.
   4717 
   4718 2011-09-26  Cary Coutant  <ccoutant (a] google.com>
   4719 
   4720 	gcc PR lto/47247
   4721 	* plugin.cc (get_symbols_v2): New function.
   4722 	(Plugin::load): Add LDPT_GET_SYMBOLS_V2.
   4723 	(is_referenced_from_outside): New function.
   4724 	(Pluginobj::get_symbol_resolution_info): Add version parameter, return
   4725 	LDPR_PREVAILING_DEF_IRONLY_EXP when using new version.
   4726 	(get_symbols): Pass version parameter.
   4727 	(get_symbols_v2): New function.
   4728 	* plugin.h (Pluginobj::get_symbol_resolution_info): Add version
   4729 	parameter.
   4730 	* testsuite/plugin_test.c (get_symbols_v2): New static variable.
   4731 	(onload): Add LDPT_GET_SYMBOLS_V2.
   4732 	(all_symbols_read_hook): Use get_symbols_v2; check for
   4733 	LDPR_PREVAILING_DEF_IRONLY_EXP.
   4734 	* testsuite/plugin_test_3.sh: Update expected results.
   4735 
   4736 2011-09-23  Simon Baldwin  <simonb (a] google.com>
   4737 
   4738 	* configure.ac: Add new --with-gold-ldadd and --with-gold-ldflags
   4739 	configuration options.
   4740 	* configure: Regenerate.
   4741 	* Makefile.am: Handle GOLD_LDADD and GOLD_LDFLAGS.
   4742 	* Makefile.in: Regenerate.
   4743 	* testsuite/Makefile.in: Regenerate.
   4744 
   4745 2011-09-19  Sriraman Tallam  <tmsriram (a] google.com>
   4746 
   4747 	* plugin.h (should_defer_layout): Modify to check for any_claimed_.
   4748 
   4749 2011-09-19  Cary Coutant  <ccoutant (a] google.com>
   4750 
   4751 	* incremental.cc (can_incremental_update): Fix typo in comment.
   4752 	* incremental.h (can_incremental_update): Likewise.
   4753 
   4754 2011-09-18  Cary Coutant  <ccoutant (a] google.com>
   4755 
   4756 	* incremental.cc (can_incremental_update): New function.
   4757 	* incremental.h (can_incremental_update): New function.
   4758 	* layout.cc (Layout::init_fixed_output_section): Call it.
   4759 	(Layout::make_output_section): Don't allow patch space in .eh_frame.
   4760 	* object.cc (Sized_relobj_file::do_layout): Call
   4761 	can_incremental_update.
   4762 
   4763 2011-09-13  Cary Coutant  <ccoutant (a] google.com>
   4764 
   4765 	* configure.ac: Check for glibc support for gnu_indirect_function
   4766 	support with static linking, setting automake conditional
   4767 	IFUNC_STATIC.
   4768 	* Makefile.in: Regenerate.
   4769 	* configure: Regenerate.
   4770 
   4771 	* testsuite/Makefile.am (ifuncmain1static, ifuncmain2static)
   4772 	(ifuncmain4static, ifuncmain5static, ifuncmain7static): Add check
   4773 	for IFUNC_STATIC.
   4774 	* testsuite/Makefile.in: Regenerate.
   4775 
   4776 2011-09-13  Cary Coutant  <ccoutant (a] google.com>
   4777 
   4778 	* incremental.cc (Sized_relobj_incr::do_layout): Call
   4779 	report_comdat_group for kept comdat sections.
   4780 	* testsuite/Makefile.am (incremental_comdat_test_1): New test.
   4781 	* testsuite/Makefile.in: Regenerate.
   4782 	* testsuite/incr_comdat_test_1.cc: New source file.
   4783 	* testsuite/incr_comdat_test_2_v1.cc: New source file.
   4784 	* testsuite/incr_comdat_test_2_v2.cc: New source file.
   4785 	* testsuite/incr_comdat_test_2_v3.cc: New source file.
   4786 
   4787 2011-09-13  Ian Lance Taylor  <iant (a] google.com>
   4788 
   4789 	* object.cc (Sized_relobj_file::do_layout): Remove unused local
   4790 	variable external_symbols_offset.
   4791 
   4792 2011-09-12  Ian Lance Taylor  <iant (a] google.com>
   4793 
   4794 	* object.cc (Sized_relobj_file::do_layout): Remove assertion which
   4795 	triggered if object has no symbols.
   4796 
   4797 2011-09-09  David S. Miller  <davem (a] davemloft.net>
   4798 
   4799 	* output.cc (Output_fill_debug_info::do_write): Use Swap_unaligned.
   4800 	(Output_fill_debug_line::do_write): Likewise.
   4801 
   4802 2011-08-29  Cary Coutant  <ccoutant (a] google.com>
   4803 
   4804 	* output.cc: (Output_fill_debug_info::do_minimum_hole_size): Add
   4805 	casts to match formatting specs.
   4806 	(Output_fill_debug_line::do_minimum_hole_size): Likewise.
   4807 
   4808 2011-08-26  Cary Coutant  <ccoutant (a] google.com>
   4809 
   4810 	* layout.cc (Free_list::allocate): Provide guarantee of minimum
   4811 	remaining hole size when allocating.
   4812 	(Layout::make_output_section): Set fill methods for debug sections.
   4813 	* layout.h (Free_list::Free_list_node): Move from private to
   4814 	public.
   4815 	(Free_list::set_min_hole_size): New function.
   4816 	(Free_list::begin, Free_list::end): New functions.
   4817 	(Free_list::min_hole_): New data member.
   4818 	* output.cc: Include dwarf.h.
   4819 	(Output_fill_debug_info::do_minimum_hole_size): New function.
   4820 	(Output_fill_debug_info::do_write): New function.
   4821 	(Output_fill_debug_line::do_minimum_hole_size): New function.
   4822 	(Output_fill_debug_line::do_write): New function.
   4823 	(Output_section::Output_section): Initialize new data member.
   4824 	(Output_section::set_final_data_size): Ensure patch space is larger
   4825 	than minimum hole size.
   4826 	(Output_section::do_write): Fill holes in debug sections.
   4827 	* output.h (Output_fill): New class.
   4828 	(Output_fill_debug_info): New class.
   4829 	(Output_fill_debug_line): New class.
   4830 	(Output_section::set_free_space_fill): New function.
   4831 	(Output_section::free_space_fill_): New data member.
   4832 	* testsuite/Makefile.am (incremental_test_3): Add
   4833 	--incremental-patch option.
   4834 	(incremental_test_4): Likewise.
   4835 	(incremental_test_5): Likewise.
   4836 	(incremental_test_6): Likewise.
   4837 	(incremental_copy_test): Likewise.
   4838 	(incremental_common_test_1): Likewise.
   4839 	* testsuite/Makefile.in: Regenerate.
   4840 
   4841 2011-08-26  Nick Clifton  <nickc (a] redhat.com>
   4842 
   4843 	* po/es.po: Updated Spanish translation.
   4844 
   4845 2011-08-01  Cary Coutant  <ccoutant (a] google.com>
   4846 
   4847 	* gold/testsuite/Makefile.am (justsyms_exec): New testcase.
   4848 	* gold/testsuite/Makefile.in: Regenerate.
   4849 	* gold/testsuite/justsyms_exec.c: New source file.
   4850 	* gold/testsuite/justsyms_lib.c: New source file.
   4851 
   4852 2011-08-01  Cary Coutant  <ccoutant (a] google.com>
   4853 
   4854 	* layout.cc (Layout::set_segment_offsets): Don't realign text
   4855 	segment if -Ttext was specified.
   4856 	* object.cc (Sized_relobj_file::Sized_relobj_file): Store the ELF
   4857 	file type.
   4858 	* object.h (Sized_relobj_file::e_type): New function.
   4859 	(Sized_relobj_file::e_type_): New data member.
   4860 	* symtab.cc (Symbol_table::add_from_relobj): Don't add section
   4861 	base address for ET_EXEC files.
   4862 	* target.cc (Target::do_make_elf_object_implementation): Allow
   4863 	ET_EXEC files with --just-symbols option.
   4864 
   4865 2011-07-28  Cary Coutant  <ccoutant (a] google.com>
   4866 
   4867 	* workqueue-internal.h (Workqueue_threader::should_cancel_thread):
   4868 	Add thread_number parameter.
   4869 	(Workqueue_threader_threadpool::should_cancel_thread): Likewise.
   4870 	* workqueue-threads.cc
   4871 	(Workqueue_threader_threadpool::should_cancel_thread): Cancel
   4872 	current thread if its thread number is greater than desired thread
   4873 	count.
   4874 	* workqueue.cc (Workqueue_threader_single::should_cancel_thread):
   4875 	Add thread_number parameter.
   4876 	(Workqueue::should_cancel_thread): Likewise.
   4877 	(Workqueue::find_runnable_or_wait): Pass thread_number to
   4878 	should_cancel_thread.
   4879 	* workqueue.h (Workqueue::should_cancel_thread): Add thread_number
   4880 	parameter.
   4881 
   4882 2011-07-22  Sriraman Tallam  <tmsriram (a] google.com>
   4883 
   4884 	* symtab.cc (Symbol_table::add_from_relobj): Mark symbol as referenced
   4885 	only after checking if it cannot be forced local.
   4886 	* symtab.h (is_externally_visible): Check if the symbol is not forced
   4887 	local.
   4888 
   4889 2011-07-15  Ian Lance Taylor  <iant (a] google.com>
   4890 
   4891 	* options.h (class General_options): Add --print-output-format.
   4892 	Move -EL next to -EB, for  better --help output.
   4893 	* target-select.cc: Include <cstdio>, "options.h", and
   4894 	"parameters.h".
   4895 	(Target_selector::do_target_bfd_name): New function.
   4896 	(print_output_format): New function.
   4897 	* target-select.h (class Target_selector): Update declarations.
   4898 	(Target_selector::target_bfd_name): New function.
   4899 	(print_output_format): Declare.
   4900 	* main.cc: Include "target-select.h".
   4901 	(main): Handle --print-output-format.
   4902 	* gold.cc: Include "target-select.h".
   4903 	(queue_initial_tasks): Handle --print-output-format when there are
   4904 	no input files.
   4905 	* parameters.cc (parameters_force_valid_target): Give a better
   4906 	error message if -EB/-EL does not match target.
   4907 	* freebsd.h (Target_selector_freebsd::do_target_bfd_name): New
   4908 	function.
   4909 
   4910 2011-07-15  Ian Lance Taylor  <iant (a] google.com>
   4911 
   4912 	* i386.cc (class Output_data_plt_i386): Add layout_ field.
   4913 	(Output_data_plt_i386::Output_data_plt_i386): Initialize layout_.
   4914 	(Output_data_plt_i386::do_write): Write address of .dynamic
   4915 	section to first entry in .got.plt section.
   4916 	* x86_64.cc (class Output_data_plt_x86_64): Add layout_ field.
   4917 	(Output_data_plt_x86_64::Output_data_plt_x86_64) [both versions]:
   4918 	Initialize layout_.
   4919 	(Output_data_plt_x86_64::do_write): Write address of .dynamic
   4920 	section to first entry in .got.plt section.
   4921 	* layout.h (Layout::dynamic_section): New function.
   4922 
   4923 2011-07-13  Sriraman Tallam  <tmsriram (a] google.com>
   4924 
   4925 	* archive.cc (Archive::get_elf_object_for_member): Add extra parameter
   4926 	to claim_file call.
   4927 	* layout.cc (Layout::Layout): Initialize section_ordering_specified_,
   4928 	input_section_position_, and input_section_glob_.
   4929 	(read_layout_from_file): Call function section_ordering_specified.
   4930 	* layout.h (is_section_ordering_specified): New function.
   4931 	(section_ordering_specified): New function.
   4932 	(section_ordering_specified_): New boolean member.
   4933 	* main.cc(main): Call load_plugins after layout object is defined.
   4934 	* output.cc (Output_section::add_input_section): Use
   4935 	function section_ordering_specified to check if section ordering is
   4936 	needed.
   4937 	* output.cc (Output_section::add_relaxed_input_section): Use
   4938 	function section_ordering_specified to check if section ordering is
   4939 	needed.
   4940 	(Output_section::update_section_layout): New function.
   4941 	(Output_section::sort_attached_input_sections): Check if input section
   4942 	must be reordered.
   4943 	* output.h (Output_section::update_section_layout): New function.
   4944 	* plugin.cc (get_section_count): New function.
   4945 	(get_section_type): New function.
   4946 	(get_section_name): New function.
   4947 	(get_section_contents): New function.
   4948 	(update_section_order): New function.
   4949 	(allow_section_ordering): New function.
   4950 	(Plugin::load): Add the new interfaces to the transfer vector.
   4951 	(Plugin_manager::load_plugins): New parameter.
   4952 	(Plugin_manager::all_symbols_read): New parameter.
   4953 	(Plugin_manager::claim_file): New parameter. Save the elf object for
   4954 	unclaimed objects.
   4955 	(Plugin_manager::get_elf_object): New function.
   4956 	(Plugin_manager::get_view): Change to directly use the bool to check
   4957 	if get_view is called from claim_file_hook.
   4958 	* plugin.h (input_objects): New function
   4959 	(Plugin__manager::load_plugins): New parameter.
   4960 	(Plugin_manager::claim_file): New parameter.
   4961 	(Plugin_manager::get_elf_object): New function.
   4962 	(Plugin_manager::in_claim_file_handler): New function.
   4963 	(Plugin_manager::in_claim_file_handler_): New member.
   4964 	(layout): New function.
   4965 	* readsyms.cc (Read_symbols::do_read_symbols): Call the claim_file
   4966 	handler with an extra parameter. Make the elf object before calling
   4967 	claim_file handler.
   4968 	* testsuite/plugin_test.c (get_section_count): New function pointer.
   4969 	(get_section_type): New function pointer.
   4970 	(get_section_name): New function pointer.
   4971 	(get_section_contents): New function pointer.
   4972 	(update_section_order): New function pointer.
   4973 	(allow_section_ordering): New function pointer.
   4974 	(onload): Check if the new interfaces exist.
   4975 
   4976 2011-07-13  Ian Lance Taylor  <iant (a] google.com>
   4977 
   4978 	* i386.cc (Target_i386::got_section): If -z now, make .got.plt a
   4979 	relro section.
   4980 	* x86_64.cc (Target_x86_64::got_section): Likewise.
   4981 	* testsuite/Makefile.am (check_PROGRAMS): Add relro_now_test.
   4982 	(relro_now_test_SOURCES): New variable.
   4983 	(relro_now_test_DEPENDENCIES): New variable.
   4984 	(relro_now_test_LDFLAGS): New variable.
   4985 	(relro_now_test_LDADD): New variable.
   4986 	(relro_now_test.so): New target.
   4987 	* testsuite/Makefile.in: Rebuild.
   4988 
   4989 2011-07-12  Ian Lance Taylor  <iant (a] google.com>
   4990 
   4991 	PR gold/12980
   4992 	* i386.cc (Target_i386::Scan::global): For a GOT reloc, use a
   4993 	GLOB_DAT relocation rather than a RELATIVE relocation for a
   4994 	protected symbol when creating a shared library.
   4995 	* x86_64.cc (Target_x86_64::Scan::global): Likewise.
   4996 	* testsuite/protected_1.cc (f2, get_f2_addr): New functions.
   4997 	* testsuite/protected_main_1.cc (main): Test that protected
   4998 	function has same address.
   4999 
   5000 2011-07-11  Ian Lance Taylor  <iant (a] google.com>
   5001 
   5002 	PR gold/12979
   5003 	* options.h (class General_options): Add -Bgroup.
   5004 	* options.cc (General_options::finalize): If -Bgroup is set,
   5005 	default to --unresolved-symbols=report-all.
   5006 	* layout.cc (Layout::finish_dynamic_section): Implement -Bgroup.
   5007 	* target-reloc.h (issue_undefined_symbol_error): Handle
   5008 	--unresolved-symbols=report-all.
   5009 
   5010 2011-07-08  Ian Lance Taylor  <iant (a] google.com>
   5011 
   5012 	PR gold/11985
   5013 	* layout.cc (Layout::create_initial_dynamic_sections): Don't crash
   5014 	if linker script discards key sections.
   5015 	(Layout::create_dynamic_symtab): Likewise.
   5016 	(Layout::assign_local_dynsym_offsets): Likewise.
   5017 	(Layout::sized_create_version_sections): Likewise.
   5018 	(Layout::create_interp): Likewise.
   5019 	(Layout::finish_dynamic_section): Likewise.
   5020 	(Layout::set_dynamic_symbol_size): Likewise.
   5021 
   5022 2011-07-08  Ian Lance Taylor  <iant (a] google.com>
   5023 
   5024 	PR gold/12386
   5025 	* options.h (class General_options): Add --unresolved-symbols.
   5026 	* target-reloc.h (issue_undefined_symbol_error): Check
   5027 	--unresolved-symbols.  Add comments.
   5028 
   5029 2011-07-08  Ian Lance Taylor  <iant (a] google.com>
   5030 
   5031 	* testsuite/odr_violation2.cc (Ordering::operator()): Make
   5032 	expression more complex.
   5033 
   5034 2011-07-08  Ian Lance Taylor  <iant (a] google.com>
   5035 
   5036 	PR gold/11317
   5037 	* target-reloc.h (issue_undefined_symbol_error): New inline
   5038 	function, broken out of relocate_section.
   5039 	(relocate_section): Call issue_undefined_symbol_error.
   5040 	* i386.cc (Target_i386::Relocate::relocate_tls): Don't crash if
   5041 	there is no TLS segment if we are about to issue an undefined
   5042 	symbol error.
   5043 	* x86_64.cc (Target_x86_64::relocate_tls): Likewise.
   5044 
   5045 2011-07-08  Ian Lance Taylor  <iant (a] google.com>
   5046 
   5047 	PR gold/12279
   5048 	* resolve.cc (Symbol_table::should_override): Add fromtype
   5049 	parameter.  Change all callers.  Give error when linking together
   5050 	TLS and non-TLS symbol.
   5051 	(Symbol_table::should_override_with_special): Add fromtype
   5052 	parameter.  Change all callers.
   5053 	* i386.cc (Target_i386::Relocate::relocate_tls): Don't crash if
   5054 	there is no TLS segment if we have reported some errors.
   5055 	* x86_64.cc (Target_x86_64::relocate_tls): Likewise.
   5056 
   5057 2011-07-08  Ian Lance Taylor  <iant (a] google.com>
   5058 
   5059 	PR gold/12372
   5060 	* target.h (Target::plt_address_for_global): New function.
   5061 	(Target::plt_address_for_local): New function.
   5062 	(Target::plt_section_for_global): Remove.
   5063 	(Target::plt_section_for_local): Remove.
   5064 	(Target::do_plt_address_for_global): New virtual function.
   5065 	(Target::do_plt_address_for_local): New virtual function.
   5066 	(Target::do_plt_section_for_global): Remove.
   5067 	(Target::do_plt_section_for_local): Remove.
   5068 	(Target::register_global_plt_entry): Add Symbol_table and Layout
   5069 	parameters.
   5070 	* output.cc (Output_data_got::Got_entry::write): Use
   5071 	plt_address_for_global and plt_address_for_local.
   5072 	* layout.cc (Layout::add_target_dynamic_tags): Use size and
   5073 	address of output section.
   5074 	* i386.cc (class Output_data_plt_i386): Add irelative_rel_,
   5075 	got_irelative_, and irelative_count_ fields.  Update
   5076 	declarations.
   5077 	(Output_data_plt_i386::has_irelative_section): New function.
   5078 	(Output_data_plt_i386::entry_count): Add irelative_count_.
   5079 	(Output_data_plt_i386::set_final_data_size): Likewise.
   5080 	(class Target_i386): Add got_irelative_ and rel_irelative_
   5081 	fields.  Update declarations.
   5082 	(Target_i386::Target_i386): Initialize new fields.
   5083 	(Target_i386::do_plt_address_for_global): New function replacing
   5084 	do_plt_section_for_global.
   5085 	(Target_i386::do_plt_address_for_local): New function replacing
   5086 	do_plt_section_for_local.
   5087 	(Target_i386::got_section): Create got_irelative_.
   5088 	(Target_i386::rel_irelative_section): New function.
   5089 	(Output_data_plt_i386::Output_data_plt_i386): Initialize new
   5090 	fields.  Don't define __rel_iplt_{start,end}.
   5091 	(Output_data_plt_i386::add_entry): Add symtab and layout
   5092 	parameters.  Change all callers.  Use different PLT and GOT for
   5093 	IFUNC symbols.
   5094 	(Output_data_plt_i386::add_local_ifunc_entry): Add symtab and
   5095 	layout parameters.  Change all callers.  Use different PLT and
   5096 	GOT.
   5097 	(Output_data_plt_i386::rel_tls_desc): Fix formatting.
   5098 	(Output_data_plt_i386::rel_irelative): New function.
   5099 	(Output_data_plt_i386::address_for_global): New function.
   5100 	(Output_data_plt_i386::address_for_local): New function.
   5101 	(Output_data_plt_i386::do_write): Write out IRELATIVE area.  Use
   5102 	IRELATIVE GOT when changing IFUNC GOT entries.
   5103 	(Target_i386::Scan::global): Use IRELATIVE GOT for IRELATIVE
   5104 	reloc.
   5105 	(Target_i386::do_finalize_sections): Create the __rel_iplt symbols
   5106 	if we didn't create an IRELATIVE GOT.
   5107 	(Target_i386::Relocate::relocate): Use plt_address_for_global and
   5108 	plt_address_for_local.
   5109 	(Target_i386::do_dynsym_value): Use plt_address_for_global.
   5110 	* x86_64.cc (class Output_data_plt_x86_64): Add irelative_rel_,
   5111 	got_irelative_, and irelative_count_ fields.  Update
   5112 	declarations.
   5113 	(Output_data_plt_x86_64::Output_data_plt_x86_64) [both versions]:
   5114 	Initialize new fields.  Remove symtab parameter.  Change all
   5115 	callers.
   5116 	(Output_data_plt_x86_64::get_tlsdesc_plt_offset): Add
   5117 	irelative_count_.
   5118 	(Output_data_plt_x86_64::has_irelative_section): New function.
   5119 	(Output_data_plt_x86_64::entry_count): Add irelative_count_.
   5120 	(class Target_x86_64): Add got_irelative_ and rel_irelative_
   5121 	fields.  Update declarations.
   5122 	(Target_x86_64::Target_x86_64): Initialize new fields.
   5123 	(Target_x86_64::do_plt_address_for_global): New function replacing
   5124 	do_plt_section_for_global.
   5125 	(Target_x86_64::do_plt_address_for_local): New function replacing
   5126 	do_plt_section_for_local.
   5127 	(Target_x86_64::got_section): Create got_irelative_.
   5128 	(Target_x86_64::rela_irelative_section): New function.
   5129 	(Output_data_plt_x86_64::init): Remove symtab parameter.  Change
   5130 	all callers.  Don't create __rel_iplt_{start,end}.
   5131 	(Output_data_plt_x86_64::add_entry): Add symtab and layout
   5132 	parameters.  Change all callers.  Use different PLT and GOT for
   5133 	IFUNC symbols.
   5134 	(Output_data_plt_x86_64::add_local_ifunc_entry): Add symtab and
   5135 	layout parameters.  Change all callers.  Use different PLT and
   5136 	GOT.
   5137 	(Output_data_plt_x86_64::add_relocation): Add symtab and layout
   5138 	parameters.  Change all callers.  Use different PLT and GOT for
   5139 	IFUNC symbols.
   5140 	(Output_data_plt_x86_64::rela_tlsdesc): Fix formatting.
   5141 	(Output_data_plt_x86_64::rela_irelative): New function.
   5142 	(Output_data_plt_x86_64::address_for_global): New function.
   5143 	(Output_data_plt_x86_64::address_for_local): New function.
   5144 	(Output_data_plt_x86_64::set_final_data_size): Likewise.
   5145 	(Output_data_plt_x86_64::do_write): Write out IRELATIVE area.
   5146 	(Target_x86_64::init_got_plt_for_update): Create got_irelative_.
   5147 	(Target_x86_64::register_global_plt_entry): Add symtab and layout
   5148 	parameters.
   5149 	(Target_x86_64::Scan::global): Use IRELATIVE GOT for IRELATIVE
   5150 	reloc.
   5151 	(Target_x86_64::do_finalize_sections): Create the __rela_iplt
   5152 	symbols if we didn't create an IRELATIVE GOT.
   5153 	(Target_x86_64::Relocate::relocate): Use plt_address_for_global and
   5154 	plt_address_for_local.
   5155 	(Target_x86_64::do_dynsym_value): Use plt_address_for_global.
   5156 	* testsuite/ifuncvar1.c: New test file.
   5157 	* testsuite/ifuncvar2.c: New test file.
   5158 	* testsuite/ifuncvar3.c: New test file.
   5159 	* testsuite/Makefile.am (check_PROGRAMS): Add ifuncvar.
   5160 	(ifuncvar1_pic.o, ifuncvar2_pic.o, ifuncvar.so): New targets.
   5161 	(ifuncvar_SOURCES, ifuncvar_DEPENDENCIES): New variables.
   5162 	(ifuncvar_LDFLAGS, ifuncvar_LDADD): New variables.
   5163 	* testsuite/Makefile.in: Rebuild.
   5164 
   5165 2011-07-07  Cary Coutant  <ccoutant (a] google.com>
   5166 
   5167 	* testsuite/Makefile.am (two_file_test_1_v1_ndebug.o): New target.
   5168 	(two_file_test_1_ndebug.o): Likewise.
   5169 	(two_file_test_1b_ndebug.o): Likewise.
   5170 	(two_file_test_2_ndebug.o): Likewise.
   5171 	(two_file_test_main_ndebug.o): Likewise.
   5172 	(incremental_test_2): Link with no-debug versions.
   5173 
   5174 2011-07-06  Cary Coutant  <ccoutant (a] google.com>
   5175 
   5176 	* gold/incremental.cc
   5177 	(Output_section_incremental_inputs::write_info_blocks): Check for
   5178 	hidden and internal symbols.
   5179 
   5180 2011-07-06  Cary Coutant  <ccoutant (a] google.com>
   5181 
   5182 	* incremental.cc (Sized_incremental_binary::do_file_has_changed):
   5183 	Check disposition for startup file.
   5184 	(Incremental_inputs::report_command_line): Ignore
   5185 	--incremental-startup-unchanged option.
   5186 	* options.cc (General_options::parse_incremental_startup_unchanged):
   5187 	New function.
   5188 	(General_options::General_options): Initialize new data member.
   5189 	* options.h (Incremental_disposition): Add INCREMENTAL_STARTUP.
   5190 	(General_options): Add --incremental-startup-unchanged option.
   5191 	(General_options::incremental_startup_disposition): New function.
   5192 	(General_options::incremental_startup_disposition_): New data member.
   5193 
   5194 2011-07-06  Cary Coutant  <ccoutant (a] google.com>
   5195 
   5196 	* incremental.cc (Sized_incremental_binary::setup_readers): Pass
   5197 	input file index to Script_info ctor.
   5198 	(Sized_incremental_binary::do_file_has_changed): Find the
   5199 	command-line argument for files named in scripts.
   5200 	* incremental.h (Script_info::Script_info): New ctor
   5201 	with input file index.
   5202 	(Script_info::input_file_index): New function.
   5203 	(Script_info::input_file_index_): New data member.
   5204 	(Incremental_binary::get_library): Add const.
   5205 	(Incremental_binary::get_script_info): Add const.
   5206 	* readsyms.cc (Read_member::is_runnable): Check for this_blocker_.
   5207 	* testsuite/Makefile.am (incremental_test_5): New test case.
   5208 	(incremental_test_6): New test case.
   5209 	* testsuite/Makefile.in: Regenerate.
   5210 
   5211 2011-07-06  Cary Coutant  <ccoutant (a] google.com>
   5212 
   5213 	* incremental.cc (Sized_incremental_binary::do_check_inputs): Add
   5214 	debug output when command lines differ.
   5215 
   5216 2011-07-06  Cary Coutant  <ccoutant (a] google.com>
   5217 
   5218 	* incremental.cc (Incremental_inputs::report_command_line): Ignore
   5219 	--incremental-patch option.
   5220 	* layout.cc (Free_list::allocate): Extend allocation beyond original
   5221 	end if enabled.
   5222 	(Layout::make_output_section): Mark sections that should get
   5223 	patch space.
   5224 	* options.cc (parse_percent): New function.
   5225 	* options.h (parse_percent): New function.
   5226 	(DEFINE_percent): New macro.
   5227 	(General_options): Add --incremental-patch option.
   5228 	* output.cc (Output_section::Output_section): Initialize new data
   5229 	members.
   5230 	(Output_section::add_input_section): Print section name when out
   5231 	of patch space.
   5232 	(Output_section::add_output_section_data): Likewise.
   5233 	(Output_section::set_final_data_size): Add patch space when
   5234 	doing --incremental-full.
   5235 	(Output_section::do_reset_address_and_file_offset): Remove patch
   5236 	space.
   5237 	(Output_segment::set_section_list_addresses): Print debug output
   5238 	only if --incremental-update.
   5239 	* output.h (Output_section::set_is_patch_space_allowed): New function.
   5240 	(Output_section::is_patch_space_allowed_): New data member.
   5241 	(Output_section::patch_space_): New data member.
   5242 	* parameters.cc (Parameters::incremental_full): New function.
   5243 	* parameters.h (Parameters::incremental_full): New function
   5244 	* testsuite/Makefile.am (incremental_test_2): Add test for
   5245 	--incremental-patch option.
   5246 	* testsuite/Makefile.in: Regenerate.
   5247 	* testsuite/two_file_test_1_v1.cc (t1, t2, t3): Add comments.
   5248 	(t18): Remove function body.
   5249 
   5250 2011-07-05  Doug Kwan  <dougkwan (a] google.com>
   5251 
   5252 	PR gold/12771
   5253 	* arm.cc (Arm_relocate_functions::abs8): Use int32_t for addend and
   5254 	Arm_Address type for relocation result.
   5255 	(Arm_relocate_functions::abs16): Use unaligned access.  Also fix
   5256 	overflow check.
   5257 	(Arm_relocate_functions::abs32): Use unaligned access.
   5258 	(Arm_relocate_functions::rel32): Ditto.
   5259 	(Arm_relocate_functions::prel31): Ditto.
   5260 	(Arm_exidix_cantunwind::do_fixed_endian_write): Ditto.
   5261 	* testsuite/Makefile.am: Add new test arm_unaligned_reloc for unaligned
   5262 	static data relocations.
   5263 	* testsuite/Makefile.in: Regnerate.
   5264 	* testsuite/arm_unaligned_reloc.{s,sh}: New files.
   5265 
   5266 2011-07-05  Ian Lance Taylor  <iant (a] google.com>
   5267 
   5268 	PR gold/12392
   5269 	* i386.cc (Target_i386::do_finalize_sections): Define __rel_iplt
   5270 	symbols if necessary.
   5271 	* x86_64.cc (Target_x86_64::do_finalize_sections): Likewise.
   5272 
   5273 2011-07-05  Ian Lance Taylor  <iant (a] google.com>
   5274 
   5275 	PR gold/12952
   5276 	* resolve.cc (Symbol::override_base_with_special): Simply override
   5277 	version with special symbol version, ignoring previous version.
   5278 
   5279 2011-07-05  Ian Lance Taylor  <iant (a] google.com>
   5280 
   5281 	* object.cc (Sized_relobj_file::include_section_group): Add
   5282 	information to comment about signature location.
   5283 
   5284 2011-07-02  Ian Lance Taylor  <iant (a] google.com>
   5285 
   5286 	PR gold/12957
   5287 	* options.h (class General_options): Add -f and -F.
   5288 	* options.cc (General_options::finalize): Fatal error if -f/-F
   5289 	are used without -shared.
   5290 	* layout.cc (Layout::finish_dynamic_section): Implement -f/-F.
   5291 
   5292 2011-07-02  Ian Lance Taylor  <iant (a] google.com>
   5293 
   5294 	* dirsearch.cc (Dir_cache::read_files): Ignore ENOTDIR errors.
   5295 
   5296 2011-07-01  Ian Lance Taylor  <iant (a] google.com>
   5297 
   5298 	PR gold/12525
   5299 	PR gold/12952
   5300 	* resolve.cc (Symbol::override_base_with_special): Don't override
   5301 	the version if the overriding symbol has a different name.
   5302 	* dynobj.cc (Versions::add_def): Add dynpool parameter.  Change
   5303 	all callers.  If we give an error about an undefined version,
   5304 	define the base version if necessary.
   5305 	* dynobj.h (class Versions): Update declaration.
   5306 	* testsuite/weak_alias_test_5.cc: New file.
   5307 	* testsuite/weak_alias_test.script: New file.
   5308 	* testsuite/weak_alias_test_main.cc: Check that versioned_symbol
   5309 	and versioned_alias have the right value, and call t2.
   5310 	* testsuite/Makefile.am (weak_alias_test_DEPENDENCIES): Add
   5311 	weak_alias_test_5.so.
   5312 	(weak_alias_test_LDADD): Likewise.
   5313 	(weak_alias_test_5_pic.o, weak_alias_test_5.so): New targets.
   5314 	* testsuite/Makefile.in: Rebuild.
   5315 
   5316 2011-07-01  Ian Lance Taylor  <iant (a] google.com>
   5317 
   5318 	PR gold/12525
   5319 	* options.h (class General_options): Support -z notext.
   5320 	* testsuite/Makefile.am (two_file_shared_1_nonpic.so): Use
   5321 	-Wl,-z,notext.
   5322 	(two_file_shared_nonpic.so): Likewise.
   5323 	(two_file_shared_mixed.so): Likewise.
   5324 	(two_file_shared_mixed_1.so): Likewise.
   5325 	(weak_undef_lib_nonpic.so): Likewise.
   5326 	(alt/weak_undef_lib_nonpic.so): Likewise.
   5327 	(tls_test_shared_nonpic.so): Likewise.
   5328 	* testsuite/Makefile.in: Rebuild.
   5329 
   5330 2011-07-01  Ian Lance Taylor  <iant (a] google.com>
   5331 
   5332 	PR gold/12525
   5333 	* configure.ac: Test whether static linking works, setting
   5334 	the automake conditional HAVE_STATIC.
   5335 	* testsuite/Makefile.am: Disable tests using -static if
   5336 	HAVE_STATIC is not true.
   5337 	* configure, testsuite/Makefile.in: Rebuild.
   5338 
   5339 2011-07-01  Ian Lance Taylor  <iant (a] google.com>
   5340 
   5341 	PR gold/12525
   5342 	* ehframe.cc (Eh_frame_hdr::get_fde_pc): Handle DW_EH_PE_datarel.
   5343 	Assert if we see DW_EH_PE_indirect.
   5344 	* target.h (Target::ehframe_datarel_base): New function.
   5345 	(Target::do_ehframe_datarel_base): New target function.
   5346 	* i386.cc (Target_i386::do_ehframe_datarel_base): New function.
   5347 	* x86_64.cc (Target_x86_64::do_ehframe_datarel_base): New
   5348 	function.
   5349 
   5350 2011-07-01  Ian Lance Taylor  <iant (a] google.com>
   5351 
   5352 	PR gold/12571
   5353 	* options.h (class General_options): Add
   5354 	--ld-generated-unwind-info.
   5355 	* ehframe.cc (Fde::write): Add address parameter.  Change all
   5356 	callers.  If associated with PLT, fill in address and size.
   5357 	(Cie::set_output_offset): Only add merge mapping if there is an
   5358 	object.
   5359 	(Cie::write): Add address parameter.  Change all callers.
   5360 	(Eh_frame::add_ehframe_for_plt): New function.
   5361 	* ehframe.h (class Fde): Update declarations.  Move shndx_ and
   5362 	input_offset_ fields into union u_, with new plt field.
   5363 	(Fde::Fde): Adjust for new union field.
   5364 	(Fde::Fde) [Output_data version]: New constructor.
   5365 	(Fde::add_mapping): Only add merge mapping if there is an object.
   5366 	(class Cie): Update declarations.
   5367 	(class Eh_frame): Declare add_ehframe_for_plt.
   5368 	* layout.cc (Layout::layout_eh_frame): Break out code into
   5369 	make_eh_frame_section, and call it.
   5370 	(Layout::make_eh_frame_section): New function.
   5371 	(Layout::add_eh_frame_for_plt): New function.
   5372 	* layout.h (class Layout): Update declarations.
   5373 	* merge.cc (Merge_map::add_mapping): Add assertion.
   5374 	* i386.cc: Include "dwarf.h".
   5375 	(class Output_data_plt_i386): Make first_plt_entry,
   5376 	dyn_first_plt_entry, exec_plt_entry, and dyn_plt_entry const.  Add
   5377 	plt_eh_frame_cie_size, plt_eh_frame_fde_size, plt_eh_frame_cie,
   5378 	and plt_eh_frame_fde.
   5379 	(Output_data_plt_i386::Output_data_plt_i386): Align to 16-byte
   5380 	boundary.  Call add_eh_frame_for_plt if appropriate.
   5381 	* x86_64.cc: Include "dwarf.h".
   5382 	(class Output_data_plt_x86_64): Align to 16-byte boundary.  Make
   5383 	first_plt_entry, plt_entry and tlsdesc_plt_entry const.  Add
   5384 	plt_eh_frame_cie_size, plt_eh_frame_fde_size, plt_eh_frame_cie,
   5385 	and plt_eh_frame_fde.
   5386 	(Output_data_plt_x86_64::init): Call add_eh_frame_for_plt if
   5387 	appropriate.
   5388 
   5389 2011-06-29  Ian Lance Taylor  <iant (a] google.com>
   5390 
   5391 	PR gold/12629
   5392 	* object.cc (Sized_relobj_file::layout_section): Change shdr
   5393 	parameter to be const.
   5394 	(Sized_relobj_file::layout_eh_frame_section): New function, broken
   5395 	out of do_layout.
   5396 	(Sized_relobj_file::do_layout): Defer .eh_frame sections if
   5397 	appropriate.  Call layout_eh_frame_section.
   5398 	(Sized_relobj_file::do_layout_deferred_sections): Handle .eh_frame
   5399 	sections.
   5400 	* object.h (class Sized_relobj_file): Update declarations.
   5401 
   5402 2011-06-29  Ian Lance Taylor  <iant (a] google.com>
   5403 
   5404 	PR gold/12652
   5405 	* script.cc (Token::integer_value): Accept trailing M/m/K/k
   5406 	modifier.
   5407 	(Lex::gather_token): Accept trailing M/m/K/k for integers.
   5408 
   5409 2011-06-29  Ian Lance Taylor  <iant (a] google.com>
   5410 
   5411 	PR gold/12675
   5412 	* object.cc (Sized_relobj_file::check_eh_frame_flags): Check for
   5413 	SHT_X86_64_UNWIND.
   5414 	* layout.cc (Layout::layout_eh_frame): Likewise.
   5415 
   5416 2011-06-29  Ian Lance Taylor  <iant (a] google.com>
   5417 
   5418 	PR gold/12695
   5419 	* layout.cc (Layout::symtab_section_shndx): New function.
   5420 	* layout.h (class Layout): Declare symtab_section_shndx.
   5421 	* output.cc (Output_section::write_header): Call it.
   5422 
   5423 2011-06-29  Ian Lance Taylor  <iant (a] google.com>
   5424 
   5425 	PR gold/12818
   5426 	* symtab.cc (Symbol::should_add_dynsym_entry): Don't add undefined
   5427 	symbols which are not used in a relocation.
   5428 
   5429 2011-06-28  Ian Lance Taylor  <iant (a] google.com>
   5430 
   5431 	PR gold/12898
   5432 	* layout.cc (Layout::segment_precedes): Don't crash if a linker
   5433 	script create indistinguishable segments.
   5434 	(Layout::set_segment_offsets): Use stable_sort when sorting
   5435 	segments.  Pass this to Compare_segments constructor.
   5436 	* layout.h (class Layout): Make segment_precedes non-static.
   5437 	(class Compare_segments): Change from struct to class.  Add
   5438 	layout_ field.  Add constructor.
   5439 	* script-sections.cc
   5440 	(Script_sections::attach_sections_using_phdrs_clause): Rename
   5441 	local orphan to is_orphan.  Don't report failure to put empty
   5442 	section in segment.  On attachment failure, report name of
   5443 	section, and attach to first PT_LOAD segment.
   5444 
   5445 2011-06-28  Ian Lance Taylor  <iant (a] google.com>
   5446 
   5447 	PR gold/12934
   5448 	* target-select.cc (Target_selector::Target_selector): Add
   5449 	emulation parameter.  Change all callers.
   5450 	(select_target_by_bfd_name): Rename from select_target_by_name.
   5451 	Change all callers.
   5452 	(select_target_by_emulation): New function.
   5453 	(supported_emulation_names): New function.
   5454 	* target-select.h (class Target_selector): Add emulation_ field.
   5455 	Update declarations.
   5456 	(Target_selector::recognize_by_bfd_name): Rename from
   5457 	recognize_by_name.  Change all callers.
   5458 	(Target_selector::supported_bfd_names): Rename from
   5459 	supported_names.  Change all callers.
   5460 	(Target_selector::recognize_by_emulation): New function.
   5461 	(Target_selector::supported_emulations): New function.
   5462 	(Target_selector::emulation): New function.
   5463 	(Target_selector::do_recognize_by_bfd_name): Rename from
   5464 	do_recognize_by_name.  Change all callers.
   5465 	(Target_selector::do_supported_bfd_names): Rename from
   5466 	do_supported_names.  Change all callers.
   5467 	(Target_selector::do_recognize_by_emulation): New function.
   5468 	(Target_selector::do_supported_emulations): New function.
   5469 	(select_target_by_bfd_name): Change name in declaration.
   5470 	(select_target_by_emulation): Declare.
   5471 	(supported_emulation_names): Declare.
   5472 	* parameters.cc (parameters_force_valid_target): Try to find
   5473 	target based on emulation from -m option.
   5474 	* options.h (class General_options): Change doc string for -m.
   5475 	* options.cc (help): Print emulations.
   5476 	(General_options::parse_V): Likewise.
   5477 	* freebsd.h (Target_selector_freebsd::Target_selector_freebsd):
   5478 	Add emulation parameter.  Change all callers.
   5479 
   5480 2011-06-28  Ian Lance Taylor  <iant (a] google.com>
   5481 
   5482 	* target.h (class Target): Add osabi_ field.
   5483 	(Target::osabi): New function.
   5484 	(Target::set_osabi): New function.
   5485 	(Target::Target): Initialize osabi_.
   5486 	(Target::do_adjust_elf_header): Make pure virtual.
   5487 	(Sized_target::do_adjust_elf_header): Declare.
   5488 	* target.cc (Sized_target::do_adjust_elf_header): New function.
   5489 	(class Sized_target): Instantiate all versions.
   5490 	* freebsd.h (class Target_freebsd): Remove.
   5491 	(Target_selector_freebsd::do_recognize): Call set_osabi on
   5492 	Target.
   5493 	(Target_selector_freebsd::do_recognize_by_name): Likewise.
   5494 	(Target_selector_freebsd::set_osabi): Remove.
   5495 	* i386.cc (class Target_i386): Inherit from Sized_target rather
   5496 	than Target_freebsd.
   5497 	* x86_64.cc (class Target_x86_64): Likewise.
   5498 
   5499 2011-06-28  Ian Lance Taylor  <iant (a] google.com>
   5500 
   5501 	* target.h (Target::can_check_for_function_pointers): Rewrite.
   5502 	Make non-virtual.
   5503 	(Target::can_icf_inline_merge_sections): Likewise.
   5504 	(Target::section_may_have_icf_unsafe_poineters): Likewise.
   5505 	(Target::Target_info): Add can_icf_inline_merge_sections field.
   5506 	(Target::do_can_check_for_function_pointers): New virtual
   5507 	function.
   5508 	(Target::do_section_may_have_icf_unsafe_pointers): Likewise.
   5509 	* arm.cc (Target_arm::do_can_check_for_function_pointers): Rename
   5510 	from can_check_for_function_pointers, move in file.
   5511 	(Target_arm::do_section_may_have_icf_unsafe_pointers): Rename from
   5512 	section_may_have_icf_unsafe_poineters, move in file.
   5513 	(Target_arm::arm_info): Initialize can_icf_inline_merge_sections.
   5514 	* i386.cc (Target_i386::do_can_check_for_function_pointers):
   5515 	Rename from can_check_for_function_pointers, move in file.
   5516 	(Target_i386::can_icf_inline_merge_sections): Remove.
   5517 	(Target_i386::i386_info): Initialize
   5518 	can_icf_inline_merge_sections.
   5519 	* powerpc.cc (Target_powerpc::powerpc_info) [all versions]:
   5520 	Initialize can_icf_inline_merge_sections.
   5521 	* sparc.cc (Target_sparc::sparc_info) [both version]: Likewise.
   5522 	* x86_64.cc (Target_x86_64::do_can_check_for_function_pointers):
   5523 	Rename from can_check_for_function_pointers, move in file.
   5524 	(Target_x86_64::can_icf_inline_merge_sections): Remove.
   5525 	(Target_x86_64::x86_64_info): Initialize
   5526 	can_icf_inline_merge_sections.
   5527 	* testsuite/testfile.cc (Target_test::test_target_info):
   5528 	Likewise.
   5529 	* icf.cc (get_section_contents): Correct formatting.
   5530 
   5531 2011-06-27  Ian Lance Taylor  <iant (a] google.com>
   5532 
   5533 	* symtab.cc (Symbol::versioned_name): New function.
   5534 	(Symbol_table::add_to_final_symtab): Use versioned_name when
   5535 	appropriate.
   5536 	(Symbol_table::sized_write_symbol): Likewise.
   5537 	* symtab.h (class Symbol): Declare versioned_name.
   5538 	* stringpool.h (class Stringpool_template): Add variant of add
   5539 	which takes a std::basic_string.
   5540 	* testsuite/Makefile.am (check_PROGRAMS): Add ver_test_12.
   5541 	(ver_test_12_SOURCES, ver_test_12_DEPENDENCIES): New variables.
   5542 	(ver_test_12_LDFLAGS, ver_test_12_LDADD): New variables.
   5543 	(ver_test_12.o): New target.
   5544 	* testsuite/Makefile.in: Rebuild.
   5545 
   5546 2011-06-27  Doug Kwan  <dougkwan (a] google.com>
   5547 
   5548 	* arm.cc (Arm_relocate_functions::thm_jump8,
   5549 	Arm_relocate_functions::thm_jump11): Use a wider signed
   5550 	type to compute offset.
   5551 	* testsuite/Makefile.am: Add new tests arm_thm_jump11 and
   5552 	arm_thm_jump8.
   5553 	* testsuite/Makefile.in: Regenerate.
   5554 	* testsuite/arm_branch_in_range.sh: Check test results of
   5555 	arm_thm_jump11 and arm_thm_jump8.
   5556 	* testsuite/arm_thm_jump11.s: New test source file.
   5557 	* testsuite/arm_thm_jump11.t: New linker script.
   5558 	* testsuite/arm_thm_jump8.s: New test source file.
   5559 	* testsuite/arm_thm_jump8.t: New linker script.
   5560 
   5561 2011-06-24  Ian Lance Taylor  <iant (a] google.com>
   5562 
   5563 	* layout.cc: Include "object.h".
   5564 	(ctors_sections_in_init_array): New static variable.
   5565 	(Layout::is_ctors_in_init_array): New function.
   5566 	(Layout::layout): Add entry to ctors_sections_in_init_array if
   5567 	appropriate.
   5568 	* layout.h (class Layout): Declare is_ctors_in_init_array.
   5569 	* reloc.cc (Sized_relobj_file::do_relocate): Call reverse_words if
   5570 	is_ctors_reverse_view is set.
   5571 	(Sized_relobj_file::write_sections): Add layout parameter.  Change
   5572 	all callers.  Set is_ctors_reverse_view field of View_size.
   5573 	(Sized_relobj_file::reverse_words): New function.
   5574 	* object.h (Sized_relobj_file::View_size): Add
   5575 	is_ctors_reverse_view field.
   5576 	(class Sized_relobj_file): Update declarations.
   5577 	* testsuite/initpri3.c: New test.
   5578 	* testsuite/Makefile.am: (check_PROGRAMS): Add initpri3a and
   5579 	initpri3b.
   5580 	(initpri3a_SOURCES, initpri3a_DEPENDENCIES): New variables.
   5581 	(initpri3a_LDFLAGS, initpri3a_LDADD): New variables.
   5582 	(initpri3b_SOURCES, initpri3b_DEPENDENCIES): New variables.
   5583 	(initpri3b_LDFLAGS, initpri3b_LDADD): New variables.
   5584 	* testsuite/Makefile.in: Rebuild.
   5585 
   5586 2011-06-24  Cary Coutant  <ccoutant (a] google.com>
   5587 
   5588 	* testsuite/Makefile.am: Add in-tree assembler to gcctestdir.
   5589 	(debug_msg_cdebug.o, odr_violation1_cdebug.o, odr_violation2_cdebug.o)
   5590 	(debug_msg_cdebug.err): New targets.
   5591 	* testsuite/Makefile.in: Regenerate.
   5592 	* testsuite/debug_msg.sh: Check output of link with compressed debug.
   5593 	Fix checks for link with shared library.
   5594 
   5595 2011-06-24  Doug Kwan  <dougkwan (a] google.com>
   5596 
   5597 	* arm.cc (Arm_output_section::append_text_sections_to_list): Do not
   5598 	skip empty text sections.
   5599 	* testsuite/arm_exidx_test.s: Test handling of an empty text section.
   5600 
   5601 2011-06-22  Ian Lance Taylor  <iant (a] google.com>
   5602 
   5603 	PR gold/12910
   5604 	* options.h (class General_options): Add --ctors-in-init-array.
   5605 	* layout.cc (Layout::get_output_section): Treat SHT_INIT_ARRAY and
   5606 	friends as SHT_PROGBITS for merging sections.
   5607 	(Layout::layout): Remove special handling of .init_array and
   5608 	friends.  Don't sort if doing relocatable link.  Sort for .ctors
   5609 	and .dtors if ctors_in_init_array.
   5610 	(Layout::make_output_section): Force correct section types for
   5611 	.init_array and friends.  Don't sort if doing relocatable link,
   5612 	Don't sort .ctors and .dtors if ctors_in_init_array.
   5613 	(Layout::section_name_mapping): Remove .ctors. and .dtorso.
   5614 	(Layout::output_section_name): Add relobj parameter.  Change all
   5615 	callers.  Handle .ctors. and .dtors. in code rather than table.
   5616 	Handle .ctors and .dtors if ctors_in_init_array.
   5617 	(Layout::match_file_name): New function, moved from output.cc.
   5618 	* layout.h (class Layout): Update declarations.
   5619 	* output.cc: Include "layout.h".
   5620 	(Input_section_sort_entry::get_priority): New function.
   5621 	(Input_section_sort_entry::match_file_name): Just call
   5622 	Layout::match_file_name.
   5623 	(Output_section::Input_section_sort_init_fini_compare::operator()):
   5624 	Handle .ctors and .dtors.  Sort by explicit priority rather than
   5625 	by name.
   5626 	* configure.ac: Remove CONSTRUCTOR_PRIORITY test and conditional.
   5627 	* testsuite/initpri2.c: New test.
   5628 	* testsuite/Makefile.am: Don't test CONSTRUCTOR_PRIORITY.
   5629 	(check_PROGRAMS): Add initpri2.
   5630 	(initpri2_SOURCES, initpri2_DEPENDENCIES): New variables.
   5631 	(initpri2_LDFLAGS, initpri2_LDADD): New variables.
   5632 	* configure, testsuite/Makefile.in: Rebuild.
   5633 
   5634 2011-06-19  Ian Lance Taylor  <iant (a] google.com>
   5635 
   5636 	PR gold/12880
   5637 	* layout.cc (Layout::attach_allocated_section_to_segment): Add a
   5638 	.interp section to a PT_INTERP segment even if we have seen a
   5639 	--dynamic-linker option.  Don't do it if we have seen a PHDRS
   5640 	clause in a linker script.
   5641 	(Layout::finalize): Don't create a .interp section if we've
   5642 	already create a PT_INTERP segment.
   5643 	(Layout::create_interp): Always call choose_output_section (revert
   5644 	patch of 2011-06-17).  Don't create PT_INTERP segment.
   5645 	* script-sections.cc
   5646 	(Script_sections::create_note_and_tls_segments): Add a .interp
   5647 	section to a PT_INTERP segment even if we have seen a
   5648 	--dynamic-linker option.
   5649 
   5650 2011-06-18  Ian Lance Taylor  <iant (a] google.com>
   5651 
   5652 	* layout.cc (Layout::finish_dynamic_section): Don't set DT_TEXTREL
   5653 	merely because a non-PT_LOAD segment has a dynamic reloc.
   5654 
   5655 2011-06-18  Ian Lance Taylor  <iant (a] google.com>
   5656 
   5657 	* layout.cc (Layout::finish_dynamic_section): Don't create
   5658 	DT_FLAGS entry if not needed.
   5659 
   5660 2011-06-18  Ian Lance Taylor  <iant (a] google.com>
   5661 
   5662 	PR gold/12745
   5663 	* layout.cc (Layout::layout_eh_frame): Correct handling of
   5664 	writable .eh_frame section.
   5665 
   5666 2011-06-17  Ian Lance Taylor  <iant (a] google.com>
   5667 
   5668 	PR gold/12893
   5669 	* resolve.cc (Symbol_table::resolve): Don't give an error if a
   5670 	symbol is redefined with the exact same object and value.
   5671 
   5672 2011-06-17  Ian Lance Taylor  <iant (a] google.com>
   5673 
   5674 	PR gold/12880
   5675 	* layout.h (class Layout): Add interp_segment_ field.
   5676 	* layout.cc (Layout::Layout): Initialize interp_segment_ field.
   5677 	(Layout::attach_allocated_section_to_segment): If making shared
   5678 	library, put .interp section in PT_INTERP segment.
   5679 	(Layout::finalize): Also call create_interp if -dynamic-linker
   5680 	option was used.
   5681 	(Layout::create_interp): Assert that there is no PT_INTERP
   5682 	segment.  If not using a SECTIONS clause, use make_output_section.
   5683 	(Layout::make_output_segment): Set interp_segment_ if PT_INTERP.
   5684 	* script-sections.cc
   5685 	(Script_sections::create_note_and_tls_segments): If making shared
   5686 	library, put .interp section in PT_INTERP segment.
   5687 
   5688 2011-06-17  Ian Lance Taylor  <iant (a] google.com>
   5689 
   5690 	* object.cc (Sized_relobj_file::do_layout): Keep warning sections
   5691 	when making a shared library.
   5692 
   5693 2011-06-17  Ian Lance Taylor  <iant (a] google.com>
   5694 
   5695 	* x86_64.cc (Target_x86_64::Scan::check_non_pic): Add gsym
   5696 	parameter.  Change all callers.  Don't issue warning about PC32
   5697 	against locally defined symbol.
   5698 
   5699 2011-06-16  Ian Lance Taylor  <iant (a] google.com>
   5700 
   5701 	* symtab.cc (Warnings::issue_warning): Don't warn if relocation
   5702 	occurs in same object.
   5703 
   5704 2011-06-14  Alan Modra  <amodra (a] gmail.com>
   5705 
   5706 	* po/POTFILES.in: Regenerate.
   5707 
   5708 2011-06-09  Ian Lance Taylor  <iant (a] google.com>
   5709 
   5710 	* script-sections.cc
   5711 	(Orphan_output_section::set_section_addresses): For a relocatable
   5712 	link set address to 0.
   5713 
   5714 2011-06-09  Cary Coutant  <ccoutant (a] google.com>
   5715 
   5716 	PR gold/12804
   5717 	* gold/gold.cc (queue_initial_tasks): Warn if --incremental is
   5718 	used with --compress-debug-sections.
   5719 	* gold/object.cc (Sized_relobj_file::do_layout): Report
   5720 	uncompressed size of compressed input sections.
   5721 
   5722 2011-06-08  Cary Coutant  <ccoutant (a] google.com>
   5723 
   5724 	PR gold/12804
   5725 	* testsuite/two_file_test_2_v1.cc: Change initialization of
   5726 	v2 to keep it in .data.
   5727 
   5728 2011-06-07  Cary Coutant  <ccoutant (a] google.com>
   5729 
   5730 	* common.cc (Symbol_table::do_allocate_commons_list): Call
   5731 	gold_fallback.
   5732 	* errors.cc (Errors::fatal): Adjust call to gold_exit.
   5733 	(Errors::fallback): New function.
   5734 	(gold_fallback): New function.
   5735 	* errors.h (Errors::fallback): New function.
   5736 	* gold.cc (gold_exit): Change status parameter to enum; adjust
   5737 	all callers.
   5738 	(queue_initial_tasks): Call gold_fallback.
   5739 	* gold.h: Include cstdlib.
   5740 	(Exit_status): New enum type.
   5741 	(gold_exit): Change status parameter to enum.
   5742 	(gold_fallback): New function.
   5743 	* layout.cc (Layout::set_section_offsets): Call gold_fallback.
   5744 	(Layout::create_symtab_sections): Likewise.
   5745 	(Layout::create_shdrs): Likewise.
   5746 	* main.cc (main): Adjust call to gold_exit.
   5747 	* output.cc (Output_data_got::add_got_entry): Call gold_fallback.
   5748 	(Output_data_got::add_got_entry_pair): Likewise.
   5749 	(Output_section::add_input_section): Likewise.
   5750 	(Output_section::add_output_section_data): Likewise.
   5751 	(Output_segment::set_section_list_addresses): Likewise.
   5752 	* x86_64.cc (Output_data_plt_x86_64::add_entry): Likewise.
   5753 
   5754 2011-06-07  Cary Coutant  <ccoutant (a] google.com>
   5755 
   5756 	* layout.cc (Layout::set_segment_offsets): Don't adjust layout
   5757 	for incremental links.
   5758 	* output.cc (Output_segment::set_section_list_addresses): Remove
   5759 	FIXME and test for TLS or BSS.
   5760 
   5761 2011-06-07  Cary Coutant  <ccoutant (a] google.com>
   5762 
   5763 	* testsuite/Makefile.am: Add incremental_copy_test,
   5764 	incremental_common_test_1.
   5765 	* testsuite/Makefile.in: Regenerate.
   5766 	* testsuite/common_test_1_v1.c: New source file.
   5767 	* testsuite/common_test_1_v2.c: New source file.
   5768 	* testsuite/copy_test_v1.cc: New source file.
   5769 
   5770 2011-06-07  Cary Coutant  <ccoutant (a] google.com>
   5771 
   5772 	* common.cc (Symbol_table::do_allocate_commons_list): For incremental
   5773 	update, allocate common from bss section's free list.
   5774 	* incremental-dump.cc (dump_incremental_inputs): Print flag for
   5775 	linker-defined symbols.
   5776 	* incremental.cc (Sized_incremental_binary::do_process_got_plt):
   5777 	Skip GOT and PLT entries that are no longer referenced.
   5778 	(Output_section_incremental_inputs::write_info_blocks): Mark
   5779 	linker-defined symbols.
   5780 	(Sized_incr_relobj::do_add_symbols): Process linker-defined symbols.
   5781 	* output.cc (Output_section::allocate): New function.
   5782 	* output.h (Output_section::allocate): New function.
   5783 	* resolve.cc (Symbol_table::report_resolve_problem): Add case for
   5784 	linker-defined symbols.
   5785 	(Symbol::override_base_with_special): Copy is_predefined_ flag.
   5786 	* symtab.cc (Symbol::init_fields): Initialize is_predefined_ flag.
   5787 	(Symbol::init_base_output_data): Likewise.
   5788 	(Symbol::init_base_output_segment): Likewise.
   5789 	(Symbol::init_base_constant): Likewise.
   5790 	(Sized_symbol::init_output_data): Likewise.
   5791 	(Sized_symbol::init_output_segment): Likewise.
   5792 	(Sized_symbol::init_constant): Likewise.
   5793 	(Symbol_table::do_define_in_output_data): Likewise.
   5794 	(Symbol_table::do_define_in_output_segment): Likewise.
   5795 	(Symbol_table::do_define_as_constant): Likewise.
   5796 	* symtab.h (Symbol::is_predefined): New function.
   5797 	(Symbol::init_base_output_data): Add is_predefined parameter.
   5798 	(Symbol::init_base_output_segment): Likewise.
   5799 	(Symbol::init_base_constant): Likewise.
   5800 	(Symbol::is_predefined_): New data member.
   5801 	(Sized_symbol::init_output_data): Add is_predefined parameter.
   5802 	(Sized_symbol::init_output_segment): Likewise.
   5803 	(Sized_symbol::init_constant): Likewise.
   5804 	(enum Symbol_table::Defined): Add INCREMENTAL_BASE.
   5805 
   5806 2011-06-07  Cary Coutant  <ccoutant (a] google.com>
   5807 
   5808 	* copy-relocs.cc (Copy_relocs::copy_reloc): Call make_copy_reloc
   5809 	instead of emit_copy_reloc.
   5810 	(Copy_relocs::emit_copy_reloc): Refactor.
   5811 	(Copy_relocs::make_copy_reloc): New function.
   5812 	(Copy_relocs::add_copy_reloc): Remove.
   5813 	* copy-relocs.h (Copy_relocs::emit_copy_reloc): Move to public
   5814 	section.
   5815 	(Copy_relocs::make_copy_reloc): New function.
   5816 	(Copy_relocs::add_copy_reloc): Remove.
   5817 	* gold.cc (queue_middle_tasks): Emit old COPY relocations from
   5818 	unchanged input files.
   5819 	* incremental-dump.cc (dump_incremental_inputs): Print "COPY" flag.
   5820 	* incremental.cc (Sized_incremental_binary::do_reserve_layout):
   5821 	Reserve BSS space for COPY relocations.
   5822 	(Sized_incremental_binary::do_emit_copy_relocs): New function.
   5823 	(Output_section_incremental_inputs::write_info_blocks): Record
   5824 	whether a symbol is copied from a shared object.
   5825 	(Sized_incr_dynobj::do_add_symbols): Record COPY relocations.
   5826 	* incremental.h (enum Incremental_shlib_symbol_flags): New type.
   5827 	(INCREMENTAL_SHLIB_SYM_FLAGS_SHIFT): New constant.
   5828 	(Incremental_input_entry_reader::get_output_symbol_index): Add
   5829 	is_copy parameter.
   5830 	(Incremental_binary::emit_copy_relocs): New function.
   5831 	(Incremental_binary::do_emit_copy_relocs): New function.
   5832 	(Sized_incremental_binary::Sized_incremental_binary): Initialize
   5833 	new data member.
   5834 	(Sized_incremental_binary::add_copy_reloc): New function.
   5835 	(Sized_incremental_binary::do_emit_copy_relocs): New function.
   5836 	(Sized_incremental_binary::Copy_reloc): New struct.
   5837 	(Sized_incremental_binary::Copy_relocs): New typedef.
   5838 	(Sized_incremental_binary::copy_relocs_): New data member.
   5839 	* symtab.cc (Symbol_table::add_from_incrobj): Change return type.
   5840 	* symtab.h (Symbol_table::add_from_incrobj): Change return type.
   5841 	* target.h (Sized_target::emit_copy_reloc): New function.
   5842 	* x86_64.cc (Target_x86_64::emit_copy_reloc): New function.
   5843 
   5844 2011-06-02  Cary Coutant  <ccoutant (a] google.com>
   5845 
   5846 	PR gold/12163
   5847 	* gold/archive.cc (Archive::Archive): Initialize new data member.
   5848 	(Archive::include_all_members): Return if archive has already been
   5849 	included.
   5850 	* gold/archive.h (Archive::include_all_members_): New data member.
   5851 
   5852 2011-06-02  Nick Clifton  <nickc (a] redhat.com>
   5853 
   5854 	* dynobj.h: Fix spelling mistake in comment.
   5855 	* output.cc: Likewise.
   5856 
   5857 2011-05-31  Doug Kwan  <dougkwan (a] google.com>
   5858 	    Asier Llano
   5859 
   5860 	PR gold/12826
   5861 	* arm.cc (Target_arm::tag_cpu_arch_combine): Fix handling of
   5862 	arch value that equals to elfcpp::MAX_TAG_CPU_ARCH.
   5863 	* testsuite/Makefile.am: (MOSTLYCLEANFILES): Clean up.  Remove
   5864 	redundant arm_exidx_test.so.
   5865 	* testsuite/Makefile.in: Regenerate.
   5866 	(check_SCRIPTS): Add pr12826.sh
   5867 	(check_DATA): Add pr12826.stdout
   5868 	(pr12826.stdout, pr12826.so, pr12826_1.o, pr12826_2.o): New rules.
   5869 	* testsuite/pr12826.sh: New file.
   5870 	* testsuite/pr12826_1.s: Ditto.
   5871 	* testsuite/pr12826_1.s: Ditto.
   5872 
   5873 2011-05-30  Ian Lance Taylor  <iant (a] google.com>
   5874 
   5875 	* reloc.cc (Sized_relobj_file::do_read_relocs): Ignore empty reloc
   5876 	sections.
   5877 
   5878 2011-05-29  Ian Lance Taylor  <iant (a] google.com>
   5879 
   5880 	PR gold/12804
   5881 	* testsuite/Makefile.am: Use different file name for two_file_test
   5882 	temporary file for each incremental test.
   5883 	* testsuite/Makefile.in: Rebuild.
   5884 
   5885 2011-05-29  Ian Lance Taylor  <iant (a] google.com>
   5886 
   5887 	* binary.cc (Binary_to_elf::sized_convert): Don't crash if the
   5888 	binary input file is empty.
   5889 
   5890 2011-05-27  Ian Lance Taylor  <iant (a] google.com>
   5891 
   5892 	* testsuite/Makefile.am (ver_test_2.so): Use -Wl,-R,.
   5893 	(ver_test_9.so): Likewise.
   5894 	* testsuite/Makefile.in: Rebuild.
   5895 
   5896 2011-05-26 Cary Coutant  <ccoutant (a] google.com>
   5897 
   5898 	* incremental-dump.cc (dump_incremental_inputs): Print COMDAT groups.
   5899 	* incremental.cc (Incremental_inputs::report_input_section): Fix
   5900 	comment, indentation.
   5901 	(Incremental_inputs::report_comdat_group): New function.
   5902 	(Output_section_incremental_inputs::set_final_data_size): Adjust size
   5903 	of data for incremental input file entry.
   5904 	(Output_section_incremental_inputs::write_info_blocks): Write COMDAT
   5905 	group count, COMDAT group signatures.
   5906 	(Sized_incr_relobj::do_layout): Record kept COMDAT group info from
   5907 	an unchanged input file.
   5908 	* incremental.h (Incremental_object_entry::Incremental_object_entry):
   5909 	Initialize new data member.
   5910 	(Incremental_object_entry::add_comdat_group): New function.
   5911 	(Incremental_object_entry::get_comdat_group_count): New function.
   5912 	(Incremental_object_entry::get_comdat_signature_key): New function.
   5913 	(Incremental_object_entry::groups_): New data member.
   5914 	(Incremental_inputs::report_comdat_group): New function.
   5915 	(Incremental_input_entry_reader::get_symbol_offset): Adjust size of
   5916 	data for incremental input file entry.
   5917 	(Incremental_input_entry_reader::get_comdat_group_count): New function.
   5918 	(Incremental_input_entry_reader::get_input_section): Adjust size of
   5919 	data for incremental input file entry.
   5920 	(Incremental_input_entry_reader::get_global_symbol_reader): Likewise.
   5921 	(Incremental_input_entry_reader::get_comdat_group_signature): New
   5922 	function.
   5923 	* object.cc (Sized_relobj::include_section_group): Report kept
   5924 	COMDAT groups for incremental links.
   5925 
   5926 2011-05-24  David Meyer  <pdox (a] google.com>
   5927 
   5928 	* dirsearch.cc (Dirsearch::find): Replace n1 and n2 parameters
   5929 	with name parameter.  Add found_name parameter.
   5930 	* fileread.cc (Input_file::find_file): Adjust code accordingly.
   5931 	* dirsearch.h (class Dirsearch): Update declaration.
   5932 
   5933 2011-05-24  Ian Lance Taylor  <iant (a] google.com>
   5934 
   5935 	* archive.cc (Library_base::should_include_member): Pull in object
   5936 	from archive if it defines the entry symbol.
   5937 	* parameters.cc (Parameters::entry): New function.
   5938 	* parameters.h (class Parameters): Declare entry.
   5939 	* output.h (class Output_file_header): Remove entry_ field.
   5940 	* output.cc (Output_file_header::Output_file_header): Remove entry
   5941 	parameter.  Change all callers.
   5942 	(Output_file_header::entry): Use parameters->entry.
   5943 	* gold.cc (queue_middle_tasks): Likewise.
   5944 	* plugin.cc (Plugin_hook::run): Likewise.
   5945 
   5946 2011-05-24 Cary Coutant  <ccoutant (a] google.com>
   5947 
   5948 	* gold.cc (queue_initial_tasks): Pass incremental base filename
   5949 	to Output_file::open_base_file; don't print error message.
   5950 	* incremental-dump.cc (main): Adjust call to
   5951 	Output_file::open_for_modification.
   5952 	* incremental-dump.cc (main): Likewise.
   5953 	* incremental.cc (Incremental_inputs::report_command_line):
   5954 	Ignore --incremental-base option when comparing command lines.
   5955 	Ignore parameter when given as separate argument.
   5956 	* options.h (class General_options): Add --incremental-base.
   5957 	* output.cc (Output_file::Output_file):
   5958 	(Output_file::open_base_file): Add base_name and writable parameters;
   5959 	read base file into new file; print error message here.
   5960 	(Output_file::map_no_anonymous): Add writable parameter; adjust all
   5961 	callers.
   5962 	* output.h (Output_file::open_for_modification): Rename to...
   5963 	(Output_file::open_base_file): ...this; add base_name and
   5964 	writable parameters; adjust all callers.
   5965 	(Output_file::map_no_anonymous): Add writable parameter; adjust all
   5966 	callers.
   5967 	* testsuite/Makefile.am (incremental_test_4): Test
   5968 	--incremental-base.
   5969 	* testsuite/Makefile.in: Regenerate.
   5970 
   5971 2011-05-24 Cary Coutant  <ccoutant (a] google.com>
   5972 
   5973 	* testsuite/Makefile.am: Add incremental_test_2, incremental_test_3,
   5974 	incremental_test_4.
   5975 	* testsuite/Makefile.in: Regenerate.
   5976 	* testsuite/two_file_test_1_v1.cc: New test source file.
   5977 	* testsuite/two_file_test_1b_v1.cc: New test source file.
   5978 	* testsuite/two_file_test_2_v1.cc: New test source file.
   5979 
   5980 2011-05-24 Cary Coutant  <ccoutant (a] google.com>
   5981 
   5982 	* dynobj.h (Dynobj::do_dynobj): New function.
   5983 	* incremental-dump.cc (dump_incremental_inputs): Print as_needed
   5984 	flag and soname for shared objects.
   5985 	* incremental.cc (Incremental_inputs::report_object): Make
   5986 	either Incremental_object_entry or Incremental_dynobj_entry; add
   5987 	soname to string table.
   5988 	(Incremental_inputs::report_input_section): Add assertion.
   5989 	(Output_section_incremental_inputs::set_final_data_size): Adjust
   5990 	type of input file entry for shared libraries; adjust size of
   5991 	shared library info entry.
   5992 	(Output_section_incremental_inputs::write_input_files): Write
   5993 	as_needed flag for shared libraries.
   5994 	(Output_section_incremental_inputs::write_info_blocks): Adjust type
   5995 	of input file entry for shared libraries; write soname.
   5996 	(Sized_incr_dynobj::Sized_incr_dynobj): Read as_needed flag and
   5997 	soname from incremental info.
   5998 	* incremental.h (enum Incremental_input_flags): Add
   5999 	INCREMENTAL_INPUT_AS_NEEDED.
   6000 	(Incremental_input_entry::Incremental_input_entry): Initialize new
   6001 	data member.
   6002 	(Incremental_input_entry::set_as_needed): New function.
   6003 	(Incremental_input_entry::as_needed): New function.
   6004 	(Incremental_input_entry::do_dynobj_entry): New function.
   6005 	(Incremental_input_entry::as_needed_): New data member.
   6006 	(Incremental_object_entry::Incremental_object_entry): Don't check
   6007 	for shared library.
   6008 	(Incremental_object_entry::do_type): Likewise.
   6009 	(class Incremental_dynobj_entry): New class.
   6010 	(Incremental_input_entry_reader::as_needed): New function.
   6011 	(Incremental_input_entry_reader::get_soname): New function.
   6012 	(Incremental_input_entry_reader::get_global_symbol_count): Rewrite.
   6013 	(Incremental_input_entry_reader::get_output_symbol_index): Adjust
   6014 	size of shared library info entry.
   6015 	* layout.cc (Layout::finish_dynamic_section): Don't test for
   6016 	incremental link when adding DT_NEEDED entries.
   6017 	* object.h (Object::Object): Initialize new data member.
   6018 	(Object::dynobj): New function.
   6019 	(Object::set_as_needed): New function.
   6020 	(Object::as_needed): New function.
   6021 	(Object::do_dynobj): New function.
   6022 	(Object::as_needed_): New data member.
   6023 
   6024 2011-05-24 Cary Coutant  <ccoutant (a] google.com>
   6025 
   6026 	* incremental-dump.cc (dump_incremental_inputs): Print dynamic reloc
   6027 	info; adjust display of GOT entries.
   6028 	* incremental.cc (Sized_incremental_binary::setup_readers): Allocate
   6029 	vector of input objects; remove file_status_.
   6030 	(Sized_incremental_binary::do_reserve_layout): Remove file_status_.
   6031 	(Sized_incremental_binary::do_process_got_plt): Adjust calls to
   6032 	got_plt reader; call target hooks to reserve GOT entries.
   6033 	(Output_section_incremental_inputs::set_final_data_size): Adjust size
   6034 	of input file info header and GOT info entry.
   6035 	(Output_section_incremental_inputs::write_info_blocks): Write dynamic
   6036 	relocation info.
   6037 	(Got_plt_view_info::got_descriptor): Remove.
   6038 	(Got_plt_view_info::sym_index): New data member.
   6039 	(Got_plt_view_info::input_index): New data member.
   6040 	(Local_got_offset_visitor::visit): Write input file index.
   6041 	(Global_got_offset_visitor::visit): Write 0 for input file index.
   6042 	(Global_symbol_visitor_got_plt::operator()): Replace got_descriptor
   6043 	with sym_index and input_index.
   6044 	(Output_section_incremental_inputs::write_got_plt): Adjust size of
   6045 	incremental info GOT entry; replace got_descriptor with input_index.
   6046 	(Sized_relobj_incr::Sized_relobj_incr): Adjust initializers; record
   6047 	map from input file index to object.
   6048 	(Sized_relobj_incr::do_layout): Replace direct data member reference
   6049 	with accessor function.
   6050 	(Sized_relobj_incr::do_for_all_local_got_entries): Move to base class.
   6051 	* incremental.h (Incremental_input_entry_reader::get_symbol_offset):
   6052 	Adjust size of input file info header.
   6053 	(Incremental_input_entry_reader::get_first_dyn_reloc): New function.
   6054 	(Incremental_input_entry_reader::get_dyn_reloc_count): New function.
   6055 	(Incremental_input_entry_reader::get_input_section): Adjust size of
   6056 	input file info header.
   6057 	(Incremental_got_plt_reader::Incremental_got_plt_reader): Adjust size
   6058 	of incremental info GOT entry.
   6059 	(Incremental_got_plt_reader::get_got_desc): Remove.
   6060 	(Incremental_got_plt_reader::get_got_symndx): New function.
   6061 	(Incremental_got_plt_reader::get_got_input_index): New function.
   6062 	(Sized_incremental_binary::Sized_incremental_binary): Remove
   6063 	file_status_; add input_objects_.
   6064 	(Sized_incremental_binary::~Sized_incremental_binary): Remove.
   6065 	(Sized_incremental_binary::set_file_is_unchanged): Remove.
   6066 	(Sized_incremental_binary::file_is_unchanged): Remove.
   6067 	(Sized_incremental_binary::set_input_object): New function.
   6068 	(Sized_incremental_binary::input_object): New function.
   6069 	(Sized_incremental_binary::file_status_): Remove.
   6070 	(Sized_incremental_binary::input_objects_): New data member.
   6071 	(Sized_relobj_incr): Rename Sized_incr_relobj to this; adjust all
   6072 	references.
   6073 	(Sized_relobj_incr::invalid_address): Move to base class.
   6074 	(Sized_relobj_incr::is_output_section_offset_invalid): Move to base
   6075 	class.
   6076 	(Sized_relobj_incr::do_output_section_offset): Likewise.
   6077 	(Sized_relobj_incr::do_for_all_local_got_entries): Likewise.
   6078 	(Sized_relobj_incr::section_offsets_): Likewise.
   6079 	* object.cc (Sized_relobj::do_for_all_local_got_entries): New
   6080 	function.
   6081 	(Sized_relobj_file::Sized_relobj_file): Remove local_got_offsets_.
   6082 	(Sized_relobj_file::layout_section): Replace refs to section_offsets_
   6083 	with accessor function.
   6084 	(Sized_relobj_file::do_layout): Likewise.
   6085 	(Sized_relobj_file::do_layout_deferred_sections): Likewise.
   6086 	(Sized_relobj_file::do_for_all_local_got_entries): Move to base class.
   6087 	(Sized_relobj_file::compute_final_local_value): Replace refs to
   6088 	section_offsets_ with accessor function.
   6089 	(Sized_relobj_file::do_finalize_local_symbols): Likewise.
   6090 	* object.h (Relobj::Relobj): Initialize new data members.
   6091 	(Relobj::add_dyn_reloc): New function.
   6092 	(Relobj::first_dyn_reloc): New function.
   6093 	(Relobj::dyn_reloc_count): New function.
   6094 	(Relobj::first_dyn_reloc_): New data member.
   6095 	(Relobj::dyn_reloc_count_): New data member.
   6096 	(Sized_relobj): Rename Sized_relobj_base to this; adjust all
   6097 	references.
   6098 	(Sized_relobj::Address): New typedef.
   6099 	(Sized_relobj::invalid_address): Move here from child class.
   6100 	(Sized_relobj::Sized_relobj): Initialize new data members.
   6101 	(Sized_relobj::sized_relobj): New function.
   6102 	(Sized_relobj::is_output_section_offset_invalid): Move here from
   6103 	child class.
   6104 	(Sized_relobj::get_output_section_offset): Likewise.
   6105 	(Sized_relobj::local_has_got_offset): Likewise.
   6106 	(Sized_relobj::local_got_offset): Likewise.
   6107 	(Sized_relobj::set_local_got_offset): Likewise.
   6108 	(Sized_relobj::do_for_all_local_got_entries): Likewise.
   6109 	(Sized_relobj::clear_got_offsets): New function.
   6110 	(Sized_relobj::section_offsets): Move here from child class.
   6111 	(Sized_relobj::do_output_section_offset): Likewise.
   6112 	(Sized_relobj::do_set_section_offset): Likewise.
   6113 	(Sized_relobj::Local_got_offsets): Likewise.
   6114 	(Sized_relobj::local_got_offsets_): Likewise.
   6115 	(Sized_relobj::section_offsets_): Likewise.
   6116 	(Sized_relobj_file): Rename Sized_relobj to this; adjust all
   6117 	references.
   6118 	(Sized_relobj_file::is_output_section_offset_invalid): Move to base
   6119 	class.
   6120 	(Sized_relobj_file::sized_relobj): New function
   6121 	(Sized_relobj_file::local_has_got_offset): Move to base class.
   6122 	(Sized_relobj_file::local_got_offset): Likewise.
   6123 	(Sized_relobj_file::set_local_got_offset): Likewise.
   6124 	(Sized_relobj_file::get_output_section_offset): Likewise.
   6125 	(Sized_relobj_file::do_for_all_local_got_entries): Likewise.
   6126 	(Sized_relobj_file::do_output_section_offset): Likewise.
   6127 	(Sized_relobj_file::do_set_section_offset): Likewise.
   6128 	(Sized_relobj_file::Local_got_offsets): Likewise.
   6129 	(Sized_relobj_file::local_got_offsets_): Likewise.
   6130 	(Sized_relobj_file::section_offsets_): Likewise.
   6131 	* output.cc (Output_reloc::Output_reloc): Adjust type of relobj
   6132 	(all constructors).
   6133 	(set_needs_dynsym_index): Convert relobj to derived class pointer.
   6134 	(Output_reloc::get_symbol_index): Likewise.
   6135 	(Output_reloc::local_section_offset): Likewise.
   6136 	(Output_reloc::get_address): Likewise.
   6137 	(Output_reloc::symbol_value): Likewise.
   6138 	(Output_data_got::reserve_slot): Move to class definition.
   6139 	(Output_data_got::reserve_local): New function.
   6140 	(Output_data_got::reserve_slot_for_global): Remove.
   6141 	(Output_data_got::reserve_global): New function.
   6142 	* output.h (Output_reloc::Output_reloc): Adjust type of relobj
   6143 	(all constructors, two instantiations).
   6144 	(Output_reloc::get_relobj): New function (two instantiations).
   6145 	(Output_reloc::u1_.relobj, Output_reloc::u2_.relobj): Adjust type.
   6146 	(Output_data_reloc_base::add): Convert relobj to derived class pointer.
   6147 	(Output_data_reloc::add_global): Adjust type of relobj.
   6148 	(Output_data_reloc::add_global_relative): Likewise.
   6149 	(Output_data_reloc::add_symbolless_global_addend): Likewise.
   6150 	(Output_data_reloc::add_local): Likewise.
   6151 	(Output_data_reloc::add_local_relative): Likewise.
   6152 	(Output_data_reloc::add_symbolless_local_addend): Likewise.
   6153 	(Output_data_reloc::add_local_section): Likewise.
   6154 	(Output_data_reloc::add_output_section): Likewise.
   6155 	(Output_data_reloc::add_absolute): Likewise.
   6156 	(Output_data_reloc::add_target_specific): Likewise.
   6157 	(Output_data_got::reserve_slot): Move definition here.
   6158 	(Output_data_got::reserve_local): New function.
   6159 	(Output_data_got::reserve_global): New function.
   6160 	* reloc.cc (Sized_relobj_file::do_read_relocs): Replace refs to
   6161 	section_offsets_ with accessor function.
   6162 	(Sized_relobj_file::write_sections): Likewise.
   6163 	(Sized_relobj_file::do_relocate_sections): Likewise.
   6164 	* target.h (Sized_target::reserve_local_got_entry): New function.
   6165 	(Sized_target::reserve_global_got_entry): New function.
   6166 	* x86_64.cc (Target_x86_64::reserve_local_got_entry): New function.
   6167 	(Target_x86_64::reserve_global_got_entry): New function.
   6168 	(Target_x86_64::init_got_plt_for_update): Create rela_dyn section.
   6169 
   6170 2011-05-23 Cary Coutant  <ccoutant (a] google.com>
   6171 
   6172 	* gold.cc (queue_middle_tasks): Process existing GOT/PLT entries.
   6173 	* incremental-dump.cc (dump_incremental_inputs): Mask high-order
   6174 	bit when checking got_type.
   6175 	* incremental.cc (Sized_incremental_binary::setup_readers):
   6176 	Store symbol table and string table locations; initialize bit vector
   6177 	of file status flags.
   6178 	(Sized_incremental_binary::do_reserve_layout): Set bit flag for
   6179 	unchanged files.
   6180 	(Sized_incremental_binary::do_process_got_plt): New function.
   6181 	(Sized_incremental_binary::get_symtab_view): Use stored locations.
   6182 	(Output_section_incremental_inputs::set_final_data_size): Record
   6183 	file index for each input file.
   6184 	(Output_section_incremental_inputs::write_got_plt): Store file index
   6185 	instead of input entry offset for each GOT entry.
   6186 	* incremental.h
   6187 	(Incremental_input_entry::Incremental_input_entry): Initialize new
   6188 	data member.
   6189 	(Incremental_input_entry::set_offset): Store file index.
   6190 	(Incremental_input_entry::get_file_index): New function.
   6191 	(Incremental_input_entry::file_index_): New data member.
   6192 	(Incremental_binary::process_got_plt): New function.
   6193 	(Incremental_binary::do_process_got_plt): New function.
   6194 	(Sized_incremental_binary::Sized_incremental_binary): Initialize new
   6195 	data members.
   6196 	(Sized_incremental_binary::~Sized_incremental_binary): New destructor.
   6197 	(Sized_incremental_binary::set_file_is_unchanged): New function.
   6198 	(Sized_incremental_binary::file_is_unchanged): New function.
   6199 	(Sized_incremental_binary::do_process_got_plt): New function.
   6200 	(Sized_incremental_binary::file_status_): New data member.
   6201 	(Sized_incremental_binary::main_symtab_loc_): New data member.
   6202 	(Sized_incremental_binary::main_strtab_loc_): New data member.
   6203 	* output.cc (Output_data_got::Got_entry::write): Add case
   6204 	RESERVED_CODE.
   6205 	(Output_data_got::add_global): Call add_got_entry.
   6206 	(Output_data_got::add_global_plt): Likewise.
   6207 	(Output_data_got::add_global_with_rel): Likewise.
   6208 	(Output_data_got::add_global_with_rela): Likewise.
   6209 	(Output_data_got::add_global_pair_with_rel): Call add_got_entry_pair.
   6210 	(Output_data_got::add_global_pair_with_rela): Likewise.
   6211 	(Output_data_got::add_local): Call add_got_entry.
   6212 	(Output_data_got::add_local_plt): Likewise.
   6213 	(Output_data_got::add_local_with_rel): Likewise.
   6214 	(Output_data_got::add_local_with_rela): Likewise.
   6215 	(Output_data_got::add_local_pair_with_rel): Call add_got_entry_pair.
   6216 	(Output_data_got::add_local_pair_with_rela): Likewise.
   6217 	(Output_data_got::reserve_slot): New function.
   6218 	(Output_data_got::reserve_slot_for_global): New function.
   6219 	(Output_data_got::add_got_entry): New function.
   6220 	(Output_data_got::add_got_entry_pair): New function.
   6221 	(Output_section::add_output_section_data): Edit FIXME.
   6222 	* output.h
   6223 	(Output_section_data_build::Output_section_data_build): New
   6224 	constructor with size parameter.
   6225 	(Output_data_space::Output_data_space): Likewise.
   6226 	(Output_data_got::Output_data_got): Initialize new data member; new
   6227 	constructor with size parameter.
   6228 	(Output_data_got::add_constant): Call add_got_entry.
   6229 	(Output_data_got::reserve_slot): New function.
   6230 	(Output_data_got::reserve_slot_for_global): New function.
   6231 	(class Output_data_got::Got_entry): Add RESERVED_CODE.
   6232 	(Output_data_got::add_got_entry): New function.
   6233 	(Output_data_got::add_got_entry_pair): New function.
   6234 	(Output_data_got::free_list_): New data member.
   6235 	* target.h (Sized_target::init_got_plt_for_update): New function.
   6236 	(Sized_target::register_global_plt_entry): New function.
   6237 	* x86_64.cc (Output_data_plt_x86_64::Output_data_plt_x86_64):
   6238 	Initialize new data member; call init; add constructor with PLT count.
   6239 	(Output_data_plt_x86_64::init): New function.
   6240 	(Output_data_plt_x86_64::add_relocation): New function.
   6241 	(Output_data_plt_x86_64::reserve_slot): New function.
   6242 	(Output_data_plt_x86_64::free_list_): New data member.
   6243 	(Target_x86_64::init_got_plt_for_update): New function.
   6244 	(Target_x86_64::register_global_plt_entry): New function.
   6245 	(Output_data_plt_x86_64::add_entry): Allocate from free list for
   6246 	incremental updates.
   6247 	(Output_data_plt_x86_64::add_relocation): New function.
   6248 	* testsuite/object_unittest.cc (Object_test): Set default options.
   6249 
   6250 2011-05-16  Ian Lance Taylor  <iant (a] google.com>
   6251 
   6252 	* options.h (class General_options): Make -i a synonym for -r.
   6253 
   6254 2011-05-16  Ian Lance Taylor  <iant (a] google.com>
   6255 
   6256 	* testsuite/tls_test_main.cc: Use semaphores instead of mutexes.
   6257 
   6258 2011-05-10 Cary Coutant  <ccoutant (a] google.com>
   6259 
   6260 	* object.cc (Sized_relobj::do_count_local_symbols): Check for
   6261 	strip_all (-s).
   6262 
   6263 2011-05-06  Ian Lance Taylor  <iant (a] google.com>
   6264 
   6265 	* layout.cc (Layout::layout): If the output section flags change,
   6266 	update the ordering.
   6267 
   6268 2011-04-25 Cary Coutant  <ccoutant (a] google.com>
   6269 
   6270 	* incremental-dump.cc (dump_incremental_inputs): Print local
   6271 	symbol info for each input file.
   6272 	* incremental.cc
   6273 	(Output_section_incremental_inputs::set_final_data_size): Add local
   6274 	symbol info to input file entries in incremental info.
   6275 	(Output_section_incremental_inputs::write_info_blocks): Likewise.
   6276 	(Sized_incr_relobj::Sized_incr_relobj): Initialize new data members.
   6277 	(Sized_incr_relobj::do_add_symbols): Cosmetic change.
   6278 	(Sized_incr_relobj::do_count_local_symbols): Replace stub with
   6279 	implementation.
   6280 	(Sized_incr_relobj::do_finalize_local_symbols): Likewise.
   6281 	(Sized_incr_relobj::do_relocate): Write the local symbols.
   6282 	(Sized_incr_dynobj::do_add_symbols): Cosmetic change.
   6283 	* incremental.h (Incremental_inputs_reader::get_symbol_offset):
   6284 	Adjust size of input file header.
   6285 	(Incremental_inputs_reader::get_local_symbol_offset): New function.
   6286 	(Incremental_inputs_reader::get_local_symbol_count): New function.
   6287 	(Incremental_inputs_reader::get_input_section): Adjust size of input
   6288 	file header.
   6289 	(Incremental_inputs_reader::get_global_symbol_reader): Likewise.
   6290 	(Sized_incr_relobj::This): New typedef.
   6291 	(Sized_incr_relobj::sym_size): New const data member.
   6292 	(Sized_incr_relobj::Local_symbol): New struct.
   6293 	(Sized_incr_relobj::do_output_local_symbol_count): New function.
   6294 	(Sized_incr_relobj::do_local_symbol_offset): New function.
   6295 	(Sized_incr_relobj::local_symbol_count_): New data member.
   6296 	(Sized_incr_relobj::output_local_dynsym_count_): New data member.
   6297 	(Sized_incr_relobj::local_symbol_index_): New data member.
   6298 	(Sized_incr_relobj::local_symbol_offset_): New data member.
   6299 	(Sized_incr_relobj::local_dynsym_offset_): New data member.
   6300 	(Sized_incr_relobj::local_symbols_): New data member.
   6301 	* object.h (Relobj::output_local_symbol_count): New function.
   6302 	(Relobj::local_symbol_offset): New function.
   6303 	(Relobj::do_output_local_symbol_count): New function.
   6304 	(Relobj::do_local_symbol_offset): New function.
   6305 	(Sized_relobj::do_output_local_symbol_count): New function.
   6306 	(Sized_relobj::do_local_symbol_offset): New function.
   6307 
   6308 2011-04-22  Vladimir Simonov  <sv (a] sw.ru>
   6309 
   6310 	* descriptors.cc (set_close_on_exec): New function.
   6311 	(Descriptors::open): Use set_close_on_exec.
   6312 	* output.cc (S_ISLNK): Define if not defined.
   6313 
   6314 2011-04-22 Cary Coutant  <ccoutant (a] google.com>
   6315 
   6316 	* incremental.cc (Sized_incremental_binary::setup_readers): Allocate
   6317 	global symbol map.
   6318 	(Sized_incremental_binary::do_apply_incremental_relocs): New function.
   6319 	(Sized_incr_relobj::do_add_symbols): Add symbols to global symbol map.
   6320 	(Sized_incr_relobj::do_relocate): Remap section indices in incremental
   6321 	relocations.
   6322 	(Sized_incr_dynobj::do_add_symbols): Add symbols to global symbol map.
   6323 	(Sized_incr_dynobj::do_for_all_global_symbols): Remove FIXME.
   6324 	(Sized_incr_dynobj::do_for_all_local_got_entries): Likewise.
   6325 	* incremental.h
   6326 	(Incremental_inputs_reader::global_symbol_reader_at_offset): New
   6327 	function.
   6328 	(Incremental_binary::apply_incremental_relocs): New function.
   6329 	(Incremental_binary::do_apply_incremental_relocs): New function.
   6330 	(Sized_incremental_binary::Sized_incremental_binary): Initialize new
   6331 	data member.
   6332 	(Sized_incremental_binary::add_global_symbol): New function.
   6333 	(Sized_incremental_binary::global_symbol): New function.
   6334 	(Sized_incremental_binary::do_apply_incremental_relocs): New function.
   6335 	(Sized_incremental_binary::symbol_map_): New data member.
   6336 	* layout.cc (Layout_task_runner::run): Apply incremental relocations.
   6337 	* target.h (Sized_target::apply_relocation): New function.
   6338 	* target-reloc.h (apply_relocation): New function.
   6339 	* x86_64.cc (Target_x86_64::apply_relocation): New function.
   6340 
   6341 2011-04-22  Doug Kwan  <dougkwan (a] google.com>
   6342 
   6343 	* arm.cc (Arm_output_section::Arm_output_section): Set SHF_LINK_ORDER
   6344 	flag of a SHT_ARM_EXIDX section.
   6345 	* testsuite/Makefile.am (arm_exidx_test): New test rules.
   6346 	* testsuite/Makefile.in: Regenerate.
   6347 	* testsuite/arm_exidx_test.s: New file.
   6348 	* testsuite/arm_exidx_test.sh: Same.
   6349 
   6350 2011-04-20 Cary Coutant  <ccoutant (a] google.com>
   6351 
   6352 	PR gold/12689
   6353 	* archive.h (Incremental_archive_entry::Archive_member):
   6354 	Initialize arg_serial_ (second constructor).
   6355 
   6356 2011-04-17  Ian Lance Taylor  <iant (a] google.com>
   6357 
   6358 	* object.cc (Relocate_info::location): Simplify location string.
   6359 	* errors.cc (Errors::error_at_location): Don't print program
   6360 	name.
   6361 	(Errors::warning_at_location): Likewise.
   6362 	(Errors::undefined_symbol): Likewise.
   6363 	* testsuite/debug_msg.sh: Update accordingly.
   6364 
   6365 2011-04-14 Cary Coutant  <ccoutant (a] google.com>
   6366 
   6367 	* gold/layout.cc (Layout::symtab_section_offset): New function.
   6368 	* gold/layout.h (Layout::symtab_section_offset): New function.
   6369 	* gold/reloc.cc (Sized_relobj::do_relocate): Call it.
   6370 
   6371 2011-04-12  Ian Lance Taylor  <iant (a] google.com>
   6372 
   6373 	* configure.ac: Check for sys/mman.h and mmap.  Check for mremap
   6374 	with MREMAP_MAYMOVE.
   6375 	* output.h (class Output_file): Add map_is_allocated_ field.
   6376 	* output.cc: Only #include <sys/mman.h> if it exists.  If mmap is
   6377 	not available, provide stubs.  If mremap is not available, #define
   6378 	it to gold_mremap.
   6379 	(MREMAP_MAYMOVE): Define if not defined.
   6380 	(Output_file::Output_file): Initialize map_is_allocated_.
   6381 	(Output_file::resize): Check map_is_allocated_.
   6382 	(Output_file::map_anonymous): If mmap fails, use malloc.
   6383 	(Output_file::unmap): Don't do anything for an anonymous map.
   6384 	* fileread.cc: Only #include <sys/mman.h> if it exists.  If mmap
   6385 	is not available, provide stubs.
   6386 	(File_read::View::~View): Use free rather than delete[].
   6387 	(File_read::make_view): Use malloc rather than new[].  If mmap
   6388 	fails, use malloc.
   6389 	(File_read::find_or_make_view): Use malloc rather than new[].
   6390 	* gold.h: Remove HAVE_REMAP code.
   6391 	* mremap.c: #include <errno.h>.  Only #include <sys/mman.h> if it
   6392 	exists.  Rename mremap to gold_mremap.  If mmap is not available
   6393 	don't do anything.
   6394 	* configure, config.in: Rebuild.
   6395 
   6396 2011-04-11  Ian Lance Taylor  <iant (a] google.com>
   6397 
   6398 	* incremental.cc (Sized_incr_relobj::do_add_symbols): Always
   6399 	initialize local variable v.
   6400 
   6401 2011-04-11  Cary Coutant  <ccoutant (a] google.com>
   6402 
   6403 	* archive.cc (Archive::include_member): Adjust call to
   6404 	report_object.
   6405 	(Add_archive_symbols::run): Track argument serial numbers.
   6406 	(Lib_group::include_member): Likewise.
   6407 	(Add_lib_group_symbols::run): Adjust call to report_archive_begin.
   6408 	* archive.h (Incremental_archive_entry::Archive_member):
   6409 	Initialize arg_serial_.
   6410 	(Archive_member::arg_serial_): New data member.
   6411 	* dynobj.cc (Dynobj::Dynobj): Allow input_file_ to be NULL.
   6412 	(Sized_dynobj::do_add_symbols): Track symbols when doing an
   6413 	incremental link.
   6414 	(Sized_dynobj::do_for_all_local_got_entries): New function.
   6415 	* dynobj.h: (Sized_dynobj::do_for_all_local_got_entries): New
   6416 	function.
   6417 	* fileread.cc (get_mtime): New function.
   6418 	* fileread.h (get_mtime): New function.
   6419 	* gold.cc (queue_initial_tasks): Check for incremental update.
   6420 	(process_incremental_input): New function.
   6421 	(queue_middle_tasks): Don't force valid target for incremental
   6422 	update.
   6423 	* incremental-dump.cc (find_input_containing_global): Adjust
   6424 	size of symbol info entry.
   6425 	(dump_incremental_inputs): Dump argument serial number and
   6426 	in_system_directory flag; bias shndx by 1; print symbol names
   6427 	when dumping per-file symbol lists; use new symbol info readers.
   6428 	* incremental.cc
   6429 	(Output_section_incremental_inputs:update_data_size): New function.
   6430 	(Sized_incremental_binary::setup_readers): Setup input readers
   6431 	for each input file; build maps for files added from libraries
   6432 	and scripts.
   6433 	(Sized_incremental_binary::check_input_args): New function.
   6434 	(Sized_incremental_binary::do_check_inputs): Build map of argument
   6435 	serial numbers to input arguments.
   6436 	(Sized_incremental_binary::do_file_has_changed): Rename
   6437 	do_file_is_unchanged to this; compare file modification times.
   6438 	(Sized_incremental_binary::do_init_layout): New function.
   6439 	(Sized_incremental_binary::do_reserve_layout): New function.
   6440 	(Sized_incremental_binary::do_get_input_reader): Remove.
   6441 	(Sized_incremental_binary::get_symtab_view): New function.
   6442 	(Incremental_checker::can_incrementally_link_output_file): Remove.
   6443 	(Incremental_inputs::report_command_line): Exclude --debug options.
   6444 	(Incremental_inputs::report_archive_begin): Add parameter; track
   6445 	argument serial numbers; don't put input file entry for archive
   6446 	before archive members.
   6447 	(Incremental_inputs::report_archive_end): Put input file entry
   6448 	for archive after archive members.
   6449 	(Incremental_inputs::report_object): Add parameter; track argument
   6450 	serial numbers and in_system_directory flag.
   6451 	(Incremental_inputs::report_script): Add parameter; track argument
   6452 	serial numbers.
   6453 	(Output_section_incremental_inputs::set_final_data_size): Adjust
   6454 	size of symbol info entry; check for forwarding symbols.
   6455 	(Output_section_incremental_inputs::write_input_files): Write
   6456 	in_system_directory flag and argument serial number.
   6457 	(Output_section_incremental_inputs::write_info_blocks): Map section
   6458 	indices between incremental info and original input file; store
   6459 	input section index for each symbol.
   6460 	(class Local_got_offset_visitor): Derive from Got_offset_list::Visitor;
   6461 	change operator() to visit().
   6462 	(class Global_got_offset_visitor): Likewise.
   6463 	(class Global_symbol_visitor_got_plt):
   6464 	(Output_section_incremental_inputs::write_got_plt): Use new visitor
   6465 	classes.
   6466 	(Sized_incr_relobj::Sized_incr_relobj): New constructor.
   6467 	(Sized_incr_relobj::do_read_symbols): New function.
   6468 	(Sized_incr_relobj::do_layout): New function.
   6469 	(Sized_incr_relobj::do_layout_deferred_sections): New function.
   6470 	(Sized_incr_relobj::do_add_symbols): New function.
   6471 	(Sized_incr_relobj::do_should_include_member): New function.
   6472 	(Sized_incr_relobj::do_for_all_global_symbols): New function.
   6473 	(Sized_incr_relobj::do_for_all_local_got_entries): New function.
   6474 	(Sized_incr_relobj::do_section_size): New function.
   6475 	(Sized_incr_relobj::do_section_name): New function.
   6476 	(Sized_incr_relobj::do_section_contents): New function.
   6477 	(Sized_incr_relobj::do_section_flags): New function.
   6478 	(Sized_incr_relobj::do_section_entsize): New function.
   6479 	(Sized_incr_relobj::do_section_address): New function.
   6480 	(Sized_incr_relobj::do_section_type): New function.
   6481 	(Sized_incr_relobj::do_section_link): New function.
   6482 	(Sized_incr_relobj::do_section_info): New function.
   6483 	(Sized_incr_relobj::do_section_addralign): New function.
   6484 	(Sized_incr_relobj::do_initialize_xindex): New function.
   6485 	(Sized_incr_relobj::do_get_global_symbol_counts): New function.
   6486 	(Sized_incr_relobj::do_read_relocs): New function.
   6487 	(Sized_incr_relobj::do_gc_process_relocs): New function.
   6488 	(Sized_incr_relobj::do_scan_relocs): New function.
   6489 	(Sized_incr_relobj::do_count_local_symbols): New function.
   6490 	(Sized_incr_relobj::do_finalize_local_symbols): New function.
   6491 	(Sized_incr_relobj::do_set_local_dynsym_indexes): New function.
   6492 	(Sized_incr_relobj::do_set_local_dynsym_offset): New function.
   6493 	(Sized_incr_relobj::do_relocate): New function.
   6494 	(Sized_incr_relobj::do_set_section_offset): New function.
   6495 	(Sized_incr_dynobj::Sized_incr_dynobj): New function.
   6496 	(Sized_incr_dynobj::do_read_symbols): New function.
   6497 	(Sized_incr_dynobj::do_layout): New function.
   6498 	(Sized_incr_dynobj::do_add_symbols): New function.
   6499 	(Sized_incr_dynobj::do_should_include_member): New function.
   6500 	(Sized_incr_dynobj::do_for_all_global_symbols): New function.
   6501 	(Sized_incr_dynobj::do_for_all_local_got_entries): New function.
   6502 	(Sized_incr_dynobj::do_section_size): New function.
   6503 	(Sized_incr_dynobj::do_section_name): New function.
   6504 	(Sized_incr_dynobj::do_section_contents): New function.
   6505 	(Sized_incr_dynobj::do_section_flags): New function.
   6506 	(Sized_incr_dynobj::do_section_entsize): New function.
   6507 	(Sized_incr_dynobj::do_section_address): New function.
   6508 	(Sized_incr_dynobj::do_section_type): New function.
   6509 	(Sized_incr_dynobj::do_section_link): New function.
   6510 	(Sized_incr_dynobj::do_section_info): New function.
   6511 	(Sized_incr_dynobj::do_section_addralign): New function.
   6512 	(Sized_incr_dynobj::do_initialize_xindex): New function.
   6513 	(Sized_incr_dynobj::do_get_global_symbol_counts): New function.
   6514 	(make_sized_incremental_object): New function.
   6515 	(Incremental_library::copy_unused_symbols): New function.
   6516 	(Incremental_library::do_for_all_unused_symbols): New function.
   6517 	* incremental.h (enum Incremental_input_flags): New type.
   6518 	(class Incremental_checker): Remove.
   6519 	(Incremental_input_entry::Incremental_input_entry): Add argument
   6520 	serial number.
   6521 	(Incremental_input_entry::arg_serial): New function.
   6522 	(Incremental_input_entry::set_is_in_system_directory): New function.
   6523 	(Incremental_input_entry::is_in_system_directory): New function.
   6524 	(Incremental_input_entry::arg_serial_): New data member.
   6525 	(Incremental_input_entry::is_in_system_directory_): New data member.
   6526 	(class Script_info): Move here from script.h.
   6527 	(Script_info::Script_info): Add filename parameter.
   6528 	(Script_info::filename): New function.
   6529 	(Script_info::filename_): New data member.
   6530 	(Incremental_script_entry::Incremental_script_entry): Add argument
   6531 	serial number.
   6532 	(Incremental_object_entry::Incremental_object_entry): Likewise.
   6533 	(Incremental_object_entry::add_input_section): Build list of input
   6534 	sections with map to original shndx.
   6535 	(Incremental_object_entry::get_input_section_index): New function.
   6536 	(Incremental_object_entry::shndx_): New data member.
   6537 	(Incremental_object_entry::name_key_): Rename; adjust all refs.
   6538 	(Incremental_object_entry::sh_size_): Rename; adjust all refs.
   6539 	(Incremental_archive_entry::Incremental_archive_entry): Add argument
   6540 	serial number.
   6541 	(Incremental_inputs::report_archive_begin): Likewise.
   6542 	(Incremental_inputs::report_object): Likewise.
   6543 	(Incremental_inputs::report_script): Likewise.
   6544 	(class Incremental_global_symbol_reader): New class.
   6545 	(Incremental_input_entry_reader::Incremental_input_entry_reader): Read
   6546 	and store flags and input file type.
   6547 	(Incremental_input_entry_reader::arg_serial): New function.
   6548 	(Incremental_input_entry_reader::type): Extract type from flags.
   6549 	(Incremental_input_entry_reader::is_in_system_directory): New function.
   6550 	(Incremental_input_entry_reader::get_input_section_count): Call
   6551 	accessor function for type.
   6552 	(Incremental_input_entry_reader::get_symbol_offset): Call accessor
   6553 	function for type; adjust size of global symbol entry.
   6554 	(Incremental_input_entry_reader::get_global_symbol_count): Call
   6555 	accessor function for type.
   6556 	(Incremental_input_entry_reader::get_object_count): Likewise.
   6557 	(Incremental_input_entry_reader::get_object_offset): Likewise.
   6558 	(Incremental_input_entry_reader::get_member_count): Likewise.
   6559 	(Incremental_input_entry_reader::get_unused_symbol_count): Likewise.
   6560 	(Incremental_input_entry_reader::get_member_offset): Likewise.
   6561 	(Incremental_input_entry_reader::get_unused_symbol): Likewise.
   6562 	(Incremental_input_entry_reader::Global_symbol_info): Remove.
   6563 	(Incremental_input_entry_reader::get_global_symbol_info): Remove.
   6564 	(Incremental_input_entry_reader::get_global_symbol_reader): New
   6565 	function.
   6566 	(Incremental_input_entry_reader::get_output_symbol_index): New
   6567 	function.
   6568 	(Incremental_input_entry_reader::type_): Remove.
   6569 	(Incremental_input_entry_reader::flags_): New data member.
   6570 	(Incremental_inputs_reader::input_file_offset): New function.
   6571 	(Incremental_inputs_reader::input_file_index): New function.
   6572 	(Incremental_inputs_reader::input_file): Call input_file_offset.
   6573 	(Incremental_inputs_reader::input_file_at_offset): New function.
   6574 	(Incremental_relocs_reader::get_r_type): Reformat.
   6575 	(Incremental_relocs_reader::get_r_shndx): Reformat.
   6576 	(Incremental_relocs_reader::get_r_offset): Reformat.
   6577 	(Incremental_relocs_reader::data): New function.
   6578 	(Incremental_binary::Incremental_binary): Initialize new data members.
   6579 	(Incremental_binary::check_inputs): Add cmdline parameter.
   6580 	(Incremental_binary::file_is_unchanged): Remove.
   6581 	(Input_reader::arg_serial): New function.
   6582 	(Input_reader::get_unused_symbol_count): New function.
   6583 	(Input_reader::get_unused_symbol): New function.
   6584 	(Input_reader::do_arg_serial): New function.
   6585 	(Input_reader::do_get_unused_symbol_count): New function.
   6586 	(Input_reader::do_get_unused_symbol): New function.
   6587 	(Incremental_binary::input_file_count): New function.
   6588 	(Incremental_binary::get_input_reader): Change signature to use
   6589 	index instead of filename.
   6590 	(Incremental_binary::file_has_changed): New function.
   6591 	(Incremental_binary::get_input_argument): New function.
   6592 	(Incremental_binary::get_library): New function.
   6593 	(Incremental_binary::get_script_info): New function.
   6594 	(Incremental_binary::init_layout): New function.
   6595 	(Incremental_binary::reserve_layout): New function.
   6596 	(Incremental_binary::output_file): New function.
   6597 	(Incremental_binary::do_check_inputs): New function.
   6598 	(Incremental_binary::do_file_is_unchanged): Remove.
   6599 	(Incremental_binary::do_file_has_changed): New function.
   6600 	(Incremental_binary::do_init_layout): New function.
   6601 	(Incremental_binary::do_reserve_layout): New function.
   6602 	(Incremental_binary::do_input_file_count): New function.
   6603 	(Incremental_binary::do_get_input_reader): Change signature.
   6604 	(Incremental_binary::input_args_map_): New data member.
   6605 	(Incremental_binary::library_map_): New data member.
   6606 	(Incremental_binary::script_map_): New data member.
   6607 	(Sized_incremental_binary::Sized_incremental_binary): Initialize
   6608 	new data members.
   6609 	(Sized_incremental_binary::output_section): New function.
   6610 	(Sized_incremental_binary::inputs_reader): Add const.
   6611 	(Sized_incremental_binary::symtab_reader): Add const.
   6612 	(Sized_incremental_binary::relocs_reader): Add const.
   6613 	(Sized_incremental_binary::got_plt_reader): Add const.
   6614 	(Sized_incremental_binary::get_symtab_view): New function.
   6615 	(Sized_incremental_binary::Inputs_reader): New typedef.
   6616 	(Sized_incremental_binary::Input_entry_reader): New typedef.
   6617 	(Sized_incremental_binary::do_check_inputs): Add cmdline parameter.
   6618 	(Sized_incremental_binary::do_file_is_unchanged): Remove.
   6619 	(Sized_incremental_binary::do_file_has_changed): New function.
   6620 	(Sized_incremental_binary::do_init_layout): New function.
   6621 	(Sized_incremental_binary::do_reserve_layout): New function.
   6622 	(Sized_input_reader::Inputs_reader): Remove.
   6623 	(Sized_input_reader::Input_entry_reader): Remove.
   6624 	(Sized_input_reader::do_arg_serial): New function.
   6625 	(Sized_input_reader::do_get_unused_symbol_count): New function.
   6626 	(Sized_input_reader::do_get_unused_symbol): New function.
   6627 	(Sized_incremental_binary::do_input_file_count): New function.
   6628 	(Sized_incremental_binary::do_get_input_reader): Change signature;
   6629 	use index instead of filename.
   6630 	(Sized_incremental_binary::section_map_): New data member.
   6631 	(Sized_incremental_binary::input_entry_readers_): New data member.
   6632 	(class Sized_incr_relobj): New class.
   6633 	(class Sized_incr_dynobj): New class.
   6634 	(make_sized_incremental_object): New function.
   6635 	(class Incremental_library): New class.
   6636 	* layout.cc (Free_list::num_lists): New static data member.
   6637 	(Free_list::num_nodes): New static data member.
   6638 	(Free_list::num_removes): New static data member.
   6639 	(Free_list::num_remove_visits): New static data member.
   6640 	(Free_list::num_allocates): New static data member.
   6641 	(Free_list::num_allocate_visits): New static data member.
   6642 	(Free_list::init): New function.
   6643 	(Free_list::remove): New function.
   6644 	(Free_list::allocate): New function.
   6645 	(Free_list::dump): New function.
   6646 	(Free_list::print_stats): New function.
   6647 	(Layout_task_runner::run): Resize output file for incremental updates.
   6648 	(Layout::Layout): Initialize new data members.
   6649 	(Layout::set_incremental_base): New function.
   6650 	(Layout::init_fixed_output_section): New function.
   6651 	(Layout::layout_eh_frame): Do not build .eh_frame_hdr section for
   6652 	incremental updates.
   6653 	(Layout::create_gold_note): Do not create gold note section for
   6654 	incremental updates.
   6655 	(Layout::set_segment_offsets): Do not recalculate RELRO alignment
   6656 	for incremental updates.
   6657 	(Layout::set_section_offsets): For incremental updates, allocate space
   6658 	from free list.
   6659 	(Layout::create_symtab_sections): Layout with offsets relative to
   6660 	start of section; for incremental updates, allocate space from free
   6661 	list.
   6662 	(Layout::create_shdrs): For incremental updates, allocate space from
   6663 	free list.
   6664 	(Layout::finish_dynamic_section): For incremental updates, do not
   6665 	check --as-needed (fixed in subsequent patch).
   6666 	* layout.h (class Free_list): New class.
   6667 	(Layout::set_incremental_base): New function.
   6668 	(Layout::incremental_base): New function.
   6669 	(Layout::init_fixed_output_section): New function.
   6670 	(Layout::allocate): New function.
   6671 	(Layout::incremental_base_): New data member.
   6672 	(Layout::free_list_): New data member.
   6673 	* main.cc (main): Print Free_list statistics.
   6674 	* object.cc (Relobj::finalize_incremental_relocs): Add
   6675 	clear_counts parameter; clear counts only when clear_counts is set.
   6676 	(Sized_relobj::Sized_relobj): Initialize new base class.
   6677 	(Sized_relobj::do_layout): Don't report special sections.
   6678 	(Sized_relobj::do_for_all_local_got_entries): New function.
   6679 	(Sized_relobj::write_local_symbols): Add symtab_off parameter; add
   6680 	symtab_off to all symbol table offsets.
   6681 	(Sized_relobj::do_get_global_symbol_counts): Add typename keyword.
   6682 	* object.h (class Got_offset_list): Move to top of file.
   6683 	(Object::Object): Allow case where input_file == NULL.
   6684 	(Object::~Object): Likewise.
   6685 	(Object::input_file): Assert that input_file != NULL.
   6686 	(Object::lock): Allow case where input_file == NULL.
   6687 	(Object::unlock): Likewise.
   6688 	(Object::is_locked): Likewise.
   6689 	(Object::token): Likewise.
   6690 	(Object::release): Likewise.
   6691 	(Object::is_incremental): New function.
   6692 	(Object::get_mtime): New function.
   6693 	(Object::for_all_local_got_entries): New function.
   6694 	(Object::clear_view_cache_marks): Allow case where input_file == NULL.
   6695 	(Object::set_is_in_system_directory): New function.
   6696 	(Object::is_in_system_directory): New function.
   6697 	(Object::do_is_incremental): New function.
   6698 	(Object::do_get_mtime): New function.
   6699 	(Object::do_for_all_local_got_entries): New function.
   6700 	(Object::is_in_system_directory_): New data member.
   6701 	(Relobj::finalize_incremental_relocs): Add clear_counts parameter.
   6702 	(class Sized_relobj_base): New class.
   6703 	(class Sized_relobj): Derive from Sized_relobj_base.
   6704 	(class Sized_relobj::Symbols): Redeclare from base class.
   6705 	(class Sized_relobj::local_got_offset_list): Remove.
   6706 	(class Sized_relobj::Output_sections): Redeclare from base class.
   6707 	(class Sized_relobj::do_for_all_local_got_entries): New function.
   6708 	(class Sized_relobj::write_local_symbols): Add offset parameter.
   6709 	(class Sized_relobj::local_symbol_offset_): Update comment.
   6710 	(class Sized_relobj::local_dynsym_offset_): Update comment.
   6711 	* options.cc (Input_arguments::add_file): Remove const.
   6712 	* options.h (Input_file_argument::Input_file_argument):
   6713 	Initialize arg_serial_ (all constructors).
   6714 	(Input_file_argument::set_arg_serial): New function.
   6715 	(Input_file_argument::arg_serial): New function.
   6716 	(Input_file_argument::arg_serial_): New data member.
   6717 	(Input_arguments::Input_arguments): Initialize file_count_.
   6718 	(Input_arguments::add_file): Remove const.
   6719 	(Input_arguments::number_of_input_files): New function.
   6720 	(Input_arguments::file_count_): New data member.
   6721 	(Command_line::number_of_input_files): Call
   6722 	Input_arguments::number_of_input_files.
   6723 	* output.cc (Output_segment_headers::Output_segment_headers):
   6724 	Set current size.
   6725 	(Output_section::Input_section::current_data_size): New function.
   6726 	(Output_section::Output_section): Initialize new data members.
   6727 	(Output_section::add_input_section): Don't do merge sections for
   6728 	an incremental link; allocate space from free list for an
   6729 	incremental update.
   6730 	(Output_section::add_output_section_data): Allocate space from
   6731 	free list for an incremental update.
   6732 	(Output_section::update_data_size): New function.
   6733 	(Output_section::set_fixed_layout): New function.
   6734 	(Output_section::reserve): New function.
   6735 	(Output_segment::set_section_addresses): Remove const.
   6736 	(Output_segment::set_section_list_addresses): Remove const; allocate
   6737 	space from free list for an incremental update.
   6738 	(Output_segment::set_offset): Adjust size of RELRO segment for an
   6739 	incremental update.
   6740 	* output.h (Output_data::current_data_size): Move here from
   6741 	child classes.
   6742 	(Output_data::pre_finalize_data_size): New function.
   6743 	(Output_data::update_data_size): New function.
   6744 	(Output_section_headers::update_data_size): new function.
   6745 	(Output_section_data_build::current_data_size): Move to Output_data.
   6746 	(Output_data_strtab::update_data_size): New function.
   6747 	(Output_section::current_data_size): Move to Output_data.
   6748 	(Output_section::set_fixed_layout): New function.
   6749 	(Output_section::has_fixed_layout): New function.
   6750 	(Output_section::reserve): New function.
   6751 	(Output_section::update_data_size): New function.
   6752 	(Output_section::has_fixed_layout_): New data member.
   6753 	(Output_section::free_list_): New data member.
   6754 	(Output_segment::set_section_addresses): Remove const.
   6755 	(Output_segment::set_section_list_addresses): Remove const.
   6756 	* plugin.cc (Sized_pluginobj::do_for_all_local_got_entries):
   6757 	New function.
   6758 	* plugin.h (Sized_pluginobj::do_for_all_local_got_entries):
   6759 	New function.
   6760 	* readsyms.cc (Read_symbols::do_read_symbols): Add library
   6761 	parameter when calling Add_symbols constructor; store argument
   6762 	serial number for members of a lib group.
   6763 	(Add_symbols::locks): Allow case where token == NULL.
   6764 	(Add_symbols::run): Report libraries denoted by --start-lib/--end-lib.
   6765 	(Read_member::~Read_member): New function.
   6766 	(Read_member::is_runnable): New function.
   6767 	(Read_member::locks): New function.
   6768 	(Read_member::run): New function.
   6769 	(Check_script::~Check_script): New function.
   6770 	(Check_script::is_runnable): New function.
   6771 	(Check_script::locks): New function.
   6772 	(Check_script::run): New function.
   6773 	(Check_library::~Check_library): New function.
   6774 	(Check_library::is_runnable): New function.
   6775 	(Check_library::locks): New function.
   6776 	(Check_library::run): New function.
   6777 	* readsyms.h (Add_symbols::Add_symbols): Add library parameter.
   6778 	(Add_symbols::library_): New data member.
   6779 	(class Read_member): New class.
   6780 	(class Check_script): New class.
   6781 	(class Check_library): New class.
   6782 	* reloc.cc (Read_relocs::is_runnable): Allow case where
   6783 	token == NULL.
   6784 	(Read_relocs::locks): Likewise.
   6785 	(Scan_relocs::locks): Likewise.
   6786 	(Relocate_task::locks): Likewise.
   6787 	(Sized_relobj::do_scan_relocs): Tell finalize_incremental_relocs
   6788 	to clear counters.
   6789 	(Sized_relobj::incremental_relocs_scan): Fix comment.
   6790 	(Sized_relobj::do_relocate): Pass output file offset to
   6791 	write_local_symbols.
   6792 	(Sized_relobj::incremental_relocs_write_reltype): Use reloc_size
   6793 	from class declaration.
   6794 	* script.cc (read_input_script): Allocate Script_info; pass
   6795 	argument serial number to report_script.
   6796 	* script.h (class Script_info): Move to incremental.h.
   6797 	* symtab.cc (Symbol_table::add_from_incrobj): New function.
   6798 	* symtab.h (Symbol_table::add_from_incrobj): New function.
   6799 	(Symbol_table::set_file_offset): New function.
   6800 
   6801 2011-04-05  Cary Coutant  <ccoutant (a] google.com>
   6802 
   6803 	* incremental-dump.cc (dump_incremental_inputs): Change signature
   6804 	to take a Sized_incremental_binary; change caller.  Use readers
   6805 	in Sized_incremental_binary.
   6806 	* incremental.cc
   6807 	(Sized_incremental_binary::find_incremental_inputs_sections):
   6808 	Rename do_find_incremental_inputs_sections to this.
   6809 	(Sized_incremental_binary::setup_readers): New function.
   6810 	(Sized_incremental_binary::do_check_inputs): Check
   6811 	has_incremental_info_ flag; move setup code to setup_readers;
   6812 	use input readers.
   6813 	(Sized_incremental_binary::do_file_is_unchanged): New function.
   6814 	(Sized_incremental_binary::do_get_input_reader): New function.
   6815 	* incremental.h (class Incremental_binary): Move to end of file.
   6816 	(Incremental_binary::file_is_unchanged): New function.
   6817 	(Incremental_binary::do_file_is_unchanged): New function.
   6818 	(Incremental_binary::Input_reader): New class.
   6819 	(Incremental_binary::get_input_reader): New function.
   6820 	(class Sized_incremental_binary): Move to end of file.
   6821 	(Sized_incremental_binary::Sized_incremental_binary): Setup the
   6822 	input section reader classes.
   6823 	(Sized_incremental_binary::has_incremental_info): New function.
   6824 	(Sized_incremental_binary::inputs_reader): New function.
   6825 	(Sized_incremental_binary::symtab_reader): New function.
   6826 	(Sized_incremental_binary::relocs_reader): New function.
   6827 	(Sized_incremental_binary::got_plt_reader): New function.
   6828 	(Sized_incremental_binary::do_file_is_unchanged): New function.
   6829 	(Sized_incremental_binary::Sized_input_reader): New class.
   6830 	(Sized_incremental_binary::get_input_reader): New function.
   6831 	(Sized_incremental_binary::find_incremental_inputs_sections):
   6832 	Rename do_find_incremental_inputs_sections to this.
   6833 	(Sized_incremental_binary::setup_readers): New function.
   6834 	(Sized_incremental_binary::has_incremental_info_): New data member.
   6835 	(Sized_incremental_binary::inputs_reader_): New data member.
   6836 	(Sized_incremental_binary::symtab_reader_): New data member.
   6837 	(Sized_incremental_binary::relocs_reader_): New data member.
   6838 	(Sized_incremental_binary::got_plt_reader_): New data member.
   6839 	(Sized_incremental_binary::current_input_file_): New data member.
   6840 
   6841 2011-04-05  Paul Pluzhnikov  <ppluzhnikov (a] google.com>
   6842 
   6843 	PR gold/12640
   6844 	* dwarf_reader.cc (Sized_dwarf_line_info): Fix vector bounds
   6845 	violation.
   6846 
   6847 2011-03-30  Cary Coutant  <ccoutant (a] google.com>
   6848 
   6849 	* archive.cc (Archive::include_member): Adjust call to report_object.
   6850 	(Add_archive_symbols::run): Add script_info to call to
   6851 	report_archive_begin.
   6852 	(Lib_group::include_member): Adjust call to report_object.
   6853 	(Add_lib_group_symbols::run): Adjust call to report_object.
   6854 	* incremental-dump.cc (dump_incremental_inputs): Remove unnecessary
   6855 	blocks.  Add object count for script input files.
   6856 	* incremental.cc (Incremental_inputs::report_archive_begin): Add
   6857 	script_info parameter; change all callers.
   6858 	(Incremental_inputs::report_object): Add script_info parameter;
   6859 	change all callers.
   6860 	(Incremental_inputs::report_script): Store backpointer to
   6861 	incremental info entry.
   6862 	(Output_section_incremental_inputs::set_final_data_size): Record
   6863 	additional information for scripts.
   6864 	(Output_section_incremental_inputs::write_info_blocks): Likewise.
   6865 	* incremental.h (Incremental_script_entry::add_object): New function.
   6866 	(Incremental_script_entry::get_object_count): New function.
   6867 	(Incremental_script_entry::get_object): New function.
   6868 	(Incremental_script_entry::objects_): New data member; adjust
   6869 	constructor.
   6870 	(Incremental_inputs::report_archive_begin): Add script_info parameter.
   6871 	(Incremental_inputs::report_object): Add script_info parameter.
   6872 	(Incremental_inputs_reader::get_object_count): New function.
   6873 	(Incremental_inputs_reader::get_object_offset): New function.
   6874 	* options.cc (Input_arguments::add_file): Return reference to
   6875 	new input argument.
   6876 	* options.h (Input_argument::set_script_info): New function.
   6877 	(Input_argument::script_info): New function.
   6878 	(Input_argument::script_info_): New data member; adjust all
   6879 	constructors.
   6880 	(Input_file_group::add_file): Return reference to new input argument.
   6881 	(Input_file_lib::add_file): Likewise.
   6882 	(Input_arguments::add_file): Likewise.
   6883 	* readsyms.cc (Add_symbols::run): Adjust call to report_object.
   6884 	* script.cc (Parser_closure::Parser_closure): Add script_info
   6885 	parameter; adjust all callers.
   6886 	(Parser_closure::script_info): New function.
   6887 	(Parser_closure::script_info_): New data member.
   6888 	(read_input_script): Report scripts earlier to incremental info.
   6889 	(script_add_file): Set script_info in Input_argument.
   6890 	(script_add_library): Likewise.
   6891 	* script.h (Script_options::Script_info): Rewrite class.
   6892 
   6893 2011-03-29  Cary Coutant  <ccoutant (a] google.com>
   6894 
   6895 	* archive.cc (Library_base::should_include_member): Move
   6896 	method here from class Archive.
   6897 	(Archive::Archive): Initialize base class.
   6898 	(Archive::should_include_member): Move to base class.
   6899 	(Archive::do_for_all_unused_symbols): New function.
   6900 	(Add_archive_symbols::run): Remove redundant access to
   6901 	incremental_inputs.
   6902 	(Lib_group::Lib_group): Initialize base class.
   6903 	(Lib_group::do_filename): New function.
   6904 	(Lib_group::include_member): Pass pointer to Lib_group to
   6905 	report_object.
   6906 	(Lib_group::do_for_all_unused_symbols): New function.
   6907 	(Add_lib_group_symbols::run): Report archive information for
   6908 	incremental links.
   6909 	* archive.h (class Library_base): New base class.
   6910 	(class Archive): Derive from Library_base.
   6911 	(Archive::filename): Move to base class.
   6912 	(Archive::set_incremental_info): Likewise.
   6913 	(Archive::incremental_info): Likewise.
   6914 	(Archive::Should_include): Likewise.
   6915 	(Archive::should_include_member): Likewise.
   6916 	(Archive::Armap_entry): Remove.
   6917 	(Archive::Unused_symbol_iterator): Remove.
   6918 	(Archive::unused_symbols_begin): Remove.
   6919 	(Archive::unused_symbols_end): Remove.
   6920 	(Archive::do_filename): New function.
   6921 	(Archive::do_get_mtime): New function.
   6922 	(Archive::do_for_all_unused_symbols): New function.
   6923 	(Archive::task_): Move to base class.
   6924 	(Archive::incremental_info_): Likewise.
   6925 	(class Lib_group): Derive from Library_base.
   6926 	(Lib_group::do_filename): New function.
   6927 	(Lib_group::do_get_mtime): New function.
   6928 	(Lib_group::do_for_all_unused_symbols): New function.
   6929 	(Lib_group::task_): Move to base class.
   6930 	* dynobj.cc (Sized_dynobj::do_for_all_global_symbols): New
   6931 	function.
   6932 	* dynobj.h (Sized_dynobj::do_for_all_global_symbols): New
   6933 	function.
   6934 	* incremental.cc (Incremental_inputs::report_archive_begin):
   6935 	Use Library_base; call library's get_mtime; add incremental inputs
   6936 	entry before members.
   6937 	(class Unused_symbol_visitor): New class.
   6938 	(Incremental_inputs::report_archive_end): Use Library_base; use
   6939 	visitor class to record unused symbols; don't add incremental inputs
   6940 	entry after members.
   6941 	(Incremental_inputs::report_object): Use Library_base.
   6942 	* incremental.h
   6943 	(Incremental_archive_entry::Incremental_archive_entry): Remove
   6944 	unused Archive parameter.
   6945 	(Incremental_inputs::report_archive_begin): Use Library_base.
   6946 	(Incremental_inputs::report_archive_end): Likewise.
   6947 	(Incremental_inputs::report_object): Likewise.
   6948 	* object.cc (Sized_relobj::do_for_all_global_symbols): New
   6949 	function.
   6950 	* object.h (Object::for_all_global_symbols): New function.
   6951 	(Object::do_for_all_global_symbols): New function.
   6952 	(Sized_relobj::do_for_all_global_symbols): New function.
   6953 	* plugin.cc (Sized_pluginobj::do_for_all_global_symbols):  New
   6954 	function.
   6955 	* plugin.h (Sized_pluginobj::do_for_all_global_symbols):  New
   6956 	function.
   6957 
   6958 2011-03-27  Ian Lance Taylor  <iant (a] google.com>
   6959 
   6960 	* archive.cc (Archive::interpret_header): Return -1 if something
   6961 	goes wrong.  Change callers accordingly.
   6962 
   6963 2011-03-25  Cary Coutant  <ccoutant (a] google.com>
   6964 
   6965 	* testsuite/Makefile.am (final_layout.stdout): Use -n option with nm.
   6966 	* testsuite/Makefile.in: Regenerate.
   6967 
   6968 2011-03-23  Rafael vila de Espndola <respindola (a] mozilla.com>
   6969 
   6970 	* plugin.cc (get_view): New.
   6971 	(Plugin::load): Pass get_view to the plugin.
   6972 	(Plugin_manager::get_view): New.
   6973 
   6974 2011-03-21  Ian Lance Taylor  <iant (a] google.com>
   6975 
   6976 	* testsuite/final_layout.sh: Rewrite to not use dc.
   6977 	* testsuite/relro_test.sh: Fail if dc is not present.
   6978 
   6979 2011-03-21  Sriraman Tallam  <tmsriram (a] google.com>
   6980 
   6981 	* testsuite/icf_safe_so_test.sh: Add #!/bin/sh to start.
   6982 	Change == to -eq.
   6983 	* testsuite/icf_string_merge_test.sh: Add #!/bin/sh to start.
   6984 	* testsuite/icf_safe_test.sh: Add #!/bin/sh to start.
   6985 	Change == to -eq.
   6986 	* testsuite/icf_sht_rel_addend_test.sh: Add #!/bin/sh to start.
   6987 	* testsuite/icf_preemptible_functions_test.sh: Add #!/bin/sh to start.
   6988 
   6989 2011-03-14  Ian Lance Taylor  <iant (a] google.com>
   6990 
   6991 	* script-sections.cc (Sort_output_sections::script_compare):
   6992 	Rename from is_before, change return type.
   6993 	(Sort_output_sections::operator()): Adjust accordingly.
   6994 
   6995 2011-03-11  Jeffrey Yasskin  <jyasskin (a] google.com>
   6996 
   6997 	PR gold/12572
   6998 	* testsuite/odr_violation2.cc: Add comment to make all error line
   6999 	numbers double digits.
   7000 	* testsuite/debug_msg.sh: Adjust expected errors.
   7001 
   7002 2011-03-09  Jeffrey Yasskin  <jyasskin (a] google.com>
   7003 
   7004 	* dwarf_reader.cc (Sized_dwarf_line_info): Include all lines,
   7005 	but mark earlier ones as non-canonical
   7006 	(offset_to_iterator): Update search target and example
   7007 	(do_addr2line): Return extra lines in a vector*
   7008 	(format_file_lineno): Extract from do_addr2line
   7009 	(one_addr2line): Add vector* out-param
   7010 	* dwarf_reader.h (Offset_to_lineno_entry): New field recording
   7011 	when a lineno entry appeared last for its instruction
   7012 	(Dwarf_line_info): Add vector* out-param
   7013 	* object.cc (Relocate_info): Pass NULL for the vector* out-param
   7014 	* symtab.cc (Odr_violation_compare): Include the lineno in the
   7015 	comparison again.
   7016 	(linenos_from_loc): New. Combine the canonical line for an
   7017 	address with its other lines.
   7018 	(True_if_intersect): New. Helper functor to make
   7019 	std::set_intersection a query.
   7020 	(detect_odr_violations): Compare sets of lines instead of just
   7021 	one line for each function. This became less deterministic, but
   7022 	has fewer false positives.
   7023 	* symtab.h: Declarations.
   7024 	* testsuite/Makefile.am (odr_violation2.o): Compile with -O2 to
   7025 	mix an optimized and non-optimized object in the same binary
   7026 	(odr_violation2.so): Same.
   7027 	* testsuite/Makefile.in: Regenerate from Makefile.am.
   7028 	* testsuite/debug_msg.cc (main): Make OdrDerived classes.
   7029 	* testsuite/debug_msg.sh: Update line numbers and add
   7030 	assertions.
   7031 	* testsuite/odr_violation1.cc: Use OdrDerived, in a
   7032 	non-optimized context.
   7033 	* testsuite/odr_violation2.cc: Make sure Ordering::operator()
   7034 	isn't inlined, and use OdrDerived in an optimized context.
   7035 	* testsuite/odr_header1.h: Defines OdrDerived, where
   7036 	optimization will change the
   7037 	first-instruction-in-the-destructor's file and line number.
   7038 	* testsuite/odr_header2.h: Defines OdrBase.
   7039 
   7040 2011-03-09  Ian Lance Taylor  <iant (a] google.com>
   7041 
   7042 	* fileread.cc (File_read::clear_views): Don't delete the whole
   7043 	file view.
   7044 
   7045 2011-03-08  Ian Lance Taylor  <iant (a] google.com>
   7046 
   7047 	PR gold/12525
   7048 	* fileread.cc: #include <climits>.
   7049 	(GOLD_IOV_MAX): Define.
   7050 	(File_read::read_multiple): Limit number of entries by iov_max.
   7051 	* fileread.h (class File_read): Always set max_readv_entries to
   7052 	128.
   7053 
   7054 2011-03-07  Ian Lance Taylor  <iant (a] google.com>
   7055 
   7056 	PR gold/12525
   7057 	* options.h (class General_options): Add -dy and -dn.
   7058 
   7059 2011-03-02  Cary Coutant  <ccoutant (a] google.com>
   7060 
   7061 	* testsuite/script_test_9.t: Add TLS segment.
   7062 
   7063 2011-03-02  Simon Baldwin  <simonb (a] google.com>
   7064 
   7065 	* configure.ac: Add check for gnu_indirect_function support in
   7066 	the toolchain building binutils.
   7067 	* configure: Rebuild.
   7068 
   7069 2011-02-18  Rafael vila de Espndola <respindola (a] mozilla.com>
   7070 
   7071 	* symtab.cc (Symbol::should_add_dynsym_entry) Return false for
   7072 	plugin only symbols.
   7073 	(Symbol_table::sized_finalize_symbol) Mark symbol only present
   7074 	in plugin files as not needed in the symbol table.
   7075 
   7076 2011-02-11  Sriraman Tallam  <tmsriram (a] google.com>
   7077 
   7078 	* output.cc (Output_section::add_input_section): Delay fill
   7079 	generation for section ordering.
   7080 
   7081 2011-02-09  Ian Lance Taylor  <iant (a] google.com>
   7082 
   7083 	PR gold/12316
   7084 	* object.h (class Sized_relobj): Remove clear_local_symbols.
   7085 	* reloc.cc (Sized_relobj::do_relocate): Don't call
   7086 	clear_local_symbols.
   7087 
   7088 2011-02-08  Rafael vila de Espndola <respindola (a] mozilla.com>
   7089 
   7090 	* plugin.cc (is_visible_from_outside): Return true for symbols
   7091 	in the -u option.
   7092 
   7093 2011-02-04  Jeffrey Yasskin  <jyasskin (a] google.com>
   7094 
   7095 	* symtab.cc (Odr_violation_compare::operator()): Sort by just the
   7096 	filename.
   7097 
   7098 2011-02-02  Sriraman Tallam  <tmsriram (a] google.com>
   7099 
   7100 	* icf.h (is_section_foldable_candidate): Change type of parameter
   7101 	to std::string.
   7102 	* icf.cc (Icf::find_identical_sections): Change type of local variable
   7103 	section_name to be std::string.
   7104 	(is_function_ctor_or_dtor): Change type of parameter to std::string.
   7105 
   7106 2011-01-25  Ian Lance Taylor  <iant (a] google.com>
   7107 
   7108 	* script.cc (script_add_extern): Rewrite to use
   7109 	add_symbol_reference.
   7110 
   7111 2011-01-25  Doug Kwan  <dougkwan (a] google.com>
   7112 
   7113 	* icf.cc (get_section_contents): Always lock section's object.
   7114 
   7115 2011-01-24  Ian Lance Taylor  <iant (a] google.com>
   7116 
   7117 	* options.h (class General_options): Accept
   7118 	--no-detect-odr-violations.
   7119 
   7120 2011-01-24  Ian Lance Taylor  <iant (a] google.com>
   7121 
   7122 	* version.cc (version_string): Bump to 1.11.
   7123 
   7124 2011-01-24  Ian Lance Taylor  <iant (a] google.com>
   7125 
   7126 	* plugin.cc (class Plugin_rescan): Define new class.
   7127 	(Plugin_manager::claim_file): Set any_claimed_.
   7128 	(Plugin_manager::save_archive): New function.
   7129 	(Plugin_manager::save_input_group): New function.
   7130 	(Plugin_manager::all_symbols_read): Create Plugin_rescan task if
   7131 	necessary.
   7132 	(Plugin_manager::new_undefined_symbol): New function.
   7133 	(Plugin_manager::rescan): New function.
   7134 	(Plugin_manager::rescannable_defines): New function.
   7135 	(Plugin_manager::add_input_file): Set any_added_.
   7136 	* plugin.h (class Plugin_manager): define new fields rescannable_,
   7137 	undefined_symbols_, any_claimed_, and any_added_.  Declare
   7138 	Plugin_rescan as friend.  Declare new functions.
   7139 	(Plugin_manager::Rescannable): Define type.
   7140 	(Plugin_manager::Rescannable_list): Define type.
   7141 	(Plugin_manager::Undefined_symbol_list): Define type.
   7142 	(Plugin_manager::Plugin_manager): Initialize new fields.
   7143 	* archive.cc (Archive::defines_symbol): New function.
   7144 	(Add_archive_symbols::run): Pass archive to plugins if any.
   7145 	* archive.h (class Archive): Declare defines_symbol.
   7146 	* readsyms.cc (Input_group::~Input_group): New function.
   7147 	(Finish_group::run): Pass input_group to plugins if any.
   7148 	* readsyms.h (class Input_group): Declare destructor.
   7149 	* symtab.cc (add_from_object): Pass undefined symbol to plugins if
   7150 	any.
   7151 
   7152 2011-01-10  Ian Lance Taylor  <iant (a] google.com>
   7153 
   7154 	* layout.cc (Layout::layout_eh_frame): Mark a writable .eh_frame
   7155 	section as relro.
   7156 	(Layout::set_segment_offsets): Reset increase_relro before calling
   7157 	set_section_addresses a second time.
   7158 
   7159 2011-01-04  Cary Coutant  <ccoutant (a] google.com>
   7160 
   7161 	* script-sections.cc (Sort_output_sections::operator()): Sort TLS
   7162 	sections before NOBITS sections.
   7163 
   7164 2011-01-01  H.J. Lu  <hongjiu.lu (a] intel.com>
   7165 
   7166 	* version.cc (print_version): Update copyright to 2011.
   7167 
   7168 2010-12-23  Cary Coutant  <ccoutant (a] google.com>
   7169 
   7170 	* output.h (Output_data_reloc::add_output_section): Pass OD instead
   7171 	of OS to this->add.  Add OD parameter to second form of the function.
   7172 
   7173 2010-12-20  Ian Lance Taylor  <iant (a] google.com>
   7174 
   7175 	* dwarf_reader.cc (Sized_dwarf_line_info::read_lines): Only keep
   7176 	second of two consecutive entries with same offset.
   7177 
   7178 2010-12-16  Ralf Wildenhues  <Ralf.Wildenhues (a] gmx.de>
   7179 
   7180 	* testsuite/Makefile.am (ifuncmain2static_LDADD)
   7181 	(ifuncmain2_LDADD, ifuncmain4static_LDADD, ifuncmain4_LDADD)
   7182 	(ifuncmain7static_LDADD, ifuncmain7_LDADD): New empty variables,
   7183 	to avoid unneeded links against $(LDADD).
   7184 	* testsuite/Makefile.in: Regenerate.
   7185 
   7186 2010-12-15  Ian Lance Taylor  <iant (a] google.com>
   7187 
   7188 	PR gold/12324
   7189 	* x86_64.cc (Target_x86_64::Scan::check_non_pic): Give an error
   7190 	for R_X86_64_32 and R_X86_64_PC32.
   7191 	* testsuite/Makefile.am (ver_matching_def.so): Depend on and use
   7192 	ver_matching_def_pic.o.
   7193 	(ver_matching_def_pic.o): New target.
   7194 
   7195 2010-12-14  Ralf Wildenhues  <Ralf.Wildenhues (a] gmx.de>
   7196 
   7197 	* fileread.cc (file_counts_lock, file_counts_initialize_lock)
   7198 	(total_mapped_bytes, current_mapped_bytes, maximum_mapped_bytes):
   7199 	Move definition before File_read::View member definitions.
   7200 	(File_read::View::~View): Initialize and hold lock before
   7201 	updating current_mapped_bytes.
   7202 
   7203 2010-12-14  Ralf Wildenhues  <Ralf.Wildenhues (a] gmx.de>
   7204 
   7205 	* dwarf_reader.cc: Remove outdated comment.
   7206 	* gold-threads.cc: Fix typo in error message.
   7207 	* archive.cc: Fix typos in comments.
   7208 	* archive.h: Likewise.
   7209 	* arm-reloc-property.cc: Likewise.
   7210 	* arm-reloc-property.h: Likewise.
   7211 	* arm-reloc.def: Likewise.
   7212 	* arm.cc: Likewise.
   7213 	* attributes.h: Likewise.
   7214 	* cref.cc: Likewise.
   7215 	* ehframe.cc: Likewise.
   7216 	* fileread.h: Likewise.
   7217 	* gold.h: Likewise.
   7218 	* i386.cc: Likewise.
   7219 	* icf.cc: Likewise.
   7220 	* incremental.h: Likewise.
   7221 	* int_encoding.cc: Likewise.
   7222 	* layout.h: Likewise.
   7223 	* main.cc: Likewise.
   7224 	* merge.h: Likewise.
   7225 	* object.cc: Likewise.
   7226 	* object.h: Likewise.
   7227 	* options.cc: Likewise.
   7228 	* readsyms.cc: Likewise.
   7229 	* reduced_debug_output.cc: Likewise.
   7230 	* reloc.cc: Likewise.
   7231 	* script-sections.cc: Likewise.
   7232 	* sparc.cc: Likewise.
   7233 	* symtab.h: Likewise.
   7234 	* target-reloc.h: Likewise.
   7235 	* target.cc: Likewise.
   7236 	* target.h: Likewise.
   7237 	* timer.cc: Likewise.
   7238 	* timer.h: Likewise.
   7239 	* x86_64.cc: Likewise.
   7240 
   7241 2010-12-09  Cary Coutant  <ccoutant (a] google.com>
   7242 
   7243 	* layout.cc (Layout::layout_gnu_stack): Add warnings for executable
   7244 	stack.
   7245 	* layout.h (Layout::layout_gnu_stack): Add pointer to Object
   7246 	parameter; change all callers.
   7247 	* object.cc (Sized_relobj::do_layout): Adjust call to layout_gnu_stack.
   7248 	* options.h (warn_execstack): New option.
   7249 
   7250 2010-12-07  Doug Kwan  <dougkwan (a] google.com>
   7251 
   7252 	* arm.cc (Target_arm::Scan::get_reference_flags): Treat R_ARM_PREL31
   7253 	like function call relocations.
   7254 
   7255 2010-12-07  Ian Lance Taylor  <iant (a] google.com>
   7256 
   7257 	* archive.cc (Archive::get_elf_object_for_member): Permit
   7258 	punconfigured to be NULL.
   7259 	(Archive::read_symbols): Pass NULL to get_elf_object_for_member.
   7260 	(Archive::include_member): Pass NULL to get_elf_object_for_member
   7261 	if we searched for the archive and this is the first included
   7262 	object.
   7263 
   7264 2010-12-01  Ian Lance Taylor  <iant (a] google.com>
   7265 
   7266 	* dwarf_reader.h (class Sized_dwarf_line_info): Add
   7267 	track_relocs_type_ field.
   7268 	* dwarf_reader.cc (Sized_dwarf_line_info::Sized_dwarf_line_info):
   7269 	Set track_relocs_type_.
   7270 	(Sized_dwarf_line_info::process_one_opcode): Ignore the section
   7271 	contents when using RELA relocs.
   7272 	(Sized_dwarf_line_info::read_relocs): Add the reloc addend to
   7273 	reloc_map_.
   7274 	* reloc.cc (Track_relocs::next_addend): New function.
   7275 	* reloc.h (class Track_relocs): Declare next_addend.
   7276 
   7277 2010-12-01  Ian Lance Taylor  <iant (a] google.com>
   7278 
   7279 	* testsuite/icf_virtual_function_folding_test.cc (class Bar): Add
   7280 	virtual destructor.
   7281 
   7282 2010-12-01  Ian Lance Taylor  <iant (a] google.com>
   7283 
   7284 	* README: Update compilers known to work and fail.
   7285 
   7286 2010-11-23  Matthias Klose  <doko (a] ubuntu.com>
   7287 
   7288 	* configure.in: For --enable-gold, handle value `default' instead of
   7289 	`both*'.  Always install ld as ld.bfd, install as ld if gold is
   7290 	not the default.
   7291 	* configure: Regenerate.
   7292 
   7293 2010-11-18  Doug Kwan  <dougkwan (a] google.com>
   7294 
   7295 	* expression.cc (BINARY_EXPRESSION): Initialize left_alignment
   7296 	and right_alignment to be zero.  Store result alignment only if it is
   7297 	greater than existing alignment.
   7298 
   7299 2010-11-16  Cary Coutant  <ccoutant (a] google.com>
   7300 
   7301 	PR gold/12220
   7302 	* dwarf_reader.cc (Sized_dwarf_line_info::Sized_dwarf_line_info):
   7303 	Check for ".zdebug_line".
   7304 
   7305 2010-11-16  Doug Kwan  <dougkwan (a] google.com>
   7306 	    Cary Coutant  <ccoutant (a] google.com>
   7307 
   7308 	* output.h (Output_segment::set_section_addresses): Pass increase_relro
   7309 	by reference; adjust all callers.
   7310 	* output.cc (Output_segment::set_section_addresses): Adjust references
   7311 	to increase_relro. Add padding to *increase_relro when ORDER_RELRO_LAST
   7312 	list is empty.
   7313 	(Output_segment::set_offset): Assert if PT_GNU_RELRO segment does not
   7314 	end at page boundary.
   7315 
   7316 2010-11-16  Cary Coutant  <ccoutant (a] google.com>
   7317 
   7318 	PR gold/12220
   7319 	* layout.cc (Layout::choose_output_section): Transform names of
   7320 	compressed sections even when using a script with a SECTIONS clause.
   7321 	(Layout::output_section_name): Remove code to transform
   7322 	compressed debug section names.
   7323 	* output.cc (Output_section::add_input_section): Use uncompressed
   7324 	section size when tracking input sections.
   7325 
   7326 2010-11-11  Richard Sandiford  <richard.sandiford (a] linaro.org>
   7327 
   7328 	* symtab.h (Symbol::NON_PIC_REF): Remove.
   7329 	(Symbol::RELATIVE_REF, Symbol::TLS_REF): New Reference_flags.
   7330 	(Symbol::FUNCTION_CALL): Renumber.  Reword comment.
   7331 	(Symbol::needs_dynamic_reloc): Don't check NON_PIC_REF.
   7332 	(Symbol::use_plt_offset): Take a flags argument and pass it
   7333 	directly to needs_dynamic_reloc.  Restrict check for undefined
   7334 	weak symbols to function calls.
   7335 	* arm.cc (Target_arm::Scan::get_reference_flags): New function.
   7336 	(Target_arm::Scan::global): Use it.
   7337 	(Target_arm::Scan::scan_reloc_for_stub): Likewise.
   7338 	(Target_arm::Relocate::relocate): Likewise.
   7339 	(Target_arm::Relocate::should_apply_static_reloc): Replace flags
   7340 	parameter with an r_type parameter.  Use get_reference_flags
   7341 	to get the flags.
   7342 	(Target_arm::Relocate::relocate): Update accordingly.
   7343 	* i386.cc (Target_i386::Scan::get_reference_flags): New function.
   7344 	(Target_i386::Scan::reloc_needs_plt_for_ifunc): Use it.
   7345 	(Target_i386::Scan::global): Likewise.
   7346 	(Target_i386::Relocate::relocate): Likewise.
   7347 	(Target_i386::Relocate::should_apply_static_reloc): Replace flags
   7348 	parameter with an r_type parameter.  Use get_reference_flags
   7349 	to get the flags.
   7350 	(Target_i386::Relocate::relocate): Update accordingly.
   7351 	* powerpc.cc (Target_powerpc::Scan::get_reference_flags): New function.
   7352 	(Target_powerpc::Scan::global): Use it.
   7353 	(Target_powerpc::Scan::scan_reloc_for_stub): Likewise.
   7354 	(Target_powerpc::Relocate::relocate): Likewise.
   7355 	* sparc.cc (Target_sparc::Scan::get_reference_flags): New function.
   7356 	(Target_sparc::Scan::global): Use it.
   7357 	(Target_sparc::Scan::scan_reloc_for_stub): Likewise.
   7358 	(Target_sparc::Relocate::relocate): Likewise.
   7359 	* x86_64.cc (Target_x86_64::Scan::get_reference_flags): New function.
   7360 	(Target_x86_64::Scan::reloc_needs_plt_for_ifunc): Use it.
   7361 	(Target_x86_64::Scan::global): Likewise.
   7362 	(Target_x86_64::Relocate::relocate): Likewise.
   7363 
   7364 2010-11-08  Doug Kwan  <dougkwan (a] google.com>
   7365 	    Cary Coutant  <ccoutant (a] google.com>
   7366 
   7367 	* arm.cc (Arm_exidx_merge_section::build_contents): New method.
   7368 	(Arm_exidx_merge_section::section_contents_): New data member.
   7369 	(Arm_input_section::Arm_input_section): Initialize original_contents_.
   7370 	(Arm_input_section::~Arm_input_section): De-allocate memory.
   7371 	(Arm_input_section::original_contents_): New data member.
   7372 	(Arm_exidx_fixup::process_exidx_section): Pass EXIDX section contents
   7373 	in parameters instead of calling Object::section_contents without
   7374 	locking.
   7375 	(Arm_output_section::group_section): New parameter TASK.  Pass it
   7376 	to callees that need locking objects.
   7377 	(Arm_output_section::fix_exidx_coverage): New parameter TASK.  Use it
   7378 	to lock EXIDX input sections.  Fix a formatting issue.  Call
   7379 	Arm_exidx_merged_section::build_contents to create merged section
   7380 	contents.
   7381 	(Arm_output_section::create_stub_group): New parameter TASK.  Use it
   7382 	to lock object of stub table owner.
   7383 	(Arm_exidx_input_section::Arm_exidx_input_section): Add new parameter
   7384 	TEXT_SIZE to initialize data member TEXT_SIZE_.
   7385 	(Arm_exidx_input_section::addralign): Fix typo in comment.
   7386 	(Arm_exidx_input_section::text_size): New method.
   7387 	(Target_arm::do_relax): New parameter TASK.  Pass it to callees
   7388 	that require locking objects.  Lock objects before scanning for stubs
   7389 	and updating local symbols.
   7390 	(Arm_input_section<big_endian>::init): Copy contents of original
   7391 	input section.
   7392 	(Arm_input_section<big_endian>::do_write): Use saved contents of
   7393 	original input section instead of calling Object::section_contents
   7394 	without locking.
   7395 	(Arm_exidx_cantunwind::do_fixed_endian_write): Find out text section
   7396 	size without calling Object::section_size().
   7397 	(Arm_exidx_merged_section::Arm_exidx_merged_section): Add sanity check
   7398 	for size.  Allocate a buffer for merged EXIDX entries.
   7399 	(Arm_exidx_merged_section::build_contents): New method.
   7400 	(Arm_exidx_merged_section::do_write): Move merge section contents
   7401 	building code to Arm_exidx_merged_section::build_contetns.  Write
   7402 	out contetns in buffer instead of building it on the fly.
   7403 	(Arm_relobj::make_exidx_input_section): Also pass text section size
   7404 	to Arm_exidx_input_section constructor.
   7405 	(Arm_relobj::do_read_symbols): Fix memory leak.  Fix a formatting issue.
   7406 	(Arm_dynobj::do_read_symbols): Fix memory leak.
   7407 	* layout.cc (Layout::finalize): Pass TASK to Target::relax().
   7408 	* target.h: (class Task): Add forward declaration.
   7409 	(Target::relax): Add new parameter TASK and pass it to
   7410 	Target::do_relax().
   7411 	(Target::do_relax):: New parameter TASK.  Fix a formatting issue.
   7412 
   7413 2010-11-05  Cary Coutant  <ccoutant (a] google.com>
   7414 
   7415 	PR gold/10708
   7416 	* copy-relocs.cc (Copy_relocs::emit_copy_reloc): Hold a lock on the
   7417 	object when reading from the file.
   7418 	* gold.cc (queue_middle_tasks): Hold a lock on the object when doing
   7419 	second layout pass.
   7420 	* icf.cc (preprocess_for_unique_sections): Hold a lock on the object
   7421 	when reading section contents.
   7422 	(get_section_contents): Likewise.
   7423 	(icf::find_identical_sections): Likewise.
   7424 	* mapfile.cc (Mapfile::print_discarded_sections): Hold a lock on the
   7425 	object when reading from the file.
   7426 	* plugin.cc (Plugin_manager::layout_deferred_objects): Hold a lock on
   7427 	the object when doing deferred section layout.
   7428 
   7429 2010-11-03  Nick Clifton  <nickc (a] redhat.com>
   7430 
   7431 	PR gold/12001
   7432 	* script.h (class Symbol_assignment: name): New member.  Returns
   7433 	the name of the symbol.
   7434 	* scrfipt.cc (Script_options::is_pending_assignment): New member.
   7435 	Returns true if the given symbol name is on the list of
   7436 	assignments wating to be processed.
   7437 	* archive.cc (should_incldue_member): If the symbol is undefined,
   7438 	check to see if it is on the list of symbols pending assignment.
   7439 
   7440 2010-11-03  Ryan Mansfield  <rmansfield (a] qnx.com>
   7441 
   7442 	* script-sections.cc (Script_sections::find_memory_region): Check
   7443 	for a NULL output section pointer.
   7444 
   7445 2010-10-29  Doug Kwan  <dougkwan (a] google.com>
   7446 
   7447 	* arm.cc (Arm_outout_section::fix_exidx_coverage): Adjust call to
   7448 	Output_section::add_relaxed_input_section.
   7449 	* output.cc (Output_section::add_relaxed_input_section): Add new
   7450 	arguments LAYOUT and NAME.  Set section order index.
   7451 	(Output_section::convert_input_sections_in_list_to_relaxed_sections):
   7452 	Copy section order index.
   7453 	* output.h (Output_section::add_relaxed_input_section): Add new
   7454 	arguments LAYOUT and NAME.
   7455 
   7456 2010-10-29  Viktor Kutuzov  <vkutuzov (a] accesssoftek.com>
   7457 
   7458 	* testsuite/Makefile.am: Move gcctestdir/ld rule to
   7459 	NATIVE_OR_CROSS_LINKER.
   7460 	* testsuite/Makefile.in: Regenerate.
   7461 
   7462 2010-10-20  Doug Kwan  <dougkwan (a] google.com>
   7463 
   7464 	* arm.cc (Arm_relobj::do_read_symbols): Warn about ARM EXIDX sections
   7465 	without SHF_LINK_ORDER flags.
   7466 	* layout.cc (Layout::choose_output_section): Do not filter
   7467 	SHF_LINK_ORDER flag in a relocatable link.
   7468 
   7469 2010-10-17  Cary Coutant  <ccoutant (a] google.com>
   7470 
   7471 	* output.h (Output_segment::set_section_addresses): Change function
   7472 	signature.  Update all callers.
   7473 	* output.cc (Output_segment::is_first_section_relro): Ignore TLS
   7474 	sections.
   7475 	(Output_segment::set_section_addresses): Align after last TLS
   7476 	section.  Add padding before last relro section instead of after.
   7477 
   7478 2010-10-17  Doug Kwan  <dougkwan (a] google.com>
   7479 
   7480 	* gold/arm.cc (Target_arm::got_section): Use correct order and set
   7481 	GOT output section to be writable.
   7482 
   7483 2010-10-14  Cary Coutant  <ccoutant (a] google.com>
   7484 
   7485 	* debug.h (DEBUG_INCREMENTAL): New flag.
   7486 	(debug_string_to_enum): Add DEBUG_INCREMENTAL).
   7487 	* gold.cc (queue_initial_tasks): Check parameters for incremental link
   7488 	mode.
   7489 	* incremental.cc (report_command_line): Ignore all forms of
   7490 	--incremental.
   7491 	* layout.cc (Layout::Layout): Check parameters for incremental link
   7492 	mode.
   7493 	* options.cc (General_options::parse_incremental): New function.
   7494 	(General_options::parse_no_incremental): New function.
   7495 	(General_options::parse_incremental_full): New function.
   7496 	(General_options::parse_incremental_update): New function.
   7497 	(General_options::incremental_mode_): New data member.
   7498 	(General_options::finalize): Check incremental_mode_.
   7499 	* options.h (General_options): Update help text for --incremental.
   7500 	Add --no-incremental, --incremental-full, --incremental-update.
   7501 	(General_options::Incremental_mode): New enum type.
   7502 	(General_options::incremental_mode): New function.
   7503 	(General_options::incremental_mode_): New data member.
   7504 	* parameters.cc (Parameters::incremental_mode_): New data member.
   7505 	(Parameters::set_options): Set incremental_mode_.
   7506 	(Parameters::set_incremental_full): New function.
   7507 	(Parameters::incremental): New function.
   7508 	(Parameters::incremental_update): New function.
   7509 	(set_parameters_incremental_full): New function.
   7510 	* parameters.h (Parameters::set_incremental_full): New function.
   7511 	(Parameters::incremental): New function.
   7512 	(Parameters::incremental_update): New function.
   7513 	(Parameters::incremental_mode_): New data member.
   7514 	(set_parameters_incremental_full): New function.
   7515 	* plugin.cc (Plugin_manager::add_input_file): Check parameters for
   7516 	incremental link mode.
   7517 	* reloc.cc (Sized_relobj::do_read_relocs): Likewise.
   7518 	(Sized_relobj::do_relocate_sections): Likewise.
   7519 	* testsuite/Makefile.am (incremental_test): Use --incremental-full
   7520 	option.
   7521 	* testsuite/Makefile.in: Regenerate.
   7522 	* testsuite/incremental_test.sh: Filter all forms of --incremental.
   7523 
   7524 2010-10-12  Viktor Kutuzov  <vkutuzov (a] accesssoftek.com>
   7525 
   7526 	* script-sections.h (class Script_sections): Make
   7527 	Sections_elements typedef public.
   7528 	* script-sections.cc (class Sort_output_sections): Add elements_
   7529 	field.  Add constructor which sets it; change all callers.
   7530 	(Sort_output_sections::is_before): New function.
   7531 	(Sort_output_sections::operator()): Call is_before.
   7532 	* configure.ac (NATIVE_OR_CROSS_LINKER): New automake
   7533 	conditional.
   7534 	* testsuite/script_test_10.sh: New test. Test script section
   7535 	order.
   7536 	* testsuite/script_test_10.t: Likewise.
   7537 	* testsuite/script_test_10.s: Likewise.
   7538 	* testsuite/Makefile.am: Wrap the cross linker tests and the
   7539 	common tests into NATIVE_OR_CROSS_LINKER.
   7540 	(check_SCRIPTS): Add script_test_10.sh.
   7541 	(check_DATA): Add script_test_10.stdout.
   7542 	(script_test_10.o, script_test_10): New targets.
   7543 	(script_test_10.stdout): New target.
   7544 	* configure, testsuite/Makefile.in: Regenerate.
   7545 
   7546 2010-10-12  Viktor Kutuzov  <vkutuzov (a] accesssoftek.com>
   7547 
   7548 	* arm.cc (Target_arm::Scan::local): Report the unsupported reloc
   7549 	error for the deprecated relocations.
   7550 	(Target_arm::Scan::global): Likewise.
   7551 	(Target_arm::Relocate::relocate): Likewise.
   7552 
   7553 2010-10-12  Richard Sandiford  <richard.sandiford (a] linaro.org>
   7554 
   7555 	* fileread.cc (Input_file::find_file): Initialize *found_name
   7556 	and *namep when using the fallback search for case 4.
   7557 
   7558 2010-10-11  Cary Coutant  <ccoutant (a] google.com>
   7559 
   7560 	* options.h (class General_options): Redefine -z lazy as an alias for
   7561 	the negation of -z now.
   7562 
   7563 2010-10-11  Ian Lance Taylor  <iant (a] google.com>
   7564 
   7565 	* resolve.cc (symbol_to_bits): Report the value of the unsupported
   7566 	binding.
   7567 
   7568 2010-10-06  Nick Clifton  <nickc (a] redhat.com>
   7569 
   7570 	* script-sections.cc(class Memory_region): Remove
   7571 	current_lma_offset_ field.  Rename current_vma_offset_ to
   7572 	current_offset_.  Add last_section_ field.
   7573 	(Memory_region::get_current_vma_address): Rename to
   7574 	get_current_address.
   7575 	(Memory_region::get_current_lma_address): Delete.
   7576 	(Memory_region::increment_vma_offset): Rename to
   7577 	increment_offset.
   7578 	(Memory_region::increment_lma_offset): Delete.
   7579 	(Memory_region::attributes_compatible): New method.  Returns
   7580 	true if the provided section is compatible with the region.
   7581 	(Memory_region::get_last_section): New method.  Returns the last
   7582 	section to use the region.
   7583 	(Memory_region::set_last_section): New method.  Stores the last
   7584 	section to use the region.
   7585 	(Script_sections::block_in_region): New method.  Returns true if
   7586 	a block of memory is contained within a region.
   7587 	(Script_sections::find_memory_region): New method.  Locates a
   7588 	memory region to be used to set a VMA or LMA address.
   7589 	(Output_section_definition::set_section_addresses): Add code to
   7590 	check for addresses set by memory regions.
   7591 	(Output_segment::set_section_addresses): Remove memory region
   7592 	walking code.
   7593 	(Script_sections::create_segment): Add a warning if a header
   7594 	segment is created outside of any region.
   7595 	* script-sections.h (class Script_sections): Add prototypes for
   7596 	find_memory_region and block_in_region methods.
   7597 	* testsuite/memory_test.s: Use .long instead of .word.
   7598 	* testsuite/memory_test.t: Add some more output sections.
   7599 	* testsuite/memory_test.sh: Update expected output.
   7600 
   7601 2010-10-02  Doug Kwan  <dougkwan (a] google.com>
   7602 
   7603 	* symtab.cc (Symbol_table::Symbol_table_hash::operator()): Move
   7604 	defintion to symtab.h
   7605 	* symtab.h (Symbol_table::Symbol_table_hash::operator()): Change
   7606 	declaration to defintion.
   7607 
   7608 2010-10-01  Nick Clifton  <nickc (a] redhat.com>
   7609 
   7610 	* expression.cc (eval): Replace dummy argument with NULL.
   7611 	(eval_maybe_dot): Check for a NULL result section pointer.
   7612 	(Symbol_expression::value): Likewise.
   7613 	(Dot_expression::value): Likewise.
   7614 	(BINARY_EXPRESSION): Likewise.
   7615 	(Max_expression::value): Likewise.
   7616 	(Min_expression::value): Likewise.
   7617 	(Absolute_expression::value): Likewise.
   7618 	(Addr_expression::value_from_output_section): Likewise.
   7619 	(Loaddddr_expression::value_from_output_section): Likewise.
   7620 	(Segment_start_expression::value): Likewise.
   7621 	* script-sections.cc
   7622 	(Sections_elememt_dot_assignment::finalize_symbols): Replace dummy
   7623 	argument with NULL.
   7624 	(Sections_elememt_dot_assignment::set_section_addresses):
   7625 	Likewise.
   7626 	(Output_data_expression::do_write_to_buffer): Likewise.
   7627 	(Output_section_definition::finalize_symbols): Likewise.
   7628 	(Output_section_definition::set_section_addresses): Likewise.
   7629 
   7630 2010-09-30  Doug Kwan  <dougkwan (a] google.com>
   7631 
   7632 	* gold/testsuite/arm_branch_out_of_range.sh: Fix broken tests.
   7633 
   7634 2010-09-28  Sriraman Tallam  <tmsriram (a] google.com>
   7635 
   7636 	* target.h (Target::can_icf_inline_merge_sections): New virtual
   7637 	function.
   7638 	* x86_64.cc (Target__x86_64::can_icf_inline_merge_sections): New
   7639 	virtual function.
   7640 	* i386.cc (Target_i386::can_icf_inline_merge_sections): New
   7641 	virtual function.
   7642 	* icf.cc (get_section_contents): Inline merge sections only when
   7643 	target allows it.
   7644 
   7645 2010-09-27  Ralf Wildenhues  <Ralf.Wildenhues (a] gmx.de>
   7646 
   7647 	* configure: Regenerate.
   7648 
   7649 2010-09-17  Ian Lance Taylor  <iant (a] google.com>
   7650 
   7651 	* testsuite/memory_test.sh: Adjust for change of 2010-09-10.
   7652 	* testsuite/Makefile.am (memory_test.o): New target.
   7653 	(memory_test): Depend on memory_test.o, gcctestdir/ld, and
   7654 	memory_test.t.
   7655 	* testsuite/Makefile.in: Rebuild.
   7656 
   7657 2010-09-17  Doug Kwan  <dougkwan (a] google.com>
   7658 
   7659 	* arm.cc (Target_arm::Relocate::relocate): Ignore symbol type and
   7660 	defintion if relocation uses GOT entries of the symbol.
   7661 	* testsuite/icf_safe_test.sh: Fix test.
   7662 	* testsuite/icf_safe_so_test.sh: Fix test.
   7663 
   7664 2010-09-16  Cary Coutant  <ccoutant (a] google.com>
   7665 
   7666 	* script_sections.cc (class Memory_region): Remove "NULL" from
   7667 	vector initializations.
   7668 
   7669 2010-09-15  Cary Coutant  <ccoutant (a] google.com>
   7670 
   7671 	* incremental.cc (Output_section_incremental_inputs::write_info_blocks):
   7672 	Resolve forwarding symbols.
   7673 
   7674 2010-09-15  Doug Kwan  <dougkwan (a] google.com>
   7675 
   7676 	* gold/testsuite/script_test_3.t: Add ARM special sections.
   7677 	* gold/testsuite/script_test_4.t: Same.
   7678 	* gold/testsuite/script_test_5.t: Same.
   7679 	* gold/testsuite/script_test_6.t: Same.
   7680 	* gold/testsuite/script_test_7.t: Same.
   7681 	* gold/testsuite/script_test_7.t: Same.
   7682 	* gold/testsuite/thumb_blx_out_of_range.s: Fix instruction alignment.
   7683 
   7684 2010-09-14  Cary Coutant  <ccoutant (a] google.com>
   7685 
   7686 	* x86_64.cc (Target_x86_64::saw_tls_block_reloc_): Remove member.
   7687 	(Target_x86_64::Relocate::relocate_tls): Replace check for
   7688 	saw_tls_block_reloc_ with test for executable section.
   7689 
   7690 2010-09-12  Cary Coutant  <ccoutant (a] google.com>
   7691 
   7692 	* symtab.h (Symbol::needs_dynamic_reloc): Non-PIC calls from
   7693 	position-independent executables to shared libraries need dynamic
   7694 	relocations.
   7695 	(Symbol::may_need_copy_reloc): Do not generate COPY relocs in
   7696 	position-independent executables.
   7697 	* testsuite/Makefile.am (two_file_mixed_pie_test): New test.
   7698 	* testsuite/Makefile.in: Regenerate.
   7699 
   7700 2010-09-10  Nick Clifton  <nickc (a] redhat.com>
   7701 
   7702 	PR gold/11997
   7703 	* testsuite/memory_test.t: Discard any sections that are not
   7704 	needed.
   7705 
   7706 2010-09-09  H.J. Lu  <hongjiu.lu (a] intel.com>
   7707 
   7708 	PR gold/11996
   7709 	* object.cc (Sized_relobj::do_finalize_local_symbols): Remove
   7710 	"This::" to work around a bug in gcc 4.2.
   7711 
   7712 	* testsuite/ifuncmain7.c (foo_ifunc): Add __attribute__ ((used)).
   7713 
   7714 2010-09-09  Rafael Espindola  <espindola (a] google.com>
   7715 
   7716 	* layout.cc (Layout::attach_allocated_section_to_segment): Don't put
   7717 	sections with different PF_X flags in the same segment.
   7718 	(Layout::find_first_load_seg): Search all segments to find the first
   7719 	one.
   7720 	* options.h (rosegment): New.
   7721 
   7722 2010-09-08  Rafael Espindola  <espindola (a] google.com>
   7723 
   7724 	* layout.cc (Layout::set_segment_offsets): Always advance to a new page.
   7725 
   7726 2010-09-08  Doug Kwan  <dougkwan (a] google.com>
   7727 
   7728 	* arm.cc (Arm_exidx_cantunwind::do_print_to_mapfile): New method.
   7729 	(Arm_relobj::do_relocate_sections): Add new parameter for output
   7730 	file to match the parent.
   7731 	(Target_arm::scan_reloc_section_for_stubs): Use would-be final values
   7732 	of local symbols instead of input values.  Update code to track
   7733 	changes in gold::relocate_section.
   7734 	* object.cc (Sized_relobj::compute_final_local_value): New methods.
   7735 	(Sized_relobj::compute_final_local_value_internal): New methods.
   7736 	(Sized_relobj::do_finalize_local_symbols): Move code from loop
   7737 	body into private version of Sized_relobj::compute_final_local_value.
   7738 	Call the inline method.
   7739 	* object.h (Symbol_value::Symbol_value): Define destructor.  Free
   7740 	merged symbol value if there is one.
   7741 	(Symbol_value::has_output_value): New method defintiion.
   7742 	(Sized_relobj::Compute_final_local_value_status): New enum type.
   7743 	(Sized_relobj::compute_final_local_value): New methods.
   7744 	(Sized_relobj::compute_final_local_value_internal): New methods.
   7745 	* Makefile.am (check_SCRIPTS): Add arm_branch_out_of_range.sh
   7746 	and arm_cortex_a8.sh.
   7747 	(thumb_bl_out_of_range_local, arm_cortex_a8_b_cond, arm_cortex_a8_bl,
   7748 	arm_cortex_a8_blx, arm_cortex_a8_local, arm_corte_a8_local_reloc):
   7749 	New tests.
   7750 	* Makefile.in: Regenerate.
   7751 	* testsuite/arm_bl_out_of_range.s: Update test.
   7752 	* testsuite/thumb_bl_out_of_range.s: Ditto.
   7753 	* testsuite/thumb_blx_out_of_range.s: Ditto.
   7754 	* testsuite/arm_branch_out_of_range.sh: New file.
   7755 	* testsuite/arm_cortex_a8.sh: Ditto.
   7756 	* testsuite/arm_cortex_a8_b.s: Ditto.
   7757 	* testsuite/arm_cortex_a8_b_cond.s: Ditto.
   7758 	* testsuite/arm_cortex_a8_b_local.s: Ditto.
   7759 	* testsuite/arm_cortex_a8_bl.s: Ditto.
   7760 	* testsuite/arm_cortex_a8_blx.s: Ditto.
   7761 	* testsuite/arm_cortex_a8_local.s: Ditto.
   7762 	* testsuite/arm_cortex_a8_local_reloc.s: Ditto.
   7763 	* testsuite/thumb_bl_out_of_range_local.s: Ditto.
   7764 
   7765 2010-09-08  Rafael Espindola  <espindola (a] google.com>
   7766 
   7767 	* Makefile.am (memory_test.stdout): Run readelf with -W.
   7768 	* Makefile.in: Regenerate.
   7769 	* testsuite/memory_test.sh: Make the regexps accept both 32 and
   7770 	64 bit output.
   7771 
   7772 2010-09-08  Rafael Espindola  <espindola (a] google.com>
   7773 
   7774 	* script-sections.cc (Script_sections::add_memory_region): Convert
   7775 	field precision to int.
   7776 	* script.cc (script_set_section_region, script_set_section_region):
   7777 	Convert field precision to int.
   7778 
   7779 2010-09-08  Rafael Espindola  <espindola (a] google.com>
   7780 
   7781 	* arm.cc (do_finalize_sections): Create the __exidx_start and
   7782 	__exdix_end symbols even when the section is missing.
   7783 
   7784 2010-09-08  Nick Clifton  <nickc (a] redhat.com>
   7785 
   7786 	* README: Remove claim that MEMORY is not supported.
   7787 	* expression.cc (script_exp_function_origin)
   7788 	(script_exp_function_length): Move from here to ...
   7789 	* script.cc: ... here.
   7790 	(script_set_section_region, script_add_memory)
   7791 	(script_parse_memory_attr, script_include_directive): New
   7792 	functions.
   7793 	* script-sections.cc
   7794 	(class Memory_region): New class.
   7795 	(class Output_section_definition): Add set_memory_region,
   7796 	set_section_vma, set_section_lma and get_section_name methods.
   7797 	(class Script_Sections): Add add_memory_region,
   7798 	find_memory_region, find_memory_region_origin,
   7799 	find_memory_region_length and set_memory_region methods.
   7800 	Have set_section_addresses method walk the list of set memory
   7801 	regions.
   7802 	Extend the print methos to display memory regions.
   7803 	* script-sections.h: Add prototypes for new methods.
   7804 	Add enum for MEMORY region attributes.
   7805 	* yyscript.y: Add support for parsing MEMORY regions.
   7806 	* script-c.h: Add prototypes for new functions.
   7807 	* testsuite/Makefile.am: Add test of MEMORY region functionality.
   7808 	* testsuite/Makefile.in: Regenerate.
   7809 	* testsuite/memory_test.sh: New script.
   7810 	* testsuite/memory_test.s: New assembler source file.
   7811 	* testsuite/memory_test.t: New linker script.
   7812 
   7813 2010-08-27  Doug Kwan  <dougkwan (a] google.com>
   7814 
   7815 	* gold/resolve.cc (Symbol_table::should_override): Let a weak
   7816 	reference override an existing dynamic weak reference.
   7817 	* testsuite/Makefile.am: Add new test dyn_weak_ref.
   7818 	* testsuite/Makefile.in: Regenerate.
   7819 	* testsuite/dyn_weak_ref.sh: New file.
   7820 	* testsuite/dyn_weak_ref_1.c: Ditto.
   7821 	* testsuite/dyn_weak_ref_2.c: Ditto.
   7822 
   7823 2010-08-27  Ian Lance Taylor  <iant (a] google.com>
   7824 
   7825 	* incremental.h (class Incremental_input_entry): Add virtual
   7826 	destructor.
   7827 
   7828 2010-08-27  Ian Lance Taylor  <iant (a] google.com>
   7829 
   7830 	* testsuite/start_lib_test_3.c: Mark t3 as used.
   7831 
   7832 2010-08-27  Nick Clifton  <nickc (a] redhat.com>
   7833 
   7834 	* options.cc (version_script): Fix small typo in previous
   7835 	whitespace tidyup.
   7836 
   7837 2010-08-25  Nick Clifton  <nickc (a] redhat.com>
   7838 
   7839 	* archive.cc: Formatting fixes: Remove whitespace between
   7840 	typename and following asterisk.  Remove whitespace between
   7841 	function name and opening parenthesis.
   7842 	* archive.h: Likewise.
   7843 	* arm.cc: Likewise.
   7844 	* attributes.cc: Likewise.
   7845 	* attributes.h: Likewise.
   7846 	* common.cc: Likewise.
   7847 	* copy-relocs.cc: Likewise.
   7848 	* dirsearch.h: Likewise.
   7849 	* dynobj.cc: Likewise.
   7850 	* ehframe.cc: Likewise.
   7851 	* ehframe.h: Likewise.
   7852 	* expression.cc: Likewise.
   7853 	* fileread.cc: Likewise.
   7854 	* fileread.h: Likewise.
   7855 	* gc.h: Likewise.
   7856 	* gold-threads.cc: Likewise.
   7857 	* gold.cc: Likewise.
   7858 	* i386.cc: Likewise.
   7859 	* icf.h: Likewise.
   7860 	* incremental-dump.cc: Likewise.
   7861 	* incremental.cc: Likewise.
   7862 	* layout.cc: Likewise.
   7863 	* layout.h: Likewise.
   7864 	* main.cc: Likewise.
   7865 	* merge.cc: Likewise.
   7866 	* merge.h: Likewise.
   7867 	* object.cc: Likewise.
   7868 	* object.h: Likewise.
   7869 	* options.cc: Likewise.
   7870 	* options.h: Likewise.
   7871 	* output.cc: Likewise.
   7872 	* output.h: Likewise.
   7873 	* plugin.cc: Likewise.
   7874 	* plugin.h: Likewise.
   7875 	* powerpc.cc: Likewise.
   7876 	* reloc.cc: Likewise.
   7877 	* script-c.h: Likewise.
   7878 	* script-sections.cc: Likewise.
   7879 	* script.cc: Likewise.
   7880 	* stringpool.cc: Likewise.
   7881 	* symtab.cc: Likewise.
   7882 	* symtab.h: Likewise.
   7883 	* target.cc: Likewise.
   7884 	* timer.cc: Likewise.
   7885 	* timer.h: Likewise.
   7886 	* version.cc: Likewise.
   7887 	* x86_64.cc: Likewise.
   7888 
   7889 2010-08-24  Nick Clifton  <nickc (a] redhat.com>
   7890 
   7891 	PR 11899
   7892 	* layout.cc (segment_precedes): Sort segments by their physical
   7893 	addresses, if they have been set.
   7894 
   7895 2010-08-23  Cary Coutant  <ccoutant (a] google.com>
   7896 
   7897 	* archive.cc (Lib_group::add_symbols): Lock object before deleting its
   7898 	symbols data.
   7899 	(Lib_group::include_member): Unlock object after deleting its
   7900 	symbols data.
   7901 	* testsuite/start_lib_test_3.c: Remove all global symbols to trigger
   7902 	the bug fixed here.
   7903 
   7904 2010-08-19  Neil Vachharajani  <nvachhar (a] google.com>
   7905 	    Cary Coutant  <ccoutant (a] google.com>
   7906 
   7907 	* gold/archive.h (Add_lib_group_symbols): Add readsyms_blocker_, adjust
   7908 	constructor, and set_blocker.
   7909 	* gold/archive.cc (Add_lib_group_symbols::is_runnable): Also check
   7910 	readsyms_blocker_.
   7911 	* gold/readsyms.cc (Read_symbols::do_lib_group): Also pass
   7912 	this->this_blocker_ to Add_lib_group_symbols::set_blocker.
   7913 	* testsuite/Makefile.am (start_lib_test): New test case.
   7914 	* testsuite/Makefile.in: Regenerate.
   7915 	* testsuite/start_lib_test_main.c: New file.
   7916 	* testsuite/start_lib_test_1.c: New file.
   7917 	* testsuite/start_lib_test_2.c: New file.
   7918 	* testsuite/start_lib_test_3.c: New file.
   7919 
   7920 2010-08-19  Ian Lance Taylor  <iant (a] google.com>
   7921 
   7922 	* Makefile.in: Rebuild with automake 1.11.1.
   7923 	* aclocal.m4: Likewise.
   7924 	* testsuite/Makefile.in: Likewise.
   7925 
   7926 2010-08-19  Ian Lance Taylor  <iant (a] google.com>
   7927 
   7928 	PR 10893
   7929 	* i386.cc (class Output_data_plt_i386): Update declarations.
   7930 	Define Global_ifunc and Local_ifunc types.  Add global_ifuncs_ and
   7931 	local_ifuncs_ fields.
   7932 	(Target_i386::do_plt_section_for_global): New function.
   7933 	(Target_i386::do_plt_section_for_local): New function.
   7934 	(Output_data_plt_i386::Output_data_plt_i386): Add symtab
   7935 	parameter; change all callers.  Initialize global_ifuncs_ and
   7936 	local_ifuncs_.  If doing a static link define __rel_iplt_start and
   7937 	__rel_iplt_end.
   7938 	(Output_data_plt_i386::add_entry): Handle IFUNC symbols.
   7939 	(Output_data_plt_i386::add_local_ifunc_entry): New function.
   7940 	(Output_data_plt_i386::do_write): Fix GOT entries for IFUNC
   7941 	symbols.
   7942 	(Target_i386::make_plt_section): New function, broken out of
   7943 	make_plt_entry.  Set sh_info field of .rel.plt to point to .plt.
   7944 	(Target_i386::make_plt_entry): Call make_plt_section.
   7945 	(Target_i386::make_local_ifunc_plt_entry): New function.
   7946 	(Target_i386::Scan::reloc_needs_iplt_for_ifunc): New function.
   7947 	(Target_i386::Scan::local): Handle IFUNC symbols.  Add
   7948 	R_386_IRELATIVE to switch.
   7949 	(Target_i386::Scan::global): Likewise.
   7950 	(Target_i386::Relocate::relocate): Likewise.
   7951 	(Target_i386::Relocatable_size_for_reloc): Add R_386_IRELATIVE to
   7952 	switch.
   7953 	* x86_64.cc (class Output_data_plt_x86_64): Update declarations.
   7954 	(Target_x86_64::do_plt_section_for_global): New function.
   7955 	(Target_x86_64::do_plt_section_for_local): New function.
   7956 	(Output_data_plt_x86_64::Output_data_plt_x86_64): Add symtab
   7957 	parameter; change all callers.  If doing a static link define
   7958 	__rela_iplt_start and __rela_iplt_end.
   7959 	(Output_data_plt_x86_64::add_entry): Handle IFUNC symbols.
   7960 	(Output_data_plt_x86_64::add_local_ifunc_entry): New function.
   7961 	(Target_x86_64::make_plt_section): Set sh_info field of .rel.plt
   7962 	to point to .plt.
   7963 	(Target_x86_64::make_local_ifunc_plt_entry): New function.
   7964 	(Target_x86_64::Scan::check_non_pic): Add R_X86_64_IRELATIVE to
   7965 	switch.
   7966 	(Target_x86_64::Scan::reloc_needs_iplt_for_ifunc): New function.
   7967 	(Target_x86_64::Scan::local): Handle IFUNC symbols.  Add
   7968 	R_X86_64_IRELATIVE to switch.
   7969 	(Target_x86_64::Scan::global): Likewise.
   7970 	(Target_x86_64::Relocate::relocate): Likewise.
   7971 	(Target_x86_64::Relocatable_size_for_reloc): Add R_X86_64_IRELATIVE to
   7972 	switch.
   7973 	* target.h (class Target): Add plt_section_for_global and
   7974 	plt_section_for_local functions.  Add do_plt_section_for_global
   7975 	and do_plt_section_for_local virtual functions.
   7976 	* symtab.h (Symbol::needs_plt_entry): Handle IFUNC symbol.  Add
   7977 	clarifying comments.
   7978 	(Symbol::use_plt_offset): Handle IFUNC symbol.
   7979 	* object.cc (Sized_relobj::Sized_relobj): Initialize
   7980 	local_plt_offsets_.
   7981 	(Sized_relobj::local_has_plt_offset): New function.
   7982 	(Sized_relobj::local_plt_offset): New function.
   7983 	(Sized_relobj::set_local_plt_offset): New function.
   7984 	(Sized_relobj::do_count): Handle IFUNC symbol.
   7985 	* object.h (class Symbol_value): Add is_ifunc_symbol_ field.  Take
   7986 	a bit away from input_shndx_ field.  Add set_is_func_symbol and
   7987 	is_ifunc_symbol functions.
   7988 	(class Sized_relobj): Update declarations.  Remove Tls_got_entry
   7989 	and Local_tls_got_offsets.  Define Local_plt_offsets.  Add
   7990 	local_plt_offsets_ field.
   7991 	(Sized_relobj::clear_local_symbols): Clear local_plt_offsets_.
   7992 	* output.h (class Output_section_data): Add non-const
   7993 	output_section function.
   7994 	(class Output_data_got): Update declarations.
   7995 	(class Output_data_got::Got_entry): Add use_plt_offset_ field.
   7996 	Add use_plt_offset parameter to global and local constructors.
   7997 	Change all callers.  Change local_sym_index_ field to 31 bits.
   7998 	Change GSYM_CODE and CONSTANT_CODE accordingly.
   7999 	* output.cc (Output_data_reloc_base::do_adjust_output_section): If
   8000 	doing a static link don't set sh_link field.
   8001 	(Output_data_got::Got_entry::write): Use PLT offset if
   8002 	appropriate.
   8003 	(Output_data_got::add_global_plt): New function.
   8004 	(Output_data_got::add_local_plt): New function.
   8005 	* target-reloc.h (relocate_section): Handle IFUNC symbol.
   8006 	* defstd.cc (in_section): Remove entries for __rel_iplt_start,
   8007 	__rel_iplt_end, __rela_iplt_start, and __rela_iplt_end.
   8008 	* configure.ac: Set IFUNC automake conditional for glibc >= 2.11.
   8009 	* testsuite/Makefile.am: Add a bunch of IFUNC tests, all within
   8010 	IFUNC conditional.
   8011 	* testsuite/ifunc-sel.h: New file.
   8012 	* testsuite/ifuncmain1.c: New file.
   8013 	* testsuite/ifuncmain1vis.c: New file.
   8014 	* testsuite/ifuncmod1.c: New file.
   8015 	* testsuite/ifuncdep2.c: New file.
   8016 	* testsuite/ifuncmain2.c: New file.
   8017 	* testsuite/ifuncmain3.c: New file.
   8018 	* testsuite/ifuncmod3.c: New file.
   8019 	* testsuite/ifuncmain4.c: New file.
   8020 	* testsuite/ifuncmain5.c: New file.
   8021 	* testsuite/ifuncmod5.c: New file.
   8022 	* testsuite/ifuncmain6pie.c: New file.
   8023 	* testsuite/ifuncmod6.c: New file.
   8024 	* testsuite/ifuncmain7.c: New file.
   8025 	* configure, testsuite/Makefile.in: Rebuild.
   8026 
   8027 2010-08-18  Ian Lance Taylor  <iant (a] google.com>
   8028 
   8029 	* incremental.cc
   8030 	(Output_section_incremental_inputs::write_input_files): Add cast
   8031 	to avoid signed/unsigned comparison warning.
   8032 	(Output_section_incremental_inputs::write_info_blocks): Likewise.
   8033 
   8034 2010-08-12  Cary Coutant  <ccoutant (a] google.com>
   8035 
   8036 	* common.cc (Sort_commons::operator()): Remove unnecessary code.
   8037 
   8038 2010-08-13  Ian Lance Taylor  <iant (a] google.com>
   8039 
   8040 	* testsuite/incremental_test_1.c: Add prototype to avoid warning.
   8041 
   8042 2010-08-12  Cary Coutant  <ccoutant (a] google.com>
   8043 	    Doug Kwan  <dougkwan (a] google.com>
   8044 
   8045 	* resolve.cc (Symbol_table::should_override): When a weak dynamic
   8046 	defintion overrides non-weak undef, remember that the original undef
   8047 	is not weak.
   8048 	* symtab.cc (Symbol_table::sized_write_global): For undef without
   8049 	an original weak binding, set binding to global in output.
   8050 	* testsuite/Makefile.am: Add new test strong_ref_weak_def.
   8051 	* testsuite/Makefile.in: Regenerate.
   8052 	* testsuite/strong_ref_weak_def.sh: New file.
   8053 	* testsuite/strong_ref_weak_def_1.c: Ditto.
   8054 	* testsuite/strong_ref_weak_def_2.c: Ditto.
   8055 
   8056 2010-08-12  Cary Coutant  <ccoutant (a] google.com>
   8057 
   8058 	* testsuite/incremental_test.sh: Rewrite.
   8059 	* testsuite/incremental_test_1.c: Rewrite.
   8060 	* testsuite/incremental_test_2.c: Rewrite.
   8061 
   8062 2010-08-12  Cary Coutant  <ccoutant (a] google.com>
   8063 
   8064 	* arm.cc (Target_arm::got_size): Add const.
   8065 	(Target_arm::got_entry_count): New function.
   8066 	(Target_arm::plt_entry_count): New function.
   8067 	(Target_arm::first_plt_entry_offset): New function.
   8068 	(Target_arm::plt_entry_size): New function.
   8069 	(Output_data_plt_arm::entry_count): New function.
   8070 	(Output_data_plt_arm::first_plt_entry_offset): New function.
   8071 	(Output_data_plt_arm::get_plt_entry_size): New function.
   8072 	* i386.cc (Target_i386::got_size): Add const.
   8073 	(Target_i386::got_entry_count): New function.
   8074 	(Target_i386::plt_entry_count): New function.
   8075 	(Target_i386::first_plt_entry_offset): New function.
   8076 	(Target_i386::plt_entry_size): New function.
   8077 	(Output_data_plt_i386::entry_count): New function.
   8078 	(Output_data_plt_i386::first_plt_entry_offset): New function.
   8079 	(Output_data_plt_i386::get_plt_entry_size): New function.
   8080 	* incremental-dump.cc (dump_incremental_inputs): Adjust call to
   8081 	find_incremental_inputs_sections.  Dump incremental_got_plt section.
   8082 	* incremental.cc: Include target.h.
   8083 	(Sized_incremental_binary::do_find_incremental_inputs_sections): Add
   8084 	parameter.  Adjust all callers.  Find incremental_got_plt section.
   8085 	(Incremental_inputs::create_data_sections): Create incremental_got_plt
   8086 	section.
   8087 	(Output_section_incremental_inputs::set_final_data_size): Calculate
   8088 	size of incremental_got_plt section.
   8089 	(Output_section_incremental_inputs::do_write): Write the
   8090 	incremental_got_plt section.
   8091 	(Got_plt_view_info): New struct.
   8092 	(Local_got_offset_visitor): New class.
   8093 	(Global_got_offset_visitor): New class.
   8094 	(Global_symbol_visitor_got_plt): New class.
   8095 	(Output_section_incremental_inputs::write_got_plt): New function.
   8096 	* incremental.h (Incremental_binary::find_incremental_inputs_sections):
   8097 	Add parameter.  Adjust all callers.
   8098 	(Incremental_binary::do_find_incremental_inputs_sections): Likewise.
   8099 	(Incremental_inputs::got_plt_section): New function.
   8100 	(Incremental_inputs::got_plt_section_): New data member.
   8101 	(Incremental_got_plt_reader): New class.
   8102 	* layout.cc (Layout::create_incremental_info_sections): Add the
   8103 	incremental_got_plt section.
   8104 	* object.h (Got_offset_list::get_list): New function.
   8105 	(Got offset_list::for_all_got_offsets): New function.
   8106 	(Sized_relobj::local_got_offset_list): New function.
   8107 	* powerpc.cc (Target_powerpc::got_size): Add const.
   8108 	(Target_powerpc::got_entry_count): New function.
   8109 	(Target_powerpc::plt_entry_count): New function.
   8110 	(Target_powerpc::first_plt_entry_offset): New function.
   8111 	(Target_powerpc::plt_entry_size): New function.
   8112 	(Output_data_plt_powerpc::entry_count): New function.
   8113 	(Output_data_plt_powerpc::first_plt_entry_offset): New function.
   8114 	(Output_data_plt_powerpc::get_plt_entry_size): New function.
   8115 	* sparc.cc (Target_sparc::got_size): Add const.
   8116 	(Target_sparc::got_entry_count): New function.
   8117 	(Target_sparc::plt_entry_count): New function.
   8118 	(Target_sparc::first_plt_entry_offset): New function.
   8119 	(Target_sparc::plt_entry_size): New function.
   8120 	(Output_data_plt_sparc::entry_count): New function.
   8121 	(Output_data_plt_sparc::first_plt_entry_offset): New function.
   8122 	(Output_data_plt_sparc::get_plt_entry_size): New function.
   8123 	* symtab.h (Symbol::got_offset_list): New function.
   8124 	(Symbol_table::for_all_symbols): New function.
   8125 	* target.h (Sized_target::got_entry_count): New function.
   8126 	(Sized_target::plt_entry_count): New function.
   8127 	(Sized_target::plt_entry_size): New function.
   8128 	* x86_64.cc (Target_x86_64::got_size): Add const.
   8129 	(Target_x86_64::got_entry_count): New function.
   8130 	(Target_x86_64::plt_entry_count): New function.
   8131 	(Target_x86_64::first_plt_entry_offset): New function.
   8132 	(Target_x86_64::plt_entry_size): New function.
   8133 	(Output_data_plt_x86_64::entry_count): New function.
   8134 	(Output_data_plt_x86_64::first_plt_entry_offset): New function.
   8135 	(Output_data_plt_x86_64::get_plt_entry_size): New function.
   8136 
   8137 2010-08-12  Cary Coutant  <ccoutant (a] google.com>
   8138 
   8139 	* archive.cc: Include incremental.h.
   8140 	(Archive::Archive): Initialize incremental_info_.
   8141 	(Archive::include_member): Record archive members in incremental info.
   8142 	(Add_archive_symbols::run): Record begin and end of an archive in
   8143 	incremental info.
   8144 	(Lib_group::include_member): Record objects in incremental info.
   8145 	* archive.h (Incremental_archive_entry): Forward declaration.
   8146 	(Archive::set_incremental_info): New member function.
   8147 	(Archive::incremental_info): New member function.
   8148 	(Archive::Unused_symbol_iterator): New class.
   8149 	(Archive::unused_symbols_begin): New member function.
   8150 	(Archive::unused_symbols_end): New member function.
   8151 	(Archive::incremental_info_): New data member.
   8152 	* incremental-dump.cc (find_input_containing_global): New function.
   8153 	(dump_incremental_inputs): Dump new incremental info sections.
   8154 	* incremental.cc: Include symtab.h.
   8155 	(Output_section_incremental_inputs): New class.
   8156 	(Sized_incremental_binary::do_find_incremental_inputs_sections): Support
   8157 	new incremental info sections.
   8158 	(Sized_incremental_binary::do_check_inputs): Likewise.
   8159 	(Incremental_inputs::report_archive): Remove.
   8160 	(Incremental_inputs::report_archive_begin): New function.
   8161 	(Incremental_inputs::report_archive_end): New function.
   8162 	(Incremental_inputs::report_object): New function.
   8163 	(Incremental_inputs::finalize_inputs): Remove.
   8164 	(Incremental_inputs::report_input_section): New function.
   8165 	(Incremental_inputs::report_script): Rewrite.
   8166 	(Incremental_inputs::finalize): Do nothing but finalize string table.
   8167 	(Incremental_inputs::create_incremental_inputs_section_data): Remove.
   8168 	(Incremental_inputs::sized_create_inputs_section_data): Remove.
   8169 	(Incremental_inputs::create_data_sections): New function.
   8170 	(Incremental_inputs::relocs_entsize): New function.
   8171 	(Output_section_incremental_inputs::set_final_data_size): New function.
   8172 	(Output_section_incremental_inputs::do_write): New function.
   8173 	(Output_section_incremental_inputs::write_header): New function.
   8174 	(Output_section_incremental_inputs::write_input_files): New function.
   8175 	(Output_section_incremental_inputs::write_info_blocks): New function.
   8176 	(Output_section_incremental_inputs::write_symtab): New function.
   8177 	* incremental.h (Incremental_script_entry): Forward declaration.
   8178 	(Incremental_object_entry): Forward declaration.
   8179 	(Incremental_archive_entry): Forward declaration.
   8180 	(Incremental_inputs): Forward declaration.
   8181 	(Incremental_inputs_header_data): Remove.
   8182 	(Incremental_inputs_header): Remove.
   8183 	(Incremental_inputs_header_write): Remove.
   8184 	(Incremental_inputs_entry_data): Remove.
   8185 	(Incremental_inputs_entry): Remove.
   8186 	(Incremental_inputs_entry_write): Remove.
   8187 	(enum Incremental_input_type): Add INCREMENTAL_INPUT_ARCHIVE_MEMBER.
   8188 	(Incremental_binary::find_incremental_inputs_sections): Add parameters.
   8189 	(Incremental_binary::do_find_incremental_inputs_sections): Likewise.
   8190 	(Sized_ncremental_binary::do_find_incremental_inputs_sections):
   8191 	Likewise.
   8192 	(Incremental_input_entry): New class.
   8193 	(Incremental_script_entry): New class.
   8194 	(Incremental_object_entry): New class.
   8195 	(Incremental_archive_entry): New class.
   8196 	(Incremental_inputs::Incremental_inputs): Initialize new data members.
   8197 	(Incremental_inputs::report_inputs): Remove.
   8198 	(Incremental_inputs::report_archive): Remove.
   8199 	(Incremental_inputs::report_archive_begin): New function.
   8200 	(Incremental_inputs::report_archive_end): New function.
   8201 	(Incremental_inputs::report_object): Change prototype.
   8202 	(Incremental_inputs::report_input_section): New function.
   8203 	(Incremental_inputs::report_script): Change prototype.
   8204 	(Incremental_inputs::get_reloc_count): New function.
   8205 	(Incremental_inputs::set_reloc_count): New function.
   8206 	(Incremental_inputs::create_data_sections): New function.
   8207 	(Incremental_inputs::create_incremental_inputs_section_data): Remove.
   8208 	(Incremental_inputs::inputs_section): New function.
   8209 	(Incremental_inputs::symtab_section): New function.
   8210 	(Incremental_inputs::relocs_section): New function.
   8211 	(Incremental_inputs::get_stringpool): Add const.
   8212 	(Incremental_inputs::command_line): Add const.
   8213 	(Incremental_inputs::inputs): Remove.
   8214 	(Incremental_inputs::command_line_key): New function.
   8215 	(Incremental_inputs::input_file_count): New function.
   8216 	(Incremental_inputs::input_files): New function.
   8217 	(Incremental_inputs::relocs_entsize): New function.
   8218 	(Incremental_inputs::sized_create_inputs_section_data): Remove.
   8219 	(Incremental_inputs::finalize_inputs): Remove.
   8220 	(Incremental_inputs::Input_info): Remove.
   8221 	(Incremental_inputs::lock_): Remove.
   8222 	(Incremental_inputs::inputs_): Change type.
   8223 	(Incremental_inputs::inputs_map_): Remove.
   8224 	(Incremental_inputs::current_object_entry_): New data member.
   8225 	(Incremental_inputs::inputs_section_): New data member.
   8226 	(Incremental_inputs::symtab_section_): New data member.
   8227 	(Incremental_inputs::relocs_section_): New data member.
   8228 	(Incremental_inputs::reloc_count_): New data member.
   8229 	(Incremental_inputs_reader): New class.
   8230 	(Incremental_symtab_reader): New class.
   8231 	(Incremental_relocs_reader): New class.
   8232 	* layout.cc (Layout::finalize): Move finalization of incremental info
   8233 	and creation of incremental info sections to follow finalization of
   8234 	symbol table.  Set offsets for postprocessing sections.
   8235 	(Layout::create_incremental_info_sections): Call
   8236 	Incremental_inputs::create_data_sections.  Add incremental symtab
   8237 	and relocs sections.  Set sh_entsize and sh_link fields.  Arrange for
   8238 	sections to layout after input sections.
   8239 	* layout.h (struct Timespec): Forward declaration.
   8240 	(Layout::incremental_inputs): Add const.
   8241 	(Layout::create_incremental_info_sections): Add parameter.
   8242 	* main.cc (main): Remove call to Incremental_inputs::report_inputs.
   8243 	* object.cc: Include incremental.h.
   8244 	(Relobj::finalize_incremental_relocs): New function.
   8245 	(Sized_relobj::do_layout): Record input sections in incremental info.
   8246 	* object.h (Object::output_section): New function.
   8247 	(Object::output_section_offset): Moved from Relobj.
   8248 	(Object::get_incremental_reloc_base): New function.
   8249 	(Object::get_incremental_reloc_count): New function.
   8250 	(Object::do_output_section): New function.
   8251 	(Object::do_output_section_offset): Moved from Relobj.
   8252 	(Object::do_get_incremental_reloc_base): New function.
   8253 	(Object::do_get_incremental_reloc_count): New function.
   8254 	(Object::Object): Initialize new data members.
   8255 	(Relobj::output_section): Renamed do_output_section and moved to
   8256 	protected.
   8257 	(Relobj::output_section_offset): Moved to Object.
   8258 	(Relobj::do_get_incremental_reloc_base): New function.
   8259 	(Relobj::do_get_incremental_reloc_count): New function.
   8260 	(Relobj::allocate_incremental_reloc_counts): New function.
   8261 	(Relobj::count_incremental_reloc): New function.
   8262 	(Relobj::finalize_incremental_relocs): New function.
   8263 	(Relobj::next_incremental_reloc_index): New function.
   8264 	(Relobj::reloc_counts_): New data member.
   8265 	(Relobj::reloc_bases_): New data member.
   8266 	(Sized_relobj::do_relocate_sections): Add parameter.  Change caller.
   8267 	(Sized_relobj::relocate_sections): Add parameter.  Change all callers.
   8268 	(Sized_relobj::incremental_relocs_scan): New function.
   8269 	(Sized_relobj::incremental_relocs_scan_reltype): New function.
   8270 	(Sized_relobj::incremental_relocs_write): New function.
   8271 	(Sized_relobj::incremental_relocs_write_reltype): New function.
   8272 	* plugin.cc (Plugin_manager::add_input_file): Rewrite test for
   8273 	incremental link.
   8274 	* readsyms.cc (Read_symbols::do_read_symbols): Move reporting of
   8275 	archives and object files elsewhere.
   8276 	(Add_symbols::run): Report object files here.
   8277 	(Finish_group::run): Report end of archive at end of group.
   8278 	* reloc.cc: Include layout.h, incremental.h.
   8279 	(Sized_relobj::do_read_relocs): Need relocations for incremental link.
   8280 	(Sized_relobj::do_scan_relocs): Record relocations for incremental link.
   8281 	(Sized_relobj::incremental_relocs_scan): New function.
   8282 	(Sized_relobj::incremental_relocs_scan_reltype): New function.
   8283 	(Sized_relobj::do_relocate_sections): Write incremental relocations.
   8284 	(Sized_relobj::incremental_relocs_write): New function.
   8285 	(Sized_relobj::incremental_relocs_write_reltype): New function.
   8286 	* script.cc (read_input_script): Rewrite test for incremental link.
   8287 	Change call to Incremental_inputs::report_script.
   8288 	* symtab.h (Symbol_table::first_global_index): New function.
   8289 	(Symbol_table::output_count): New function.
   8290 
   8291 2010-08-12  Doug Kwan  <dougkwan (a] google.com>
   8292 
   8293 	* arm.cc (Target_arm::merge_object_attributes): Check command line
   8294 	options --no-wchar-size-warning and --no-enum-size-warning.
   8295 	* options.h (General_options): Add ld-compatible options
   8296 	--no-enum-size-warning and --no-wchar-size-warning.
   8297 
   8298 2010-08-04  Ian Lance Taylor  <iant (a] google.com>
   8299 
   8300 	* x86_64.cc (Target_x86_64::Scan::local): Use
   8301 	R_X86_64_GNU_VTINHERIT instead of R_386_GNU_VTINHERIT and
   8302 	R_X86_64_GNU_VTENTRY instead of R_386_GNU_VTENTRY.
   8303 	(Target_x86_64::Scan::global): Likewise.
   8304 	(Target_x86_64::Relocate::relocate): Likewise.
   8305 	(Target_x86_64::Relocatable_size_for_reloc::get_size_for_reloc):
   8306 	Likewise.
   8307 
   8308 2010-08-03  Cary Coutant  <ccoutant (a] google.com>
   8309 
   8310 	* merge.cc (Output_merge_string::do_add_input_section): Count strings
   8311 	to reserve space in merged_strings vector. Keep total input size
   8312 	for stats.
   8313 	(Output_merge_string::do_print_merge_stats): Print total input size.
   8314 	* merge.h (Output_merge_string): Add input_size_ field.
   8315 	* stringpool.cc (Stringpool_template::string_length): Move
   8316 	implementations out of Stringpool_template class and place in
   8317 	stringpool.h.
   8318 	* stringpool.h (string_length): Move out of Stringpool_template.
   8319 
   8320 2010-08-03  Ian Lance Taylor  <iant (a] google.com>
   8321 
   8322 	PR 11712
   8323 	* layout.cc (relaxation_loop_body): If address of load segment is
   8324 	set, adjust address to include headers if possible.
   8325 
   8326 2010-08-03  Ian Lance Taylor  <iant (a] google.com>
   8327 
   8328 	* version.cc (version_string): Bump to 1.10.
   8329 
   8330 2010-08-03  Ian Lance Taylor  <iant (a] google.com>
   8331 
   8332 	PR 11805
   8333 	* layout.h (enum Output_section_order): Define.
   8334 	(class Layout): Update declarations.
   8335 	* layout.cc (Layout::get_output_section): Add order parameter.
   8336 	Remove is_interp, is_dynamic_linker_section, is_last_relro, and
   8337 	is_first_non_relro parameters.  Change all callers.
   8338 	(Layout::choose_output_section): Likewise.
   8339 	(Layout::add_output_section_data): Likewise.
   8340 	(Layout::make_output_section): Likewise.  Set order.
   8341 	(Layout::default_section_order): New function.
   8342 	(Layout::layout_eh_frame): Call add_output_section_to_nonload.
   8343 	* output.cc (Output_section::Output_section): Initialize order_.
   8344 	Don't initialize deleted fields.
   8345 	(Output_segment::Output_segment): Don't initialize deleted
   8346 	fields.
   8347 	(Output_segment::add_output_section_to_load): New function
   8348 	replacing add_output_section.  Change all callers to call this or
   8349 	add_output_section_to_nonload.
   8350 	(Output_segment::add_output_section_to_nonload): New function.
   8351 	(Output_segment::remove_output_section): Rewrite.
   8352 	(Output_segment::add_initial_output_data): Likewise.
   8353 	(Output_segment::has_any_data_sections): Likewise.
   8354 	(Output_segment::is_first_section_relro): Likewise.
   8355 	(Output_segment::maximum_alignment): Likewise.
   8356 	(Output_segment::has_dynamic_reloc): New function replacing
   8357 	dynamic_reloc_count.  Change all callers.
   8358 	(Output_segment::has_dynamic_reloc_list): New function replacing
   8359 	dynamic_reloc_count_list.  Change all callers.
   8360 	(Output_segment::set_section_addresses): Rewrite.
   8361 	(Output_segment::set_offset): Rewrite.
   8362 	(Output_segment::find_first_and_last_list): Remove.
   8363 	(Output_segment::set_tls_offsets): Rewrite.
   8364 	(Output_segment::first_section_load_address): Likewise.
   8365 	(Output_segment::output_section_count): Likewise.
   8366 	(Output_segment::section_with_lowest_load_address): Likewise.
   8367 	(Output_segment::write_section_headers): Likewise.
   8368 	(Output_segment::print_sections_to_map): Likewise.
   8369 	* output.h (class Output_data): Remove dynamic_reloc_count_
   8370 	field.  Add has_dynamic_reloc_ field.  Make bools into bitfields.
   8371 	(Output_data::add_dynamic_reloc): Rewrite.
   8372 	(Output_data::has_dynamic_reloc): New function.
   8373 	(Output_data::dynamic_reloc_count): Remove.
   8374 	(class Output_section): Add order_ field.  Remvoe is_relro_local_,
   8375 	is_last_relro_, is_first_non_relro_, is_interp_,
   8376 	is_dynamic_linker_section_ fields.  Add order and set_order
   8377 	functions.  Remove is_relro_local, set_is_relro_local,
   8378 	is_last_relro, set_is_last_relro, is_first_non_relro,
   8379 	set_is_first_non_relro functions, is_interp, set_is_interp,
   8380 	is_dynamic_linker_section, and set_is_dynamic_linker_section
   8381 	functions.
   8382 	(class Output_segment): Change Output_data_list from std::list to
   8383 	std:;vector.  Add output_lists_ field.  Remove output_data_ and
   8384 	output_bss_ fields.  Update declarations.
   8385 
   8386 2010-08-02  Ian Lance Taylor  <iant (a] google.com>
   8387 
   8388 	* arm.cc (Target_arm::gc_process_relocs): Use typename.
   8389 	* powerpc.cc (Target_powerpc::gc_process_relocs): Likewise.
   8390 	* sparc.cc (Target_sparc::gc_process_relocs): Likewise.
   8391 
   8392 2010-08-02  Ian Lance Taylor  <iant (a] google.com>
   8393 
   8394 	PR 11855
   8395 	* script.cc (Script_options::Script_options): Initialize
   8396 	symbol_definitions_ and symbol_references_.
   8397 	(Script_options::add_symbol_assignment): Update
   8398 	symbol_definitions_ and symbol_references_.
   8399 	(Script_options::add_symbol_reference): New function.
   8400 	(script_symbol): New function.
   8401 	* script.h (class Script_options): Add symbol_definitions_ and
   8402 	symbol_references_ fields.
   8403 	(Script_options::referenced_const_iterator): New type.
   8404 	(Script_options::referenced_begin): New function.
   8405 	(Script_options::referenced_end): New function.
   8406 	(Script_options::is_referenced): New function.
   8407 	(Script_options::any_unreferenced): New function.
   8408 	* script-c.h (script_symbol): Declare.
   8409 	* yyscript.y (exp): Call script_symbol.
   8410 	* symtab.cc: Include "script.h".
   8411 	(Symbol_table::gc_mark_undef_symbols): Add layout parameter.
   8412 	Change all callers.  Check symbols referenced by scripts.
   8413 	(Symbol_table::add_undefined_symbols_from_command_line): Add
   8414 	layout parameter.  Change all callers.
   8415 	(Symbol_table::do_add_undefined_symbols_from_command_line):
   8416 	Likewise.  Break out loop body.  Check symbols referenced by
   8417 	scripts.
   8418 	(Symbol_table::add_undefined_symbol_from_command_line): New
   8419 	function broken out of
   8420 	do_add_undefined_symbols_from_command_line.
   8421 	* symtab.h (class Symbol_table): Update declarations.
   8422 	* archive.cc: Include "layout.h".
   8423 	(Archive::should_include_member): Add layout parameter.  Change
   8424 	all callers.  Check for symbol mentioned in expression.
   8425 	* archive.h (class Archive): Update declaration.
   8426 	* object.cc (Sized_relobj::do_should_include_member): Add layout
   8427 	parameter.
   8428 	* object.h (Object::should_include_member): Add layout parameter.
   8429 	Change all callers.
   8430 	(Object::do_should_include_member): Add layout parameter.
   8431 	(class Sized_relobj): Update declaration.
   8432 	* dynobj.cc (Sized_dynobj::do_should_include_member): Add layout
   8433 	parameter.
   8434 	* dynobj.h (class Sized_dynobj): Update declaration.
   8435 	* plugin.cc (Sized_pluginobj::do_should_include_member): Add
   8436 	layout parameter.
   8437 	* plugin.h (class Sized_pluginobj): Update declaration.
   8438 
   8439 2010-08-02  Ian Lance Taylor  <iant (a] google.com>
   8440 
   8441 	PR 11866
   8442 	* output.cc (Output_segment::set_offset): Search for the first and
   8443 	last sections rather than assuming that the list is in order.
   8444 	(Output_segment::find_first_and_last_list): New function.
   8445 	* output.h (class Output_segment): Update declarations.
   8446 	* testsuite/Makefile.am (check_PROGRAMS): Add relro_strip_test.
   8447 	(relro_strip_test_SOURCES): New variable.
   8448 	(relro_strip_test_DEPENDENCIES): New variable.
   8449 	(relro_strip_test_LDFLAGS): New variable.
   8450 	(relro_strip_test_LDADD): New variable.
   8451 	(relro_strip_test.so): New target.
   8452 
   8453 2010-08-02  Ian Lance Taylor  <iant (a] google.com>
   8454 
   8455 	* i386.cc (class Target_i386): Add got_tlsdesc_ field.
   8456 	(Target_i386::Target_i386):: Initialize got_tlsdesc_.
   8457 	(Target_i386::got_tlsdesc_section): New function.
   8458 	(Target_i386::got_section): Create space for GOT entries for
   8459 	TLSDESC relocations.
   8460 	(Target_i386::Scan::local): Use TLSDESC GOT for unoptimized
   8461 	R_386_TLS_GOTDESC.
   8462 	(Target_i386::Scan::global): Likewise.
   8463 	(Target_i386::Relocate::relocate_tls): Adjust GOT offset when
   8464 	using TLSDESC GOT.
   8465 	* x86_64.cc (class Target_x86_64): Add got_tlsdesc_ field.
   8466 	(Target_x86_64::Target_x86_64):: Initialize got_tlsdesc_.
   8467 	(Target_x86_64::got_tlsdesc_section): New function.
   8468 	(Target_x86_64::got_section): Create space for GOT entries for
   8469 	TLSDESC relocations.
   8470 	(Target_x86_64::Scan::local): Use TLSDESC GOT for unoptimized
   8471 	R_386_TLS_GOTDESC.
   8472 	(Target_x86_64::Scan::global): Likewise.
   8473 	(Target_x86_64::Relocate::relocate_tls): Adjust GOT offset when
   8474 	using TLSDESC GOT.
   8475 
   8476 2010-08-02  Ian Lance Taylor  <iant (a] google.com>
   8477 
   8478 	* testsuite/final_layout.sh: Use dc to convert from hex to
   8479 	decimal.
   8480 
   8481 2010-07-29  Sriraman Tallam  <tmsriram (a] google.com>
   8482 
   8483 	* arm.cc (Target_arm<big_endian>::gc_process_relocs): Add template
   8484 	paramter to the call to gold::gc_process_relocs.
   8485 	* i386.cc (Target_i386<big_endian>::gc_process_relocs): Add template
   8486 	paramter to the call to gold::gc_process_relocs.
   8487 	* x86_64.cc (Target_x86_64<big_endian>::gc_process_relocs): Add template
   8488 	parameter to the call to gold::gc_process_relocs.
   8489 	* powerpc.cc (Target_powerpc<big_endian>::gc_process_relocs): Add
   8490 	template parameter to the call to gold::gc_process_relocs.
   8491 	* sparc.cc (Target_sparc<big_endian>::gc_process_relocs): Add template
   8492 	paramter to the call to gold::gc_process_relocs.
   8493 	* gc.h (get_embedded_addend_size): New function.
   8494 	(gc_process_relocs): Save the size of the reloc for use by ICF.
   8495 	* icf.cc (get_section_contents): Get the addend from the text section
   8496 	for SHT_REL relocation sections.
   8497 	* icf.h (Icf::Reloc_addend_size_info): New typedef.
   8498 	(Icf::Reloc_info): Add new member reloc_addend_size_info.
   8499 	* int_encoding.h (read_from_pointer): New overloaded function.
   8500 	* testsuite/Makefile.am (icf_sht_rel_addend_test): New test.
   8501 	* testsuite/icf_sht_rel_addend_test.sh: New file.
   8502 	* testsuite/icf_sht_rel_addend_test_1.cc: New file.
   8503 	* testsuite/icf_sht_rel_addend_test_2.cc: New file.
   8504 
   8505 2010-07-28  Ralf Wildenhues  <Ralf.Wildenhues (a] gmx.de>
   8506 
   8507 	* configure.ac (AM_INIT_AUTOMAKE): Use parallel-tests option.
   8508 	* Makefile.in: Regenerate.
   8509 	* testsuite/Makefile.in: Regenerate.
   8510 
   8511 2010-07-27  Jeffrey Yasskin  <jyasskin (a] google.com>
   8512 
   8513 	* testsuite/debug_msg.sh: Test mixed weak/strong symbol behavior.
   8514 	* gold/testsuite/debug_msg.cc: Likewise.
   8515 	* gold/testsuite/odr_violation1.cc
   8516 	* gold/testsuite/odr_violation2.cc
   8517 
   8518 2010-07-21  Cary Coutant  <ccoutant (a] google.com>
   8519 
   8520 	* merge.h (Output_merge_string::Merged_string): Remove object, shndx,
   8521 	string, and length fields.
   8522 	(Output_merge_string::Merged_strings_list): New type.
   8523 	(Output_merge_string::Merged_strings_lists): New typedef.
   8524 	(Output_merge_string): Replace merged_strings_ with
   8525 	merged_strings_lists_.
   8526 	* merge.cc (Output_merge_string::do_add_input_section): Allocate new
   8527 	Merged_strings_list per input object and section.  Don't store pointer
   8528 	to the string.  Don't store length with each merged string entry.
   8529 	(Output_merge_string::finalize_merged_data): Loop over list of merged
   8530 	strings lists.  Recompute length of each merged string.
   8531 
   8532 2010-07-15  Cary Coutant  <ccoutant (a] google.com>
   8533 
   8534 	* plugin.cc (Plugin_finish::run): Don't call cleanup handlers from
   8535 	here.
   8536 
   8537 2010-07-14  Ian Lance Taylor  <iant (a] google.com>
   8538 
   8539 	* descriptors.cc (Descriptors::open): Report correct name in error
   8540 	message.
   8541 
   8542 2010-07-13  Doug Kwan  <dougkwan (a] google.com>
   8543 
   8544 	* arm.cc (Arm_input_section::Arm_input_section): For a
   8545 	SHT_ARM_EXIDX section, always keeps the input sections.
   8546 	(Arm_input_section::set_exidx_section_link): New method.
   8547 	(Arm_exidx_input_section::Arm_exidx_input_section): Initialize
   8548 	has_errors_ to false.
   8549 	(Arm_exidx_input_section::has_errors,
   8550 	Arm_exidx_input_section::set_has_errors): New methods.
   8551 	(Arm_exidx_input_section::has_errors_): New data member.
   8552 	(Arm_relobj::get_exidx_shndx_list): New method.
   8553 	(Arm_output_section::append_text_sections_to_list): Do not skip
   8554 	section without SHF_EXECINSTR.
   8555 	(Arm_output_section::fix_exidx_coverage): Skip input sections with
   8556 	errors.
   8557 	(Arm_relobj::make_exidx_input_section): Add new parameter for text
   8558 	section header.  Make error messages more verbose.  Check for
   8559 	a non-executable section linked to an EXIDX section.
   8560 	(Arm_relobj::do_read_symbols): Remove error checking, which has been
   8561 	moved to Arm_relobj::make_exidx_input_section.  Add an assertion to
   8562 	check that there is no deferred EXIDX section if we exit early.
   8563 	Instead of not making an EXIDX section in case of an error, make one
   8564 	and set the has_errors flag of it.
   8565 	(Target_arm::do_finalize_sections): Fix up links of EXIDX sections
   8566 	in a relocatable link.
   8567 	(Target_arm::do_relax): Look for the EXIDX output section instead of
   8568 	assuming that it is called .ARM.exidx.
   8569 	(Target_arm::fix_exidx_coverage): Add a new parameter for input
   8570 	section list.  Do not check for SHF_EXECINSTR section flags but
   8571 	skip any input section with errors.
   8572 	* output.cc (Output_section::Output_section): Initialize
   8573 	always_keeps_input_sections_ to false.
   8574 	(Output_section::add_input_section): Check for
   8575 	always_keeps_input_sections_.
   8576 	*  output.h (Output_section::always_keeps_input_sections,
   8577 	Output_section::set_always_keeps_input_sections): New methods.
   8578 	(Output_section::always_keeps_input_sections): New data member.
   8579 
   8580 2010-07-13  Rafael Espindola  <espindola (a] google.com>
   8581 
   8582 	* fileread.cc (try_extra_search_path, find_file): Move to Input_file.
   8583 	* fileread.h (Input_file): Add try_extra_search_path and find_file.
   8584 
   8585 2010-07-13  Philip Herron  <herron.philip (a] googlemail.com>
   8586 	    Ian Lance Taylor  <iant (a] google.com>
   8587 
   8588 	* output.h (Output_section_lookup_maps::add_merge_section):
   8589 	Correct check of whether value was inserted.
   8590 	(Output_section_lookup_maps::add_merge_input_section): Likewise.
   8591 	(Output_section_lookup_maps::add_relaxed_input_section):
   8592 	Likewise.
   8593 	* arm.cc (Target_arm::got_section): Remove used local os.
   8594 	* i386.cc (Target_i386::got_section): Likewise.
   8595 	* x86_64.cc (Target_x86_64::got_section): Likewise.
   8596 	* sparc.cc (Target_sparc::got_section): Likewise.
   8597 	(Target_sparc::relocate): Remove unused local have_got_offset.
   8598 	* powerpc.cc (Target_powerpc::relocate): Likewise.
   8599 
   8600 2010-07-13  Ian Lance Taylor  <iant (a] google.com>
   8601 
   8602 	* compressed_output.cc (zlib_decompress): Fix signature in
   8603 	!HAVE_ZLIB_H case.
   8604 
   8605 	* archive.cc (Archive::include_member): Unlock an external member
   8606 	of a thin archive.  Don't bother to delete an object we know is
   8607 	NULL.
   8608 
   8609 2010-07-12  Cary Coutant  <ccoutant (a] google.com>
   8610 
   8611 	* compressed_output.cc (zlib_decompress): New function.
   8612 	(get_uncompressed_size): New function.
   8613 	(decompress_input_section): New function.
   8614 	* compressed_output.h (get_uncompressed_size): New function.
   8615 	(decompress_input_section): New function.
   8616 	* dwarf_reader.cc (Sized_dwarf_line_info::Sized_dwarf_line_info)
   8617 	Handle compressed debug sections.
   8618 	* layout.cc (is_compressed_debug_section): New function.
   8619 	(Layout::output_section_name): Map compressed section names to
   8620 	canonical names.
   8621 	* layout.h (is_compressed_debug_section): New function.
   8622 	(is_debug_info_section): Recognize compressed debug sections.
   8623 	* merge.cc: Include compressed_output.h.
   8624 	(Output_merge_data::do_add_input_section): Handle compressed
   8625 	debug sections.
   8626 	(Output_merge_string::do_add_input_section): Handle compressed
   8627 	debug sections.
   8628 	* object.cc: Include compressed_output.h.
   8629 	(Sized_relobj::Sized_relobj): Initialize new data members.
   8630 	(build_compressed_section_map): New function.
   8631 	(Sized_relobj::do_read_symbols): Handle compressed debug sections.
   8632 	* object.h (Object::section_is_compressed): New method.
   8633 	(Object::do_section_is_compressed): New method.
   8634 	(Sized_relobj::Compressed_section_map): New type.
   8635 	(Sized_relobj::do_section_is_compressed): New method.
   8636 	(Sized_relobj::compressed_sections_): New data member.
   8637 	* output.cc (Output_section::add_input_section): Handle compressed
   8638 	debug sections.
   8639 	* reloc.cc: Include compressed_output.h.
   8640 	(Sized_relobj::write_sections): Handle compressed debug sections.
   8641 
   8642 2010-07-08  Cary Coutant  <ccoutant (a] google.com>
   8643 
   8644 	* resolve.cc (Symbol_table::resolve): Remember whether undef was
   8645 	weak when resolving to a dynamic def.
   8646 	(Symbol_table::should_override): Add adjust_dyndef flag; set it
   8647 	for weak undef/dynamic def cases. Adjust callers.
   8648 	* symtab.cc (Symbol::init_fields): Initialize undef_binding_set_ and
   8649 	undef_binding_weak_.
   8650 	(Symbol_table::sized_write_globals): Adjust symbol binding.
   8651 	(Symbol_table::sized_write_symbol): Add binding parameter.
   8652 	* symtab.h (Symbol::set_undef_binding): New method.
   8653 	(Symbol::is_undef_binding_weak): New method.
   8654 	(Symbol::undef_binding_set_, Symbol::undef_binding_weak_): New members.
   8655 	(Symbol_table::should_override): Add new parameter.
   8656 	(Symbol_table::sized_write_symbol): Add new parameter.
   8657 
   8658 	* testsuite/weak_undef_file1.cc: Add new test case.
   8659 	* testsuite/weak_undef_file2.cc: Fix header comment.
   8660 	* testsuite/weak_undef_test.cc: Add new test case.
   8661 
   8662 2010-06-29  Doug Kwan  <dougkwan (a] google.com>
   8663 
   8664 	* arm-reloc-property.cc (Arm_reloc_property::Arm_reloc_property):
   8665 	Initialize USE_SYMBOL_.
   8666 	* arm-reloc-property.h (Arm_reloc_property::uses_symbol): New method
   8667 	definition.
   8668 	(Arm_reloc_property::uses_symbol_): New data member declaration.
   8669 	* arm.cc (Target_arm::Relocate::relocate): Exit early if relocation
   8670 	uses symbol value and symbol is undefined but not weakly undefined.
   8671 
   8672 2010-06-28  Rafael Espindola  <espindola (a] google.com>
   8673 
   8674 	* plugin.cc (Plugin::load): Use dlerror.
   8675 
   8676 2010-06-26  Jeffrey Yaskin  <jyasskin (a] google.com>
   8677 
   8678 	* symtab.cc (detect_odr_violations): When reporting an ODR
   8679 	violation, report an object where the symbol is defined.
   8680 
   8681 2010-06-25  Doug Kwan  <dougkwan (a] google.com>
   8682 
   8683 	* arm.cc (Target_arm::can_check_for_functions_pointers): Return true.
   8684 	(Target_arm::section_may_have_icf_unsafe_pointers): New method
   8685 	definition.
   8686 	(Target_arm::Scan::local_reloc_may_be_function_pointer,
   8687 	Target_arm::Scan::global_reloc_may_be_function_pointer): Implement
   8688 	target hook to detect function points.
   8689 	(Target_arm::Scan::possible_function_pointer_reloc): New method.
   8690 	* icf.h (Icf::check_section_for_function_pointers): Change type of
   8691 	parameter SECTION_NAME to const reference to std::string.  Use
   8692 	target hook to determine if section may have unsafe pointers.
   8693 	* target.h (Target::section_may_have_icf_unsafe_pointers): New
   8694 	method definition.
   8695 
   8696 2010-06-21  Rafael Espindola  <espindola (a] google.com>
   8697 
   8698 	* fileread.cc (Input_file::find_fie): New
   8699 	(Input_file::open): Use Input_file::find_fie.
   8700 	* fileread.h (Input_file::find_fie): New
   8701 	* plugin.cc (set_extra_library_path): New.
   8702 	(Plugin::load): Add set_extra_library_path to the transfer vector.
   8703 	(Plugin_manager::set_extra_library_path): New.
   8704 	(Plugin_manager::add_input_file): Use the extra search path if set.
   8705 	(set_extra_library_path(): New.
   8706 	* plugin.h (Plugin_manager): Add set_extra_library_path and
   8707 	extra_search_path_.
   8708 
   8709 2010-06-19  Cary Coutant  <ccoutant (a] google.com>
   8710 
   8711 	* layout.cc (gdb_sections): Add .debug_types.
   8712 	(lines_only_debug_sections): Likewise.
   8713 
   8714 2010-06-18  Rafael Espindola  <espindola (a] google.com>
   8715 
   8716 	* plugin.cc (add_input_file,add_input_library)
   8717 	(Plugin_manager::add_input_file): Make filename arguments const.
   8718 	* plugin.h (Plugin_manager::add_input_file): Make filename arguments
   8719 	const.
   8720 
   8721 2010-06-16  Doug Kwan  <dougkwan (a] google.com>
   8722 
   8723 	* arm.cc (Target_arm::do_finalize_sections): Do not emit an
   8724 	.ARM.attributes section if we have not merged any input
   8725 	attributes sections.
   8726 
   8727 2010-06-15  Viktor Kutuzov  <vkutuzov (a] accesssoftek.com>
   8728 
   8729 	* arm.cc: Allow combining objects with no EABI version
   8730 	information.
   8731 
   8732 2010-06-15  Rafael Espindola  <espindola (a] google.com>
   8733 
   8734 	* plugin.cc (Plugin_hook::run): Set in_real_elf for the start symbol.
   8735 
   8736 2010-06-15  Viktor Kutuzov  <vkutuzov (a] accesssoftek.com>
   8737 
   8738 	* fileread.cc: Only #include <sys/uio.h> if HAVE_READV.
   8739 	(struct iovec): Correct !HAVE_READV definition.
   8740 
   8741 2010-06-10  Cary Coutant  <ccoutant (a] google.com>
   8742 
   8743 	* object.cc (Sized_relobj::do_layout): Defer layout for reloc sections.
   8744 	(Sized_relobj::do_layout_deferred_sections): Do layout for deferred
   8745 	reloc sections.
   8746 	* object.h (Sized_relobj::deferred_layout_relocs_): New data member.
   8747 
   8748 	PR 11683
   8749 	* symtab.h (Symbol::is_placeholder): New member function.
   8750 	* target-reloc.h (relocate_section): Check for placeholder symbols.
   8751 
   8752 	* testsuite/Makefile.am (plugin_test_8): New test.
   8753 	(plugin_test_9): New test.
   8754 	* testsuite/Makefile.in: Regenerate.
   8755 
   8756 2010-06-09  Nick Clifton  <nickc (a] redhat.com>
   8757 
   8758 	* yyscript.y (input_list_element): Allow strings prefixed with
   8759 	the '-' character.  Treat these as libraries.
   8760 	* script.cc (script_add_library): New function.  Adds a library
   8761 	specified by "-l<name>" found in an input script.
   8762 	* script-c.h: Add prototype for script_add_library.
   8763 
   8764 2010-06-07  Doug Kwan  <dougkwan (a] google.com>
   8765 
   8766 	* arm.cc (Target_arm::do_relax): Reserve more space for stubs.
   8767 	Restrict stub-group size to be within long conditional branch
   8768 	range when working around cortex-A8 erratum.
   8769 
   8770 2010-06-07  Damien Diederen  <dd (a] crosstwine.com>
   8771 
   8772 	* gold-threads.cc (Lock_impl_threads::Lock_impl_threads): Correct
   8773 	#ifdef typo.
   8774 
   8775 2010-06-03  Sriraman Tallam  <tmsriram (a] google.com>
   8776 
   8777 	PR gold/11658
   8778 	* output.cc
   8779 	(Output_section::Input_section_sort_entry::compare_section_ordering):
   8780 	Change to return non-zero correctly.
   8781 	(Output_section::Input_section_sort_section_order_index_compare
   8782 	::operator()): Change to fix ambiguity in comparisons.
   8783 
   8784 2010-06-01  Sriraman Tallam  <tmsriram (a] google.com>
   8785 
   8786 	* gold.h (is_wildcard_string): New function.
   8787 	* layout.cc (Layout::layout): Pass this pointer to add_input_section.
   8788 	(Layout::layout_eh_frame): Ditto.
   8789 	(Layout::find_section_order_index): New method.
   8790 	(Layout::read_layout_from_file): New method.
   8791 	* layout.h (Layout::find_section_order_index): New method.
   8792 	(Layout::read_layout_from_file): New method.
   8793 	(Layout::input_section_position_): New private member.
   8794 	(Layout::input_section_glob_): New private member.
   8795 	* main.cc (main): Call read_layout_from_file here.
   8796 	* options.h (--section-ordering-file): New option.
   8797 	* output.cc (Output_section::input_section_order_specified_): New
   8798 	member.
   8799 	(Output_section::Output_section): Initialize new member.
   8800 	(Output_section::add_input_section): Add new parameter.
   8801 	Keep input sections when --section-ordering-file is used.
   8802 	(Output_section::set_final_data_size): Sort input sections when
   8803 	section ordering file is specified.
   8804 	(Output_section::Input_section_sort_entry): Add new parameter.
   8805 	Check sorting type.
   8806 	(Output_section::Input_section_sort_entry::compare_section_ordering):
   8807 	New method.
   8808 	(Output_section::Input_section_sort_compare::operator()): Change to
   8809 	consider section_order_index.
   8810 	(Output_section::Input_section_sort_init_fini_compare::operator()):
   8811 	Change to consider section_order_index.
   8812 	(Output_section::Input_section_sort_section_order_index_compare
   8813 	::operator()): New method.
   8814 	(Output_section::sort_attached_input_sections): Change to sort
   8815 	according to section order when specified.
   8816 	(Output_section::add_input_section<32, true>): Add new parameter.
   8817 	(Output_section::add_input_section<64, true>): Add new parameter.
   8818 	(Output_section::add_input_section<32, false>): Add new parameter.
   8819 	(Output_section::add_input_section<64, false>): Add new parameter.
   8820 	* output.h (Output_section::add_input_section): Add new parameter.
   8821 	(Output_section::input_section_order_specified): New
   8822 	method.
   8823 	(Output_section::set_input_section_order_specified): New method.
   8824 	(Input_section::Input_section): Initialize section_order_index_.
   8825 	(Input_section::section_order_index): New method.
   8826 	(Input_section::set_section_order_index): New method.
   8827 	(Input_section::section_order_index_): New member.
   8828 	(Input_section::Input_section_sort_section_order_index_compare): New
   8829 	struct.
   8830 	(Output_section::input_section_order_specified_): New member.
   8831 	* script-sections.cc (is_wildcard_string): Delete and move modified
   8832 	method to gold.h.
   8833 	(Output_section_element_input::Output_section_element_input): Modify
   8834 	call to is_wildcard_string.
   8835 	(Output_section_element_input::Input_section_pattern
   8836 	::Input_section_pattern): Ditto.
   8837 	(Output_section_element_input::Output_section_element_input): Ditto.
   8838 	* testsuite/Makefile.am (final_layout): New test case.
   8839 	* testsuite/Makefile.in: Regenerate.
   8840 	* testsuite/final_layout.cc: New file.
   8841 	* testsuite/final_layout.sh: New file.
   8842 
   8843 2010-06-01  Rafael Espindola  <espindola (a] google.com>
   8844 
   8845 	* plugin.cc (Plugin::load): Pass the output name to the plugin.
   8846 
   8847 2010-06-01  Rafael Espindola  <espindola (a] google.com>
   8848 
   8849 	* plugin.cc (Sized_pluginobj::::do_add_symbols): Correctly set the
   8850 	visibility of symbols.
   8851 
   8852 2010-05-27  Doug Kwan  <dougkwan (a] google.com>
   8853 
   8854 	* object.cc (Sized_relobj::do_finalize_local_symbols): Use offset
   8855 	from start of output section instead of address for a local symbol
   8856 	in a merged or relaxed section when doing a relocatable link.
   8857 
   8858 2010-05-26  Rafael Espindola  <espindola (a] google.com>
   8859 
   8860 	PR 11604
   8861 	* gold/object.cc(Sized_relobj::do_layout_deferred_sections): Avoid
   8862 	adding sections the garbage collector removed.
   8863 	* gold/testsuite/Makefile.am: Add test.
   8864 	* gold/testsuite/Makefile.in: Regenerate.
   8865 	* gold/testsuite/plugin_test_7.sh: New.
   8866 	* gold/testsuite/plugin_test_7_1.c: New.
   8867 	* gold/testsuite/plugin_test_7_2.c: New.
   8868 
   8869 2010-05-26  Rafael Espindola  <espindola (a] google.com>
   8870 
   8871 	* script-sections.cc (Output_section_definition::set_section_addresses):
   8872 	Check for --section-start.
   8873 
   8874 2010-05-26  Doug Kwan  <dougkwan (a] google.com>
   8875 
   8876 	* arm.cc (Arm_scan_relocatable_relocs): New class.
   8877 	(Target_arm::relocate_special_relocatable): New method.
   8878 	(Arm_relocate_functions::arm_branch_common): Handle relocatable link.
   8879 	(Arm_relocate_functions::thumb_branch_common): Same.
   8880 	(Target_arm::scan_relocatable_relocs): Use Arm_scan_relocatable_relocs
   8881 	instead of Default_scan_relocatable_relocs.
   8882 	* target-reloc.h (relocate_for_relocatable): Let target handle
   8883 	relocation strategy Relocatable_relocs::RELOC_SPECIAL.
   8884 	* target.h (Sized_target::relocate_special_relocatable): New method.
   8885 
   8886 2010-05-25  Viktor Kutuzov  <vkutuzov (a] accesssoftek.com>
   8887 
   8888 	* timer.cc: Only #include <sys/times.h> if HAVE_TIMES is defined.
   8889 
   8890 2010-05-23  Doug Kwan  <dougkwan (a] google.com>
   8891 
   8892 	* arm.cc (Arm_input_section::do_output_offset): Use convert_types
   8893 	instead of a cast.
   8894 	(Target_arm::apply_cortex_a8_workaround): Rewrite a conditional branch
   8895 	with a direct branch, not a conditional branch, to a stub.
   8896 	* merge.cc (Output_merge_base::record_input_section): New method
   8897 	defintion.
   8898 	(Output_merge_data::do_add_input_section): Record input section if
   8899 	keeps-input-sections flag is set.
   8900 	(Output_merge_string::do_add_input_section): Ditto.
   8901 	* merge.h (Output_merge_base::Output_merge_base): Initialize new data
   8902 	members KEEPS_INPUT_SECTIONS_, FIRST_RELOBJ_, FIRST_SHNDX_ and
   8903 	INPUT_SECTIONS_.
   8904 	(Output_merge_base::keeps_input_sections,
   8905 	Output_merge_base::set_keeps_input_sections,
   8906 	Output_merge_base::first_relobj, Output_merge_base::first_shndx): New
   8907 	method definitions.
   8908 	(Output_merge_base::Input_sections): New type declaration.
   8909 	(Output_merge_base::input_sections_begin,
   8910 	Output_merge_base::input_sections_end,
   8911 	Output_merge_base::do_set_keeps_input_sections): New method definitions.
   8912 	(Output_merge_base::bool keeps_input_sections_,
   8913 	Output_merge_base::first_relobj_, Output_merge_base::first_shndx_,
   8914 	Output_merge_base::input_sections_): New data members.
   8915 	(Output_merge_data::do_set_keeps_input_sections): New method
   8916 	defintion.
   8917 	(Output_merge_string::do_set_keeps_input_sections): Ditto.
   8918 	* output.cc (Output_section::Input_section::relobj): Move method
   8919 	defintion from class declaration to here and handle merge sections.
   8920 	(Output_section::Input_section::shndx): Ditto.
   8921 	(Output_section::Output_section): Remove initializations of removed
   8922 	data members and initialize new data member LOOKUP_MAPS_.
   8923 	(Output_section::add_input_section): Set keeps-input-sections flag
   8924 	for a newly created merge output section as appropriate.  Adjust code
   8925 	to use Output_section_lookup_maps class.
   8926 	(Output_section::add_relaxed_input_section): Adjst code for lookup
   8927 	maps code refactoring.
   8928 	(Output_section::add_merge_input_section): Add a new parameter
   8929 	KEEPS_INPUT_SECTION.  Adjust code to use Output_section_lookup_maps
   8930 	class.  If adding input section to a newly created merge output
   8931 	section fails, remove the new merge section.
   8932 	(Output_section::convert_input_sections_in_list_to_relaxed_input_sections):
   8933 	Adjust code for use of the Output_section_lookup_maps class.
   8934 	(Output_section::find_merge_section): Ditto.
   8935 	(Output_section::build_lookup_maps): New method defintion.
   8936 	(Output_section::find_relaxed_input_section): Adjust code to use
   8937 	Output_section_lookup_maps class.
   8938 	(Output_section::get_input_sections): Export merge sections.  Adjust
   8939 	code to use Output_section_lookup_maps class.
   8940 	(Output_section:::add_script_input_section): Adjust code to use
   8941 	Output_section_lookup_maps class.  Update lookup maps for merge
   8942 	sections also.
   8943 	(Output_section::discard_states): Use Output_section_lookup_maps.
   8944 	(Output_section::restore_states): Same.
   8945 	* output.h (Merge_section_properties): Move class defintion out of
   8946 	Output_section.
   8947 	(Output_section_lookup_maps): New class.
   8948 	(Output_section::Input_section::is_merge_section): New method
   8949 	defintion.
   8950 	(Output_section::Input_section::relobj): Move defintion out of class
   8951 	defintion.  Declare method only.
   8952 	(Output_section::Input_section::shndx): Ditto.
   8953 	(Output_section::Input_section::output_merge_base): New method defintion.
   8954 	(Output_section::Input_section::u2_.pomb): New union field.
   8955 	(Output_section::Merge_section_by_properties_map,
   8956 	Output_section::Output_section_data_by_input_section_map,
   8957 	Output_section::Ouptut_relaxed_input_section_by_input_section_map):
   8958 	Remove types.
   8959 	(Output_section::add_merge_input_section): Add new parameter
   8960 	KEEPS_INPUT_SECTIONS.
   8961 	(Output_section::build_lookup_maps): New method declaration.
   8962 	(Output_section::merge_section_map_,
   8963 	Output_section::merge_section_by_properties_map_,
   8964 	Output_section::relaxed_input_section_map_,
   8965 	Output_section::is_relaxed_input_section_map_valid_): Remove data
   8966 	members.
   8967 	(Output_section::lookup_maps_): New data member.
   8968 
   8969 2010-05-21  Doug Kwan  <dougkwan (a] google.com>
   8970 
   8971 	PR gold/11619
   8972 	* arm.cc (Arm_input_section::do_output_offset): Add a cast to
   8973 	avoid a compilation error.
   8974 
   8975 2010-05-19  Rafael Espindola  <espindola (a] google.com>
   8976 
   8977 	* script-sections.cc (Output_section_definition::allocate_to_segment):
   8978 	Update the phdrs_list even when the output section is NULL.
   8979 	* testsuite/Makefile.am: Add test.
   8980 	* testsuite/Makefile.in: Regenerate.
   8981 	* testsuite/script_test_9.cc: New.
   8982 	* testsuite/script_test_9.sh: New.
   8983 	* testsuite/script_test_9.t: New.
   8984 
   8985 2010-05-19  Doug Kwan  <dougkwan (a] google.com>
   8986 
   8987 	* arm.cc (Arm_input_section::original_size): New method.
   8988 	(Arm_input_section::do_addralign): Add a cast.
   8989 	(Arm_input_section::do_output_offset): Remove static cast.
   8990 	(Arm_input_section::original_addralign,
   8991 	 Arm_input_section::original_size_): Change type to uint32_t.
   8992 	(Arm_input_section::init): Add safe casts for section alignment
   8993 	and size.
   8994 	(Arm_input_section::set_final_data_size): Do not set address and
   8995 	offset of stub table.
   8996 	(Arm_output_section::fix_exidx_coverage): Change use of of
   8997 	Output_section::Simple_input_section to that of
   8998 	Output_section::Input_section.
   8999 	(Target_arm::do_relax): Set addresses and file offsets of Stub_tables
   9000 	except for the first pass.
   9001 	* output.cc (Output_section::get_input_sections): Change type of
   9002 	input_sections to std::list<Input_section>.
   9003 	(Output_section::add_script_input_section): Rename from
   9004 	Output_section::add_simple_input_section.  Change type of SIS
   9005 	parameter from Simple_input_section to Input_section.
   9006 	* output.h (Output_section::Simple_input_section): Remove class.
   9007 	(Output_section::Input_section): Change class visibility to public.
   9008 	(Output_section::Input_section::addralign): Use stored alignments
   9009 	for special input sections if set.
   9010 	(Output_section::Input_section::set_addralign): New method.
   9011 	(Output_section::get_input_sections): Change parameter type from
   9012 	list of Simple_input_section to list of Input_section.
   9013 	(Output_section::add_script_input_section): Rename from
   9014 	Output_section::add_simple_input_section. Change first parameter's
   9015 	type from Simple_input_section to Input_section and remove the
   9016 	second and third parameters.
   9017 	* script-sections.cc (Input_section::Input_section_list): Change
   9018 	type to list of Output_section::Input_section/
   9019 	(Input_section_info::Input_section_info): Change parameter type of
   9020 	INPUT_SECTION to Output_section::Input_section.
   9021 	(Input_section_info::input_section): Change return type.
   9022 	(Input_section_info::input_section_): Change type to
   9023 	Output_section::Input_section.
   9024 	(Output_section_element_input::set_section_addresses): Adjust code
   9025 	to use Output_section::Input_section instead of
   9026 	Output_section::Simple_input_section.  Adjust code for renaming
   9027 	of Output_section::add_simple_input_section.
   9028 	(Orphan_output_section::set_section_addresses): Ditto.
   9029 
   9030 2010-05-18  Ralf Wildenhues  <Ralf.Wildenhues (a] gmx.de>
   9031 
   9032 	* gold.h (Unordered_multimap, Unordered_map): Fix defines for
   9033 	when neither HAVE_TR1_UNORDERED_MAP nor HAVE_EXT_HASH_MAP are set.
   9034 
   9035 2010-05-18  Rafael Espindola  <espindola (a] google.com>
   9036 
   9037 	* options.cc (General_options::finalize): Handle -nostdlib.
   9038 	* options.h (nostdlib): New option.
   9039 	* script.cc (script_add_search_dir): Handle -nostdlib.
   9040 
   9041 2010-05-12  Doug Kwan  <dougkwan (a] google.com>
   9042 
   9043 	* arm.cc (Target_arm::do_finalize_sections): Create an empty
   9044 	attributes section only if there no attributes section after merging.
   9045 	(Target_arm::merge_object_attributes): Move value of
   9046 	Tag_MPextension_use_legacy to that of Tag_MPextension_use.
   9047 	Handle Tag_DIV_use and Tag_MPextension_use_legacy.
   9048 	* testsuite/Makefile.am (check_SCRIPTS): Add arm_attr_merge.sh
   9049 	(check_DATA): Add arm_attr_merge_6.stdout, arm_attr_merge_6r_stdout
   9050 	and arm_attr_merge_7.stdout.
   9051 	(arm_attr_merge_6.stdout, arm_attr_merge_6 arm_attr_merge_6a.o
   9052 	arm_attr_merge_6b.o, arm_attr_merge_6r.stdout, arm_attr_merge_6r,
   9053 	arm_attr_merge_7.stdout, arm_attr_merge_7, arm_attr_merge_7a.o,
   9054 	arm_attr_merge_7b.o): New rules.
   9055 	(MOSTLYCLEANFILES): Add arm_attr_merge_6, arm_attr_merge_6r and
   9056 	arm_attr_merge_7
   9057 	* testsuite/Makefile.in: Regenerate.
   9058 	* testsuite/arm_attr_merge.sh: New file.
   9059 	* testsuite/arm_attr_merge_[67][ab].s: Same.
   9060 
   9061 2010-05-05  Nick Clifton  <nickc (a] redhat.com>
   9062 
   9063 	* po/es.po: Updated Spanish translation.
   9064 
   9065 2010-04-27  H.J. Lu  <hongjiu.lu (a] intel.com>
   9066 
   9067 	* Makefile.am (install-exec-local): Properly install gold as
   9068 	default cross linker.
   9069 	* Makefile.in: Regenerated.
   9070 
   9071 2010-04-27  H.J. Lu  <hongjiu.lu (a] intel.com>
   9072 	    Nick Clifton  <nickc (a] redhat.com>
   9073 
   9074 	* configure.ac (install_as_default): Define and set to false
   9075 	unless --enable-gold or --enable-gold=both/gold has been
   9076 	specified.
   9077 	* configure: Regenerate.
   9078 
   9079 	* Makefile.am (install-exec-local): Install the executable as
   9080 	'ld.gold'.  If install_as_default is true then also install it as
   9081 	'ld'.
   9082 	* Makefile.in: Regenerated.
   9083 
   9084 2010-04-24  Ian Lance Taylor  <iant (a] google.com>
   9085 
   9086 	* layout.cc (Layout::layout_reloc): In relocatable link don't
   9087 	combine reloc sections for grouped sections.
   9088 
   9089 2010-04-23  Sriraman Tallam  <tmsriram (a] google.com>
   9090 
   9091 	* gc.h (gc_process_relocs): Pass information on relocs pointing to
   9092 	sections that are not ordinary to icf.
   9093 	* icf.cc (get_section_contents): Handle relocation pointing to section
   9094 	with no object or shndx information.
   9095 	* testsuite/Makefile.am: Remove icf_virtual_function_folding_test.sh
   9096 	* testsuite/Makefile.in: Regenerate.
   9097 	* testsuite/icf_virtual_function_folding_test.cc: Remove printf.
   9098 	* testsuite/icf_virtual_function_folding_test.sh: Delete file.
   9099 
   9100 2010-04-22  Ian Lance Taylor  <iant (a] google.com>
   9101 
   9102 	* expression.cc (Expression::Expression_eval_info): Add
   9103 	result_alignment_pointer field.
   9104 	(Expression::eval_with_dot): Add result_alignment_pointer
   9105 	parameter.  Change all callers.
   9106 	(Expression::eval_maybe_dot): Likewise.
   9107 	(class Binary_expression): Add alignment_pointer parameter to
   9108 	left_value and right_value.  Change all callers.
   9109 	(BINARY_EXPRESSION): Set result alignment.
   9110 	(class Trinary_expression): Add alignment_pointer parameter to
   9111 	arg2_value and arg3_value.  Change all callers.
   9112 	(Trinary_cond::value): Set result alignment.
   9113 	(Max_expression::value, Min_expression::value): Likewise.
   9114 	(Align_expression::value): Likewise.
   9115 	* script-sections.cc (class Sections_element): Add dot_alignment
   9116 	parameter to set_section_addresses virtual function.  Update
   9117 	instantiations.
   9118 	(class Output_section_element): Likewise.
   9119 	(Script_sections::create_segments): Add dot_alignment parameter.
   9120 	Change all callers.
   9121 	(Script_sections::create_segments_from_phdrs_clause): Likewise.
   9122 	(Script_sections::set_phdrs_clause_addresses): Likewise.
   9123 	* script-sections.h: Update declarations.
   9124 	* script.h: Update declarations.
   9125 	* output.h (Output_segment::set_minimum_p_align): Don't decrease
   9126 	min_p_align.
   9127 	* testsuite/script_test_3.t: Set large alignment.
   9128 	* testsuite/script_test_3.sh: Make sure that at least one LOAD
   9129 	segment has expected alignment.
   9130 
   9131 2010-04-22  Nick Clifton  <nickc (a] redhat.com>
   9132 
   9133 	* po/gold.pot: Updated by the Translation project.
   9134 	* po/vi.po: Updated Vietnamese translation.
   9135 
   9136 2010-04-22  H.J. Lu  <hongjiu.lu (a] intel.com>
   9137 
   9138 	* testsuite/Makefile.am (check_PROGRAMS): Add
   9139 	icf_virtual_function_folding_test.
   9140 	* testsuite/Makefile.in: Regenerated.
   9141 
   9142 2010-04-15  Andrew Haley  <aph (a] redhat.com>
   9143 
   9144 	* options.h (merge_exidx_entries): New option.
   9145 	* arm.cc (class Arm_exidx_fixup): Add new arg, merge_exidx_entries.
   9146 	(class Arm_exidx_fixup::merge_exidx_entries_): New member.
   9147 	(Output_section::fix_exidx_coverage): Add new arg, merge_exidx_entries.
   9148 	(Target_arm::merge_exidx_entries): New function.
   9149 	(process_exidx_entry): Don't merge if merge_exidx_entries_ is false.
   9150 	(Arm_output_section::fix_exidx_coverage): Pass merge_exidx_entries
   9151 	to Arm_exidx_fixup constructor.
   9152 	Add new arg, merge_exidx_entries.
   9153 	(Target_arm::fix_exidx_coverage): pass merge_exidx_entries to
   9154 	Arm_output_section::fix_exidx_coverage.
   9155 
   9156 2010-04-18  Sriraman Tallam  <tmsriram (a] google.com>
   9157 
   9158 	* icf.cc (get_section_contents): Check for preemptible functions.
   9159 	Ignore addend when appropriate.
   9160 	* symtab.cc (should_add_dynsym_entry): Add new parameter.  Check for
   9161 	section folded.
   9162 	(add_from_relobj): Check for section folded.
   9163 	(set_dynsym_indexes): Fix call to should_add_dynsym_entry.
   9164 	* symtab.h (should_add_dynsym_entry): Add new parameter.
   9165 	* target-reloc.h (scan_relocs): Check for section folded.
   9166 	* x86_64.cc (Target_x86_64::Scan::possible_function_pointer_reloc):
   9167 	Check reloc types for function pointers in shared objects.
   9168 	* testsuite/Makefile.am (icf_virtual_function_folding_test): New test
   9169 	case.
   9170 	(icf_preemptible_functions_test): New test case.
   9171 	(icf_string_merge_test): New test case.
   9172 	* testsuite.Makefile.in: Regenerate.
   9173 	* testsuite/icf_safe_so_test.sh: Change to not fold foo_glob and
   9174 	bar_glob.  Refactor code.
   9175 	* testsuite/icf_preemptible_functions_test.cc: New file.
   9176 	* testsuite/icf_preemptible_functions_test.sh: New file.
   9177 	* testsuite/icf_string_merge_test.cc: New file.
   9178 	* testsuite/icf_string_merge_test.sh: New file.
   9179 	* testsuite/icf_virtual_function_folding_test.cc: New file.
   9180 	* testsuite/icf_virtual_function_folding_test.sh: New file.
   9181 
   9182 2010-04-14  Doug Kwan  <dougkwan (a] google.com>
   9183 
   9184 	* arm.cc (Arm_output_section::fix_exidx_coverage): Mark object
   9185 	for local symbol recounting if we remove a section due to ICF.
   9186 	* gold.cc (queue_middle_gc_tasks): Create a dummy blocker if
   9187 	there are no regular objects in input.
   9188 
   9189 2010-04-13  Doug Kwan  <dougkwan (a] google.com>
   9190 
   9191 	* arm.cc (Arm_input_section::set_final_data_size): Compute
   9192 	accurate final data size instead of using current data size.
   9193 
   9194 2010-04-09  Doug Kwan  <dougkwan (a] google.com>
   9195 
   9196 	* layout.cc (Layout::choose_output_section): Handle script section
   9197 	types.
   9198 	(Layout::make_output_section_for_script): Add section type parameter.
   9199 	Handle script section types.
   9200 	* layout.h (Layout::make_output_section_for_script): Add section
   9201 	type parameter.
   9202 	* output.cc (Output_section::Output_section): Initialize data member
   9203 	is_noload_.
   9204 	(Output_section::do_reset_address_and_file_offset): Do not set address
   9205 	to 0 if section is a NOLOAD section.
   9206 	* output.h (Output_section::is_noload): New method.
   9207 	(Output_section::set_is_noload): Ditto.
   9208 	(Output_section::is_noload_): New data member.
   9209 	* script-c.h (Script_section_type): New enum type.
   9210 	(struct Parser_output_section_header): Add new file section_type.
   9211 	* script-sections.cc (Sections_element::output_section_name): Add
   9212 	parameter for returning script section type.
   9213 	(Output_section_definition::output_section_name): Ditto.
   9214 	(Output_section_definition::section_type)P; New method.
   9215 	(Output_section_definiton::script_section_type_name): Ditto.
   9216 	(Output_section_definition::script_section_type_): New data member.
   9217 	(Output_section_definition::Output_section_definition): Initialize
   9218 	data member Output_section_definition::script_section_type_.
   9219 	(Output_section_definition::create_sections): Pass script section type
   9220 	to Layout::make_output_section_for_script.
   9221 	(Output_section_definition::output_section_name): Return script
   9222 	section type to caller.
   9223 	(Output_section_definition::set_section_address): Do not advance
   9224 	dot value and load address if section type is NOLOAD.  Set address
   9225 	of NOLOAD sections regardless of section flags.
   9226 	(Output_section_definition::print): Print section type if it is
   9227 	not SCRIPT_SECTION_TYPE_NONE.
   9228 	(Output_section_definition::section_type): New method.
   9229 	(Output_section_definition::script_section_type_name): Ditto.
   9230 	(Script_sections::output_section_name): Add new parameter
   9231 	PSECTION_TYPE for returning script section type.  Pass it to
   9232 	section elements.  Handle discard sections.
   9233 	(Sort_output_sections::operator()): Handle NOLOAD sections.
   9234 	* script-sections.h (Script_sections::Section_type): New enum type.
   9235 	(Script_sections::output_section_name): Add a new parameter for
   9236 	returning script section type.
   9237 	* script.cc (script_keyword_parsecodes): Add keywords COPY, DSECT,
   9238 	INFO and NOLOAD.
   9239 	* yyscript.y (union): Add new field SECTION_TYPE.
   9240 	(COPY, DSECT, INFO, NOLOAD): New tokens.
   9241 	(opt_address_and_section_type): Change type to output_section_header.
   9242 	(section_type): New non-terminal
   9243 	(section_header): Handle section type.
   9244 	(opt_address_and_section_type): Return section type value.
   9245 
   9246 2010-04-09  H.J. Lu  <hongjiu.lu (a] intel.com>
   9247 
   9248 	* testsuite/plugin_common_test_1.c (foo): Add prototype.
   9249 	* testsuite/plugin_common_test_2.c (foo): Likewise.
   9250 
   9251 2010-04-08  Doug Kwan  <dougkwan (a] google.com>
   9252 
   9253 	* merge.cc (Output_merge_data::set_final_data_size): Handle empty
   9254 	Output_merge_data.
   9255 	* output.cc (Output_section::add_merge_input_section): Simplify
   9256 	code and return status of Output_merge_base::add_input_section.
   9257 	Update merge section map only if Output_merge_base::add_input_section
   9258 	returns true.
   9259 
   9260 2010-04-07  Doug Kwan  <dougkwan (a] google.com>
   9261 
   9262 	* arm.cc (Arm_relobj::scan_section_for_cortex_a8_erratum): Warn
   9263 	if section is marked as containing instructions but has no mapping
   9264 	symbols.
   9265 	(Arm_relobj::do_count_local_symbols): Call adjust_sym_shndx to get
   9266 	correct section index.
   9267 	(Arm_relobj::find_linked_text_section): Ditto.
   9268 
   9269 2010-04-07  Cary Coutant  <ccoutant (a] google.com>
   9270 
   9271 	* archive.cc (include_member): Destroy Read_symbols_data object before
   9272 	releasing file.
   9273 	* object.cc (Read_symbols_data::~Read_symbols_data) New destructor.
   9274 	* object.h (Read_symbols_data::Read_symbols_data) New constructor.
   9275 	(Read_symbols_data::~Read_symbols_data) New destructor.
   9276 	(Section_relocs::Section_relocs) New constructor.
   9277 	(Section_relocs::~Section_relocs) New destructor.
   9278 	(Read_relocs_data::Read_relocs_data) New constructor.
   9279 	(Read_relocs_data::~Read_relocs_data) New destructor.
   9280 	* testsuite/binary_unittest.cc (Sized_binary_test): Set sd member
   9281 	pointers to NULL after deleting.
   9282 
   9283 2010-04-07  Doug Kwan  <dougkwan (a] google.com>
   9284 
   9285 	* arm.cc: Replace "endianity" with "endianness" in comments.
   9286 	(Arm_exidx_cantunwind): Ditto.
   9287 	(Arm_relobj::Arm_relobj): Initialize merge_flags_and_attribures.
   9288 	(Arm_relobj::merge_flags_and_attributes): New method.
   9289 	(Arm_relobj::merge_flags_and_attributes_): New data member.
   9290 	(Arm_exidx_cantunwind::do_fixed_endian_write): Fix formatting.
   9291 	(Arm_relobj::scan_sections_for_stubs): Ditto.
   9292 	(Arm_relobj::do_read_symbols): Check to see if we really want to
   9293 	merge processor-specific flags and attributes.  Exit early if
   9294 	an object is empty except for section names and the undefined symbol.
   9295 	(Target_arm::do_finalize_sections): Move check for ELF format to
   9296 	Arm_relobj::do_read_symbols.  Merge processor specific flags and
   9297 	attributes from a regular object only when we have determined that
   9298 	it is aapropriate.  Do not create an .ARM.attributes section in
   9299 	output if there is no regular input object.
   9300 	(Target_arm::merge_processor_specific_flags): Check
   9301 	--warn-mismatch before printing any error.
   9302 	(Target_arm::merge_object_attributes): Ditto.
   9303 	* gold.cc (queue_middle_tasks): Handle the case in which there is
   9304 	no regular object in input.
   9305 	* options.cc (General_options::parse_EB): New method.
   9306 	(General_options::parse_EL): Same.
   9307 	(General_options::General_options): Initialize endianness_.
   9308 	* options.h (-EB, -EL, -no-pipeline-knowledge, -p, --warn-mismatch):
   9309 	New options.
   9310 	(General_options::Endianness): New enum.
   9311 	(General_options::endianness): New method.
   9312 	(General_options::endianness_): New data member.
   9313 	* parameters.cc (Parameters::set_options): Check target endianness.
   9314 	(Parameters::set_target_once): Ditto.
   9315 	(Parameters::check_target_endianness): New method.
   9316 	(parameters_force_valid_target): If either -EL or -EB is specified,
   9317 	use it to define endianness of default target.
   9318 	* parameters.h (Parameters::check_target_endianness): New method
   9319 	declaration.
   9320 	* target.h (class Target): Change "endianity" to "endianness"
   9321 	in comments.
   9322 
   9323 2010-04-07  Ralf Wildenhues  <Ralf.Wildenhues (a] gmx.de>
   9324 
   9325 	* configure.ac (AM_INIT_AUTOMAKE): Add option no-dist.
   9326 	* configure: Regenerate.
   9327 	* Makefile.in: Regenerate.
   9328 	* testsuite/Makefile.in: Regenerate.
   9329 
   9330 2010-04-06  Cary Coutant  <ccoutant (a] google.com>
   9331 
   9332 	gcc PR lto/42757
   9333 	* plugin.cc (Pluginobj::get_symbol_resolution_info): Check for
   9334 	prevailing definitions of common symbols.
   9335 	* testsuite/plugin_test_6.sh: New test case.
   9336 	* testsuite/plugin_common_test_1.c: New test case.
   9337 	* testsuite/plugin_common_test_2.c: New test case.
   9338 	* testsuite/Makefile.am (plugin_test_6): New test case.
   9339 	* testsuite/Makefile.in: Regenerate.
   9340 
   9341 2010-04-06  Nick Clifton  <nickc (a] redhat.com>
   9342 
   9343 	* po/vi.po: New Vietnamese translation.
   9344 
   9345 2010-03-30  Doug Kwan  <dougkwan (a] google.com>
   9346 
   9347 	* arm.cc (Target_arm::using_thumb_only): Handle v6-M
   9348 
   9349 2010-03-25  Doug Kwan  <dougkwan (a] google.com>
   9350 
   9351 	* gold/arm.cc (Arm_exidx_fixup::update_offset_map): Rearrange code
   9352 	to avoid a conversion warning on a 32-bit host.
   9353 
   9354 2010-03-24  Ian Lance Taylor  <iant (a] google.com>
   9355 
   9356 	* testsuite/script_test_3.t: Add a TLS segment.
   9357 	* testsuite/Makefile.am (check_PROGRAMS): Add
   9358 	tls_phdrs_script_test.
   9359 	(tls_phdrs_script_test_SOURCES): Define.
   9360 	(tls_phdrs_script_test_DEPENDENCIES): Define.
   9361 	(tls_phdrs_script_test_LDFLAGS): Define.
   9362 	(tls_phdrs_script_test_LDADD): Define.
   9363 	* testsuite/Makefile.in: Rebuild.
   9364 
   9365 2010-03-23  Cary Coutant  <ccoutant (a] google.com>
   9366 
   9367 	* fileread.cc (find_or_make_view): Fix comment.
   9368 
   9369 2010-03-23  Ian Lance Taylor  <iant (a] google.com>
   9370 
   9371 	* script-sections.cc (class Orphan_section_placement): Define
   9372 	PLACE_TLS and PLACE_TLS_BSS.
   9373 	(Orphan_section_placement::Orphan_section_placement): Initialize
   9374 	new places.
   9375 	(Orphan_section_placement::find_place): Handle SHF_TLS sections.
   9376 	* testsuite/Makefile.am (check_PROGRAMS): Add tls_script_test.
   9377 	(tls_script_test_SOURCES): Define.
   9378 	(tls_script_test_DEPENDENCIES): Define.
   9379 	(tls_script_test_LDFLAGS): Define.
   9380 	(tls_script_test_LDADD): Define.
   9381 	* testsuite/Makefile.in: Rebuild.
   9382 
   9383 2010-03-22  Doug Kwan  <dougkwan (a] google.com>
   9384 
   9385 	* arm.cc (Arm_relocate_functions::abs8,
   9386 	Arm_relocate_functions::abs16): Use correct check for overflow
   9387 	specified in the ARM ELF specs.
   9388 	(Arm_relocate_functions): thumb_branch_common.  Handle bit 1 of branch
   9389 	target of a BLX instruction specially.
   9390 	(Reloc_stub::stub_type_for_reloc): Ditto.
   9391 	(Relocate::relocate): Use symbolic names instead of numeric relocation
   9392 	codes to report error.
   9393 	(Target_arm::do_relox): Reduce default stub-group size for Cortex-A8
   9394 	workaround.
   9395 	* testsuite/Makefile.am (check_DATA): add thumb_blx_in_range.stdout,
   9396 	thumb_blx_out_of_range.stdout, thumb2_blx_in_range.stdout and
   9397 	thumb2_blx_out_of_range.stdout
   9398 	(thumb_bl_out_of_range, thumb_bl_out_of_range.o,
   9399 	thumb2_bl_out_of_range, thumb2_bl_out_of_range.o): Fix dependenices.
   9400 	(thumb_blx_in_range.stdout, thumb_blx_in_range, thumb_blx_in_range.o,
   9401 	thumb_blx_out_of_range.stdout, thumb_blx_out_of_range,
   9402 	thumb_blx_out_of_range.o, thumb2_blx_in_range.stdout,
   9403 	thumb2_blx_in_range, thumb2_blx_in_range.o,
   9404 	thumb2_blx_out_of_range.stdout, thumb2_blx_out_of_range,
   9405 	thumb2_blx_out_of_range.o): New rules.
   9406 	(MOSTLYCLEANFILES): Add thumb_blx_in_range, thumb_blx_out_of_range,
   9407 	thumb2_blx_in_range and	thumb2_blx_out_of_range.
   9408 	* testsuite/Makefile.in: Regenerate.
   9409 	* arm_branch_in_range.sh: Add tests for THUMB BLX.
   9410 	* testsuite/thumb_blx_in_range.s: New file.
   9411 	* testsuite/thumb_blx_out_of_range.s: New file.
   9412 
   9413 2010-03-22  Rafael Espindola  <espindola (a] google.com>
   9414 
   9415 	* archive.cc (Should_include): Move to archive.h.
   9416 	(should_include_member): Make it a member of Archive.
   9417 	(Lib_group): New.
   9418 	(Add_lib_group_symbols): New.
   9419 	* archive.h: Include options.h.
   9420 	(Archive_member): Moved from Archive.
   9421 	(Should_include): Moved from archive.cc.
   9422 	(Lib_group): New.
   9423 	(Add_lib_group_symbols): New.
   9424 	* dynobj.cc (do_should_include_member): New.
   9425 	* dynobj.h (do_should_include_member): New.
   9426 	* gold.cc (queue_initial_tasks): Update call to queue.
   9427 	* main.cc (main): Print lib group stats.
   9428 	* object.cc (do_should_include_member): New.
   9429 	* object.h: Include archive.h.
   9430 	(Object::should_include_member): New.
   9431 	(Object::do_should_include_member): New.
   9432 	(Sized_relobj::do_should_include_member): New.
   9433 	* options.cc (General_options::parse_start_lib): New.
   9434 	(General_options::parse_end_lib): New.
   9435 	(Input_arguments::add_file): Handle lib groups.
   9436 	(Input_arguments::start_group): Check we are not in a lib.
   9437 	(Input_arguments::start_lib): New.
   9438 	(Input_arguments::end_lib): New.
   9439 	* options.h (General_options): Add start_lib and end_lib.
   9440 	(Input_argument::lib_): New.
   9441 	(Input_argument::lib): New.
   9442 	(Input_argument::is_lib): New.
   9443 	(Input_file_lib): New.
   9444 	(Input_arguments::in_lib_): New.
   9445 	(Input_arguments::in_lib): New.
   9446 	(Input_arguments::start_lib): New.
   9447 	(Input_arguments::end_lib_): New.
   9448 	* plugin.cc (Pluginobj::get_symbol_resolution_info): Mark symbols
   9449 	in unused members as preempted.
   9450 	(Sized_pluginobj::do_should_include_member): New.
   9451 	* plugin.h (Sized_pluginobj::do_should_include_member): New.
   9452 	* readsyms.cc (Read_symbols::locks): If we are just reading a member,
   9453 	return the blocker.
   9454 	(Read_symbols::do_whole_lib_group): New.
   9455 	(Read_symbols::do_lib_group): New.
   9456 	(Read_symbols::do_read_symbols): Handle lib groups.
   9457 	(Read_symbols::get_name): Handle lib groups.
   9458 	* readsyms.h (Read_symbols): Add an archive member pointer.
   9459 	(Read_symbols::do_whole_lib_group): New.
   9460 	(Read_symbols::do_lib_group): New.
   9461 	(Read_symbols::member_): New.
   9462 	* script.cc (read_input_script): Update call to queue_soon.
   9463 
   9464 2010-03-19  Doug Kwan  <dougkwan (a] google.com>
   9465 
   9466 	* arm.cc (Stub_table::Stub_table): Initialize new data members
   9467 	Stub_table::reloc_stubs_size_ and Stub_table::reloc_stubs_addralign_.
   9468 	(Stub_table::add_reloc_stub): Assign stub offset and update
   9469 	Stub_table::reloc_stubs_size_ and Stub_table::reloc_stubs_addralign_.
   9470 	(Stub_table::reloc_stubs_size_, Stub_table::reloc_stubs_addralign_):
   9471 	New data members.
   9472 	(Stub_table::update_data_size_and_addralign): Use
   9473 	Stub_table::reloc_stubs_size_ and Stub_table::reloc_stubs_addralign_
   9474 	instead of going over all reloc stubs.
   9475 	(Stub_table::finalize_stubs): Do not assign reloc stub offsets.
   9476 	* stringpool.cc (Stringpool_template::Stringpool_template): Initialize
   9477 	Stringpool_template::offset_ to size of Stringpool_char.
   9478 	(Stringpool_template::new_key_offset): Remove code to initialize
   9479 	Stringpool_template::offset_.
   9480 	* stringpool.h (Stringpool_template::set_no_zero_null): Set
   9481 	Stringpool_template::offset_ to zero.
   9482 
   9483 2010-03-15  Doug Kwan  <dougkwan (a] google.com>
   9484 
   9485 	* stringpool.cc (Stringpool_template::Stringpool_template): Initialize
   9486 	offset_.
   9487 	(Stringpool_template::new_key_offset): New method.
   9488 	(Stringpool_template::add_string): Assign offsets when adding new
   9489 	strings.
   9490 	(Stringpool_template::set_string_offsets): Do not set string offsets
   9491 	when not optimizing.
   9492 	* stringpool.h (Chunked_vector::Chunked_vector): Initialize data
   9493 	member size_.
   9494 	(Chunked_vector::clear): Clear size_.
   9495 	(Chunked_vector::reserve): Call reserve method of all Element_vectors.
   9496 	(Chunked_vector::size): Return size_.
   9497 	(Chunked_vector::push_back): Use size_ to find insert position.
   9498 	(Chunked_vector::size_): New data member.
   9499 	(Stringpool_template::set_no_zero_null): Assert string set is empty.
   9500 	(Stringpool_template::new_key_offset): New method declaration.
   9501 	(Stringpool_template::offset_): New data member.
   9502 
   9503 2010-03-15   Rafael Espindola  <espindola (a] google.com>
   9504 
   9505 	* readsyms.cc (Read_symbols::do_read_symbols): Update calls to
   9506 	Add_symbols' constructor.
   9507 	* readsyms.h (Add_symbols): Remove the input_group member.
   9508 
   9509 2010-03-10  Ian Lance Taylor  <iant (a] google.com>
   9510 
   9511 	* reloc.cc (Sized_relobj::split_stack_adjust_reltype): Call the
   9512 	target to ask whether a reference to a symbol requires a stack
   9513 	split.
   9514 	* target.h (Target::is_call_to_non_split): New function.
   9515 	(Target::do_is_call_to_non_split): Declare virtual function.
   9516 	* target.cc: Include "symtab.h".
   9517 	(Target::do_is_call_to_non_split): New function.
   9518 	* i386.cc (Target_i386::do_is_call_to_non_split): New function.
   9519 
   9520 2010-03-10  Cary Coutant  <ccoutant (a] google.com>
   9521 
   9522 	* fileread.cc (File_read::~File_read): Don't delete whole_file_view_.
   9523 	(File_read::open[1]): Remove initial mapping of whole_file_view_.
   9524 	(File_read::open[2]): Add whole_file_view_ to list of views.
   9525 	(File_read::make_view): Remove test of whole_file_view_.
   9526 	(File_read::find_or_make_view): Create whole_file_view_ if
   9527 	necessary.
   9528 	(File_read::clear_views): Replace bool parameter with enum;
   9529 	adjust all callers.  Don't delete views with permanent data;
   9530 	do delete cached views and views from archives if
   9531 	--no-keep-files-mapped is set.  Set whole_file_view_ to NULL
   9532 	if clearing the corresponding view.
   9533 	* fileread.h (File_read::Clear_views_mode): New enum.
   9534 	(File_read::View::is_permanent_view): New method.
   9535 	(File_read::clear_views): Replace bool parameter
   9536 	with enum; adjust all callers.
   9537 	* options.h (General_options): Change keep_files_mapped option;
   9538 	add map_whole_files.
   9539 	* readsyms.cc (Add_symbols::run): Delete sd_ object before
   9540 	releasing the file.
   9541 	* reloc.cc (Scan_relocs::run): Delete rd_ object before releasing
   9542 	the file.
   9543 
   9544 2010-03-10  David S. Miller  <davem (a] davemloft.net>
   9545 
   9546 	* sparc.cc (Target_sparc::Scan::local): Accept R_SPARC_WPLT30.
   9547 
   9548 2010-03-09  Sriraman Tallam  <tmsriram (a] google.com>
   9549 
   9550 	* icf.cc (get_section_contents): Add '@' marker after processing the
   9551 	merge reloc.
   9552 
   9553 2010-03-08  Doug Kwan  <dougkwan (a] google.com>
   9554 
   9555 	* gold/arm.cc (Arm_exidx_fixup::update_offset_map): Fix build breakage
   9556 	due to a conversion warning.
   9557 	(Arm_relobj::update_output_local_symbol_count): Check for local
   9558 	symbol with unset output index.
   9559 
   9560 2010-03-05  Ian Lance Taylor  <iant (a] google.com>
   9561 
   9562 	* options.h (class General_options): Add --spare-dynamic-tags.
   9563 	* output.cc (Output_data_dynamic::set_final_data_size): Implement
   9564 	--spare-dynamic-tags.
   9565 
   9566 2010-03-05  Ian Lance Taylor  <iant (a] google.com>
   9567 
   9568 	* incremental.cc: Include "libiberty.h".
   9569 
   9570 2010-03-05  Rainer Orth  <ro (a] CeBiTec.Uni-Bielefeld.DE>
   9571 
   9572 	* dynobj.h (Verdef::Verdef): Add is_info arg, is_info member
   9573 	function, is_info_ member.
   9574 	* dynobj.cc (Verdef::write): Set VER_FLG_INFO if this->is_info_.
   9575 	(Versions::Versions): Update caller.
   9576 	(Versions::define_base_version): Likewise.
   9577 	(Versions::add_def): Likewise.
   9578 
   9579 2010-03-03  Sriraman Tallam  <tmsriram (a] google.com>
   9580 
   9581 	* i386.cc (Target_i386::can_check_for_function_pointers): New function.
   9582 	(Scan::possible_function_pointer_reloc): New function.
   9583 	(Scan::local_reloc_may_be_function_pointer): Change to call
   9584 	possible_function_pointer_reloc.
   9585 	(Scan::global_reloc_may_be_function_pointer): Ditto.
   9586 	* icf.h (Icf::check_section_for_function_pointers): Change to reject
   9587 	relocations in ".data.rel.ro._ZTV" section.
   9588 	* testsuite/icf_safe_so_test.sh: Change to pass i386.
   9589 	* testsuite/icf_safe_so_test.cc: Ditto.
   9590 	* testsuite/icf_safe_test.cc: Ditto.
   9591 	* testsuite/icf_safe_test.sh: Ditto.
   9592 
   9593 2010-03-03  Viktor Kutuzov  <vkutuzov (a] accesssoftek.com>
   9594 	    Ian Lance Taylor  <iant (a] google.com>
   9595 
   9596 	* target-reloc.h (relocate_section): Check the symbol table index
   9597 	for -1U before setting the local symbol index.
   9598 	(scan_relocatable_relocs): If copying the relocation, record that
   9599 	the local symbol is required.
   9600 	* object.h (Symbol_value::is_output_symtab_index_set): New
   9601 	function.
   9602 	(Symbol_value::may_be_discarded_from_output_symtab): New
   9603 	function.
   9604 	(Symbol_value::has_output_symtab_entry): New function.
   9605 	(Symbol_value::needs_output_symtab_entry): Remove.
   9606 	(Symbol_value::output_symtab_index): Make sure the symbol index is
   9607 	set.
   9608 	(Symbol_value::set_output_symtab_index): Make sure the symbol
   9609 	index is not set.  Make sure the new index is valid.
   9610 	(Symbol_value::set_must_have_output_symtab_entry): New function.
   9611 	(Symbol_value::has_output_dynsym_entry): New function.
   9612 	(Symbol_value::set_output_dynsym_index): Make sure the new index
   9613 	is valid.
   9614 	(Sized_relobj::set_must_have_output_symtab_entry): New function.
   9615 	* object.cc (Sized_relobj::do_count_local_symbols): Only discard a
   9616 	local symbol if permitted.
   9617 	(Sized_relobj::do_finalize_local_symbols): Call
   9618 	is_output_symtab_index_set rather than needs_output_symtab_entry.
   9619 	(Sized_relobj::write_local_symbols): Call has_output_symtab_entry
   9620 	rather than needs_output_symtab_entry.  Call
   9621 	has_output_dynsym_entry rather than needs_output_dynsym_entry.
   9622 	* arm.cc (Arm_relobj::update_output_local_symbol_count): Call
   9623 	is_output_symtab_index_set rather than needs_output_symtab_entry.
   9624 	* testsuite/discard_locals_relocatable_test.c: New file.
   9625 	* testsuite/discard_locals_test.sh: Test -r.
   9626 	* testsuite/Makefile.am (check_DATA): Add
   9627 	discard_locals_relocatable_test1.syms,
   9628 	discard_local_relocatable_test2.syms.
   9629 	(MOSTLYCLEANFILES): Likewise.  Also add
   9630 	discard_locals_relocatable_test1.lout and
   9631 	discard_locals_relocatable_test2.out.
   9632 	(discard_locals_relocatable_test1.syms): New target.
   9633 	(discard_locals_relocatable_test.o): New target.
   9634 	(discard_locals_relocatable_test1.out): New target.
   9635 	(discard_locals_relocatable_test2.syms): New target.
   9636 	(discard_locals_relocatable_test2.out): New target.
   9637 	(various): Add missing ../ld-new dependencies.
   9638 	* testsuite/Makefile.in: Rebuild.
   9639 
   9640 2010-03-03  Nick Clifton  <nickc (a] redhat.com>
   9641 
   9642 	* po/fi.po: New Finnish translation.
   9643 
   9644 2010-03-01  Doug Kwan  <dougkwan (a] google.com>
   9645 
   9646 	* layout.cc (Layout::Layout): Force section types of .init_array*,
   9647 	.preinit_array* and .fini_array* sections.
   9648 	* output.cc (Output_section::Input_section_sort_entry::has_priority):
   9649 	Fix check of return value of std::string::find.().
   9650 	(Output_section::Input_section_sort_compare::operator()): Remove
   9651 	comment about .init_array.
   9652 	(Output_section::Input_section_sort_init_fini_compare::operator()):
   9653 	New method.
   9654 	(Output_section::sort_attached_input_sections): Handle .init_array
   9655 	and .fini_array specially.
   9656 	* output.h (Output_section::Inut_section_sort_compare): Update
   9657 	comment.
   9658 	(Output_section::Input_section_sort_init_fini_compare): New struct.
   9659 
   9660 2010-02-26  Doug Kwan  <dougkwan (a] google.com>
   9661 
   9662 	* arm.cc (Target_arm::Relocate::reloc_is_non_pic): Treat
   9663 	R_ARM_PREL31 and R_ARM_SBREL31 as position independent.
   9664 	* testsuite/debug_msg.sh: Avoid matching source line number for
   9665 	use of global variable undef_int.
   9666 
   9667 2010-02-26  Doug Kwan  <dougkwan (a] google.com>
   9668 
   9669 	* arm.cc (Target_arm::scan_reloc_for_stub): Move code handling
   9670 	R_ARM_V4BX to Target_arm::scan_reloc_section_for_stubs.
   9671 	(Target_arm::scan_reloc_section_for_stubs): Instead of calling
   9672 	scan_reloc_for_stub, do all processing of R_ARM_V4BX here.
   9673 	* options.cc (General_options::General_options): Initialize member
   9674 	fix_v4bx_.
   9675 	* testsuite/Makefile.am (check_SCRIPTS): Add arm_fix_v4bx.sh
   9676 	(check_DATA): Add arm_fix_v4bx.stdout, arm_fix_v4bx_interworking.stdout
   9677 	and rm_no_fix_v4bx.stdout
   9678 	(arm_fix_v4bx.stdout, arm_fix_v4bx, arm_fix_v4bx.o,
   9679 	arm_fix_v4bx_interworking.stdout, arm_fix_v4bx_interworking,
   9680 	arm_no_fix_v4bx.stdout, arm_no_fix_v4bx): New make rules.
   9681 	(MOSTLYCLEANFILES): Add arm_fix_v4bx, arm_fix_v4bx_interworking
   9682 	and arm_no_fix_v4bx.
   9683 	* Makefile.in: Regenerate.
   9684 	* testsuite/arm_fix_v4bx.s: New file.
   9685 	* testsuite/arm_fix_v4bx.sh: Ditto.
   9686 
   9687 2010-02-24  Doug Kwan  <dougkwan (a] google.com>
   9688 
   9689 	* arm.cc (Target_arm::got_section): Make the .got section the first
   9690 	non RELRO section in the data segment.
   9691 	* testsuite/script_test_5.sh: Fix match patterns to avoid matching
   9692 	suffixes of section names.
   9693 
   9694 2010-02-24  Doug Kwan  <dougkwan (a] google.com>
   9695 
   9696 	* arm.cc (Target_arm::do_finalize_sections): Skip processor specific
   9697 	flags and attributes merging if an input file is a binary file.
   9698 	* fileread.cc (Input_file::open): Record format of original file.
   9699 	* fileread.h (Input_file::Format): New enum type.
   9700 	(Input_file::Input_file): Initialize data member format_.
   9701 	(Input_file::format): New method definition.
   9702 	(Input_file::format_):: New data member.
   9703 
   9704 2010-02-24  Doug Kwan  <dougkwan (a] google.com>
   9705 
   9706 	* arm.cc (Arm_output_data_got): New class.
   9707 	(ARM_TCB_SIZE): New constant
   9708 	(Target_arm): Use Arm_output_data_got instead of Output_data_got.
   9709 	(Arm_output_section::fix_exidx_coverage): Add a parameter for layout.
   9710 	If user uses a script with a SECTIONS clause, issue only a warning
   9711 	for a misplaced EXIDX input section.  Otherwise, issue an error.
   9712 	(Arm_relobj::do_gc_process_relocs): Exit early if we are not doing
   9713 	garbage collection.
   9714 	(Target_arm::got_mode_index_entry): Handle static linking.
   9715 	(Target_arm::Scan::local): Ditto.
   9716 	(Target_arm::Scan::global): Ditto.
   9717 	(Target_arm::Relocate::relocate_tls): Handle static linking.  Fix
   9718 	all incorrectly implemented relocations.
   9719 	(Target_arm::fix_exidx_coverage): Pass layout to
   9720 	Arm_output_section::fix_exidx_coverage.
   9721 	* layout.cc (Layout::section_name_mapping): Remove trailing dots
   9722 	from ".ARM.exidx." and ".ARM.extab.".
   9723 
   9724 2010-02-23  Viktor Kutuzov  <vkutuzov (a] accesssoftek.com>
   9725 
   9726 	* arm.cc (Target_arm::do_finalize_sections): Create attribute
   9727 	section if it does not already exist.
   9728 	* attributes.cc	(Attributes_section_data::Attributes_section_data):
   9729 	Don't crash if size is zero.
   9730 
   9731 2010-02-23  Viktor Kutuzov  <vkutuzov (a] accesssoftek.com>
   9732 	    Ian Lance Taylor  <iant (a] google.com>
   9733 
   9734 	* gold.cc (queue_middle_tasks): If no input files were opened,
   9735 	exit.
   9736 	* workqueue.h (Task_function::Task_function): Assert that there is
   9737 	a blocker.
   9738 
   9739 2010-02-22  Doug Kwan  <dougkwan (a] google.com>
   9740 
   9741 	* gold-threads.h (Once::~Once): Explicitly define virtual destructor.
   9742 	* icf.cc (get_section_contents): Cast snprintf arguments to long long
   9743 	types to avoid warnings due to different uint64_t implementations
   9744 	on different hosts.
   9745 
   9746 2010-02-21  Doug Kwan  <dougkwan (a] google.com>
   9747 
   9748 	* arm.cc (Arm_relocate_functions::arm_branch_common): Fix bug in
   9749 	handling of the maximum backward branch offset.
   9750 	(Arm_relocate_functions::thumb_branch_common): Ditto.
   9751 	* testsuite/Makefile.am (check_SCRIPTS): Add arm_branch_in_range.sh.
   9752 	(check_DATA): Add arm_bl_in_range.stdout, arm_bl_out_of_range.stdout
   9753 	thumb_bl_in_range.stdout, thumb_bl_out_of_range.stdout,
   9754 	thumb2_bl_in_range.stdout and thumb2_bl_out_of_range.stdout.
   9755 	(arm_bl_in_range.stdout, arm_bl_in_range, arm_bl_in_range.o,
   9756 	arm_bl_out_of_range.stdout, arm_bl_out_of_range,
   9757 	arm_bl_out_of_range.o, thumb_bl_in_range.stdout, thumb_bl_in_range,
   9758 	thumb_bl_in_range.o, thumb_bl_out_of_range.stdout,
   9759 	thumb_bl_out_of_range thumb_bl_out_of_range.o,
   9760 	thumb2_bl_in_range.stdout, thumb2_bl_in_range, thumb2_bl_in_range.o
   9761 	thumb2_bl_out_of_range.stdout, thumb2_bl_out_of_range,
   9762 	thumb2_bl_out_of_range.o): New rules.
   9763 	(MOSTLYCLEANFILES): Add arm_bl_in_range, arm_bl_out_of_range,
   9764 	thumb_bl_in_range, thumb_bl_out_of_range, thumb2_bl_in_range and
   9765 	thumb2_bl_out_of_range
   9766 	* testsuite/Makefile.in: Regenerate.
   9767 	* testsuite/arm_bl_in_range.s: New file.
   9768 	* testsuite/arm_bl_out_of_range.s: Ditto.
   9769 	* testsuite/arm_branch_in_range.sh: Ditto.
   9770 	* testsuite/arm_branch_range.t: Ditto.
   9771 	* testsuite/thumb2_branch_range.t: Ditto.
   9772 	* testsuite/thumb_bl_in_range.s: Ditto.
   9773 	* testsuite/thumb_bl_out_of_range.s: Ditto.
   9774 	* testsuite/thumb_branch_range.t: Ditto.
   9775 
   9776 2010-02-20  Sriraman Tallam  <tmsriram (a] google.com>
   9777 
   9778 	* gc.h (gc_process_relocs): Change vectors to point to the new list.
   9779 	Add reloc offset information.
   9780 	* icf.cc (get_section_contents): Change iterators to point to the new
   9781 	vectors. Add reloc offset information to the contents.
   9782 	* icf.h (Icf::Sections_reachable_info): New typedef.
   9783 	(Icf::Sections_reachable_list): New typedef.
   9784 	(Icf::Offset_info): New typedef.
   9785 	(Icf::Reloc_info): New struct typedef.
   9786 	(Icf::Reloc_info_list): New typedef.
   9787 	(Icf::symbol_reloc_list): Delete method.
   9788 	(Icf::addend_reloc_list): Delete method.
   9789 	(Icf::section_reloc_list): Delete method.
   9790 	(Icf::reloc_info_list): New method.
   9791 	(Icf::reloc_info_list_): New member.
   9792 
   9793 2010-02-19  Doug Kwan  <dougkwan (a] google.com>
   9794 
   9795 	* arm-reloc.def: Mark R_ARM_TLS_GD32, R_ARM_TLS_LDM32,
   9796 	R_ARM_TLS_LDO32, R_ARM_TLS_IE32 and R_ARM_TLS_LE32 are implemented.
   9797 	* arm.cc (Arm_relocation_functions): New forward declaration.
   9798 	(Target_arm::Target_arm): Initialize new data members
   9799 	got_mod_index_offset_ and tls_base_symbol_defined_.
   9800 	(Target_arm::Relocate::relocate_tls): New method.
   9801 	(Target_arm::optimize_tls_reloc, Target_arm::define_tls_base_symbol,
   9802 	 Target_arm::got_mod_index_entry, Target_arm::rel_tls_desc_section):
   9803 	New methods.
   9804 	(Target_arm::Got_type): Add GOT_TYPE_TLS_NOFFSET, GOT_TYPE_OFFSET,
   9805 	GOT_TYPE_TLS_PAIR and GOT_TYPE_TLS_DESC.
   9806 	(Target_arm::got_mod_index_offset_,
   9807 	Target_arm::tls_base_symbol_defined_): New data members.
   9808 	(Target_arm::Scan::local, Target::Scan::global,
   9809 	Target_arm::Relocate::relocate): Handle 32-bit initial TLS
   9810 	relocations.
   9811 
   9812 2010-02-18  Doug Kwan  <dougkwan (a] google.com>
   9813 
   9814 	* arm.cc (Arm_relobj::find_linked_text_section): New method.
   9815 	(Arm_relobj::make_exidx_input_section): Pass section index of linked
   9816 	text section as a parameter becuase some broken tools may not set
   9817 	the link in section header.
   9818 	(Target_arm::has_got_section): New method.
   9819 	(Target_arm::scan_section_for_cortex_a8_stubs): Treat an input section
   9820 	without any mapping symbol as data only.  Remove warning.
   9821 	(Arm_relobj::do_read_synbols): If an EXIDX input section has no
   9822 	link in its section header, try to discover the link by inspecting the
   9823 	REL31 relocation at the beginning of the section.
   9824 	(Target_arm::Scan::check_non_pic): Report name of offending relocation
   9825 	in error message.
   9826 	(Target_arm::Scan::global): Treat any reference to the symbol
   9827 	_GLOBAL_OFFSET_TABLE_ as a GOT access.
   9828 
   9829 2010-02-12  Sriraman Tallam  <tmsriram (a] google.com>
   9830 
   9831 	* arm.cc (Scan::local_reloc_may_be_function_pointer): New function.
   9832 	(Scan::global_reloc_may_be_function_pointer): New function.
   9833 	* sparc.cc (Scan::local_reloc_may_be_function_pointer): New function.
   9834 	(Scan::global_reloc_may_be_function_pointer): New function.
   9835 	* powerpc.cc (Scan::local_reloc_may_be_function_pointer): New function.
   9836 	(Scan::global_reloc_may_be_function_pointer): New function.
   9837 	* i386.cc (Scan::local_reloc_may_be_function_pointer): New function.
   9838 	(Scan::global_reloc_may_be_function_pointer): New function.
   9839 	* x86_64.cc (Scan::local_reloc_may_be_function_pointer): New function.
   9840 	(Scan::global_reloc_may_be_function_pointer): New function.
   9841 	(Scan::possible_function_pointer_reloc): New function.
   9842 	(Target_x86_64::can_check_for_function_pointers): New function.
   9843 	* gc.h (gc_process_relocs): Scan relocation types to determine if
   9844 	function pointers were taken for targets that support it.
   9845 	* icf.cc (Icf::find_identical_sections): Include functions for
   9846 	folding in safe ICF whose pointer is not taken.
   9847 	* icf.h (Secn_fptr_taken_set): New typedef.
   9848 	(fptr_section_id_): New member.
   9849 	(section_has_function_pointers): New function.
   9850 	(set_section_has_function_pointers): New function.
   9851 	(check_section_for_function_pointers): New function.
   9852 	* options.h: Fix comment for safe ICF option.
   9853 	* target.h (can_check_for_function_pointers): New function.
   9854 	* testsuite/Makefile.am: Add icf_safe_so_test test case.
   9855 	Modify icf_safe_test for X86-64.
   9856 	* testsuite/Makefile.in: Regenerate.
   9857 	* testsuite/icf_safe_so_test.cc: New file.
   9858 	* testsuite/icf_safe_so_test.sh: New file.
   9859 	* testsuite/icf_safe_test.cc (kept_func_3): New function.
   9860 	(main): Change to take pointer to function kept_func_3.
   9861 	* testsuite/icf_safe_test.sh (arch_specific_safe_fold): Check if safe
   9862 	folding is done correctly for X86-64.
   9863 
   9864 2010-02-12  David S. Miller  <davem (a] davemloft.net>
   9865 
   9866 	* output.h (Output_reloc<SHT_REL>::Output_reloc): Add
   9867 	is_symbolless parameter.
   9868 	(Output_reloc<SHT_REL>::is_symbolless): New.
   9869 	(Output_reloc<SHT_REL>::is_symbolless_): New.
   9870 	(Output_reloc<SHT_REL>::type_): Decrease to 29 bits.
   9871 	(Output_reloc<SHT_RELA>::Output_reloc): Add is_symbolless parameter.
   9872 	(Output_reloc<SHT_RELA>::is_symbolless): New.
   9873 	(Output_data_reloc::add_global): Handle is_symbolless.
   9874 	(Output_data_reloc::add_global_relative): Likewise.
   9875 	(Output_data_reloc::add_local): Likewise.
   9876 	(Output_data_reloc::add_local_relative): Likewise.
   9877 	(Output_data_reloc::add_symbolless_global_addend): New.
   9878 	(Output_data_reloc::add_symbolless_local_addend): New.
   9879 	* output.cc (Output_reloc<SHT_REL>::Output_reloc): Handle
   9880 	is_symbolless.
   9881 	(Output_reloc::set_needs_dynsym_index): Test ->is_symbolless_
   9882 	instead of ->is_relative_
   9883 	(Output_reloc::write): Likewise.
   9884 	(Output_reloc::get_symbol_index): Return 0 when ->is_symbolless_
   9885 	(Output_reloc::write_rel): Simplify.
   9886 
   9887 	* sparc.cc (Target_sparc::Scan::local): Use
   9888 	->add_symbolless_local_addend as needed.
   9889 	(Target_sparc::Scan::global): Use ->add_symbolless_global_addend as
   9890 	needed.  Also, emit appropriate unaligned vs. aligned dynamic reloc
   9891 	based upon relocation offset.
   9892 
   9893 2010-02-11  Doug Kwan  <dougkwan (a] google.com>
   9894 
   9895 	* arm.cc (Target_arm::Scan::local): Fix bugs in relocation handling.
   9896 	(Target_arm::Scan::global): Ditto.  Also remove a comment before the
   9897 	beginning of function.
   9898 	(Target_arm::Relocate::relocate): Remove error messages for MOVW_ABS
   9899 	and MOVT_ABS relocations.  Those are non issued in scanning.  Fix
   9900 	parameter is_32bit in calls to should_apply_static_reloc.
   9901 	* testsuite/Makefile.am (check_SCRIPTS): Add arm_abs_global.sh.
   9902 	(check_DATA): Add arm_abs_global.stdout.
   9903 	(arm_abs_lib.o, libarm_abs.so, arm_abs_global.o, arm_abs_global,
   9904 	arm_abs_global.stdout): New rules.
   9905 	(MOSTLLYCLEANFILES): Add arm_abs_global
   9906 	* Makefile.in: Regenerate.
   9907 	* testsuite/arm_abs_global.s: New file.
   9908 	* testsuite/arm_abs_global.sh: Ditto.
   9909 	* testsuite/arm_abs_lib.s: Ditto.
   9910 
   9911 2010-02-11  Ian Lance Taylor  <iant (a] google.com>
   9912 
   9913 	* gold.cc (queue_middle_gc_tasks): Use a separate blocker for each
   9914 	Read_relocs task.
   9915 	(queue_middle_tasks): Likewise, and also for Scan_relocs.  Run
   9916 	Allocate_commons_task first.
   9917 	* reloc.cc (Read_relocs::run): Pass next_blocker_ down to next
   9918 	task, rather than symtab_lock_.
   9919 	(Gc_process_relocs::~Gc_process_relocs): New function.
   9920 	(Gc_process_relocs::is_runnable): Check this_blocker_.
   9921 	(Gc_process_relocs::locks): Use next_blocker_ rather than
   9922 	blocker_.
   9923 	(Scan_relocs::~Scan_relocs): New function.
   9924 	(Scan_relocs::is_runnable): Check this_blocker_ rather than
   9925 	symtab_lock_.
   9926 	(Scan_relocs::locks): Drop symtab_lock_ and blocker_.  Add
   9927 	next_blocker_.
   9928 	* reloc.h (class Read_relocs): Drop symtab_lock_ and blocker_
   9929 	fields.  Add this_blocker_ and next_blocker_ fields.  Adjust
   9930 	constructor accordingly.
   9931 	(class Gc_process_relocs): Likewise.
   9932 	(class Scan_relocs): Likewise.
   9933 	* common.h (class Allocate_commons_task): Remove symtab_lock_
   9934 	field, and corresponding constructor parameter.
   9935 	* common.cc (Allocate_commons_tasK::is_runnable): Remove use of
   9936 	symtab_lock_.
   9937 	(Allocate_commons_task::locks): Likewise.
   9938 
   9939 2010-02-11  Ian Lance Taylor  <iant (a] google.com>
   9940 
   9941 	* gold-threads.h (class Once): Define.
   9942 	(class Initialize_lock): Rewrite as child of Once.
   9943 	* gold-threads.cc (class Once_initialize): Define.
   9944 	(once_pointer_control): New static variable.
   9945 	(once_pointer, once_arg): New static variables.
   9946 	(c_run_once): New static function.
   9947 	(Once::Once, Once::run_once, Once::internal_run): New functions.
   9948 	(class Initialize_lock_once): Remove.
   9949 	(initialize_lock_control): Remove.
   9950 	(initialize_lock_pointer): Remove.
   9951 	(initialize_lock_once): Remove.
   9952 	(Initialize_lock::Initialize_lock): Move to gold-threads.h.
   9953 	(Initialize_lock::initialize): Rewrite.
   9954 	(Initialize_lock::do_run_once): New function.
   9955 	* archive.cc (Archive::interpret_header): Only clear name if it is
   9956 	not already empty.
   9957 	* fileread.cc: Include "gold-threads.h"
   9958 	(file_counts_lock): New static variable.
   9959 	(file_counts_initialize_lock): Likewise.
   9960 	(File_read::release): Only increment counts when using --stats.
   9961 	Use a lock around the increment.
   9962 	* parameters.cc (class Set_parameters_target_once): Define.
   9963 	(set_parameters_target_once): New static variable.
   9964 	(Parameters::Parameters): Move here from parameters.h.
   9965 	(Parameters::set_target): Rewrite.
   9966 	(Parameters::set_target_once): New function.
   9967 	(Parameters::clear_target): Move here and rewrite.
   9968 	* parameters.h (class Parameters): Update declarations.  Add
   9969 	set_parameters_target_once_ field.
   9970 	(Parameters::Parameters): Move to parameters.cc.
   9971 	(Parameters::clear_target): Likewise.
   9972 	* readsyms.cc (Read_symbols::do_group): Create a Start_group
   9973 	task.
   9974 	(Start_group::~Start_group): New function.
   9975 	(Start_group::is_runnable): New function.
   9976 	(Start_group::locks, Start_group::run): New functions.
   9977 	(Finish_group::run): Change saw_undefined to size_t.
   9978 	* readsyms.h (class Start_group): Define.
   9979 	(class Finish_group): Change saw_undefined_ field to size_t.
   9980 	(Finish_group::Finish_group): Remove saw_undefined and
   9981 	this_blocker parameters.  Change all callers.
   9982 	(Finish_group::set_saw_undefined): New function.
   9983 	(Finish_group::set_blocker): New function.
   9984 	* symtab.h (class Symbol_table): Change saw_undefined to return
   9985 	size_t.  Change saw_undefined_ field to size_t.
   9986 	* target-select.cc (Set_target_once::do_run_once): New function.
   9987 	(Target_selector::Target_selector): Initialize set_target_once_
   9988 	field.  Don't initialize lock_ and initialize_lock_ fields.
   9989 	(Target_selector::instantiate_target): Rewrite.
   9990 	(Target_selector::set_target): New function.
   9991 	* target-select.h (class Set_target_once): Define.
   9992 	(class Target_selector): Update declarations.  Make
   9993 	Set_target_once a friend.  Remove lock_ and initialize_lock_
   9994 	fields.  Add set_target_once_ field.
   9995 
   9996 2010-02-10  Ian Lance Taylor  <iant (a] google.com>
   9997 
   9998 	* dirsearch.cc (Dirsearch::initialize): Add all blockers before
   9999 	queueing any tasks.
   10000 	* gold.cc (queue_middle_gc_tasks): Likewise.  Fix final blocker.
   10001 	(queue_middle_tasks): Add all blockers before queueing any tasks.
   10002 	(queue_final_tasks): Likewise.
   10003 	* token.h (Task_token::add_blockers): New function.
   10004 	* object.h (Input_objects::number_of_relobjs): New function.
   10005 
   10006 2010-02-10  Ian Lance Taylor  <iant (a] google.com>
   10007 
   10008 	* i386.cc (Relocate::relocate_tls): A local symbol is final if not
   10009 	shared, not if not position independent.
   10010 	* x86_64.cc (Relocate::relocate_tls): Likewise.
   10011 	* testsuite/Makefile.am (check_PROGRAMS): Add tls_pie_pic_test.
   10012 	(tls_pie_pic_test): New target.
   10013 	* testsuite/Makefile.in: Rebuild.
   10014 
   10015 	* testsuite/Makefile.am (check_PROGRAMS): Add tls_pie_test.
   10016 	(tls_test_main_pie.o, tls_test_pie.o): New targets.
   10017 	(tls_test_file2_pie.o, tls_test_c_pie.o, tls_pie_test): Likewise.
   10018 	* testsuite/Makefile.in: Rebuild.
   10019 
   10020 2010-02-09  David S. Miller  <davem (a] davemloft.net>
   10021 
   10022 	* sparc.cc (Target_sparc::Scan::local): Do not emit relocs other than
   10023 	R_SPARC_RELATIVE using ->add_local_relative().
   10024 	(Target_sparc::Scan::global): Likewise for ->add_global_relative().
   10025 
   10026 	* output.h (Output_data_dynamic::add_section_size): New method
   10027 	that takes two Output_data objects.
   10028 	(Output_data_dynamic::Dynamic_entry): Create storage for secondary
   10029 	entry param.  Handle it in initializers.
   10030 	* output.cc (Output_data_dynamic::Dynamic_entry::write): For
   10031 	DYNAMIC_SECTION_SIZE, add in second object size if non-NULL.
   10032 	* layout.h (Layout::add_target_dynamic_tags): Add dynrel_includes_plt
   10033 	arg.
   10034 	* layout.cc (Layout::add_target_dynamic_tags): If dynrel_includes_plt,
   10035 	and .rela.plt exists, set DT_REL{,A}SZ to sum of .rela.dyn and .rela.plt
   10036 	* arm.cc (Target_arm::do_finalize_sections): Update to pass false
   10037 	for dynrel_includes_plt.
   10038 	* i386.cc (Target_i386::do_finalize_sections): Likewise.
   10039 	* x86_64.cc (Target_x86_64::do_finalize_sections): Likewise.
   10040 	* sparc.cc (Target_sparc::make_plt_entry): Force .rela.dyn to be output
   10041 	before .rela.plt
   10042 	(Target_sparc::do_finalize_sections): Update to pass true for
   10043 	dynrel_includes_plt.
   10044 	* powerpc.cc (Target_powerpc::make_plt_entry): Force .rela.dyn to be
   10045 	output before .rela.plt
   10046 	(Target_powerpc::do_finalize_sections): Update to pass true for
   10047 	dynrel_includes_plt when 32-bit.
   10048 
   10049 2010-02-08  Doug Kwan  <dougkwan (a] google.com>
   10050 
   10051 	* arm.cc (Arm_relobj::simple_input_section_output_address): New
   10052 	method.
   10053 	(Arm_relobj::section_needs_cortex_a8_stub_scanning,
   10054 	Arm_relobj::scan_section_for_cortex_a8_stubs,
   10055 	Arm_relobj::do_relocation_section): Instead of calling
   10056 	Output_section::output_address, use faster
   10057 	Arm_relobj::simple_input_section_output_address.
   10058 
   10059 2010-02-08  David S. Miller  <davem (a] davemloft.net>
   10060 
   10061 	* sparc.cc (Target_sparc::Relocate::relocate): If relocation offset is
   10062 	unaligned for R_SPARC_16, R_SPARC_32, or R_SPARC_64, use the unaligned
   10063 	relocation helper function.
   10064 
   10065 	* sparc.cc (Target_sparc::Scan::local): Handle R_SPARC_GOTDATA_OP*
   10066 	just like R_SPARC_GOT{10,13,22}.
   10067 	(Target_sparc::Scan::local): Likewise.
   10068 	(Target_sparc::Relocate:relocate): Likewise.
   10069 
   10070 2010-02-06  Ian Lance Taylor  <iant (a] google.com>
   10071 
   10072 	* configure.ac: Rewrite targetobjs duplicate removal code to use
   10073 	only shell constructs.
   10074 	* configure: Rebuild.
   10075 
   10076 2010-02-05  Doug Kwan  <dougkwan (a] google.com>
   10077 
   10078 	PR 11247
   10079 	* arm.cc (Arm_relobj::section_is_scannable): New method.
   10080 	(Arm_relobj::section_needs_reloc_stub_scanning): Use it.
   10081 	(Arm_relobj::section_needs_cortex_a8_stub_scanning): Same.
   10082 
   10083 2010-02-04  Doug Kwan  <dougkwan (a] google.com>
   10084 
   10085 	PR 11247
   10086 	* arm-reloc-property.cc (cstdio): Include.
   10087 	* configure.ac (targetobjs): Remove duplicates.
   10088 	* configure: Regenerate.
   10089 	* resolve.cc (Symbol_table::resolve): Explicit instantiate both
   10090 	big and little endian version for a given address size.
   10091 
   10092 2010-02-03  Doug Kwan  <dougkwan (a] google.com>
   10093 
   10094 	* arm-reloc-property.cc
   10095 	(Arm_reloc_property_table::reloc_name_in_error_message): New method
   10096 	definition.
   10097 	* arm-reloc-property.h
   10098 	(Arm_reloc_property_table::get_implemented_static_reloc_property):
   10099 	New method definition.
   10100 	(Arm_reloc_property_table::reloc_name_in_error_message): New method
   10101 	declaration.
   10102 	* arm-reloc.def (THM_MOVT_ABS, THM_MOVT_PREL, THM_MOVT_BREL): Change
   10103 	overflow to N.
   10104 	(GOT_PREL): Change implemented to Y.
   10105 	* arm.cc (Target_arm::reloc_uses_thumb_bit): Remove method.
   10106 	(Target_arm::Relocate::reloc_needs_sym_origin): Remove method.
   10107 	(Arm_relocate_functions::movw_abs_nc): Remove method.
   10108 	(Arm_relocate_functions::movt_abs): Ditto.
   10109 	(Arm_relocate_functions::thm_movw_abs_nc): Ditto.
   10110 	(Arm_relocate_functions::thm_movt_abs): Ditto.
   10111 	(Arm_relocate_functions::movw_rel_nc): Ditto.
   10112 	(Arm_relocate_functions::movw_rel): Ditto.
   10113 	(Arm_relocate_functions::movt_rel): Ditto.
   10114 	(Arm_relocate_functions:thm_movw_rel_nc): Ditto.
   10115 	(Arm_relocate_functions:thm_movw_rel): Ditto.
   10116 	(Arm_relocate_functions:thm_movt_rel): Ditto.
   10117 	(Arm_relocate_functions::movw, Arm_relocate_functions::movt,
   10118 	(Arm_relocate_functions::thm_movw, Arm_relocate_functions::thm_movt):
   10119 	New method definitions.
   10120 	(Arm_relocation_functions::arm_grp_alu): Add assertion for group index.
   10121 	(Arm_relocation_functions::arm_grp_ldr): Ditto.
   10122 	(Arm_relocation_functions::arm_grp_ldrs): Ditto.
   10123 	(Arm_relocation_functions::arm_grp_ldc): Ditto.
   10124 	(Target_arm::Relocate::relocate): Check for non-static or
   10125 	unimplemented relocation code and exit early.  Change calls to
   10126 	Target_arm::reloc_uses_thumb_bit and
   10127 	Target_arm::Reloc::reloc_needs_sym_origin to use relocation property
   10128 	instead.  Refactor code to handle similar relocations to increase
   10129 	code sharing.  Remove check for unsupported relocation code in switch
   10130 	statement.
   10131 	(Target_arm::Relocatable_size_for_reloc::get_size_for_reloc): Use
   10132 	relocation property table to find out size.  Change error message to
   10133 	print out the name of a relocation code instead of the numeric value.
   10134 	(Target_arm::scan_reloc_for_stub): Use relocation property table
   10135 	instead of calling Target_arm::reloc_uses_thumb_bit().
   10136 
   10137 2010-02-02  Doug Kwan  <dougkwan (a] google.com>
   10138 
   10139 	* arm.cc (Target_arm::relocate_section): Do view adjustment for all
   10140 	types of relaxed input section.
   10141 
   10142 2010-02-02  Doug Kwan  <dougkwan (a] google.com>
   10143 
   10144 	* Makefile.am (HFILES): Add arm-reloc-property.h.
   10145 	(DEFFILES): New.
   10146 	(TARGETSOURCES): Add arm-reloc-property.cc
   10147 	(ALL_TARGETOBJS): Add arm-reloc-property.$(OBJEXT)
   10148 	(libgold_a_SOURCES): $(DEFFILES)
   10149 	* Makefile.in: Regenerate.
   10150 	* arm-reloc-property.cc: New file.
   10151 	* arm-reloc-property.h: New file.
   10152 	* arm-reloc.def: New file.
   10153 	* arm.cc: Update comments.
   10154 	(arm-reloc-property.h): New included header.
   10155 	(arm_reloc_property_table): New global variable.
   10156 	(Target_arm::do_select_as_default_target): New method definition.
   10157 	* configure.tgt (armeb*-*-*,armbe*-*-*,arm*-*-*): Add
   10158 	arm-reloc-property to targ_extra_obj.
   10159 	* parameters.cc (set_parameters_target): Call
   10160 	Target::select_as_default_target().
   10161 	* target.h (Target::select_as_default_target): New method definition.
   10162 	(Target::do_select_as_default_target): Same.
   10163 
   10164 2010-02-01  Doug Kwan  <dougkwan (a] google.com>
   10165 
   10166 	* arm.cc (Arm_exidx_fixup::Arm_exidx_fixup): Initialize
   10167 	first_output_text_section_.
   10168 	(Arm_exidx_fixup::first_output_text_section): New method definition.
   10169 	(Arm_exidx_fixup::first_output_text_section_): New data member.
   10170 	(Arm_exidx_fixup::process_exidx_section): Record the first text
   10171 	output section seen.
   10172 	(Arm_output_section::fix_exidx_coverage): Set correct linked section
   10173 	and entsize in output section header.
   10174 
   10175 2010-01-29  Viktor Kutuzov  <vkutuzov (a] accesssoftek.com>
   10176 
   10177 	* gold/arm.cc: Added support for the ARM relocations: R_ARM_THM_PC8,
   10178 	R_ARM_THM_PC12, R_ARM_THM_ALU_PREL_11_0.
   10179 	(Arm_relocate_functions::thm_alu11): New Method.
   10180 	(Arm_relocate_functions::thm_pc8): New Method.
   10181 	(Arm_relocate_functions::thm_pc12): New Method.
   10182 	(Target_arm::Scan::local): Handle the relocations.
   10183 	(Target_arm::Scan::global): Likewise.
   10184 	(Target_arm::Relocate::relocate): Likewise.
   10185 	(Target_arm:Relocatable_size_for_reloc::get_size_for_reloc): Likewise.
   10186 
   10187 2010-01-29  Doug Kwan  <dougkwan (a] google.com>
   10188 
   10189 	* arm.cc (Target_arm::Scan::global): General PLTs for the same set
   10190 	of relocation types as ld.
   10191 
   10192 2010-01-29  Doug Kwan  <dougkwan (a] google.com>
   10193 
   10194 	* arm.cc (Arm_relocate_functions::arm_branch_common) Change visibility
   10195 	to public.
   10196 	(Arm_relocate_functions::thumb_branch_common): Ditto.
   10197 	(Arm_relocate_functions::thm_call, Arm_relocate_functions::thm_jump24,
   10198 	Arm_relocate_functions::thm_xpc22, Arm_relocate_functions::plt32,
   10199 	Arm_relocate_functions::xpc25, Arm_relocate_functions::call,
   10200 	Arm_relocate_functions::jump24): Remove.
   10201 	(Target_arm::Relocate::relocate): Adjust code to call
   10202 	Arm_relocation_functions::arm_branch_common and
   10203 	Arm_relocation_functions::thumb_branch_common instead of their removed
   10204 	wrappers.  Merge switch-cases together to reduce source code size.
   10205 
   10206 2010-01-29  Doug Kwan  <dougkwan (a] google.com>
   10207 
   10208 	* arm.cc (Arm_relobj::Arm_relobj): Initialize new data member
   10209 	output_local_symbol_count_needs_update_.
   10210 	(Arm_relobj::output_local_symbol_count_needs_update,
   10211 	 Arm_relobj::set_output_local_symbol_count_needs_update,
   10212 	 Arm_relobj::update_output_local_symbol_count): New methods.
   10213 	(Arm_relobj::output_local_symbol_count_needs_update_): New data
   10214 	member.
   10215 	(Arm_exidx_cantunwind::do_fixed_endian_write): Write address
   10216 	of pointed function as in a R_ARM_PREL31 relocation.
   10217 	(Arm_output_section<big_endian>::fix_exidx_coverage): Mark objects
   10218 	for output local symbol count updating.
   10219 	(Target_arm::do_relax): Update output local symbol counts in objects
   10220 	if necessary.
   10221 	* object.h (Sized_relobj::set_output_local_symbol_count): New method.
   10222 
   10223 2010-01-29  Viktor Kutuzov  <vkutuzov (a] accesssoftek.com>
   10224 
   10225 	* arm.cc: Added support for the ARM relocations:
   10226 	R_ARM_MOVW_BREL_NC, R_ARM_MOVT_BREL, R_ARM_MOVW_BREL,
   10227 	R_ARM_THM_MOVW_BREL_NC, R_ARM_THM_MOVT_BREL, R_ARM_THM_MOVW_BREL.
   10228 	(Arm_relocate_functions::movw_rel_nc): Renamed (was
   10229 	movw_prel_nc).
   10230 	(Arm_relocate_functions::movw_rel): New method.
   10231 	(Arm_relocate_functions::movt_rel): Renamed (was movt_prel).
   10232 	(Arm_relocate_functions::thm_movw_rel_nc): Renamed (was
   10233 	thm_movw_prel_nc).
   10234 	(Arm_relocate_functions::thm_movw_rel): New method.
   10235 	(Arm_relocate_functions::thm_movt_rel): Renamed (was
   10236 	thm_movt_prel).
   10237 	(Target_arm::Scan::local): Handle MOVW_BREL/MOVT_BREL
   10238 	relocations.
   10239 	(Target_arm::Scan::global): Likewise.
   10240 	(Target_arm::Relocate::relocate): Likewise.
   10241 	(Target_arm::Relocatable_size_for_reloc::get_size_for_reloc):
   10242 	Likewise.
   10243 
   10244 2010-01-27  Viktor Kutuzov  <vkutuzov (a] accesssoftek.com>
   10245 
   10246 	* arm.cc: Added support for ARM group relocations.
   10247 	(Target_arm::reloc_needs_sym_origin): New method.
   10248 	(Arm_relocate_functions::calc_grp_kn): New method.
   10249 	(Arm_relocate_functions::calc_grp_residual): New method.
   10250 	(Arm_relocate_functions::calc_grp_gn): New method.
   10251 	(Arm_relocate_functions::arm_grp_alu): New Method.
   10252 	(Arm_relocate_functions::arm_grp_ldr): New Method.
   10253 	(Arm_relocate_functions::arm_grp_ldrs): New Method.
   10254 	(Arm_relocate_functions::arm_grp_ldc): New Method.
   10255 	(Target_arm::Scan::local): Handle the ARM group relocations.
   10256 	(Target_arm::Scan::global): Likewise.
   10257 	(Target_arm::Relocate::relocate): Likewise.
   10258 	(Target_arm::Relocatable_size_for_reloc::get_size_for_reloc):
   10259 	Likewise.
   10260 
   10261 2010-01-26  Doug Kwan  <dougkwan (a] google.com>
   10262 
   10263 	* arm.cc (set): Include.
   10264 	(class Arm_exidx_fixup): Change type of last_input_section_ to const
   10265 	pointer type.
   10266 	(Arm_output_section::Text_section_list): New type.
   10267 	(Arm_output_section::append_text_sections_to_list): New method.
   10268 	(Arm_output_section::fix_exidx_coverage): Ditto.
   10269 	(Arm_relobj::Arm_relobj): Initialize exidx_section_map_.
   10270 	(Arm_relobj::convert_input_section_to_relaxed_section): Use
   10271 	Relobj::set_section_offset() instead of
   10272 	Sized_relobj::invalidate_section_offset().
   10273 	(Arm_relobj::section_needs_reloc_stub_scanning): Add an extra
   10274 	parameter for section headers. Ignore relocation sections for
   10275 	unallocated sections and EXIDX sections.
   10276 	(Target_arm::fix_exidx_coverage): New method.
   10277 	(Target_arm::output_section_address_less_than): New type.
   10278 	(Arm_exidx_fixup::add_exidx_cantunwind_as_needed): Use index of the
   10279 	linked text section instead of the EXIDX section.
   10280 	(Arm_output_section::create_stub_group): Add an assertion to check
   10281 	that this is not an EXIDX output section.
   10282 	(Arm_output_section::append_text_sections_to_list): New method.
   10283 	(Arm_output_section::fix_exidx_coverage): Ditto.
   10284 	(Arm_relobj::scan_sections_for_stubs): Adjust call to
   10285 	Arm_relobj::section_needs_reloc_stub_scanning.
   10286 	(Target_arm::do_relax): Fix EXIDX output section coverage in the
   10287 	first pass.
   10288 	(Target_arm::fix_exidx_coverage): New method.
   10289 	* object.h (Relobj::set_output_section): New method.
   10290 	(Sized_relobj::invalidate_section_offset): Remove method.
   10291 	(Sized_relobj::do_invalidate_section_offset): Remove method.
   10292 	(Sized_relobj::do_set_section_offset): Handle offset value -1.
   10293 
   10294 2010-01-25  Doug Kwan  <dougkwan (a] google.com>
   10295 
   10296 	* arm.cc (Arm_exidx_merged_section::do_output_offset):
   10297 	Fix warning due to signed and unsigned comparison on a 32-bit host.
   10298 
   10299 2010-01-22  Doug Kwan  <dougkwan (a] google.com>
   10300 
   10301 	* arm.cc (Target_arm::do_relax): Record an output section for section
   10302 	offset adjustment it contains any stub table that has changed.
   10303 	* layout.cc (Layout::clean_up_after_relaxation): Adjust section
   10304 	offsets in an output section if necessary.
   10305 	* output.cc (Output_section::Output_section): Initialize
   10306 	section_offsets_need_adjustments_.
   10307 	(Output_section::add_input_section_for_script): Renamed to
   10308 	Output_section::add_simple_input_section.
   10309 	(Output_section::save_states): Add a comment.
   10310 	(Output_section::discard_states): New method defintion.
   10311 	(Output_section::adjust_section_offsets): Same.
   10312 	* output.h (Output_section::add_input_section_for_script): Renamed to
   10313 	Output_section::add_simple_input_section.
   10314 	(Output_section::discard_states): New method declaration.
   10315 	(Output_section::adjust_section_offsets): Same.
   10316 	(Output_section::section_offsets_need_adjustment,
   10317 	Output_section::set_section_offsets_need_adjustment): New method
   10318 	definitions.
   10319 	(Output_section::section_offsets_need_adjustment_): New data member.
   10320 	* script-sections.cc
   10321 	(Output_section_element_input::set_section_address): Adjust code for
   10322 	renaming of Output_section::add_input_section_for_script.
   10323 	(Orphan_output_section::set_section_address): Same.
   10324 
   10325 2010-01-22  Viktor Kutuzov  <vkutuzov (a] accesssoftek.com>
   10326 
   10327 	* gold/arm.cc (Target_arm): Updated fix_v4bx method and usage of
   10328 	Fix_v4bx enum values .
   10329 	* gold/options.h (General_options): New option definitions.
   10330 	(General_options::fix_v4bx): New method.
   10331 	(General_options::Fix_v4bx): New enum.
   10332 	* gold/options.cc (General_options::parse_fix_v4bx): New method.
   10333 	(General_options::parse_fix_v4bx_interworking): New method.
   10334 
   10335 2010-01-22  Doug Kwan  <dougkwan (a] google.com>
   10336 
   10337 	* arm.cc (Arm_exidx_fixup): New class.
   10338 
   10339 2010-01-21  Doug Kwan  <dougkwan (a] google.com>
   10340 
   10341 	* arm.cc (Arm_exidx_cantunwind, Arm_exidx_merged_section): New
   10342 	classes.
   10343 	(Arm_exidx_section_offset_map): New type.
   10344 
   10345 2010-01-21  Doug Kwan  <dougkwan (a] google.com>
   10346 
   10347 	* arm.cc (Arm_exidx_input_section): New class.
   10348 	(Arm_relobj::exidx_input_section_by_link,
   10349 	Arm_relobj::exidx_input_section_by_shndx,
   10350 	Arm_relobj::make_exidx_input_section): New methods.
   10351 	(read_arm_attributes_section): Remove.
   10352 	(Arm_relobj::do_read_symbols): Look for ARM.exidx sections and record
   10353 	information about them.
   10354 	(Arm_dynobj::do_read_symbols): Move code in read_arm_attributes_section
   10355 	to here.
   10356 
   10357 2010-01-20  Doug Kwan  <dougkwan (a] google.com>
   10358 
   10359 	* arm.cc (Target_arm::Arm_input_section_map): Change key type from
   10360 	Input_section_specifier to Section_id.
   10361 	(Target_arm::new_arm_input_section: Adjust code for change of key
   10362 	type.
   10363 	(Target_arm::find_arm_input_section): Ditto.
   10364 	* gc.h (object.h): Include for Section_id nand Section_id_hash.
   10365 	(Section_id): Remove.
   10366 	(Garbage_collection::Section_id_hash): Remove.
   10367 	* icf.h (object.h): Include for Section_id nand Section_id_hash.
   10368 	(Section_id): Remove.
   10369 	(Icf::Section_id_hash): Remove.
   10370 	* object.h (Section_id, Const_section_id, Section_id_hash,
   10371 	Const_section_id_hash): New type definitions.
   10372 	* output.cc (Output_section::add_relaxed_input_section): Change to
   10373 	use Const_section_id instead of Input_section_specifier as key type.
   10374 	(Output_section::add_merge_input_section): Ditto.
   10375 	(Output_section::build_relaxation_map): Change to use Section_id
   10376 	instead of Input_section_specifier as key type.
   10377 	(Output_section::convert_input_sections_in_list_to_relaxed_sections):
   10378 	Ditto.
   10379 	(Output_section::convert_input_sections_to_relaxed_sections): Change
   10380 	to use Const_section_id instead of Input_section_specifier as key type.
   10381 	(Output_section::find_merge_section): Ditto.
   10382 	(Output_section::find_relaxed_input_section): Ditto.
   10383 	* output.h (Input_section_specifier): Remove class.
   10384 	(Output_section::Output_section_data_by_input_section_map): Change
   10385 	key type to Const_section_id.
   10386 	(Output_section::Output_relaxed_input_section_by_input_section_map):
   10387 	Ditto.
   10388 	(Output_section::Relaxation_map): Change key type to Section_id.
   10389 
   10390 2010-01-20  Viktor Kutuzov  <vkutuzov (a] accesssoftek.com>
   10391 
   10392 	* gold/arm.cc: Added support for R_ARM_V4BX relocation
   10393 	(class Arm_v4bx_stub): New class.
   10394 	(DEF_STUBS): Updated definition to support v4_veneer_bx.
   10395 	(Stub_factory::make_arm_v4bx_stub): New method.
   10396 	(Stub_factory::elf32_arm_stub_v4_veneer_bx): New veneer template.
   10397 	(Stub_table::empty): Handle v4bx stubs.
   10398 	(Stub_table::add_arm_v4bx_stub): New method.
   10399 	(Stub_table::find_arm_v4bx_stub): New method.
   10400 	(Arm_relocate_functions::v4bx): New method.
   10401 	(Target_arm::fix_v4bx): New method.
   10402 	(Target_arm::Target_arm): Handle R_ARM_V4BX.
   10403 	(Stub_table::relocate_stubs): Likewise.
   10404 	(Stub_table::do_write): Likewise.
   10405 	(Stub_table::update_data_size_and_addralign): Likewise.
   10406 	(Stub_table::finalize_stubs):  Likewise.
   10407 	(Target_arm::Scan::local): Likewise.
   10408 	(Target_arm::Scan::global): Likewise.
   10409 	(Target_arm::do_finalize_sections): Likewise.
   10410 	(Target_arm::Relocate::relocate): Likewise.
   10411 	(Target_arm::Relocatable_size_for_reloc::get_size_for_reloc):
   10412 	Likewise.
   10413 	(Target_arm::scan_reloc_for_stub): Likewise.
   10414 	(Target_arm::scan_reloc_section_for_stubs): Likewise.
   10415 
   10416 2010-01-19  Ian Lance Taylor  <iant (a] google.com>
   10417 
   10418 	* output.cc (Output_section_headers::do_sized_write): Write large
   10419 	segment count to sh_info field.
   10420 	(Output_file_header::do_sized_write): For large segment count,
   10421 	write PN_XNUM to e_phnum field.
   10422 
   10423 2010-01-15  Viktor Kutuzov  <vkutuzov (a] accesssoftek.com>
   10424 
   10425 	* arm.cc (Arm_relocate_functions::thm_jump6): New function.
   10426 	(Arm_relocate_functions::thm_jump8): New function.
   10427 	(Arm_relocate_functions::thm_jump11): New function.
   10428 	(Target_arm::Scan::local): Handle R_ARM_THM_JUMP6, R_ARM_THM_JUMP8,
   10429 	R_ARM_THM_JUMP11.
   10430 	(Target_arm::Scan::global): Likewise.
   10431 	(Target_arm::Relocate::relocate): Likewise.
   10432 	(Target_arm::Relocatable_size_for_reloc::get_size_for_reloc):
   10433 	Likewise.
   10434 
   10435 2010-01-14  Doug Kwan  <dougkwan (a] google.com>
   10436 
   10437 	* arm.cc (map, utility): Include headers.
   10438 	(Target_arm::apply_cortex_a8_workaround): New method.
   10439 	(Arm_relobj::do_relocate_sections): Apply any Cortex-A8 workaround.
   10440 	(Target_arm::Scan::local): Handle R_ARM_THM_JUMP24, R_ARM_THM_JUMP19.
   10441 	(Target_arm::Scan::global): R_ARM_THM_JUMP19.
   10442 	(Target_arm::do_finalize_sections): Set fix_cortex_a8_ according to
   10443 	the --[no-]fix-cortex-a8 command line options.
   10444 	(Target_arm::Relocate::relocate): Handle R_ARM_JUMP19.
   10445 	(Target_arm::relocate_stub): Use addend in instruction template.
   10446 	* options.h (DEFINE_bool): Set the user-set flag.
   10447 	(General_options): Add --[no-]-fix-cortex options.
   10448 	* output.cc (Output_section::convert_input_sections_to_relaxed_sections)
   10449 	: Update fast look-up map after conversion.
   10450 
   10451 2010-01-14  Sriraman Tallam  <tmsriram (a] google.com>
   10452 
   10453 	* object.cc (Sized_relobj::do_layout): Change to call layout_gnu_stack
   10454 	in the first pass of do_layout.
   10455 
   10456 2010-01-13  Doug Kwan  <dougkwan (a] google.com>
   10457 
   10458 	* arm.cc (Arm_relobj::section_needs_reloc_stub_scanning,
   10459 	Arm_relobj::scan_sections_for_stubs): Rearrange code to avoid an
   10460 	apparent compiler problem of not folding static constant integral
   10461 	data members of elfcpp::Elf_sizes<32>.
   10462 
   10463 2010-01-13  Doug Kwan  <dougkwan (a] google.com>
   10464 
   10465 	* arm.cc (Arm_relobj::section_needs_reloc_stub_scanning,
   10466 	Arm_relobj::section_needs_cortex_a8_stub_scanning,
   10467 	Arm_relobj::scan_section_for_cortex_a8_erratum,
   10468 	Arm_relobj::scan_span_for_cortex_a8_erratum): New methods.
   10469 	(Arm_relobj::scan_sections_for_stubs): Move code deciding what
   10470 	sections to scan for relocation stubs into a new method
   10471 	Arm_relobj::section_needs_reloc_stub_scanning.  Handle both
   10472 	relocation and Cortex-A8 stub scanning.
   10473 	(Target_arm::do_relax): Force stubs to be after stubbed sections
   10474 	if fixing the Cortex-A8 erratum.  Remove all Cortex-A8 stubs at
   10475 	the beginning of a new relaxation pass.  Update a comment.
   10476 	(Target_arm::scan_span_for_cortex_a8_erratum): New method definition.
   10477 
   10478 2010-01-12  Ian Lance Taylor  <iant (a] google.com>
   10479 
   10480 	* target-reloc.h (visibility_error): New inline function.
   10481 	(relocate_section): Call visibility_error.
   10482 	* testsuite/Makefile.am (check_DATA): Add protected_3.err.
   10483 	(MOSTLYCLEANFILES): Likewise.
   10484 	(protected_4_pic.o, protected_3.err): New targets.
   10485 	* testsuite/protected_4.cc: New file.
   10486 
   10487 2010-01-12  Doug Kwan  <dougkwan (a] google.com>
   10488 
   10489 	* arm.cc (Cortex_a8_reloc): New class.
   10490 	(Target_arm::Target_arm): Initialize new data members fix_cortex_a8_
   10491 	and cortex_a8_relocs_info_.
   10492 	(Target_arm::fix_cortex_a8): New method definition.
   10493 	(Target_arm::Cortex_a8_relocs_info): New type.
   10494 	(Target_arm::fix_cortex_a8_, Target_arm::cortex_a8_relocs_info_):
   10495 	New data member declarations.
   10496 	(Target_arm::scan_reloc_for_stub): Record information about
   10497 	relocations for THUMB branches that might be exempted from the
   10498 	Cortex-A8 workaround.
   10499 	(Target_arm::do_relax): Clear all Cortex-A8 relocation information
   10500 	at the beginning of a relaxation pass.
   10501 
   10502 2010-01-12  Doug Kwan  <dougkwan (a] google.com>
   10503 
   10504 	* arm.cc (Arm_relobj::mapping_symbols_info_): New data member.
   10505 	(Arm_relobj::Mapping_symbol_position,
   10506 	 Arm_reloj::Mapping_symbol_position_less,
   10507 	 Arm_relobj::Mapping_symbols_info): New types.
   10508 	(Target_arm::is_mapping_symbol_name): New method definition.
   10509 	(Arm_relobj::do_count_local_symbols): Save information about mapping
   10510 	symbols.
   10511 
   10512 2010-01-11  Doug Kwan  <dougkwan (a] google.com>
   10513 
   10514 	* arm.cc (Arm_relocate_functions::thumb32_branch_offset,
   10515 	Arm_relocate_functions::thumb32_branch_upper,
   10516 	Arm_relocate_functions::thumb32_branch_lower,
   10517 	Arm_relocate_functions::thumb32_cond_branch_offset,
   10518 	Arm_relocate_functions::thumb32_cond_branch_upper,
   10519 	Arm_relocate_functions::thumb32_cond_branch_lower,
   10520 	Arm_relocate_functions::thm_jump19): New methods to handle THUMB
   10521 	branch offset encoding.
   10522 	(Arm_relocate_functions::thumb_branch_common): Use new branch
   10523 	offset encoding methods to avoid code duplication.
   10524 	(Stub_template::Stub_template) Handle THUMB16_SPECIAL_TYPE.
   10525 	(Stub_addend_reader::operator()): Use new branch encoding method
   10526 	to avoid code duplication.
   10527 
   10528 2010-01-11  Doug Kwan  <dougkwan (a] google.com>
   10529 
   10530 	* arm.cc (Arm_relobj::do_gc_process_relocs): New method.
   10531 	(Target_arm::do_finalize_sections): Define special EXIDX section
   10532 	symbols only if referenced.
   10533 	* gc.h (Garbage_collection::add_reference): New method.
   10534 	(gc_process_relocs): Use Garbage_collection::add_reference to avoid
   10535 	code duplication.
   10536 
   10537 2010-01-11  Ian Lance Taylor  <iant (a] google.com>
   10538 
   10539 	* script.cc (Version_script_info::build_expression_list_lookup):
   10540 	Change complaing about duplicate wildcard match from error to
   10541 	warning.
   10542 
   10543 	* script.cc (class Lazy_demangler): Recreate--revert part of patch
   10544 	of 2009-12-30.
   10545 	(Version_script_info::Version_script_info): Initialize globs_,
   10546 	default_version_, default_is_global_, and exact_.  Don't
   10547 	initialize globals_ or locals_.
   10548 	(Version_script_info::build_lookup_tables): Build local symbols
   10549 	first.
   10550 	(Version_script_info::unquote): New function.
   10551 	(Version_script_info::add_exact_match): New function.
   10552 	(Version_script_info::build_expression_list_lookup): Remove lookup
   10553 	parameter.  Add is_global parameter.  Change all callers.  Handle
   10554 	wildcard pattern specially.  Unquote pattern.  Call
   10555 	add_exact_match.
   10556 	(Version_script_info::get_name_to_match): New function.
   10557 	(Version_script_info::get_symbol_version): New function.
   10558 	(Version_script_info::get_symbol_version_helper): Remove.
   10559 	(Version_script_info::check_unmatched_names): Call unquote.
   10560 	* script.h (class Version_script_info): Change get_symbol_version
   10561 	to be non-inline and add is_global parameter; change all callers.
   10562 	Rewrite symbol_is_local.  Update declarations.  Define struct
   10563 	Version_tree_match, Exact, Globs.  Don't define struct Lookup.
   10564 	Remove globals_ and locals_ members.  Add exact_, globs_,
   10565 	default_version_, is_global_.
   10566 	(Version_script_info::Glob): Remove pattern, add expression and
   10567 	is_global.  Update constructor.  Change all callers.
   10568 	* dynobj.cc (Versions::finalize): Mark the version symbol as the
   10569 	default version.
   10570 	(Versions::symbol_section_contents): If a symbol is undefined, or
   10571 	defined in a dynamic object, set the version index to
   10572 	VER_NDX_LOCAL.
   10573 	* symtab.cc (Symbol_table::add_from_relobj): Don't call
   10574 	symbol_is_local.
   10575 	(Symbol_table::add_from_pluginobj): Likewise.
   10576 	* testsuite/ver_matching_test.sh: blaza1 and blaza go into V2.
   10577 
   10578 2010-01-11  Doug Kwan  <dougkwan (a] google.com>
   10579 
   10580 	* Makefile.am (incremental_dump_DEPENDENCIES): Add libintl dependency.
   10581 	(incremental_dump_LDADD): Add linking option for libintl.
   10582 	* Makefile.in: Regenerate.
   10583 
   10584 2010-01-11  H.J. Lu  <hongjiu.lu (a] intel.com>
   10585 
   10586 	PR gold/11144
   10587 	* testsuite/Makefile.am (dynamic_list.stdout): Use --dyn-syms
   10588 	instead of -Ds.
   10589 	* testsuite/Makefile.in: Regenerated.
   10590 
   10591 2010-01-10  Doug Kwan  <dougkwan (a] google.com>
   10592 
   10593 	* options.h (DEFINE_var): Use parentheses around argument varname__
   10594 	in macro body to avoid any unintended subsequent substitutions.
   10595 
   10596 2010-01-10  Ian Lance Taylor  <iant (a] google.com>
   10597 
   10598 	* resolve.cc (Symbol_table::resolve): Add symbols to list of ODR
   10599 	candidates before doing symbol resolution.
   10600 
   10601 	* resolve.cc (Symbol_table::resolve): Add symbols to the list of
   10602 	ODR candidates if only one is weak.
   10603 
   10604 2010-01-08  Ian Lance Taylor  <iant (a] google.com>
   10605 
   10606 	* script.cc (Version_script_info::build_expression_list_lookup):
   10607 	Don't warn about ambiguous version, just record the ambiguity.
   10608 	(Version_script_info::get_symbol_version_helper): Give error if
   10609 	version is ambiguous.
   10610 
   10611 2010-01-08  Doug Kwan  <dougkwan (a] google.com>
   10612 
   10613 	* arm.cc (Stub_table::Stub_table): Initalize cortex_a8_stubs_,
   10614 	prev_data_size_ and prev_addralign_.  Remove initializer for
   10615 	deleted data member has_been_changed_.
   10616 	(Stub_table::empty): Look at both reloc_stubs_ and cortex_a8_stubs_
   10617 	to determine if the table is empty.
   10618 	(Stub_table::has_been_changed, Stub_table_set_has_been_changed):
   10619 	Remove.
   10620 	(Stub_table::add_reloc_stub): Define method in class definition
   10621 	instead of just declaring it there.
   10622 	(Stub_table::add_cortex_a8_stub): New method definition.
   10623 	(Stub_table::update_data_size_and_addralign): Ditto.
   10624 	(Stub_table::finalize_stubs): Ditto.
   10625 	(Stub_table::apply_cortex_a8_workaround_to_address_range): Ditto.
   10626 	(Stub_table::do_addralign_): Return address alignment in the
   10627 	(Stub_table::do_reset_address_and_file_offset): Define method in
   10628 	class definition instead of declaring it there.  Set current data
   10629 	size to be the data size of the previous pass.
   10630 	(Stub_table::set_final_data_size): Use current data size as the
   10631 	final data size.
   10632 	(Stub_table::relocate_stub): Change parameter type of stub from
   10633 	Reloc_stub pointer to Stub pointer.
   10634 	(Stub_table::addralign_, Stub_table::has_been_changed_): Remove.
   10635 	(Stub_table::Cortex_a8_stub_list): New typedef.
   10636 	(Stub_table::cortex_a8_stubs_, Stub_table::prev_data_size_,
   10637 	 Stub_table::prev_addralign_): New data member.
   10638 	(Arm_relobj::Arm_relobj): Initialize data member
   10639 	section_has_cortex_a8_workaround_.
   10640 	(Arm_relobj::section_has_cortex_a8_workaround,
   10641 	 Arm_relobj::mark_section_for_cortex_a8_workaround): New method
   10642 	 definitions.
   10643 	(Arm_relobj::section_has_cortex_a8_workaround_): New data member
   10644 	declarations.
   10645 	(Target_arm::relocate_stub): Change parameter type of stub from
   10646 	Reloc_stub pointer to Stub pointer.
   10647 	(Insn_template::size, Insn_template::alignment): Handle
   10648 	THUMB16_SPECIAL_TYPE.
   10649 	(Stub_table::remove_all_cortex_a8_stubs, Stub_table::finalize_stubs,
   10650 	 Stub_table::update_data_size_and_addralign,
   10651 	 Stub_table::apply_cortex_a8_workaround_to_address_range): New method
   10652 	definitions.
   10653 	(Stub_table::relocate_stubs): Handle Cortex-A8 stubs.
   10654 	(Stub_table::do_write): Ditto.
   10655 	(Target_arm::do_relax): Adjust code for changes in Stub_table.
   10656 
   10657 2010-01-08  Ian Lance Taylor  <iant (a] google.com>
   10658 
   10659 	PR 11108
   10660 	* symtab.h (class Symbol): Remove fields is_target_special_ and
   10661 	has_plt_offset_.  Add field is_defined_in_discarded_section_.
   10662 	(Symbol::is_defined_in_discarded_section): New function.
   10663 	(Symbol::set_is_defined_in_discarded_section): New function.
   10664 	(Symbol::has_plt_offset): Rewrite.
   10665 	(Symbol::set_plt_offset): Verify that new offset is not -1U.
   10666 	* symtab.cc (Symbol::init_fields): Initialize plt_offset_ to -1U.
   10667 	Don't initialize is_target_special_ or has_plt_offset_.
   10668 	Initialize is_defined_in_discarded_section_.
   10669 	(Symbol_table::add_from_relobj): If appropriate, set
   10670 	is_defined_in_discarded_section.
   10671 	* resolve.cc (Symbol::override_base_with_special): Don't test
   10672 	is_target_special_.  Change has_plt_offset_ to has_plt_offset().
   10673 	* target-reloc.h (relocate_section): Do special handling for
   10674 	symbols defined in discarded sections for global symbols as well
   10675 	as local symbols.
   10676 
   10677 2010-01-08  Ian Lance Taylor  <iant (a] google.com>
   10678 
   10679 	* dynobj.cc (big_endian>::find_dynsym_sections): Set pi to NULL in
   10680 	the SHT_SYMTAB case.
   10681 
   10682 2010-01-08  Ian Lance Taylor  <iant (a] google.com>
   10683 
   10684 	* object.cc (Sized_relobj::do_layout): Don't get confused if
   10685 	layout_eh_frame returns NULL.
   10686 
   10687 2010-01-08  Ian Lance Taylor  <iant (a] google.com>
   10688 
   10689 	PR 11084
   10690 	* dynobj.cc (Sized_dynobj::find_dynsym_sections): If there is no
   10691 	dynamic symbol table, use the normal symbol table.
   10692 	(Sized_dynobj::do_read_symbols): Remove assertion about type of
   10693 	symbol table.
   10694 
   10695 2010-01-08  Ian Lance Taylor  <iant (a] google.com>
   10696 
   10697 	PR 11072
   10698 	* layout.cc (Layout::include_section): Remove .gnu_debuglink
   10699 	sections.
   10700 
   10701 2010-01-08  H.J. Lu  <hongjiu.lu (a] intel.com>
   10702 
   10703 	* version.cc (print_version): Change to "Copyright 2010".
   10704 
   10705 2010-01-08  Ian Lance Taylor  <iant (a] google.com>
   10706 
   10707 	PR 10287
   10708 	PR 11063
   10709 	* i386.cc (class Target_i386): Change return type of plt_section
   10710 	to be non-const.
   10711 	(class Output_data_plt_i386): Add tls_desc_rel_ field.
   10712 	(Output_data_plt_i386::Output_data_plt_i386): Initialize
   10713 	tls_desc_rel_ field.
   10714 	(Output_data_plt_i386::rel_tls_desc): New function.
   10715 	(Target_i386::rel_tls_desc_section): New function.
   10716 	(Target_i386::Scan::local): Rewrite R_386_TLS_GOTDESC handling.
   10717 	(Target_i386::Scan::global): For R_386_TLS_GOTDESC put
   10718 	R_386_TLS_DESC reloc in rel_tls_desc_section.
   10719 	* x86_64.cc (class Target_x86_64): Add tlsdesc_reloc_info_ field.
   10720 	Define struct Tlsdesc_info.
   10721 	(Target_x86_64::Target_x86_64): Initialize tlsdesc_reloc_info_.
   10722 	(Target_x86_64::do_reloc_symbol_index): New function.
   10723 	(Target_x86_64::add_tlsdesc_info): New function.
   10724 	(class Output_data_plt_x86_64): Add tlsdesc_rel_ field.
   10725 	(Output_data_plt_x86_64::Output_data_plt_x86_64): Initialize
   10726 	tlsdesc_rel_ field.
   10727 	(Output_data_plt_x86_64::rela_plt): Rename from rel_plt.  Change
   10728 	all callers.
   10729 	(Output_data_plt_x86_64::rela_tlsdesc): New function.
   10730 	(Target_x86_64::rela_tlsdesc_section): New function.
   10731 	(Target_x86_64::Scan::local): Rewrite R_X86_64_GOTPC32_TLSDESC
   10732 	handling.
   10733 	(Target_x86_64::Scan::global): For R_X86_64_GOTPC32_TLSDESC put
   10734 	(Target_x86_64::do_reloc_addend): New function.
   10735 	R_X86_64_TLSDESC reloc in rela_tlsdesc_section.
   10736 	* output.h (class Output_reloc) [SHT_REL]: Add new constructor
   10737 	declarations.  Define TARGET_CODE.  Add arg field to u1_ union.
   10738 	(Output_reloc::type): New function.
   10739 	(Output_reloc::is_local_section_symbol): Check for TARGET_CODE.
   10740 	(Output_reloc::is_target_specific): New function.
   10741 	(Output_reloc::target_arg): New function.
   10742 	(class Output_reloc) [SHT_RELA]: Add four new constructors for
   10743 	absolute relocs and target specific relocs.
   10744 	(class Output_data_reloc) [SHT_REL]: Add add_absolute and
   10745 	add_target_specific.
   10746 	(class Output_data_reloc) [SHT_RELA]: Likewise.
   10747 	* output.cc (Output_reloc::Output_reloc): Add four new versions
   10748 	for absolute relocs and target specific relocs.
   10749 	(Output_reloc::set_needs_dynsym_index): Add TARGET_CODE case.
   10750 	(Output_reloc::get_symbol_index): Likewise.
   10751 	(Output_reloc::local_section_offset): Check that local_sym_index_
   10752 	is not TARGET_CODE or 0.
   10753 	(Output_reloc::symbol_value): Likewise.
   10754 	(Output_reloc::write) [SHT_RELA]: Call target for target specific
   10755 	reloc.
   10756 	* target.h (class Target): Add reloc_symbol_index and reloc_addend
   10757 	functions.  Add do_reloc_symbol_index and do_reloc_addend virtual
   10758 	functions.
   10759 	* layout.cc (add_target_dynamic_tags): Use output section for
   10760 	DT_PLTRELSZ and DT_JMPREL.
   10761 
   10762 2010-01-07  Ian Lance Taylor  <iant (a] google.com>
   10763 
   10764 	PR 11061
   10765 	* output.h (class Output_reloc) [SHT_RELA]: Add is_relative
   10766 	function.
   10767 	(class Output_data_reloc_generic): Define.
   10768 	(class Output_data_reloc_base): Change base class to
   10769 	Output_data_reloc_generic.  Change add() method to call
   10770 	bump_relative_reloc_count for a relative reloc.  Remove
   10771 	sort_relocs_ field.
   10772 	* output.cc (Output_data_reloc_base::do_write): Change sort_reloc_
   10773 	to sort_relocs().
   10774 	* layout.cc (Layout::add_target_dynamic_tags): Change dyn_rel to
   10775 	Output_data_reloc_generic*.  Add DT_RELCOUNT/DT_RELACOUNT tag if
   10776 	appropriate.
   10777 	* layout.h (class Layout): Update declaration.
   10778 
   10779 2010-01-07  Ian Lance Taylor  <iant (a] google.com>
   10780 
   10781 	* output.h (class Output_data): Add const version of
   10782 	output_section and do_output_section.
   10783 	(class Output_section_data): Add const version of
   10784 	do_output_section.
   10785 	(class Output_section): Likewise.
   10786 	* layout.cc (Layout::add_target_dynamic_tags): New function.
   10787 	* layout.h (class Layout): Update declarations.
   10788 	* arm.cc (Target_arm::do_finalize_sections): Use
   10789 	add_target_dynamic_tags.
   10790 	* i386.cc (Target_i386::do_finalize_sections): Likewise.
   10791 	* powerpc.cc (Target_powerpc::do_finalize_sections): Likewise.
   10792 	* sparc.cc (Target_sparc::do_finalize_sections): Likewise.
   10793 	* x86_64.cc (Target_x86_64::do_finalize_sections): Likewise.
   10794 
   10795 2010-01-07  Ian Lance Taylor  <iant (a] google.com>
   10796 
   10797 	PR 11042
   10798 	* copy-relocs.cc (Copy_relocs::emit_copy_reloc): Mark the dynamic
   10799 	object as needed.
   10800 
   10801 2010-01-07  Dmitry Gorbachev  <d.g.gorbachev (a] gmail.com>
   10802 	    Ian Lance Taylor  <iant (a] google.com>
   10803 
   10804 	PR 11019
   10805 	* object.cc: Instantiate Xindex::initialize_symtab_xindex and
   10806 	Xindex::read_symtab_xindex.
   10807 
   10808 2010-01-07  Doug Kwan  <dougkwan (a] google.com>
   10809 
   10810 	* arm.cc (Insn_template::Type): New enum value THUMB16_SPECIAL_TYPE.
   10811 	(Insn_template::thumb16_bcond_insn): New method declaration.
   10812 	(Insn_template): Fix spelling.
   10813 	(Stub::thumb16_special): New method declaration.
   10814 	(Stub::do_write): Define virtual method which was previously pure
   10815 	virtual.
   10816 	(Stub::do_thumb16_special): New method declaration.
   10817 	(Stub::do_fixed_endian_write): New template member.
   10818 	(Reloc_stub::do_write): Remove.
   10819 	(Reloc_stub::do_fixed_endian_write): Remove.
   10820 	(Cortex_a8_stub): New class definition.
   10821 	(Stub_factory::make_cortex_a8_stub): New method definition.
   10822 	(Stub_factory::Stub_factory): Add missing static storage class
   10823 	qualifier for elf32_arm_stub_a8_veneer_blx.
   10824 
   10825 2010-01-07  Ian Lance Taylor  <iant (a] google.com>
   10826 
   10827 	PR 10980
   10828 	* options.h (class General_options): Add --warn-unresolved-symbols
   10829 	and --error-unresolved-symbols.
   10830 	* errors.cc (Errors::undefined_symbol): Implement
   10831 	--warn-unresolved-symbols.
   10832 
   10833 	* options.h (class General_options): Add -z text and -z textoff.
   10834 	* layout.cc (Layout::finish_dynamic_section): Implement -z text.
   10835 
   10836 2010-01-06  Sriraman Tallam  <tmsriram (a] google.com>
   10837 
   10838 	* gc.h (Garbage_collection::Cident_section_map): New typedef.
   10839 	(Garbage_collection::cident_sections): New function.
   10840 	(Garbage_collection::add_cident_section): New function.
   10841 	(Garbage_collection::cident_sections_): New member.
   10842 	(gc_process_relocs): Add references to sections whose names are C
   10843 	identifiers.
   10844 	* gold.h (cident_section_start_prefix): New constant.
   10845 	(cident_section_stop_prefix): New constant.
   10846 	(is_cident): New function.
   10847 	* layout.cc (Layout::define_section_symbols): Replace string constants
   10848 	with the newly defined constants.
   10849 	* object.cc (Sized_relobj::do_layout): Track sections whose names are
   10850 	C identifiers.
   10851 	* testsuite/Makefile.am: Add gc_orphan_section_test.
   10852 	* testsuite/Makefile.in: Regenerate.
   10853 	* testsuite/gc_orphan_section_test.cc: New file.
   10854 	* testsuite/gc_orphan_section_test.sh: New file.
   10855 
   10856 2010-01-06  Ian Lance Taylor  <iant (a] google.com>
   10857 
   10858 	PR 10980
   10859 	* options.h (class General_options): Add --warn-shared-textrel.
   10860 	* layout.cc (Layout::finish_dynamic_section): Implement
   10861 	--warn-shared-textrel.
   10862 
   10863 	PR 10980
   10864 	* options.h (class General_options): Add --warn-multiple-gp.
   10865 
   10866 2010-01-06  Viktor Kutuzov  <vkutuzov (a] accesssoftek.com>
   10867 
   10868 	* Makefile.am (incremental_dump_DEPENDENCIES): Remove
   10869 	$(THREADSLIB) and $(LIBDL).
   10870 	* Makefile.in: Rebuild.
   10871 
   10872 2010-01-06  Ian Lance Taylor  <iant (a] google.com>
   10873 
   10874 	PR 10980
   10875 	* options.cc (General_options::parse_section_start): New function.
   10876 	(General_options::section_start): New function.
   10877 	(General_options::General_options): Initialize all members.
   10878 	* options.h: Include <map>
   10879 	(class General_options): Add --section-start.  Add section_starts_
   10880 	member.
   10881 	* layout.cc (Layout::attach_allocated_section_to_segment): If
   10882 	--section-start was used, set the address of the segment.  Remove
   10883 	local sort_sections.
   10884 	(Layout::relaxation_loop_body): If the address of the load segment
   10885 	has been set by --section-start, don't use it.
   10886 	* output.h (Output_segment::update_flags_for_output_section): New
   10887 	function.
   10888 	* output.cc (Output_segment::add_output_section): Call
   10889 	update_flags_for_output_section.
   10890 
   10891 2010-01-05  Ian Lance Taylor  <iant (a] google.com>
   10892 
   10893 	PR 10980
   10894 	* options.h (class General_options): Add --undefined-version.
   10895 	* script.cc (struct Version_expression): Add was_matched_by_symbol
   10896 	field.
   10897 	(Version_script_info::matched_symbol): New function.
   10898 	(Version_script_info::get_symbol_version_helper): Call
   10899 	matched_symbol.
   10900 	(Version_script_info::check_unmatched_names): New function.
   10901 	* script.h (class Version_script_info): Update declarations.
   10902 	* gold.cc (queue_middle_tasks): Handle --no-undefined-version.
   10903 
   10904 	* options.h (class General_options): Use DEFINE_bool_alias for
   10905 	allow_multiple_definition.
   10906 	* resolve.cc (Symbol_table::should_override): Don't test
   10907 	allow_multiple_definition.
   10908 
   10909 	PR 10980
   10910 	* options.h (class General_options): Add --cref.
   10911 	* main.cc (main): Print cref table if --cref.  Don't close mapfile
   10912 	until after printing cref table.
   10913 	* cref.cc: Include "symtab.h".
   10914 	(class Cref_inputs): Define Cref_table_compare and Cref_table.
   10915 	(Cref_table_compare::operator()): New function.
   10916 	(Cref_inputs::gather_cref): New function.
   10917 	(filecol): New static const.
   10918 	(Cref_inputs::print_cref): New function.
   10919 	(Cref::print_cref): New function.
   10920 	* cref.h: Include <cstdio>.
   10921 	(class Cref): Update declarations.
   10922 	* mapfile.h (Mapfile::file): New function.
   10923 	* object.h (class Object): Define Symbols.  Declare virtual
   10924 	do_get_global_symbols.
   10925 	(Object::get_global_symbols): New function.
   10926 	* object.cc (Input_objects::add_object): Pass object to cref_ if
   10927 	--cref.
   10928 	(Input_objects::archive_start): Likewise.
   10929 	(Input_objects::archive_stop): Likewise.
   10930 	(Input_objects::print_cref): New function.
   10931 	* dynobj.h (Sized_dynobj::do_get_global_symbols): New function.
   10932 	* dynobj.cc (big_endian>::do_add_symbols): Create symbols_ if
   10933 	--cref.
   10934 	* plugin.cc (Sized_pluginobj::do_get_global_symbols): New
   10935 	function.
   10936 	* plugin.h (class Sized_pluginobj): Update declarations.
   10937 
   10938 2010-01-05  Ian Lance Taylor  <iant (a] google.com>
   10939 
   10940 	* symtab.cc (Symbol_table::add_from_object): Rename def parameter
   10941 	to is_default_version.  Rename insdef to insdefault.
   10942 	(Symbol_table::add_from_relobj): Rename def to is_default_version
   10943 	and local to is_forced_local.
   10944 	(Symbol_table::add_from_pluginobj): Likewise.
   10945 	(Symbol_table::add_from_dynobj): Likewise.
   10946 	(Symbol_table::define_special_symbol): Rename insdef to
   10947 	insdefault.
   10948 
   10949 2010-01-04  Ian Lance Taylor  <iant (a] google.com>
   10950 
   10951 	PR 10980
   10952 	* options.h (class General_options): Add
   10953 	--allow-multiple-definition and -z muldefs.
   10954 	* resolve.cc (Symbol_table::should_override): Don't warn about a
   10955 	multiple symbol definition if --allow-multiple-definition or -z
   10956 	muldefs.
   10957 
   10958 	PR 10980
   10959 	* options.h (class General_options): Add --add-needed and
   10960 	--copy-dt-needed-entries.  Tweak --as-needed help entry.
   10961 	* object.cc (Input_objects::check_dynamic_dependencies): Give an
   10962 	error if --copy-dt-needed-entries aka --add-needed is used and
   10963 	would cause a change in behaviour.
   10964 
   10965 	PR 10980
   10966 	* options.h (class General_options): Add -G as a short version of
   10967 	--shared.  Add no-op options -assert, -g, and -i.
   10968 
   10969 2010-01-04  Sriraman Tallam  <tmsriram (a] google.com>
   10970 
   10971 	* gc.h (gc_process_relocs): Call is_section_foldable_candidate to
   10972 	check for .text or .gnu.linkonce.t sections.
   10973 	* icf.cc (Icf::find_identical_sections): Ditto.
   10974 	Change the detection for mangled function name within the section
   10975 	name.
   10976 	* icf.h (is_section_foldable_candidate): New function.
   10977 
   10978 2009-12-30  Ian Lance Taylor  <iant (a] google.com>
   10979 
   10980 	PR 10980
   10981 	* options.h (class General_options): Permit two dashes with
   10982 	--retain-symbols-file.
   10983 
   10984 2009-12-30  Ian Lance Taylor  <iant (a] google.com>
   10985 
   10986 	PR 10979
   10987 	* layout.cc (Layout::relaxation_loop_body): If -Ttext was used,
   10988 	don't put the file header and segment headers in the text
   10989 	segment.
   10990 
   10991 	PR 10979
   10992 	* common.cc (Sort_commons::operator()): Stabilize sort when both
   10993 	entries are NULL.
   10994 	(Symbol_table::do_allocate_commons_list): When allocating common
   10995 	symbols, skip a symbol which is no longer common.
   10996 	* symtab.h (Symbol::is_common): Test whether the symbol comes from
   10997 	an object before checking its type.
   10998 	* testsuite/common_test_2.c: New file.
   10999 	* testsuite/common_test_3.c: New file.
   11000 	* testsuite/Makefile.am (check_PROGRAMS): Add common_test_2.
   11001 	(common_test_2_SOURCES, common_test_2_DEPENDENCIES): Define.
   11002 	(common_test_2_LDFLAGS, common_test_2_LDADD): Define.
   11003 	(common_test_2_pic.o, common_test_2.so): New targets.
   11004 	(common_test_3_pic.o, common_test_3.so): New targets.
   11005 	* testsuite/Makefile.in: Rebuild.
   11006 
   11007 	PR 10979
   11008 	* script.cc (read_input_script): If we see a new SECTIONS clause,
   11009 	and we have added an input section, give an error.
   11010 	* layout.h (class Layout): Add have_added_input_section function.
   11011 	Add have_added_input_section_ field.
   11012 	* layout.cc (Layout::Layout): Initialize
   11013 	have_added_input_section_.
   11014 	(Layout::layout): Set have_added_input_section_.
   11015 	(Layout::layout_eh_frame): Likewise.
   11016 
   11017 2009-12-30  Ian Lance Taylor  <iant (a] google.com>
   11018 
   11019 	PR 10931
   11020 	* options.h (class General_options): Add --sort-common option.
   11021 	* symtab.h (class Symbol_table): Define Sort_commons_order enum.
   11022 	* common.cc (Sort_common): Add sort_order parameter to
   11023 	constructor.  Add sort_order_ field.
   11024 	(Sort_commons::operator): Check sort_order_.
   11025 	(Symbol_table::allocate_commons): Determine the sort order.
   11026 	(Symbol_table::do_allocate_commons): Add sort_order parameter.
   11027 	Change all callers.
   11028 	(Symbol_table::do_allocate_commons_list): Likewise.
   11029 
   11030 2009-12-30  Ian Lance Taylor  <iant (a] google.com>
   11031 
   11032 	PR 10916
   11033 	* symtab.cc (Symbol_table::add_from_relobj): When not exporting
   11034 	symbols from this object, don't change the visibility of an
   11035 	undefined symbol.
   11036 	* testsuite/exclude_libs_test_1.c (lib1_ref): New function.
   11037 
   11038 2009-12-30  Ian Lance Taylor  <iant (a] google.com>
   11039 
   11040 	PR 10861
   11041 	* script.h (class Version_script_info): Define Language enum.
   11042 	Update declarations.  Define Glob, Exact, and Lookup types.  Add
   11043 	new fields globals_, locals_, and is_finalized_.
   11044 	* script.cc: Various formatting fixes.
   11045 	(class Parser_closure): Change language_stack_ from a vector of
   11046 	std::string to one of Version_script_info::Language.  Adjust all
   11047 	uses accordingly.
   11048 	(class Lazy_demangler): Remove.
   11049 	(struct Version_expression): Change language from std::string to
   11050 	Version_script_info::Language.
   11051 	(Version_script_info::Version_script_info): New function.
   11052 	(Version_script_info::~Version_script_info): Don't call clear.
   11053 	(Version_script_info::finalize): New function.
   11054 	(Version_script_info::build_lookup_tables): New function.
   11055 	(Version_script_info::build_expression_list_lookup): New
   11056 	function.
   11057 	(Version_script_info::get_symbol_version_helper): Rewrite to use
   11058 	lookup tables.
   11059 	(Version_script_info::print_expression_list): Adjust to use
   11060 	Version_script_info::Language.
   11061 	(script_push_lex_into_version_mode): Check that the version script
   11062 	has not been finalized.
   11063 	(version_script_push_lang): Change language string to
   11064 	Version_script_info::Language.
   11065 	* options.cc (Command_line::version_script): New function.
   11066 	* options.h (class General_options): Add finalize_dynamic_list
   11067 	function.  Change version_script from declaration to definition.
   11068 	* testsuite/ver_test_4.script: Remove duplicate def of t2_2.
   11069 	* testsuite/version_script.map: Remove duplicate def of foo.
   11070 	* testsuite/Makefile.am (ver_matching_def.so): Depend upon
   11071 	version_script.map.
   11072 	* testsuite/Makefile.in: Rebuild.
   11073 
   11074 2009-12-30  Ian Lance Taylor  <iant (a] google.com>
   11075 
   11076 	PR 10843
   11077 	* target-reloc.h (relocate_for_relocatable): When copying a reloc,
   11078 	if the input symbol index is 0, make the output symbol index 0.
   11079 
   11080 2009-12-30  Ian Lance Taylor  <iant (a] google.com>
   11081 
   11082 	PR 10670
   11083 	* options.h (class General_options): Add -x/--discard-all.
   11084 	* object.cc (Sized_relobj::do_count_local_symbols): Handle
   11085 	--discard-all.  If the local symbol needs a dynamic entry, check
   11086 	that before handling --discard-locals.
   11087 
   11088 2009-12-30  Ian Lance Taylor  <iant (a] google.com>
   11089 
   11090 	PR 10450
   11091 	* output.cc (Output_segment::Output_segment): If PT_TLS, set the
   11092 	flags to PF_R.
   11093 	(Output_segment::add_output_section): Don't change the flags if
   11094 	the type is PT_TLS.
   11095 
   11096 	PR 10450
   11097 	* dynobj.cc (Dynobj::create_gnu_hash_table): Add symbols to the
   11098 	GNU hash table if they need a dynamic value.  Otherwise, don't add
   11099 	them if they are defined in a dynamic object or are forced local.
   11100 
   11101 2009-12-29  Ian Lance Taylor  <iant (a] google.com>
   11102 
   11103 	PR 10450
   11104 	* layout.cc (Layout::create_dynamic_symtab): Only set entsize of
   11105 	.gnu.hash table for a 32-bit target.
   11106 
   11107 	PR 10450
   11108 	* symtab.h (Symbol::needs_dynsym_entry): A symbol in both a
   11109 	regular and a dynamic object only needs a dynamic symbol table
   11110 	entry if it is externally visible.
   11111 
   11112 	PR 10450
   11113 	* i386.cc (class Target_i386): Initialize global_offset_table_ in
   11114 	constructor.  Add global_offset_table_ field.
   11115 	(Target_i386::got_section): Set global_offset_table_.
   11116 	(Target_i386::do_finalize_sections): Set global_offset_table_
   11117 	size.
   11118 	* x86_64.cc (class Target_x86_64): Initialize global_offset_table_
   11119 	in constructor.  Add global_offset_table_ field.
   11120 	(Target_x86_64::got_section): Set global_offset_table_.
   11121 	(Target_x86_64::do_finalize_sections): Set global_offset_table_
   11122 	size.
   11123 
   11124 	* layout.cc (Layout::Layout): Initialize increase_relro_.
   11125 	(Layout::get_output_section): Add is_relro, is_last_relro, and
   11126 	is_first_non_relro parameters.  Change all callers.
   11127 	(Layout::choose_output_section): Likewise.
   11128 	(Layout::add_output_section_data): Likewise.
   11129 	(Layout::make_output_section): Likewise.
   11130 	(Layout::set_segment_offsets): Clear increase_relro when using a
   11131 	linker script.
   11132 	* layout.h (class Layout): Add increase_relro method.  Add
   11133 	increase_relro_ field.  Update declarations.
   11134 	* output.cc (Output_section::Output_section): Initialize
   11135 	is_last_relro_ and is_first_non_relro_.
   11136 	(Output_segment::add_output_section): Group relro sections is
   11137 	do_sort is true.  Handle is_last_relro and is_first_non_relro.
   11138 	(Output_segment::maximum_alignment): Remove relro handling.
   11139 	(Output_segment::set_section_addresses): Add increase_relro
   11140 	parameter.  Change all callers.  Add initial alignment to align
   11141 	relro sections on separate page.  Remove old relro handling.
   11142 	(Output_segment::set_section_list_addresses): Remove in_relro
   11143 	parameter.  Change all callers.
   11144 	(Output_segment::set_offset): Add increase parameter.  Change all
   11145 	callers.  Remove old relro handling.
   11146 	* output.h (class Output_section): Add new methods: is_last_relro,
   11147 	set_is_last_relro, is_first_non_relro, set_is_first_non_relro.
   11148 	Add is_last_relro_ and is_first_non_relro_ fields.
   11149 	* i386.cc (Target_i386::got_section): Don't call set_is_relro.
   11150 	Create separate .got.plt section.  Call increase_relro.
   11151 	* x86_64.cc (Target_x86_64::got_section): Likewise.
   11152 	* testsuite/relro_script_test.t: Add .got.plt.
   11153 
   11154 	PR 10450
   11155 	* layout.cc (Layout::Layout): Initialize dynamic_symbol_ field.
   11156 	(Layout::create_initial_dynamic_sections): Set dynamic_symbol_.
   11157 	(Layout::finalize): Call set_dynamic_symbol_size.
   11158 	(Layout::set_dynamic_symbol_size): New function.
   11159 	* layout.h (class Layout): Add dynamic_symbol_ field.  Declare
   11160 	set_dynamic_symbol_size.
   11161 
   11162 	PR 10450
   11163 	* output.h (class Output_section): Add is_entsize_zero_ field.
   11164 	* output.cc (Output_section::Output_section): Initialize
   11165 	is_entsize_zero_.
   11166 	(Output_section::set_entsize): If two different entsizes are
   11167 	requested, force it to zero.
   11168 	(Output_section::add_input_section): Set flags for .debug_str
   11169 	before updating section flags.  Set entsize.
   11170 	(Output_section::update_flags_for_input_section): Set SHF_MERGE
   11171 	and SHF_STRING if all input sections have those flags.
   11172 
   11173 2009-12-29   Rafael Espindola  <espindola (a] google.com>
   11174 
   11175 	* main.cc (main): Fix the sys time reporting.
   11176 	* workqueue.cc (Workqueue::find_and_run_task): Fix the sys time
   11177 	reporting.
   11178 
   11179 2009-12-29  Sriraman Tallam  <tmsriram (a] google.com>
   11180 
   11181 	* options.cc (General_options::parse_version): Allow -v to exit
   11182 	without an error if there is nothing to link.
   11183 
   11184 2009-12-29  Ian Lance Taylor  <iant (a] google.com>
   11185 
   11186 	* configure.ac: Set the MCMODEL_MEDIUM conditional to false if
   11187 	using a version of gcc before 4.1.
   11188 	* configure: Rebuild.
   11189 
   11190 2009-12-28  Chris Demetriou  <cgd (a] google.com>
   11191 
   11192 	* attributes.cc (Output_attributes_section_data::do_write): Use
   11193 	std::vector::front rather than std::vector::data.
   11194 
   11195 2009-12-28  Ian Lance Taylor  <iant (a] google.com>
   11196 
   11197 	* symtab.h (class Symbol_table): Add enum Defined.
   11198 	* resolve.cc (Symbol_table::should_override): Add defined
   11199 	parameter.  Change all callers.  Test whether object is NULL
   11200 	before calling a method on it.
   11201 	(Symbol_table::report_resolve_problem): Add defined parameter.
   11202 	Change all callers.
   11203 	(Symbol_table::should_override_with_special): Likewise.
   11204 	* symtab.cc (Symbol_table::define_in_output_data): Add defined
   11205 	parameter.  Change all callers.
   11206 	(Symbol_table::do_define_in_output_data): Likewise.
   11207 	(Symbol_table::define_in_output_segment): Likewise.
   11208 	(Symbol_table::do_define_in_output_segment): Likewise.
   11209 	(Symbol_table::define_as_constant): Likewise.
   11210 	(Symbol_table::do_define_as_constant): Likewise.
   11211 	* script.h (class Symbol_assignment): Add is_defsym parameter to
   11212 	constructor; change all callers.
   11213 	* script.cc (Script_options::add_symbol_assignment): Add is_defsym
   11214 	parameter.  Change all callers.  Add is_defsym_ field.
   11215 	(class Parser_closure): Add parsing_defsym parameter to
   11216 	constructor; change all callers.  Add parsing_defsym accessor
   11217 	function.  Add parsing_defsym_ field.
   11218 
   11219 2009-12-28  Ian Lance Taylor  <iant (a] google.com>
   11220 
   11221 	* gold.cc (queue_middle_tasks): Fix formatting.
   11222 	* object.cc (Relobj::is_section_name_included): Likewise.
   11223 
   11224 2009-12-23  Ian Lance Taylor  <iant (a] google.com>
   11225 
   11226 	* i386.cc (Target_i386::do_calls_non_split): Recognize
   11227 	-fsplit-stack prologue for a function with a static chain.
   11228 	* x86_64.cc (Target_x86_64::do_calls_non_split): Recognize
   11229 	-fsplit-stack prologue when using %r11.
   11230 
   11231 2009-12-21  Sriraman Tallam  <tmsriram (a] google.com>
   11232 
   11233 	* options.cc (General_options::parse_version): Make -v continue and do
   11234 	the link like GNU ld does.
   11235 
   11236 2009-12-17  Rafael Avila de Espindola  <espindola (a] google.com>
   11237 
   11238 	* Makefile.am (CCFILES): Add timer.cc.
   11239 	(HFILES): Add timer.h.
   11240 	* configure.ac: Check for sysconf and times.
   11241 	* main.cc: include timer.h.
   11242 	(main): Use Timer instead of get_run_time.
   11243 	* timer.cc: New.
   11244 	* timer.h: New.
   11245 	* workqueue.cc: include timer.h.
   11246 	(Workqueue::find_and_run_task):
   11247 	Report user, sys and wall time.
   11248 	* Makefile.in: Regenerate.
   11249 	* config.in: Regenerate.
   11250 	* configure: Regenerate.
   11251 
   11252 2009-12-16  Doug Kwan  <dougkwan (a] google.com>
   11253 
   11254 	* arm.cc (Arm_relobj::scan_sections_for_stubs): Exclude ICF-eliminated
   11255 	sections.
   11256 	* object.cc (Sized_relobj::do_finalize_local_symbols): Handle
   11257 	relaxed input sections.
   11258 	* output.cc (Output_section::find_relaxed_input_section): Change
   11259 	return type to Output_relaxed_input_section pointer.  Adjust code
   11260 	for new type of relaxed_input_section_map_.
   11261 	* output.h (Output_section::find_relaxed_input_section): Change
   11262 	return type to Output_relaxed_input_section pointer.
   11263 	(Output_section::Output_relaxed_input_section_by_input_section_map):
   11264 	New type.
   11265 	(Output_section::relaxed_input_section_map_): Change type to
   11266 	Output_section::Output_relaxed_input_section_by_input_section_map.
   11267 	* symtab.cc (Symbol_table::compute_final_value): Handle relaxed
   11268 	input section.
   11269 
   11270 2009-12-15  Ian Lance Taylor  <iant (a] google.com>
   11271 
   11272 	* layout.cc (Layout::create_shstrtab): Only write out after input
   11273 	sections if we are compressing debug sections.
   11274 
   11275 2009-12-15  Ian Lance Taylor  <iant (a] google.com>
   11276 
   11277 	* archive.cc (Archive::add_symbols): Only look up a symbol without
   11278 	a version if there is, in fact, a version.
   11279 
   11280 2009-12-14  Ian Lance Taylor  <iant (a] google.com>
   11281 
   11282 	Revert -Wshadow changes, all changes from:
   11283 	2009-12-11  Doug Kwan  <dougkwan (a] google.com>
   11284 	2009-12-11  Nick Clifton  <nickc (a] redhat.com>
   11285 	* configure.ac: Remove -Wshadow when setting WARN_CXXFLAGS.
   11286 
   11287 2009-12-11  Doug Kwan  <dougkwan (a] google.com>
   11288 
   11289 	* arm.cc (Target_arm::do_finalize_sections): Fix build breakage
   11290 	due to -Wshadow.
   11291 	* attributes.cc (Object_attribute::size): Ditto.
   11292 	(Attributes_section_data::size): Ditto.
   11293 	(Attributes_section_data::Attributes_section_data): Ditto.
   11294 	(Output_attributes_section_data::do_write): Ditto.
   11295 	* attributes.h (Object_attribute::set_type): Ditto.
   11296 	* testsuite/tls_test_main.cc (safe_lock, safe_unlock): Ditto.
   11297 
   11298 2009-12-11  Nick Clifton  <nickc (a] redhat.com>
   11299 
   11300 	* archive.cc: Fix shadowed variable warnings.
   11301 	* arm.cc: Likewise.
   11302 	* compressed_output.cc: Likewise.
   11303 	* compressed_output.h: Likewise.
   11304 	* configure: Likewise.
   11305 	* dwarf_reader.cc: Likewise.
   11306 	* dynobj.cc: Likewise.
   11307 	* dynobj.h: Likewise.
   11308 	* ehframe.cc: Likewise.
   11309 	* ehframe.h: Likewise.
   11310 	* errors.cc: Likewise.
   11311 	* expression.cc: Likewise.
   11312 	* fileread.cc: Likewise.
   11313 	* fileread.h: Likewise.
   11314 	* freebsd.h: Likewise.
   11315 	* i386.cc: Likewise.
   11316 	* icf.cc: Likewise.
   11317 	* incremental.h: Likewise.
   11318 	* layout.cc: Likewise.
   11319 	* layout.h: Likewise.
   11320 	* mapfile.cc: Likewise.
   11321 	* merge.cc: Likewise.
   11322 	* merge.h: Likewise.
   11323 	* object.cc: Likewise.
   11324 	* object.h: Likewise.
   11325 	* options.h: Likewise.
   11326 	* output.cc: Likewise.
   11327 	* output.h: Likewise.
   11328 	* parameters.cc: Likewise.
   11329 	* plugin.cc: Likewise.
   11330 	* powerpc.cc: Likewise.
   11331 	* reduced_debug_output.cc: Likewise.
   11332 	* reduced_debug_output.h: Likewise.
   11333 	* reloc.cc: Likewise.
   11334 	* reloc.h: Likewise.
   11335 	* resolve.cc: Likewise.
   11336 	* script-sections.cc: Likewise.
   11337 	* script.cc: Likewise.
   11338 	* script.h: Likewise.
   11339 	* sparc.cc: Likewise.
   11340 	* symtab.cc: Likewise.
   11341 	* symtab.h: Likewise.
   11342 	* target-select.cc: Likewise.
   11343 	* target-select.h: Likewise.
   11344 	* token.h: Likewise.
   11345 	* workqueue.cc: Likewise.
   11346 	* workqueue.h: Likewise.
   11347 	* x86_64.cc: Likewise.
   11348 
   11349 2009-12-10  Doug Kwan  <dougkwan (a] google.com>
   11350 
   11351 	* arm.cc (attributes.h): New include.
   11352 	(Arm_relobj::Arm_relobj): Initialize attributes_section_data_.
   11353 	(Arm_relobj::~Arm_relobj): Delete object pointed by
   11354 	attributes_section_data_.
   11355 	(Arm_relobj::attributes_section_data): New method definition.
   11356 	(Arm_relobj::attributes_section_data_): New data member declaration.
   11357 	(Arm_dynobj::Arm_dynobj): Initialize attributes_section_data_.
   11358 	(Arm_dynobj::~Arm_dynobj): Delete object pointed by
   11359 	attributes_section_data_.
   11360 	(Arm_dynobj::attributes_section_data): New method definition.
   11361 	(Arm_dynobj::attributes_section_data_): New data member declaration.
   11362 	(Target_arm::Target_arm): Initialize attributes_section_data_.  Change
   11363 	initialization value of may_use_blx_ to false.
   11364 	(Target_arm::using_thumb2, Target_arm::using_thumb_only,
   11365 	Target_arm::may_use_arm_nop, Target_arm::may_use_thumb2_nop): Use
   11366 	object attributes to compute results instead of hard-coding.
   11367 	(Target_arm::do_attribute_arg_type, Target_arm::do_attributes_order,
   11368 	Target_arm::get_secondary_compatible_arch,
   11369 	Target_arm::set_secondary_compatible_arch
   11370 	Target_arm::tag_cpu_arch_combine, Target_arm::aeabi_enum_name,
   11371 	Target_arm::tag_cpu_name_value, Target_arm::merge_object_attributes):
   11372 	New method declarations.
   11373 	(Target_arm::get_aeabi_object_attribute): New method definition.
   11374 	(Target_arm::attributes_section_data_): New data member declaration.
   11375 	(read_arm_attributes_section): New template definition.
   11376 	(Arm_relobj::do_read_symbols): Read attributes section if it exists.
   11377 	(Arm_dynobj::do_read_symbols): Ditto.
   11378 	(Target_arm::do_finalize_sections): Merge attributes sections from
   11379 	input.  Check for BLX use after attributes section merging.
   11380 	Fix __exidx_start and __exidx_end visibility.  Create an
   11381 	.ARM.attributes section if necessary.
   11382 	(Target_arm::get_secondary_compatible_arch,
   11383 	Target_arm::set_secondary_compatible_arch,
   11384 	Target_arm::tag_cpu_arch_combine, Target_arm::aeabi_enum_name,
   11385 	Target_arm::tag_cpu_name_value, Target_arm::merge_object_attributes,
   11386 	Target_arm::do_attribute_arg_type, Target_arm::do_attributes_order):
   11387 	New method definitions.
   11388 
   11389 2009-12-09  Ian Lance Taylor  <iant (a] google.com>
   11390 
   11391 	* plugin.cc (Plugin::load): Don't cast from void* to a function
   11392 	pointer.
   11393 
   11394 2009-12-09  Ian Lance Taylor  <iant (a] google.com>
   11395 
   11396 	* dynobj.cc (Sized_dynobj::do_read_symbols): Clear version
   11397 	information fields.
   11398 
   11399 2009-12-09  H.J. Lu  <hongjiu.lu (a] intel.com>
   11400 
   11401 	* testsuite/Makefile.am (two_file_shared_1_pic_2_test_DEPENDENCIES):
   11402 	Replace two_file_shared_1.so with two_file_shared_2.so.
   11403 	* testsuite/Makefile.in: Regenerated.
   11404 
   11405 2009-12-08  Doug Kwan  <dougkwan (a] google.com>
   11406 
   11407 	* Makefile.am (CCFILES): Add attributes.cc and int_encoding.cc.
   11408 	(HFILES): Add attributes.h and int_encoding.h.
   11409 	* Makefile.in: Regenerate.
   11410 	* dwarf_reader.cc (read_unsigned_LEB_128, read_signed_LEB_128): Move
   11411 	function definitions to int_encoding.cc
   11412 	* dwarf_reader.h (read_unsigned_LEB_128, read_signed_LEB_128): Move
   11413 	prototypes to int_encoding.h
   11414 	* reduced_debug_output.cc (int_encoding.h): New include.
   11415 	(write_unsigned_LEB_128, get_length_as_unsigned_LEB_128): Move
   11416 	function definitions to int_encoding.cc
   11417 	(insert_into_vector, read_from_pointer): Move template definitions to
   11418 	int_encoding.h
   11419 	* attributes.cc: New file.
   11420 	* attributes.h: New file.
   11421 	* int_encoding.cc: New file.
   11422 	* int_encoding.h: New file.
   11423 
   11424 2009-12-07  Rafael Avila de Espindola  <espindola (a] google.com>
   11425 
   11426 	PR gold/11055
   11427 	* incremental-dump.cc (dump_incremental_inputs): New.
   11428 	(main): Use dump_incremental_inputs.
   11429 
   11430 2009-12-07  H.J. Lu  <hongjiu.lu (a] intel.com>
   11431 
   11432 	PR gold/10893
   11433 	* i386.cc (Target_i386::Scan::globa): Use is_func instead of
   11434 	checking elfcpp::STT_FUNC.
   11435 	(Target_i386::Relocate::relocate): Likewise.
   11436 	* x86_64.cc (Target_x86_64::Scan::global): Likewise.
   11437 
   11438 	* symtab.cc (Symbol_table::sized_write_symbol): Turn IFUNC
   11439 	symbols from shared libraries into normal FUNC symbols.
   11440 
   11441 	* symtab.h (Symbol): Add is_func and use it.
   11442 
   11443 2009-12-05  Doug Kwan  <dougkwan (a] google.com>
   11444 
   11445 	* arm.cc (Target_arm::arm_info): Initialize new fields
   11446 	attributes_section and attributes_vendor.
   11447 	* i386.cc (Target_i386::i386_info): Same.
   11448 	* object.cc (Sized_relobj::do_layout): Skip attribute section.
   11449 	* gold/powerpc.cc (Target_powerpc::powerpc_info): Initialize new
   11450 	fields attributes_section and attributes_vendor.
   11451 	* sparc.cc (Target_sparc::sparc_info): Same.
   11452 	* target.h (Target::attributes_section, Target::attributes_vendor,
   11453 	Target::is_attributes_section, Target::attribute_arg_type,
   11454 	Target::attributes_order): New method definitions.
   11455 	(Target::Target_info::attributes_section,
   11456 	Target::Target_info::attributes_vendor): New fields.
   11457 	(Target::do_attribute_arg_type, Target::do_attributes_order): New
   11458 	virtual method definitions.
   11459 	* x86_64.cc (Target_x86_64::x86_64_info): Initialize new fields
   11460 	attributes_section and attributes_vendor.
   11461 	* testsuite/testfile.cc (Target_test::test_target_info): Same.
   11462 
   11463 2009-12-05  Doug Kwan  <dougkwan (a] google.com>
   11464 
   11465 	* arm.cc: Update comments about interworking and stub generation.
   11466 	(Target_arm::Relocate::reloc_is_non_pic): Update list of relocations
   11467 	considered as non-PIC.
   11468 	(Arm_relocate_functions::base_abs): Fix formatting.
   11469 	(Arm_relocate_functions::got_prel): Fix comment.  Change interface
   11470 	of function to use GOT entry address instead of offset.
   11471 	(Target_arm::Scan::global): Issue an error if a symbol would need a
   11472 	PLT does not get one because it is untyped.  Remove code to create
   11473 	dynamic symbols for relative branches.
   11474 	(Target_arm::Relocate::relocate: Use 0 instead of false since function
   11475 	takes unsigned integer instead of boolean.
   11476 
   11477 2009-12-05  H.J. Lu  <hongjiu.lu (a] intel.com>
   11478 
   11479 	* testsuite/Makefile.am (constructor_test_LDADD): New. Empty.
   11480 	(two_file_test_LDADD): Likewise.
   11481 	(common_test_1_LDADD): Likewise.
   11482 	(exception_test_LDADD) Likewise.
   11483 	(weak_test_LDADD): Likewise.
   11484 	(many_sections_test_LDADD): Likewise.
   11485 	(initpri1_LDADD): Likewise.
   11486 	(script_test_1_LDADD): Likewise.
   11487 	(script_test_2_LDADD): Likewise.
   11488 	(justsyms_LDADD): Likewise.
   11489 	(binary_test_LDADD): Likewise.
   11490 	(large_LDADD): Likewise.
   11491 	* testsuite/Makefile.in: Regenerated.
   11492 
   11493 2009-12-04  H.J. Lu  <hongjiu.lu (a] intel.com>
   11494 
   11495 	* resolve.cc (symbol_to_bits): Treat STB_GNU_UNIQUE as STB_GLOBAL.
   11496 	(Symbol_table::override_with_special): Likewise.
   11497 	(Symbol_table::add_from_object): Likewise.
   11498 
   11499 2009-12-04  Rafael Avila de Espindola  <espindola (a] google.com>
   11500 
   11501 	* incremental.cc (Incremental_inputs::sized_create_inputs_section_data):
   11502 	Don't set the data_offset twice.
   11503 
   11504 2009-12-04  Rafael Avila de Espindola  <espindola (a] google.com>
   11505 
   11506 	* testsuite/Makefile.in: Regenerate.
   11507 
   11508 2009-12-03  Doug Kwan  <dougkwan (a] google.com>
   11509 
   11510 	* arm.cc: Remove comment about missing .ARM.exidx section symbols.
   11511 	(Target_arm::do_finalize_sections): Add parameter for symbol table
   11512 	pointer.  Add __exidx_start and __exidx_end symbols as appropriate.
   11513 	* i386.cc (Target_i386::do_finalize_sections): Add an additional
   11514 	parameter for symbol table pointer.
   11515 	* layout.cc (Layout::finalize): Call Target::finalize_sections with
   11516 	an additional parameter for a pointer to symbol table.
   11517 	* powerpc.cc (Target_powerpc::do_finalize_sections): Add an additional
   11518 	parameter for a symbol table pointer.
   11519 	* sparc.cc (Target_sparc::do_finalize_sections): Ditto.
   11520 	* target.h (Target::finalize_sections, Target::do_finalize_sections):
   11521 	Ditto.
   11522 	* x86_64.cc (Target_x86_64::do_finalize_sections): Add an additional
   11523 	parameter for a symbol table pointer.
   11524 
   11525 2009-12-03  Rafael Avila de Espindola  <espindola (a] google.com>
   11526 
   11527 	* incremental.cc (Incremental_inputs_header)
   11528 	(Incremental_inputs_header_write, Incremental_inputs_entry)
   11529 	(Incremental_inputs_entry_write): Move ...
   11530 	* incremental.h (Incremental_inputs_header)
   11531 	(Incremental_inputs_header_write, Incremental_inputs_entry)
   11532 	(Incremental_inputs_entry_write): here.
   11533 
   11534 2009-12-02  Rafael Avila de Espindola  <espindola (a] google.com>
   11535 
   11536 	* incremental.cc (make_sized_incremental_binary): Set the target.
   11537 	Error if it is incompatible.
   11538 	* output.h (Output_file): Add filename method.
   11539 
   11540 2009-12-02  Rafael Avila de Espindola  <espindola (a] google.com>
   11541 
   11542 	* incremental.cc (Incremental_inputs_entry): Remove unused argument
   11543 	from the get_* methods.
   11544 
   11545 2009-12-02  Rafael Avila de Espindola  <espindola (a] google.com>
   11546 
   11547 	* incremental-dump.cc (main): Check that the offeset of a script is 0.
   11548 	* incremental.cc (Incremental_inputs::sized_create_inputs_section_data):
   11549 	Write 0 for the data_offset of scripts.
   11550 
   11551 2009-12-02  Rafael Avila de Espindola  <espindola (a] google.com>
   11552 
   11553 	* testsuite/Makefile.am: Add the incremental_test.sh test.
   11554 	* testsuite/incremental_test.sh: New.
   11555 	* testsuite/incremental_test_1.c: New.
   11556 	* testsuite/incremental_test_2.c: New.
   11557 
   11558 2009-12-01  Rafael Avila de Espindola  <espindola (a] google.com>
   11559 
   11560 	* incremental-dump.cc (main): Fix typos.
   11561 
   11562 2009-11-27  Rafael Avila de Espindola  <espindola (a] google.com>
   11563 
   11564 	PR gold/11025
   11565 	* incremental-dump.cc (main): Use llu to print 64 bit values.
   11566 
   11567 2009-11-26  Per yvind Karlsen <peroyvind (a] mandriva.org>
   11568 	    H.J. Lu  <hongjiu.lu (a] intel.com>
   11569 
   11570 	* Makefile.am (incremental_dump_DEPENDENCIES): Add $(THREADSLIB)
   11571 	$(LIBDL).
   11572 	(incremental_dump_LDADD): Likewise.
   11573 	* Makefile.in: Regenerated.
   11574 
   11575 2009-11-25  Doug Kwan  <dougkwan (a] google.com>
   11576 
   11577 	Revert:
   11578 
   11579 	2009-11-25  Doug Kwan  <dougkwan (a] google.com>
   11580 
   11581 		* arm.cc (Target_arm::Target_arm): Move method definition
   11582 		outside of class definition.  Add code to handle
   11583 		--target1-rel, --target1-abs and --target2= options.
   11584 		(Target_arm::get_reloc_reloc_type): Change method to be
   11585 		non-static and const.
   11586 		(Target_arm::target1_is_rel_, Target_arm::target2_reloc_):
   11587 		New data member declaration.
   11588 		(Target_arm::Scan::local, Target_arm::Scan::global,
   11589 		Target_arm::Relocate::relocate,
   11590 		Target_arm::Relocatable_size_for_reloc::get_size_for_reloc):
   11591 		Adjust call to Target_arm::get_real_reloc_type.
   11592 		(Target_arm::get_real_reloc_type): Use command line options
   11593 		to determine real types of R_ARM_TARGET1 and R_ARM_TARGET2.
   11594 		* options.h (--target1-rel, --target1-abs, --target2): New
   11595 		ARM-only options.
   11596 
   11597 2009-11-25  Doug Kwan  <dougkwan (a] google.com>
   11598 
   11599 	* arm.cc (Target_arm::Target_arm): Move method definition outside of
   11600 	class definition.  Add code to handle --target1-rel, --target1-abs
   11601 	and --target2= options.
   11602 	(Target_arm::get_reloc_reloc_type): Change method to be non-static
   11603 	and const.
   11604 	(Target_arm::target1_is_rel_, Target_arm::target2_reloc_): New data
   11605 	member declaration.
   11606 	(Target_arm::Scan::local, Target_arm::Scan::global,
   11607 	Target_arm::Relocate::relocate,
   11608 	Target_arm::Relocatable_size_for_reloc::get_size_for_reloc): Adjust
   11609 	call to Target_arm::get_real_reloc_type.
   11610 	(Target_arm::get_real_reloc_type): Use command line options to
   11611 	determine real types of R_ARM_TARGET1 and R_ARM_TARGET2.
   11612 	* options.h (--target1-rel, --target1-abs, --target2): New ARM-only
   11613 	options.
   11614 
   11615 2009-11-25  Doug Kwan  <dougkwan (a] google.com>
   11616 
   11617 	* arm.cc (Target_arm::may_use_thumb2_nop): New method definition.
   11618 	(Arm_relocate_functions::thumb_branch_common): New metod declaration.
   11619 	(Arm_relocate_functions::abs12, Arm_relocate_functions::abs16): Fix
   11620 	formatting.
   11621 	(Arm_relocate_functions::thm_call): Replace body with a call to
   11622 	Arm_relocate_functions::thumb_branch_common.
   11623 	(Arm_relocate_functions::thm_jump24,
   11624 	Arm_relocate_functions::thm_xpc22): New method definitions.
   11625 	(Arm_relocate_functions::thumb_branch_common): New method definition.
   11626 	(Reloc_stub::stbu_type_for_reloc): Fix incorrect uses of bit-wise-or
   11627 	operator.
   11628 	(Target_arm::Relocate::relocate): Adjust call to thm_call.
   11629 	Add code to handle R_ARM_THM_XPC22 and R_ARM_THM_JUMP24.
   11630 
   11631 2009-11-24  Rafael Avila de Espindola  <espindola (a] google.com>
   11632 
   11633 	* Makefile.am: Build incremental-dump
   11634 	* Makefile.in: Regenerate.
   11635 	* incremental-dump.cc: New.
   11636 	* incremental.cc (Incremental_inputs_header_data,
   11637 	Incremental_inputs_entry_data): Move to incremental.h
   11638 	* incremental.h: (Incremental_inputs_header_data,
   11639 	Incremental_inputs_entry_data): Move from incremental.cc
   11640 
   11641 2009-11-24  Rafael Avila de Espindola  <espindola (a] google.com>
   11642 
   11643 	* incremental.cc (Incremental_inputs_header,
   11644 	Incremental_inputs_header_write, Incremental_inputs_entry,
   11645 	Incremental_inputs_entry_write): Add a typedef with the data type.
   11646 
   11647 2009-11-24  Rafael Avila de Espindola  <espindola (a] google.com>
   11648 
   11649 	* incremental.cc (Incremental_inputs_header,
   11650 	Incremental_inputs_header_write, Incremental_inputs_entry,
   11651 	Incremental_inputs_entry_write): Update comment about which
   11652 	type has the filed descriptions.
   11653 
   11654 2009-11-15  Doug Kwan  <dougkwan (a] google.com>
   11655 
   11656 	* arm.cc (Target_arm::may_use_arm_nop): New method definition.
   11657 	(Arm_relocate_functions::arm_branch_common): Change method defintion
   11658 	in class definition to a method declaration and update list of formal
   11659 	parameters.
   11660 	(Arm_relocate_functions::plt32, Arm_relocate_functions::call,
   11661 	Arm_relocation_functions::jump24): Adjust call to
   11662 	Arm_relocate_functions::arm_branch_common.  Update list of formal
   11663 	parameters.
   11664 	(Arm_relocate_functions::xpc25): New method definition.
   11665 	(Arm_relocate_functions::arm_branch_common): Move method defintion
   11666 	out from class definition.  Use stubs for mode-switching and extending
   11667 	branch ranges.
   11668 	(Target_arm::Relocate::relocate): Handle weakly-undefined symbols
   11669 	specially.  Change code to enable use of stubs in ARM branches.
   11670 
   11671 2009-11-10  Doug Kwan  <dougkwan (a] google.com>
   11672 
   11673 	* arm.cc (Arm_relobj::do_relocate_sections): Remove options parameter
   11674 	in method declaration.
   11675 	(Target_arm::relocate_stub): New method declaration.
   11676 	(Target_arm::default_target): Change to return a pointer instead of
   11677 	a const reference.
   11678 	(Reloc_stub::stub_type_for_reloc): Adjust for the change in
   11679 	Target_arm::default_target.
   11680 	(Arm_Relobj::do_relocate_sections): Remove options paramater in
   11681 	method definition.
   11682 	(Target_arm::relocate_section): Adjust view.
   11683 	(Target_arm::relocate_stub): New method definition.
   11684 
   11685 2009-11-10  Doug Kwan  <dougkwan (a] google.com>
   11686 
   11687 	* i386.cc (Target_i386::do_calls_non_split): Add a cast to avoid
   11688 	a format warning.
   11689 	* incremental.cc (open_incremental_binary): Initialized local
   11690 	variables to avoid warnings.
   11691 	* object.cc (make_elf_object): Ditto.
   11692 	* x86_64.cc (Target_x86_64::do_calls_non_split): Add a cast to avoid
   11693 	a format warning.
   11694 
   11695 009-11-09  H.J. Lu  <hongjiu.lu (a] intel.com>
   11696 
   11697 	PR gold/10930
   11698 	* testsuite/plugin_test.c: Include "config.h".
   11699 
   11700 2009-11-09  Doug Kwan  <dougkwan (a] google.com>
   11701 
   11702 	* arm.cc (Target_arm::fake_relnum_for_stubs): New constant.
   11703 	(arm_symbol_value): Remove.
   11704 	(Arm_relocate_functions::arm_branch_common,
   11705 	Arm_relocate_functions::abs8, Arm_relocate_functions::thm_abs5,
   11706 	Arm_relocate_functions::abs12, Arm_relocate_functions::abs16,
   11707 	Arm_relocate_functions::abs32, Arm_relocate_functions::rel32,
   11708 	Arm_relocate_functions::thm_call, Arm_relocate_functions::plt32,
   11709 	Arm_relocate_functions::call, Arm_relocate_functions::jump24,
   11710 	Arm_relocate_functions::prel31, Arm_relocate_functions::mov_abs_nc,
   11711 	Arm_relocate_functions::movt_abs, Arm_relocate_functions::movw_abs_nc,
   11712 	Arm_relocate_functions::thm_mobw_abs_nc,
   11713 	Arm_relocate_functions::thm_mov_abs,
   11714 	Arm_relocate_functions::movw_prel_nc,
   11715 	Arm_relocate_functions::thm_movt_abs,
   11716 	Arm_relocate_functions::movt_prel,
   11717 	Arm_relocate_functions::thm_movw_prel_nc,
   11718 	Arm_relocate_functions::thm_movt_prel): Adjust callers of the above.
   11719 	(Target_arm::Relocate::relocate): Only decompose address into two
   11720 	parts if relocation type uses the thumb-bit and pass the actual
   11721 	bit instead of a flag indicating that the thumb-bit is used.  Adjust
   11722 	calls to methods in Arm_relocate_functions for this change.
   11723 
   11724 2009-11-08  Ian Lance Taylor  <iant (a] google.com>
   11725 
   11726 	PR 10925
   11727 	* reloc.cc: Instantiate
   11728 	Sized_relobj::initialize_input_to_output_maps and
   11729 	Sized_relobj:free_input_to_output_maps.
   11730 
   11731 2009-11-06  Ian Lance Taylor  <iant (a] google.com>
   11732 
   11733 	PR 10876
   11734 	* defstd.cc (in_segment): Set only_if_ref true for "end".
   11735 
   11736 2009-11-06  Doug Kwan  <dougkwan (a] google.com>
   11737 
   11738 	* arm.cc (class Reloc_stub): Correct a comment.
   11739 	(Target_arm::Target_arm): Initialize arm_input_section_map_.
   11740 	(Target_arm::scan_section_for_stubs): New method declaration.
   11741 	(Target_arm::do_make_elf_object, Target_arm::do_make_output_section):
   11742 	Change methods from private to protected.
   11743 	(Target_arm::do_may_relax): New method definition.
   11744 	(Target_arm::do_relax, Target_arm::group_sections,
   11745 	Target_arm::scan_reloc_for_stub,
   11746 	Target_arm::scan_reloc_section_for_stubs): New method declarations.
   11747 	(Target_arm::arm_input_section_map_): New data member declaration.
   11748 	(Target_arm::scan_reloc_for_stub,
   11749 	Target_arm::scan_reloc_section_for_stubs,
   11750 	Target_arm::scan_section_for_stubs, Target_arm::group_sections,
   11751 	Target_arm::do_relax): New method definitions.
   11752 
   11753 2009-11-06  Mikolaj Zalewski  <mikolaj (a] google.com>
   11754 
   11755 	* configure.ac: Check for (struct stat)::st_mtim
   11756 	* fileread.cc (File_read::get_mtime): Use st_mtim if available.
   11757 	* config.in: Regenerate.
   11758 	* configure: Regenerate.
   11759 
   11760 2009-11-05  Ian Lance Taylor  <iant (a] google.com>
   11761 
   11762 	PR 10910
   11763 	* output.cc (Output_segment::add_output_section): Add missing
   11764 	return statement.
   11765 
   11766 2009-11-04  Ian Lance Taylor  <iant (a] google.com>
   11767 
   11768 	PR 10880
   11769 	* object.h (class Object): Add is_needed and set_is_needed
   11770 	methods.  Add is_needed_ field.  Make bool fields into bitfields.
   11771 	* symtab.cc (Symbol_table::set_dynsym_indexes): If a symbol is
   11772 	defined in a dynamic object and referenced by a regular object,
   11773 	set is_needed for the dynamic object.
   11774 	* layout.cc (Layout::finish_dynamic_section): Don't add DT_NEEDED
   11775 	if the file is marked with as_needed and it is not needed.
   11776 
   11777 2009-11-04  Ian Lance Taylor  <iant (a] google.com>
   11778 
   11779 	PR 10887
   11780 	* arm.cc (Target_arm::do_finalize_sections): Don't add dynamic
   11781 	tags if data is discarded by linker script.
   11782 	* i386.cc (Target_i386::do_finalize_sections): Likewise.
   11783 	* powerpc.cc (Target_powerpc::do_finalize_sections): Likewise.
   11784 	* sparc.cc (Target_sparc::do_finalize_sections): Likewise.
   11785 	* x86_64.cc (Target_x86_64::do_finalize_sections): Likewise.
   11786 
   11787 2009-11-04  Ian Lance Taylor  <iant (a] google.com>
   11788 
   11789 	* layout.cc (Layout::get_output_section): Add is_interp and
   11790 	is_dynamic_linker_section parameters.  Change all callers.
   11791 	(Layout::choose_output_section): Likewise.
   11792 	(Layout::make_output_section): Likewise.
   11793 	(Layout::add_output_section_data): Add is_dynamic_linker_section
   11794 	parameter.  Change all callers.
   11795 	* layout.h (class Layout): Update declarations.
   11796 	* output.h (class Output_section): Add is_interp, set_is_interp,
   11797 	is_dynamic_linker_section, set_is_dynamic_linker_section methods.
   11798 	Add is_interp_, is_dynamic_linker_section_ fields.  Change
   11799 	generate_code_fills_at_write_ to a bitfield.
   11800 	* output.cc (Output_section::Output_sections): Initialize new
   11801 	fields.
   11802 	(Output_segment::add_output_section): Add do_sort parameter.
   11803 	Change all callers.
   11804 
   11805 2009-11-03  Ian Lance Taylor  <iant (a] google.com>
   11806 
   11807 	PR 10860
   11808 	* options.h (class General_options): Add --warn-common.
   11809 	* resolve.cc (Symbol_table::resolve): Handle --warn-common when
   11810 	merging two common symbols.
   11811 	(Symbol_table::should_override): Handle --warn-common when merging
   11812 	a common symbol with a defined symbol.  Use report_resolve_problem
   11813 	for multiple definitions.
   11814 	(Symbol_table::report_resolve_problem): New function.
   11815 	* symtab.h (class Symbol_table): Declare report_resolve_problem.
   11816 
   11817 2009-11-03  Doug Kwan  <dougkwan (a] google.com>
   11818 
   11819 	* arm.cc (Target_arm::Target_arm): Initialize stub_tables_ and
   11820 	stub_factory_.
   11821 	(Target_arm::stub_factory): New method definition.
   11822 	(Target_arm::new_arm_input_section,
   11823 	Target_arm::find_arm_input_section, Target_arm::new_stub_table,
   11824 	Target_arm::reloc_uses_thumb_bit): New method declarations.
   11825 	(Target_arm::Stub_table_list, Target_arm::Arm_input_section_map):
   11826 	New type definitions.
   11827 	(Target_arm::stub_tables_, Target_arm::stub_factory_): New data
   11828 	member declarations.
   11829 	(Target_arm::reloc_uses_thumb_bit, Target_arm::new_arm_input_section,
   11830 	Target_arm::find_arm_input_section, Target_arm::new_stub_table):
   11831 	New method definitions.
   11832 
   11833 2009-11-03  Ian Lance Taylor  <iant (a] google.com>
   11834 
   11835 	* options.h (class General_options): Add --warn_constructors.
   11836 
   11837 2009-11-03  Ian Lance Taylor  <iant (a] google.com>
   11838 
   11839 	PR 10893
   11840 	* defstd.cc (in_section): Add entries for __rel_iplt_start,
   11841 	__rel_iplt_end, __rela_iplt_start, __rela_iplt_end, and __stack.
   11842 
   11843 2009-11-03  Ian Lance Taylor  <iant (a] google.com>
   11844 
   11845 	PR 10895
   11846 	* po/Make-in ($(srcdir)/$(PACKAGE).pot): Pass -C and
   11847 	--msgid-bugs-address.
   11848 	(install-pdf): New target.
   11849 	(install-data_yes): Look up one directory to find mkinstalldirs.
   11850 
   11851 2009-11-03  H.J. Lu  <hongjiu.lu (a] intel.com>
   11852 
   11853 	* po/Make-in (.po.gmo): Don't generate .gmo files in source
   11854 	tree.
   11855 
   11856 2009-10-30  Doug Kwan  <dougkwan (a] google.com>
   11857 
   11858 	* arm.cc (Stub_addend_reader): Fix bug in previouls check-in.
   11859 
   11860 2009-10-30  Doug Kwan  <dougkwan (a] google.com>
   11861 
   11862 	* arm.cc (Stub_addend_reader): New struct template definition
   11863 	and partial specializations.
   11864 	(Stub_addend_reader::operator()): New method definition for a
   11865 	partially specialized template.
   11866 
   11867 2009-10-30  Doug Kwan  <dougkwan (a] google.com>
   11868 
   11869 	* arm.cc (Arm_relobj::processor_specific_flags): New method
   11870 	definition.
   11871 	(Arm_relobj::do_read_symbols): New method declaration.
   11872 	(Arm_relobj::processor_specific_flags_): New data member declaration.
   11873 	(Arm_dynobj): New class definition.
   11874 	(Target_arm::do_finalize_sections): Add input_objects parameter.
   11875 	(Target_arm::do_adjust_elf_header): New method declaration.
   11876 	(Target_arm::are_eabi_versions_compatible,
   11877 	(Target_arm::merge_processor_specific_flags): New method declaration.
   11878 	(Target_arm::do_make_elf_object): New overloaded method definitions
   11879 	and declaration.
   11880 	(Arm_relobj::do_read_symbols): New method definition.
   11881 	(Arm_dynobj::do_read_symbols): Ditto.
   11882 	(Target_arm::do_finalize_sections): Add input_objects parameters.
   11883 	Merge processor-specific flags from all input objects.
   11884 	(Target_arm::are_eabi_versions_compatible,
   11885 	Target_arm::merge_processor_specific_flags,
   11886 	Target_arm::do_adjust_elf_header, Target_arm::do_make_elf_object):
   11887 	New method definitions.
   11888 	* i386.cc (Target_i386::do_finalize_sections): Add unnamed
   11889 	Input_objects pointer type parameter.
   11890 	* layout.cc (Layout::finalize): Pass input objects to target's.
   11891 	finalize_sections function.
   11892 	* output.cc (Output_file_header::do_sized_write): Set ELF file
   11893 	header's processor-specific flags.
   11894 	* powerpc.cc (Target_powerpc::do_finalize_sections): Add unnamed
   11895 	Input_objects pointer type parameter.
   11896 	* sparc.cc (Target_sparc::do_finalize_sections): Same.
   11897 	* target.h (Input_objects): New forward class declaration.
   11898 	(Target::processor_specific_flags,
   11899 	Target::are_processor_specific_flags_sect): New method definitions.
   11900 	(Target::finalize_sections): Add input_objects parameter.
   11901 	(Target::Target): Initialize processor_specific_flags_ and
   11902 	are_processor_specific_flags_set_.
   11903 	(Target::do_finalize_sections): Add unnamed Input_objects pointer type
   11904 	parameter.
   11905 	(Target::set_processor_specific_flags): New method definition.
   11906 	(Target::processor_specific_flags_,
   11907 	Target::are_processor_specific_flags_set_): New data member
   11908 	declarations.
   11909 	* x86_64.cc (Target_x86_64::do_finalize_sections): Add unnamed
   11910 	Input_objects pointer type parameter.
   11911 
   11912 2009-10-30  Doug Kwan  <dougkwan (a] google.com>
   11913 
   11914 	* arm.cc: Use Arm_address instead of elfcpp::Elf_types<32>::Elf_Addr.
   11915 
   11916 2009-10-28  Ian Lance Taylor  <iant (a] google.com>
   11917 
   11918 	* object.h (class Relobj): Drop options parameter from
   11919 	gc_process_relocs, scan_relocs, relocate, do_gc_process_relocs,
   11920 	do_scan_relocs, do_relocate.  Change all callers.
   11921 	(class Sized_relobj): Drop options parameters from
   11922 	do_gc_process_relocs, do_scan_relocs, do_relocate,
   11923 	do_relocate_sections, relocate_sections, emit_relocs_scan,
   11924 	emit_relocs_scan_reltype.  Change all callers.
   11925 	(struct Relocate_info): Remove options field and all references to
   11926 	it.
   11927 	* reloc.h (class Read_relocs): Remove options constructor
   11928 	parameter and options_ field.  Change all callers.
   11929 	(class Gc_process_relocs, class Scan_relocs): Likewise.
   11930 	(class Relocate_task): Likewise.
   11931 	* target-reloc.h (scan_relocs): Remove options parameter.  Change
   11932 	all callers.
   11933 	(scan_relocatable_relocs): Likewise.
   11934 	* target.h (class Sized_target): Remove options parameter from
   11935 	gc_process_relocs, scan_relocs, scan_relocatable_relocs.  Change
   11936 	all callers.
   11937 	* gc.h (gc_process_relocs): Remove options parameter.  Change all
   11938 	callers.
   11939 	* arm.cc: Update functions to remove options parameters.
   11940 	* i386.cc: Likewise.
   11941 	* powerpc.cc: Likewise.
   11942 	* sparc.cc: Likewise.
   11943 	* x86_64.cc: Likewise.
   11944 	* testsuite/testfile.cc: Likewise.
   11945 
   11946 2009-10-28  Doug Kwan  <dougkwan (a] google.com>
   11947 
   11948 	* arm.cc (Arm_relobj): New class definition.
   11949 	(Arm_relobj::scan_sections_for_stubs,
   11950 	Arm_relobj::do_count_local_symbols, Arm_relobj::do_relocate_sections):
   11951 	New method definitions.
   11952 
   11953 2009-10-28  Cary Coutant  <ccoutant (a] google.com>
   11954 
   11955 	* plugin.h (Plugin::Plugin): Initialize cleanup_done_.
   11956 	(Plugin::cleanup_done_): New member.
   11957 	(Plugin_manager::Plugin_manager): Remove cleanup_done_.
   11958 	(Plugin_manager::cleanup_done_): Remove.
   11959 	(Plugin_manager::add_input_file): Edit error message.
   11960 	* plugin.cc (Plugin::cleanup): Test and set cleanup_done_.
   11961 	(Plugin_manager::cleanup): Remove use of cleanup_done_.
   11962 
   11963 2009-10-27  Mikolaj Zalewski  <mikolajz (a] google.com>
   11964 
   11965 	* fileread.cc: (File_read::View::~View): Use the new
   11966 	data_ownership_ filed.
   11967 	(File_read::~File_read): Dispose the new whole_file_view_.
   11968 	(File_read::open): Mmap the whole file if needed.
   11969 	(File_read::open): Use whole_file_view_ instead of contents_.
   11970 	(File_read::find_view): Use whole_file_view_ if applicable.
   11971 	(File_read::do_read): Use whole_file_view_ instead of contents_.
   11972 	(File_read::make_view): Use whole_file_view_ instead of contents_,
   11973 	update File_read::View::View call.
   11974 	(File_read::find_or_make_view): Update File_read::View::View
   11975 	call.
   11976 	* fileread.h: (File_read::File_read): Initialize whole_file_view_,
   11977 	remove contents_
   11978 	(File_read::View::Data_ownership): New enum.
   11979 	(File_read::View::View): Replace bool mapped_ with Data_ownership
   11980 	argument.
   11981 	(File_read::View::mapped_): Remove (replaced by data_ownership_).
   11982 	(File_read::View::data_ownership_): New field.
   11983 	(File_read::contents_): Remove (replaced by whole_file_view_).
   11984 	(File_read::whole_file_view_): New field.
   11985 	* options.h (class General_options): Add --keep-files-mapped.
   11986 
   11987 2009-10-27  Cary Coutant  <ccoutant (a] google.com>
   11988 
   11989 	* symtab.cc (add_from_pluginobj): Pass correct value for is_ordinary.
   11990 	* testsuite/Makefile.am (plugin_test_5): New test case.
   11991 	* testsuite/Makefile.in: Regenerate.
   11992 
   11993 2009-10-25  Doug Kwan  <dougkwan (a] google.com>
   11994 
   11995 	* object.h (Sized_relobj::View_size, Sized_relobj::Views): Change
   11996 	from private to protected to allow access by child class.
   11997 	(Sized_relobj::do_relocate_sections): New method declaration.
   11998 	(Sized_relobj::relocate_sections): Virtualize.
   11999 	* reloc.cc (Sized_relobj::do_relocate_sections): Rename from
   12000 	Sized_relobj::relocate_sections.  Instantiate template explicitly
   12001 	for different target sizes and endianity.
   12002 
   12003 2009-10-24  Doug Kwan  <dougkwan (a] google.com>
   12004 
   12005 	* arm.cc (Arm_output_section, Arm_relobj): Forward class declarations.
   12006 	(Arm_input_section::as_arm_input_section): New method.
   12007 	(Arm_output_section): New class definition.
   12008 	(Arm_output_section::create_stub_group,
   12009 	Arm_output_section::group_sections): New method definitions.
   12010 
   12011 2009-10-22  Doug Kwan  <dougkwan (a] google.com>
   12012 
   12013 	* arm.cc (Arm_input_section): New class definition.
   12014 	(Arm_input_section::init, Arm_input_section:do_write,
   12015 	Arm_input_section::set_final_data_size,
   12016 	Arm_input_section::do_reset_address_and_file_offset): New method
   12017 	definitions.
   12018 
   12019 2009-10-21  Doug Kwan  <dougkwan (a] google.com>
   12020 
   12021 	* arm.cc (Stub_table, Arm_input_section): New forward class
   12022 	declarations.
   12023 	(Stub_table): New class defintion.
   12024 	(Stub_table::add_reloc_stub, Stub_table::relocate_stubs
   12025 	Stub_table::do_reset_address_and_file_offset, Stub_table::do_write):
   12026 	New method definition.
   12027 
   12028 2009-10-21  Doug Kwan  <dougkwan (a] google.com>
   12029 
   12030 	* arm.cc: Update copyright comments.
   12031 	(Target_arm): New forward class template declaration.
   12032 	(Arm_address): New type.
   12033 	(ARM_MAX_FWD_BRANCH_OFFSET, ARM_MAX_BWD_BRANCH_OFFSET,
   12034 	THM_MAX_FWD_BRANCH_OFFSET, THM_MAX_BWD_BRANCH_OFFSET,
   12035 	THM2_MAX_FWD_BRANCH_OFFSET, THM2_MAX_BWD_BRANCH_OFFSET): New
   12036 	constants.
   12037 	(Insn_template): Same.
   12038 	(DEF_STUBS): New macro.
   12039 	(Stub_type): New enum type.
   12040 	(Stub_template): New class definition.
   12041 	(Stub): Same.
   12042 	(Reloc_stub): Same.
   12043 	(Stub_factory): Same.
   12044 	(Target_arm::Target_arm): Initialize may_use_blx_ and
   12045 	should_force_pic_veneer_.
   12046 	(Target_arm::may_use_blx, Target_arm::set_may_use_blx,
   12047 	Target_arm::should_force_pic_veneer,
   12048 	Target_arm::set_should_force_pic_veneer, Target_arm::using_thumb2,
   12049 	Target_arm::using_thumb_only, Target_arm:;default_target): New
   12050 	method defintions.
   12051 	(Target_arm::may_use_blx_, Target_arm::should_force_pic_veneer_):
   12052 	New data member declarations.
   12053 	(Insn_template::size, Insn_template::alignment): New method defintions.
   12054 	(Stub_template::Stub_template): New method definition.
   12055 	(Reloc_stub::Key::name, Reloc_stub::stub_type_for_reloc,
   12056 	Reloc_stub::do_fixed_endian_write, Reloc_stub::do_write): Same.
   12057 	(Stub_factory::Stub_factory): New method definition.
   12058 	* gold.h (string_hash): New template.
   12059 	* output.h (Input_section_specifier::hash_value): Use
   12060 	gold::string_hash.
   12061 	(Input_section_specifier::string_hash): Remove.
   12062 	* stringpool.cc (Stringpool_template::string_hash): Use
   12063 	gold::string_hash.
   12064 
   12065 2009-10-20  Doug Kwan  <dougkwan (a] google.com>
   12066 
   12067 	* object.cc (Sized_relobj::do_finalize_local_symbols): Handle section
   12068 	symbols of relaxed input sections.
   12069 	* output.h (Output_section::find_relaxed_input_section): Make
   12070 	method public.
   12071 
   12072 2009-10-16  Doug Kwan  <dougkwan (a] google.com>
   12073 
   12074 	* dynobj.cc (Versions::Versions): Initialize version_script_.
   12075 	Only insert base version symbol definition for a shared object
   12076 	if version script defines any version versions.
   12077 	(Versions::define_base_version): New method definition.
   12078 	(Versions::add_def): Check that base version is not needed.
   12079 	(Versions::add_need): Define base version lazily.
   12080 	* dynobj.h (Versions::define_base_version): New method declaration.
   12081 	(Versions::needs_base_version_): New data member declaration.
   12082 	* testsuite/Makefile.am (check_SCRIPTS): Add no_version_test.sh
   12083 	(check_DATA): Add no_version_test.stdout.
   12084 	(libno_version_test.so, no_version_test.o no_version_test.stdout):
   12085 	New make rules.
   12086 	* testsuite/Makefile.in: Regenerate.
   12087 	* testsuite/no_version_test.c: New file.
   12088 	* testsuite/no_version_test.sh: Ditto.
   12089 
   12090 2009-10-16  Doug Kwan  <dougkwan (a] google.com>
   12091 
   12092 	* expression.cc (class Segment_start_expression): New class definition.
   12093 	(Segment_start_expression::value): New method definition.
   12094 	(script_exp_function_segment_start): Return a new
   12095 	Segment_start_expression.
   12096 	* gold/script-c.h (script_saw_segment_start_expression): New function
   12097 	prototype.
   12098 	* script-sections.cc (Script_sections::Script_sections): Initialize
   12099 	SAW_SEGMENT_START_EXPRESSION_ to false.
   12100 	(Script_sections::set_section_addresses): Use -Ttext, -Tdata
   12101 	and -Tbbs options to specify section addresses if given in
   12102 	command line and no SEGMENT_START expression is seen in a script.
   12103 	* script-sections.h (Script_sections::saw_segment_start_expression,
   12104 	Script_sections::set_saw_segment_start_expression): New method
   12105 	definition.
   12106 	(Script_sections::saw_segment_start_expression_): New data member
   12107 	declaration.
   12108 	* script.cc (script_saw_segment_start_expression): New function.
   12109 	* yyscript.y (SEGMENT_START): Call script_saw_segment_start_expression.
   12110 	* testsuite/Makefile.am (check_SCRIPTS): Add script_test_6.sh,
   12111 	script_test_7.sh and script_test_8.sh.
   12112 	(check_DATA): Add script_test_6.stdout, script_test_7.stdout and
   12113 	script_test_8.stdout.
   12114 	(MOSTLYCLEANFILES): Add script_test_6, script_test_7 and script_test_8.
   12115 	(script_test_6, script_test_6.stdout, script_test_7,
   12116 	script_test_7.stdout, script_test_8, script_test_8.stdout): New rules.
   12117 	* Makefile.in: Regenerate.
   12118 	* testsuite/script_test_6.sh: New file.
   12119 	* testsuite/script_test_6.t: Same.
   12120 	* testsuite/script_test_7.sh: Same.
   12121 	* testsuite/script_test_7.t: Same.
   12122 	* testsuite/script_test_8.sh: Same.
   12123 
   12124 2009-10-16  Doug Kwan  <dougkwan (a] google.com>
   12125 
   12126 	* output.cc (Output_segment::set_section_list_address): Cast
   12127 	expressions to unsigned long long type to avoid format warnings.
   12128 
   12129 2009-10-15  Ian Lance Taylor  <iant (a] google.com>
   12130 
   12131 	* script.cc (Script_options::add_symbol_assignment): Always add a
   12132 	dot assignment to script_sections_.
   12133 	* script-sections.cc (Script_sections::add_dot_assignment):
   12134 	Initialize if necessary.
   12135 
   12136 	* layout.cc (Layout::relaxation_loop_body): Don't crash if we see
   12137 	program headers with no load segment if there is a linker script.
   12138 
   12139 	* layout.cc (Layout::set_segment_offsets): Align the file offset
   12140 	to the segment aligment for -N or -n with no load segment.
   12141 	* output.cc (Output_segment::add_output_section): Don't crash if
   12142 	the first section is a TLS section.
   12143 	(Output_segment::set_section_list_addresses): Print an error
   12144 	message if the address moves backward in a linker script.
   12145 	* script-sections.cc
   12146 	(Output_section_element_input::set_section_addresses): Don't
   12147 	increase *dot_value for a SHF_TLS/SHT_NOBITS section.
   12148 	(Orphan_output_section::set_section_addresses): Likewise.
   12149 
   12150 2009-10-15  Doug Kwan  <dougkwan (a] google.com>
   12151 
   12152 	* layout.cc (Layout::finish_dynamic_section): Generate tags
   12153 	DT_FINI_ARRAY, DT_FINI_ARRAYSZ, DT_INIT_ARRAY, DT_INIT_ARRAYSZ,
   12154 	DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ as needed. If -Bsymbolic is
   12155 	used, add DT_SYMBOLIC and set DF_SYMBOLIC in DT_FLAGS.
   12156 
   12157 2009-10-14  Ian Lance Taylor  <iant (a] google.com>
   12158 
   12159 	* object.h (class Relocate_info): Add reloc_shdr and data_shdr
   12160 	fields.
   12161 	* object.cc (Sized_relobj::relocate_sections): Set reloc_shdr and
   12162 	data_shdr fields of relinfo.
   12163 	* i386.cc (class Target_i386::Relocate): Remove ldo_addrs_ field.
   12164 	(Target_i386::Relocate::relocate_tls): Don't call fix_up_ldo.  For
   12165 	R_386_TLS_LDO_32, adjust based on section flags.
   12166 	(Target_i386::Relocate::fix_up_ldo): Remove.
   12167 
   12168 2009-10-13  Ian Lance Taylor  <iant (a] google.com>
   12169 
   12170 	Add support for -pie.
   12171 	* options.h (class General_options): Add -pie and
   12172 	--pic-executable.
   12173 	(General_options::output_is_position_independent): Test -pie.
   12174 	(General_options::output_is_executable): Return true if not shared
   12175 	and not relocatable.
   12176 	(General_options::output_is_pie): Remove.
   12177 	* options.cc (General_options::finalize): Reject incompatible uses
   12178 	of -pie.
   12179 	* gold.cc (queue_middle_tasks): A -pie link is not static.
   12180 	* symtab.h (Symbol::needs_plt_entry): Return false if -pie.
   12181 	* symtab.cc (Symbol::final_value_is_known): Return false if
   12182 	output_is_position_independent.
   12183 	* layout.cc (Layout::set_segment_offsets): Start at address 0 if
   12184 	output_is_position_independent.
   12185 	* output.cc (Output_file_header::do_sized_write): Use ET_DYN if
   12186 	output_is_position_independent.
   12187 	* i386.cc (Output_data_plt_i386::do_write): Use the PIC PLT if
   12188 	output_is_position_independent.
   12189 	* testsuite/Makefile.am (check_PROGRAMS): Add basic_pie_test and
   12190 	two_file_pie_test.
   12191 	(basic_pie_test.o, basic_pie_test): New targets.
   12192 	(two_file_test_1_pie.o, two_file_test_1b_pie.o): New targets.
   12193 	(two_file_test_2_pie.o, two_file_test_main_pie.o): New targets.
   12194 	(two_file_pie_test): New target.
   12195 	* testsuite/Makefile.in: Rebuild.
   12196 	* README: Remove note saying that -pie is not supported.
   12197 
   12198 2009-10-13  Bernhard Reutner-Fischer  <aldot (a] gcc.gnu.org>
   12199 
   12200 	* options.h (class General_options): Add -init and -fini.
   12201 	* layout.cc (Layout::finish_dynamic_section): Emit
   12202 	given init and fini functions.
   12203 
   12204 2009-10-13  Sriraman Tallam  <tmsriram (a] google.com>
   12205 
   12206 	* gc.h (gc_process_relocs): Check if icf is enabled using new
   12207 	function.
   12208 	* gold.cc (queue_initial_tasks): Likewise.
   12209 	(queue_middle_tasks): Likewise.
   12210 	* object.cc (do_layout): Likewise.
   12211 	* symtab.cc (is_section_folded): Likewise.
   12212 	* main.cc (main): Likewise.
   12213 	* reloc.cc (Read_relocs::run): Likewise.
   12214 	(Sized_relobj::do_scan_relocs): Likewise.
   12215 	* icf.cc (is_function_ctor_or_dtor): New function.
   12216 	(Icf::find_identical_sections): Check if function is ctor or dtor when
   12217 	safe icf is chosen.
   12218 	* options.h (General_options::icf): Change option to be an enum.
   12219 	(Icf_status): New enum.
   12220 	(icf_enabled): New method.
   12221 	(icf_safe_folding): New method.
   12222 	(set_icf_status): New method.
   12223 	(icf_status_): New variable.
   12224 	* (options.cc) (General_options::finalize): Set icf_status_.
   12225 	* testsuite/Makefile.am: Add commands to build icf_safe_test. Modify
   12226 	icf_test and icf_keep_unique_test to use the --icf enum flag.
   12227 	* testsuite/icf_safe_test.sh: New file.
   12228 	* testsuite/icf_safe_test.cc: New file.
   12229 
   12230 2009-10-12  Sriraman Tallam  <tmsriram (a] google.com>
   12231 
   12232 	* symtab.h: Check for GOLD_SYMTAB_H before header includes. Remove
   12233 	includes to gc.h and icf.h.
   12234 	* arm.cc: Include gc.h.
   12235 	* gold.cc: Likewise.
   12236 	* i386.cc: Likewise.
   12237 	* powerpc.cc: Likewise.
   12238 	* sparc.cc: Likewise.
   12239 	* x86_64.cc: Likewise.
   12240 	* gc.h: Include icf.h.
   12241 
   12242 2009-10-11  Ian Lance Taylor  <iant (a] google.com>
   12243 
   12244 	* plugin.cc: Include "gold.h" before other header files.
   12245 
   12246 2009-10-10  Chris Demetriou  <cgd (a] google.com>
   12247 
   12248 	* options.h (Input_file_argument::Input_file_type): New enum.
   12249 	(Input_file_argument::is_lib_): Replace with...
   12250 	(Input_file_argument::type_): New member.
   12251 	(Input_file_argument::Input_file_argument): Take Input_file_type
   12252 	'type' rather than boolean 'is_lib' as second argument.
   12253 	(Input_file_argument::is_lib): Use type_.
   12254 	(Input_file_argument::is_searched_file): New function.
   12255 	(Input_file_argument::may_need_search): Handle is_searched_file.
   12256 	* options.cc (General_options::parse_library): Support -l:filename.
   12257 	(General_options::parse_just_symbols): Update for Input_file_argument
   12258 	changes.
   12259 	(Command_line::process): Likewise.
   12260 	* archive.cc (Archive::get_file_and_offset): Likewise.
   12261 	* plugin.cc (Plugin_manager::release_input_file): Likewise.
   12262 	* script.cc (read_script_file, script_add_file): Likewise.
   12263 	* fileread.cc (Input_file::Input_file): Likewise.
   12264 	(Input_file::will_search_for): Handle is_searched_file.
   12265 	(Input_file::open): Likewise.
   12266 	* readsyms.cc (Read_symbols::get_name): Likewise.
   12267 	* testsuite/Makefile.am (searched_file_test): New test.
   12268 	* testsuite/Makefile.in: Regenerate.
   12269 	* testsuite/searched_file_test.cc: New file.
   12270 	* testsuite/searched_file_test_lib.cc: New file.
   12271 
   12272 2009-10-09  Andrew Pinski  <andrew_pinski (a] playstation.sony.com>
   12273 	    Ian Lance Taylor  <iant (a] google.com>
   12274 
   12275 	* descriptor.cc: Include <cstdio> and "binary-io.h".
   12276 	(Descriptors::open): Open the files in binary mode always.
   12277 	* script.cc (Lex::get_token): Treat \r as whitespace.
   12278 
   12279 2009-10-09  Ian Lance Taylor  <iant (a] google.com>
   12280 
   12281 	* testsuite/retain_symbols_file_test.sh: Don't test for __tcf_0.
   12282 
   12283 2009-10-09  Andrew Pinski  <andrew_pinski (a] playstation.sony.com>
   12284 	    Ian Lance Taylor  <iant (a] google.com>
   12285 
   12286 	* configure.ac: Check for readv function also.
   12287 	* fileread.cc (readv): Define if not HAVE_READV.
   12288 	* fileread.h (File_read:: max_readv_entries): Set to 1 if readv
   12289 	does not exist.
   12290 	* config.in: Regenerate.
   12291 	* configure: Regenerate.
   12292 
   12293 2009-10-09  Doug Kwan  <dougkwan (a] google.com>
   12294 
   12295 	* layout.cc (Layout::make_output_section): Call target hook to make
   12296 	ordinary output section.
   12297 	(Layout::finalize): Adjust parameter list of call the
   12298 	Target::may_relax().
   12299 	* layout.h (class Layout::section_list): New method.
   12300 	* merge.h (Output_merge_base::entsize): Change visibility to public.
   12301 	(Output_merge_base::is_string, Output_merge_base::do_is_string):
   12302 	New methods.
   12303 	(Output_merge_string::do_is_string): New method.
   12304 	* object.cc (Sized_relobj::do_setup): renamed from
   12305 	Sized_relobj::set_up.
   12306 	* object.h (Sized_relobj::adjust_shndx,
   12307 	Sized_relobj::initializ_input_to_output_maps,
   12308 	Sized_relobj::free_input_to_output_maps): Change visibilities to
   12309 	protected.
   12310 	(Sized_relobj::setup): Virtualize.
   12311 	(Sized_relobj::do_setup): New method declaration.
   12312 	(Sized_relobj::invalidate_section_offset,
   12313 	Sized_relobj::do_invalidate_section_offset): New method decfinitions.
   12314 	(Sized_relobj::elf_file, Sized_relobj::local_values): New methods.
   12315 	* options.cc (parse_int): New function.
   12316 	* options.h (parse_int): New declaration.
   12317 	(DEFINE_int): New macro.
   12318 	(stub_group_size): New option.
   12319 	* output.cc (Output_section::Output_section): Initialize memebers
   12320 	merge_section_map_, merge_section_by_properties_map_,
   12321 	relaxed_input_section_map_, is_relaxed_input_section_map_valid_.
   12322 	(Output_section::add_input_section): Handled deferred code-fill
   12323 	generation and remove an old comment.
   12324 	(Output_section::add_relaxed_input_section): New method definition.
   12325 	(Output_section::add_merge_input_section): Use merge section by
   12326 	properties map to speed to search.  Update merge section maps
   12327 	as appropriate.
   12328 	(Output_section::build_relaxation_map): New method definition.
   12329 	(Output_section::convert_input_sections_in_list_to_relaxed_sections):
   12330 	Same.
   12331 	(Output_section::relax_input_section): Renamed to
   12332 	Output_section::convert_input_sections_to_relaxed_sections and change
   12333 	interface to take a vector of pointers to relaxed sections.
   12334 	(Output_section::find_merge_section,
   12335 	Output_section::find_relaxed_input_section): New method definitions.
   12336 	(Output_section::is_input_address_mapped,
   12337 	Output_section::output_offset, Output_section::output_address):
   12338 	Use output section data maps to speed up searching.
   12339 	(Output_section::find_starting_output_address): Add comments.
   12340 	(Output_section::do_write,
   12341 	Output_section::write_to_postprocessing_buffer): Do code-fill
   12342 	generation as appropriate.
   12343 	(Output_section::get_input_sections): Invalidate relaxed input section
   12344 	map.
   12345 	(Output_section::restore_states): Adjust type of checkpoint .
   12346 	Invalidate relaxed input section map.
   12347 	* output.h (Output_merge_base): New class declaration.
   12348 	(Input_section_specifier): New class defintion.
   12349 	(class Output_relaxed_input_section) Change base class to
   12350 	Output_section_data_build.
   12351 	(Output_relaxed_input_section::Output_relaxed_input_section): Adjust
   12352 	base class initializer.
   12353 	(Output_section::add_relaxed_input_section): New method declaration.
   12354 	(Output_section::Input_section): Change visibility to protected.
   12355 	(Output_section::Input_section::relobj,
   12356 	Output_section::Input_section::shndx): Handle relaxed input sections.
   12357 	Output_section::input_sections) Change visibility to protected.  Also
   12358 	define overload to return a non-const pointer.
   12359 	(Output_section::Merge_section_properties): New class defintion.
   12360 	(Output_section::Merge_section_by_properties_map,
   12361 	Output_section::Output_section_data_by_input_section_map,
   12362 	Output_section::Relaxation_map): New types.
   12363 	(Output_section::relax_input_section): Rename method to
   12364 	Output_section::convert_input_sections_to_relaxed_sections and change
   12365 	interface to take a vector of relaxed section pointers.
   12366 	(Output_section::find_merge_section,
   12367 	Output_section::find_relaxed_input_section,
   12368 	Output_section::build_relaxation_map,
   12369 	Output_section::convert_input_sections_in_list_to_relaxed_sections):
   12370 	New method declarations.
   12371 	(Output_section::merge_section_map_
   12372 	Output_section::merge_section_by_properties_map_,
   12373 	Output_section::relaxed_input_section_map_,
   12374 	Output_section::is_relaxed_input_section_map_valid_,
   12375 	Output_section::generate_code_fills_at_write_): New data members.
   12376 	* script-sections.cc
   12377 	(Output_section_element_input::set_section_addresses): Call
   12378 	current_data_size and addralign methods of relaxed input sections.
   12379 	(Orphan_output_section::set_section_addresses): Call current_data_size
   12380 	and addralign methods of relaxed input sections.
   12381 	* symtab.cc (Symbol_table::compute_final_value): Extract template
   12382 	from the body of Symbol_table::sized_finalize_symbol.
   12383 	(Symbol_table::sized_finalized_symbol): Call
   12384 	Symbol_table::compute_final_value.
   12385 	* symtab.h (Symbol_table::Compute_final_value_status): New enum type.
   12386 	(Symbol_table::compute_final_value): New templated method declaration.
   12387 	* target.cc (Target::do_make_output_section): New method defintion.
   12388 	* target.h (Target::make_output_section): New method declaration.
   12389 	(Target::relax): Add more parameters for input objects, symbol table
   12390 	and layout.  Adjust call to do_relax.
   12391 	(Target::do_make_output_section): New method declaration.
   12392 	(Target::do_relax): Add parameters for input objects, symbol table
   12393 	and layout.
   12394 
   12395 2009-10-09  Andrew Pinski  <andrew_pinski (a] playstation.sony.com>
   12396 
   12397 	* pread.c: Include stdio.h.
   12398 
   12399 2009-10-09  Andrew Pinski  <andrew_pinski (a] playstation.sony.com>
   12400 
   12401 	* plugin.cc: Don't include dlfcn.h when ENABLE_PLUGINS is not
   12402 	defined.
   12403 
   12404 2009-10-09  Andrew Pinski  <andrew_pinski (a] playstation.sony.com>
   12405 
   12406 	* dwarf_reader.cc (Sized_dwarf_line_info::Sized_dwarf_line_info):
   12407 	Change read_shndx type to unsigned int.
   12408 	(Sized_dwarf_line_info::read_lines): Change shndx type to unsigned
   12409 	int.
   12410 	(Sized_dwarf_line_info::read_line_mappings): Likewise.
   12411 	* dwarf_reader.h (Sized_dwarf_line_info::Sized_dwarf_line_info):
   12412 	Change read_shndx type to unsigned int.
   12413 	(Sized_dwarf_line_info::read_lines): Change shndx type to unsigned
   12414 	int.
   12415 	(Sized_dwarf_line_info::read_line_mappings): Likewise.
   12416 	* layout.cc (Layout::create_symtab_sections): Cast the result of
   12417 	local_symcount * symsize to off_t in the gold_assert.
   12418 
   12419 2009-10-09  Viktor Kutuzov  <vkutuzov (a] accesssoftek.com>
   12420 
   12421 	* arm.cc (Target_arm::relocate::reloc_is_non_pic): Return true for
   12422 	R_ARM_THM_ABS5, R_ARM_ABS8, R_ARM_ABS12, R_ARM_ABS16,
   12423 	R_ARM_BASE_ABS.
   12424 	(Arm_relocate_functions::abs8): Remove has_thumb_bit parameter.
   12425 	(Arm_relocate_functions::thm_abs5): New function.
   12426 	(Arm_relocate_functions::abs12): New function.
   12427 	(Arm_relocate_functions::abs16): New function.
   12428 	(Arm_relocate_functions::base_abs): New function.
   12429 	(Scan::check_non_pic): Handle R_ARM_ABS32_NOI.
   12430 	(Scan::local): Remove special handling of R_ARM_ABS8.  Handle
   12431 	R_ARM_ABS32_NOI, R_ARM_THM_ABS5, R_ARM_ABS12, R_ARM_ABS16, and
   12432 	R_ARM_BASE_ABS.
   12433 	(Scan::global): Likewise.
   12434 	(Relocate::relocate): Handle R_ARM_ABS12, R_ARM_ABS16,
   12435 	R_ARM_ABS32_NOI, R_ARM_THM_ABS5, and R_ARM_BASE_ABS.
   12436 	(Relocatable_size_for_reloc::get_size_for_reloc): Handle
   12437 	R_ARM_ABS16, R_ARM_THM_ABS5, R_ARM_ABS32_NOI, R_ARM_ABS12, and
   12438 	R_ARM_BASE_ABS.
   12439 
   12440 2009-10-09  Viktor Kutuzov  <vkutuzov (a] accesssoftek.com>
   12441 
   12442 	* arm.cc (Arm_relocate_functions::movw_prel_nc): New function.
   12443 	(Arm_relocate_functions::movt_prel): New function.
   12444 	(Arm_relocate_functions::thm_movw_prel_nc): New function.
   12445 	(Arm_relocate_functions::thm_movt_prel): New function.
   12446 	(Scan::local): Handle R_ARM_MOVW_PREL_NC, R_ARM_MOVT_PREL,
   12447 	R_ARM_THM_MOVW_PREL_NC, and R_ARM_THM_MOVT_PREL.
   12448 	(Scan::global, Relocate::relocate): Likewise.
   12449 	(Relocatable_size_for_reloc::get_size_for_reloc): Likewise.
   12450 
   12451 2009-10-09  Mikolaj Zalewski  <mikolajz (a] google.com>
   12452 
   12453 	* gold.cc: (queue_initial_tasks): Pass incremental_inputs to
   12454 	Incremental_checker.
   12455 	* incremental.cc: (INCREMENTAL_LINK_VERSION): Change type to
   12456 	unsigned int.
   12457 	(class Incremental_inputs_header): New class.
   12458 	(Incremental_inputs_header_writer): Edit comment.
   12459 	(Incremental_inputs_entry): New class.
   12460 	(Incremental_inputs_entry_writer): Edit comment.
   12461 	(Sized_incremental_binary::do_find_incremental_inputs_section):
   12462 	Add *strtab_shndx parameter, fill it.
   12463 	(Sized_incremental_binary::do_check_inputs): New method.
   12464 	(Incremental_checker::can_incrementally_link_output_file): Use
   12465 	Sized_incremental_binary::check_inputs.
   12466 	(Incremental_inputs::report_command_line): Save command line in
   12467 	command_line_.
   12468 	* incremental.h:
   12469 	(Incremental_binary::find_incremental_inputs_section): New
   12470 	method.
   12471 	(Incremental_binary::do_find_incremental_inputs_section): Add
   12472 	strtab_shndx parameter.
   12473 	(Incremental_binary::do_check_inputs): New pure virtual method.
   12474 	(Sized_incremental_binary::do_check_inputs): Declare.
   12475 	(Incremental_checker::Incremental_checker): Add incremental_inputs
   12476 	parameter, use it to initialize incremental_inputs_.
   12477 	(Incremental_checker::incremental_inputs_): New field.
   12478 	(Incremental_checker::command_line): New method.
   12479 	(Incremental_checker::inputs): New method.
   12480 	(Incremental_checker::command_line_): New field.
   12481 
   12482 2009-10-09  Mikolaj Zalewski  <mikolajz (a] google.com>
   12483 
   12484 	* incremental.cc: Include <cstdarg> and "target-select.h".
   12485 	(vexplain_no_incremental): New function.
   12486 	(explain_no_incremental): New function.
   12487 	(Incremental_binary::error): New method.
   12488 	(Sized_incremental_binary::do_find_incremental_inputs_section): New
   12489 	method.
   12490 	(make_sized_incremental_binary): New function.
   12491 	(open_incremental_binary): New function.
   12492 	(can_incrementally_link_file): Add checks if output is ELF and has
   12493 	inputs section.
   12494 	* incremental.h: Include "elfcpp_file.h" and "output.h".
   12495 	(Incremental_binary): New class.
   12496 	(Sized_incremental_binary): New class.
   12497 	(open_incremental_binary): Declare.
   12498 	* object.cc (is_elf_object): Use
   12499 	elfcpp::Elf_recognizer::is_elf_file.
   12500 	(make_elf_object): Use elfcpp::Elf_recognizer::is_valid_header.
   12501 	* output.h (Output_file::filesize): New method.
   12502 
   12503 2009-10-07  Viktor Kutuzov  <vkutuzov (a] accesssoftek.com>
   12504 
   12505 	* arm.cc (Arm_relocate_functions::extract_arm_movw_movt_addend):
   12506 	New function.
   12507 	(Arm_relocate_functions::insert_val_arm_movw_movt): New function.
   12508 	(Arm_relocate_functions::extract_thumb_movw_movt_addend): New
   12509 	function.
   12510 	(Arm_relocate_functions::insert_val_thumb_movw_movt): New
   12511 	function.
   12512 	(Arm_relocate_functions::movw_abs_nc): New function.
   12513 	(Arm_relocate_functions::movt_abs): New function.
   12514 	(Arm_relocate_functions::thm_movw_abs_nc): New function.
   12515 	(Arm_relocate_functions::thm_movt_abs): New function.
   12516 	(Scan::local): Handle R_ARM_MOVW_ABS_NC, R_ARM_MOVT_ABS,
   12517 	R_ARM_THM_MOVW_ABS_NC, R_ARM_THM_MOVT_ABS.
   12518 	(Scan::global): Likewise.
   12519 	(Relocate::relocate): Likewise.
   12520 	(Relocatable_size_for_reloc::get_size_for_reloc): Likewise.
   12521 
   12522 2009-10-07  Viktor Kutuzov  <vkutuzov (a] accesssoftek.com>
   12523 
   12524 	* arm.cc (Arm_relocate_functions::got_prel) New function.
   12525 	(Scan::local, Scan::global): Handle R_ARM_GOT_PREL.
   12526 	(Relocate::relocate): Likewise.
   12527 	(Relocatable_size_for_reloc::get_size_for_reloc): Likewise.
   12528 
   12529 2009-10-06  Ian Lance Taylor  <iant (a] google.com>
   12530 
   12531 	* options.h (class General_options): Define
   12532 	split_stack_adjust_size parameter.
   12533 	* object.h (class Object): Add uses_split_stack_ and
   12534 	has_no_split_stack_ fields.  Add uses_split_stack and
   12535 	has_no_split_stack accessor functions.  Declare
   12536 	handle_split_stack_section.
   12537 	(class Reloc_symbol_changes): Define.
   12538 	(class Sized_relobj): Define Function_offsets.  Declare
   12539 	split_stack_adjust, split_stack_adjust_reltype, and
   12540 	find_functions.
   12541 	* object.cc (Object::handle_split_stack_section): New function.
   12542 	(Sized_relobj::do_layout): Call handle_split_stack_section.
   12543 	* dynobj.cc (Sized_dynobj::do_layout): Call
   12544 	handle_split_stack_section.
   12545 	* reloc.cc (Sized_relobj::relocate_sections): Call
   12546 	split_stack_adjust for executable sections in split_stack
   12547 	objects.  Pass reloc_map to relocate_section.
   12548 	(Sized_relobj::split_stack_adjust): New function.
   12549 	(Sized_relobj::split_stack_adjust_reltype): New function.
   12550 	(Sized_relobj::find_functions): New function.
   12551 	* target-reloc.h: Include "object.h".
   12552 	(relocate_section): Add reloc_symbol_changes parameter.  Change
   12553 	all callers.
   12554 	* target.h (class Target): Add calls_non_split method.  Declare
   12555 	do_calls_non_split virtual method.  Declare match_view and
   12556 	set_view_to_nop.
   12557 	* target.cc: Include "elfcpp.h".
   12558 	(Target::do_calls_non_split): New function.
   12559 	(Target::match_view): New function.
   12560 	(Target::set_view_to_nop): New function.
   12561 	* gold.cc (queue_middle_tasks): Give an error if mixing
   12562 	split-stack and non-split-stack objects with -r.
   12563 	* i386.cc (Target_i386::relocate_section): Add
   12564 	reloc_symbol_changes parameter.
   12565 	(Target_i386::do_calls_non_split): New function.
   12566 	* x86_64.cc (Target_x86_64::relocate_section): Add
   12567 	reloc_symbol_changes parameter.
   12568 	(Target_x86_64::do_calls_non_split): New function.
   12569 	* arm.cc (Target_arm::relocate_section): Add reloc_symbol_changes
   12570 	parameter.
   12571 	* powerpc.cc (Target_powerpc::relocate_section): Add
   12572 	reloc_symbol_changes parameter.
   12573 	* sparc.cc (Target_sparc::relocate_section): Add
   12574 	reloc_symbol_changes parameter.
   12575 	* configure.ac: Call AM_CONDITIONAL for the default target.
   12576 	* configure: Rebuild.
   12577 	* testsuite/Makefile.am (TEST_AS): New variable.
   12578 	(check_SCRIPTS): Add split_i386.sh and split_x86_64.sh.
   12579 	(check_DATA): Add split_i386 and split_x86_64 files.
   12580 	(SPLIT_DEFSYMS): Define.
   12581 	(split_i386_[1234n].o): New targets.
   12582 	(split_i386_[124]): New targets.
   12583 	(split_i386_[1234r].stdout): New targets.
   12584 	(split_x86_64_[1234n].o): New targets.
   12585 	(split_x86_64_[124]): New targets.
   12586 	(split_x86_64_[1234r].stdout): New targets.
   12587 	(MOSTLYCLEANFILES): Add new executables.
   12588 	* testsuite/split_i386.sh: New file.
   12589 	* testsuite/split_x86_64.sh: New file.
   12590 	* testsuite/split_i386_1.s: New file.
   12591 	* testsuite/split_i386_2.s: New file.
   12592 	* testsuite/split_i386_3.s: New file.
   12593 	* testsuite/split_i386_4.s: New file.
   12594 	* testsuite/split_i386_n.s: New file.
   12595 	* testsuite/split_x86_64_1.s: New file.
   12596 	* testsuite/split_x86_64_2.s: New file.
   12597 	* testsuite/split_x86_64_3.s: New file.
   12598 	* testsuite/split_x86_64_4.s: New file.
   12599 	* testsuite/split_x86_64_n.s: New file.
   12600 	* testsuite/testfile.cc (Target_test): Update relocation_section
   12601 	function.
   12602 	* testsuite/Makefile.in: Rebuild.
   12603 
   12604 2009-10-06  Ian Lance Taylor  <iant (a] google.com>
   12605 
   12606 	* i386.cc (class Target_i386::Relocate): Add ldo_addrs_ field.
   12607 	(Target_i386::Relocate::relocate_tls): Call fix_up_ldo before
   12608 	changing local_dynamic_type_ from LOCAL_DYNAMIC_NONE.  When
   12609 	handling R_386_TLS_LDO_32, if local_dynamic_type_ is NONE, push
   12610 	the address on ldo_addrs_.
   12611 	(Target_i386::Relocate::fix_up_ldo): New function.
   12612 
   12613 2009-10-06   Rafael Espindola  <espindola (a] google.com>
   12614 
   12615 	* plugin.cc (add_input_library): New.
   12616 	(Plugin::load): Add add_input_library to tv.
   12617 	(Plugin_manager::add_input_file): Add the is_lib argument.
   12618 	(add_input_file): Update call to Plugin_manager::add_input_file.
   12619 	(add_input_library): New.
   12620 	* plugin.h (Plugin_manager::add_input_file): Add the is_lib argument.
   12621 
   12622 2009-09-30  Doug Kwan  <dougkwan (a] google.com>
   12623 
   12624 	* arm.cc (Target_arm::may_need_copy_reloc): Check for THUMB function
   12625 	symbol and call Symbol::may_need_copy_reloc to determine if
   12626 	a copy reloc is needed.
   12627 	* copy-relocs.cc (Copy_relocs::need_copy_reloc): Return false if -z
   12628 	nocopyreloc is given in command line.
   12629 	(Copy_relocs::emit_copy_reloc): Assert that -z nocopyreloc is not
   12630 	given in command line.
   12631 	* i386.cc (Target_i386::may_need_copy_reloc): Remove.
   12632 	(Target_i386::Scan::global): Use Symbol::may_need_copy_reloc instead
   12633 	of the removed Target_i386::may_need_copy_reloc.
   12634 	* options.h (copyreloc): New option with default value false.
   12635 	* powerpc.cc (Target_powerpc::may_need_copy_reloc): Remove.
   12636 	(Target_powerpc::Scan::global): Use Symbol::may_need_copy_reloc
   12637 	instead of the removed Target_powerpc::may_need_copy_reloc.
   12638 	* sparc.cc (Target_powerpc::may_need_copy_reloc): Remove.
   12639 	(Target_sparc::Scan::global): Use Symbol::may_need_copy_reloc
   12640 	instead of the removed Target_sparc::may_need_copy_reloc.
   12641 	* symtab.h (Symbol::may_need_copy_reloc): New method definition.
   12642 	* x86_64.cc (Target_powerpc::may_need_copy_reloc): Remove.
   12643 	(Target_x86_64::Scan::global): Use Symbol::may_need_copy_reloc
   12644 	instead of the removed Target_x86_64::may_need_copy_reloc.
   12645 
   12646 2009-09-30  Ian Lance Taylor  <iant (a] google.com>
   12647 
   12648 	* object.h (class Object): Remove target_ field, and target,
   12649 	sized_target, and set_target methods.
   12650 	(Object::sized_target): Remove.
   12651 	(class Sized_relobj): Update declarations.  Remove sized_target.
   12652 	* object.cc (Sized_relobj::setup): Remove target parameter.
   12653 	Change all callers.
   12654 	(Input_objects::add_object): Don't do anything with the target.
   12655 	(make_elf_sized_object): Add punconfigured parameter.  Change all
   12656 	callers.  Set or test parameter target.
   12657 	* dynobj.cc (Sized_dynobj::target): Remove target parameter.
   12658 	Change all callers.
   12659 	* parameters.cc (Parameters::set_target): Change parameter type to
   12660 	be non-const.
   12661 	(Parameters::default_target): Remove.
   12662 	(set_parameters_target): Change parameter type to be non-const.
   12663 	(parameters_force_valid_target): New function.
   12664 	(parameters_clear_target): New function.
   12665 	* parameters.h (class Parameters): Update declarations.  Remove
   12666 	default_target method.  Add sized_target and clear_target
   12667 	methods.  Change target_ to be non-const.
   12668 	(set_parameters_target): Update declaration.
   12669 	(parameters_force_valid_target): Declare.
   12670 	(parameters_clear_target): Declare.
   12671 	* readsyms.cc (Read_symbols::do_read_symbols): Pass punconfigured
   12672 	as NULL if we aren't searching.
   12673 	(Add_symbols::run): Don't check for compatible target.
   12674 	* fileread.cc (Input_file::open_binary): Call
   12675 	parameters_force_valid_target.
   12676 	* gold.cc (queue_middle_tasks): Likewise.
   12677 	* plugin.cc (make_sized_plugin_object): Likewise.  Don't call
   12678 	set_target on object.
   12679 	* dynobj.h (class Sized_dynobj): Update declarations.
   12680 	* archive.cc (Archive::get_elf_object_for_member): Return NULL if
   12681 	make_elf_object returns NULL.
   12682 	(Archive::include_member): Don't check whether object target is
   12683 	compatible.
   12684 	* output.cc (Output_section::add_input_section): Get target from
   12685 	parameters.
   12686 	(Output_section::relax_input_section): Likewise.
   12687 	* reloc.cc (Sized_relobj::do_gc_process_relocs): Get target from
   12688 	parameters.
   12689 	(Sized_relobj::do_scan_relocs): Likewise.
   12690 	(Sized_relobj::relocate_sections): Likewise.
   12691 	* resolve.cc (Symbol_table::resolve): Likewise.
   12692 	* symtab.cc (Symbol_table::wrap_symbol): Likewise.  Remove object
   12693 	parameter.  Change all callers.
   12694 	(Symbol_table::add_from_object): Get target from parameters.
   12695 	(Symbol_table::add_from_relobj): Don't check object target.
   12696 	(Symbol_table::add_from_dynobj): Likewise.
   12697 	(Symbol_table::define_special_symbol): Get target from
   12698 	parameters.
   12699 	* symtab.h (class Symbol_table): Update declaration.
   12700 	* testsuite/binary_unittest.cc (gold_testsuite): Remove target
   12701 	parameter.  Change all callers.  Clear parameter target.
   12702 	(Binary_test): Test target here.
   12703 	* testsuite/object_unittest.cc (gold_testsuite): Remove
   12704 	target_test_pointer parameter.  Change all callers.
   12705 	(Object_test): Test target here.
   12706 
   12707 2009-09-26  Ian Lance Taylor  <iant (a] google.com>
   12708 
   12709 	* testsuite/initpri1.c: Don't try to use constructor priorities if
   12710 	compiling with gcc before 4.3.
   12711 
   12712 2009-09-22  Mikolaj Zalewski  <mikolajz (a] google.com>
   12713 
   12714 	* testsuite/retain_symbols_file_test.sh (check_present): Change
   12715 	output file name to retain_symbols_file_test.stdout.
   12716 	(check_absent): Likewise.
   12717 
   12718 2009-09-18  Craig Silverstein  <csilvers (a] google.com>
   12719 
   12720 	* object.cc (Sized_relobj::do_count): Test should_retain_symbol map.
   12721 	* options.cc: Include <cerrno> and <fstream>.
   12722 	(General_options::finalize): Parse -retain-symbols-file tag.
   12723 	* options.h: New flag.
   12724 	(General_options): New method should_retain_symbol, new
   12725 	variable symbols_to_retain.
   12726 	* symtab.cc (Symbol_table::sized_finalize_symbol): Test
   12727 	should_retain_symbol map.
   12728 	* testsuite/Makefile.am (retain_symbols_file_test): New test.
   12729 	* testsuite/Makefile.in: Regenerate.
   12730 	* testsuite/retain_symbols_file_test.sh: New file.
   12731 
   12732 2009-09-18  Nick Clifton  <nickc (a] redhat.com>
   12733 
   12734 	* po/es.po: Updated Spanish translation.
   12735 
   12736 2009-09-17  Doug Kwan  <dougkwan (a] google.com>
   12737 
   12738 	* debug.h (DEBUG_RELAXATION): New constant.
   12739 	(DEBUG_ALL): Add DEBUG_RELAXATION.
   12740 	(debug_string_to_enum): Add relaxation debug option.
   12741 	* layout.cc
   12742 	(Layout::Relaxation_debug_check::check_output_data_for_reset_values,
   12743 	Layout::Relaxation_debug_check::read_sections,
   12744 	Layout::Relaxation_debug_check::read_sections): New method definitions.
   12745 	(Layout::Layout): Initialize data members
   12746 	record_output_section_data_from_scrips_,
   12747 	script_output_section_data_list_ and relaxation_debug_check_.
   12748 	(Layout::save_segments, Layout::restore_segments,
   12749 	Layout::clean_up_after_relaxation, Layout::prepare_for_relaxation,
   12750 	Layout::relaxation_loop_body): New method definitions.
   12751 	(Layout::finalize): Support relaxation.  Move section layout code to
   12752 	Layout::relaxation_loop_body.
   12753 	(Layout::set_asection_address_from_script): Move code for orphan
   12754 	section placement out.
   12755 	(Layout::place_orphan_sections_in_script): New method definition.
   12756 	* layout.h (Output_segment_headers, Output_file_header):
   12757 	New forward class declarations.
   12758 	(Layout::~Layout): Define.
   12759 	(Layout::new_output_section_data_from_script): New method definition.
   12760 	(Layout::place_orphan_sections_in_script): New method declaration.
   12761 	(Layout::Segment_states): New type declaration.
   12762 	(Layout::save_segments, Layout::restore_segments,
   12763 	Layout::clean_up_after_relaxation, Layout::prepare_for_relaxation,
   12764 	Layout::relaxation_loop_body): New method declarations.
   12765 	(Layout::Output_section_data_list): New type declaration.
   12766 	(Layout::Relaxation_debug_check): New class definition.
   12767 	(Layout::record_output_section_data_from_script_,
   12768 	Layout::script_output_section_data_list_, Layout::segment_states_,
   12769 	Layout::relaxation_debug_check_): New data members.
   12770 	* output.cc: (Output_section_headers::do_size): New method definition.
   12771 	(Output_section_headers::Output_section_headers): Move size
   12772 	computation to Output_section_headers::do_size.
   12773 	(Output_segment_headers::do_size): New method definition.
   12774 	(Output_file_header::Output_file_header): Move size computation to
   12775 	Output_file_header::do_size and call it.
   12776 	(Output_file_header::do_size): New method definition.
   12777 	(Output_data_group::Output_data_group): Adjust call to
   12778 	Output_section_data.
   12779 	(Output_data_dynamic::set_final_data_size): Add DT_NULL tag only once.
   12780 	(Output_symtab_xindex::do_write): Add array bound check.
   12781 	(Output_section::Input_section::print_to_mapfile): Handle
   12782 	RELAXED_INPUT_SECTION_CODE.
   12783 	(Output_section::Output_section): Initialize data member checkpoint_.
   12784 	(Output_section::~Output_section): Delete checkpoint object pointed
   12785 	by checkpoint_.
   12786 	(Output_section::add_input_section): Always add an Input_section if
   12787 	relaxing.
   12788 	(Output_section::add_merge_input_section): Add assert.
   12789 	(Output_section::relax_input_section): New method definition.
   12790 	(Output_section::set_final_data_size): Set load address to zero for
   12791 	an unallocated section.
   12792 	(Output_section::do_address_and_file_offset_have_reset_values):
   12793 	New method definition.
   12794 	(Output_section::Input_section_sort_enty::Input_section_sort_enty):
   12795 	Handle relaxed input section.
   12796 	(Output_section::sort_attached_input_sections): Checkpoint input
   12797 	section list lazily.
   12798 	(Output_section::get_input_sections): Change type of input_sections to
   12799 	list of Simple_input_section pointers.  Checkpoint input section list
   12800 	lazily.  Also handle relaxed input sections.
   12801 	(Output_section::add_input_section_for_script): Take a reference to
   12802 	a Simple_input_section object instead of Relobj pointer and section
   12803 	index as parameter.  Handle relaxed input sections.
   12804 	(Output_section::save_states, Output_section::restore_states): New
   12805 	method definitions.
   12806 	* output.h (Output_data::Output_data): Initialize is_data_size_fixed_.
   12807 	(Output_data::is_data_size_fixed): New method definition.
   12808 	(Output_data::reset_addresss_and_file_offset): Do not reset data size
   12809 	if it is fixed.
   12810 	(Output_data::address_and_file_offset_have_reset_values): New method
   12811 	definition.
   12812 	(Output_data::do_address_and_file_offset_have_reset_values): New method
   12813 	definition.
   12814 	(Output_data::set_data_size): Check that data size is not fixed.
   12815 	(Output_data::fix_data_size): New method definition.
   12816 	(Output_data::is_data_size_fixed_): New data member.
   12817 	(Output_section_headers::set_final_data_size): New method definition.
   12818 	(Output_section_headers::do_size): New method declaration.
   12819 	(Output_segment_headers::set_final_data_size): New method definition.
   12820 	(Output_segment_headers::do_size): New method declaration.
   12821 	(Output_file_header::set_final_data_size)::New method definition.
   12822 	(Output_file_header::do_size)::New method declaration.
   12823 	(Output_section_data::Output_section_data): Add new parameter
   12824 	is_data_size_fixed and use it to fix data size.
   12825 	(Output_data_const::Output_data_const): Adjust call to base class
   12826 	constructor and fix data size.
   12827 	(Output_data_const_buffer::Output_data_const_buffer): Adjust call to
   12828 	base class constructor and fix data size.
   12829 	(Output_data_fixed_space::Output_data_fixed_space): Adjust call to
   12830 	base class constructor and fix data size.
   12831 	(Output_data_zero_fill::Output_data_zero_fill): Adjust call to base
   12832 	class constructor and fix data size.
   12833 	(Output_data_group::set_final_data_size): New method definition.
   12834 	(Output_data_dynamic::Dynamic_entry::tag): New method definition.
   12835 	(Output_symtab_xindex::Output_symtab_xindex): Adjust call to base
   12836 	class constructor and fix data size.
   12837 	(Output_relaxed_input_section): New class definition.
   12838 	(Output_section::Simple_input_section): New class definition.
   12839 	(Output_section::get_input_sections): Adjust parameter list.
   12840 	(Output_section::add_input_section_for_script): Same.
   12841 	(Output_section::save_states, Output_section::restore_states,
   12842 	Output_section::do_address_and_file_offset_have_reset_values,
   12843 	(Output_section::Input_section::Input_section): Handle
   12844 	RELAXED_INPUT_SECTION_CODE.  Add new overload for
   12845 	Output_relaxed_input_section.
   12846 	(Output_section::Input_section::is_input_section,
   12847 	Output_section::Input_section::set_output_section): Handle relaxed
   12848 	input section.
   12849 	(Output_section::Input_section::is_relaxed_input_section,
   12850 	Output_section::Input_section::output_section_data,
   12851 	Output_section::Input_section::relaxed_input_section): New method
   12852 	definitions.
   12853 	(Output_section::Input_section::RELAXED_INPUT_SECTION_CODE): New enum
   12854 	value.
   12855 	(Output_section::Input_section::u1_): Update comments.
   12856 	(Output_section::Input_section::u2_): Add new union member poris.
   12857 	(Output_section::Checkpoint_output_section): New classs definition.
   12858 	(Output_section::relax_input_section): New method declaration.
   12859 	(Output_section::checkpoint_): New data member.
   12860 	(Output_segment): Update comments.
   12861 	(Output_segment::Output_segment): Un-privatize copy constructor.
   12862 	(Output_segment::operator=): Un-privatize.
   12863 	* script-sections.cc (Output_section_element::Input_section_list):
   12864 	Change element type to Output_section::Simple_input_section.
   12865 	(Output_section_element_dot_assignment::set_section_addresses):
   12866 	Register output section data for relaxation clean up.
   12867 	(Output_data_exression::Output_data_expression): Adjust call to base
   12868 	constructor to fix data size.
   12869 	(Output_section_element_data::set_section_addresses): Register
   12870 	Output_data_expression object for relaxation clean up.
   12871 	(struct Input_section_info): Replace Relobj pointer and section index
   12872 	pair with Output_section::Simple_input_section and Convert struct to a
   12873 	class.
   12874 	(Input_section_sorter::operator()): Adjust access to
   12875 	Input_section_info data member to use accessors.
   12876 	(Output_section_element_input::set_section_addresses): Use layout
   12877 	parameter.  Adjust code to use Output_section::Simple_input_section
   12878 	and Input_secction_info classes.  Register filler for relaxation
   12879 	clean up.
   12880 	(Orphan_output_section::set_section_addresses): Replace Relobj pointer
   12881 	and section index pair with Output_section::Simple_input_section
   12882 	class.  Adjust code accordingly.
   12883 	(Phdrs_element::release_segment): New method definition.
   12884 	(Script_sections::attach_sections_using_phdrs_clause): Do not modify
   12885 	segment list.
   12886 	(Script_sections::release_segments): New method definition.
   12887 	* gold/script-sections.h (Script_sections::release_segments): New
   12888 	method declaration.
   12889 	* gold/target.h (Target::may_relax, Target::relax,
   12890 	Target::do_may_relax, Target::do_relax): New method definitions.
   12891 
   12892 2009-09-17  Viktor Kutuzov  <vkutuzov (a] accesssoftek.com>
   12893 
   12894 	* arm.cc (has_signed_unsigned_overflow): New function.
   12895 	(Arm_relocate_functions::abs8): New function.
   12896 	(Target_arm::Scan::local): Handle R_ARM_ABS8.
   12897 	(Target_arm::Scan::global): Likewise.
   12898 	(Target_arm::relocate::relocate): Likewise.
   12899 	(Target_arm::Relocatable_size_for_reloc::get_size_for_reloc):
   12900 	Likewise.
   12901 
   12902 2009-09-16  Cary Coutant  <ccoutant (a] google.com>
   12903 
   12904 	* testsuite/Makefile.am (MOSTLYCLEANFILES): Add more generated files.
   12905 	* testsuite/Makefile.in: Regenerate.
   12906 
   12907 2009-09-11  Nick Clifton  <nickc (a] redhat.com>
   12908 
   12909 	* po/gold.pot: Updated by the Translation project.
   12910 
   12911 2009-09-08  Cary Coutant  <ccoutant (a] google.com>
   12912 
   12913 	* output.cc (Output_file::open): Add execute permission to empty file.
   12914 	* testsuite/Makefile.am (permission_test): New test.
   12915 	* testsuite/Makefile.in: Regenerate.
   12916 
   12917 2009-09-02  Ian Lance Taylor  <iant (a] google.com>
   12918 
   12919 	* output.cc (Output_file::resize): Call map_no_anonymous rather
   12920 	than map.
   12921 
   12922 2009-09-01  Mikolaj Zalewski  <mikolajz (a] google.com>
   12923 
   12924 	* gold.cc: Include "incremental.h".
   12925 	(queue_initial_tasks): Call Incremental_checker methods.
   12926 	* incremental.cc: Include "output.h".
   12927 	(Incremental_checker::can_incrementally_link_output_file): New
   12928 	method.
   12929 	* incremental.h (Incremental_checker): New class.
   12930 
   12931 	* output.cc (Output_file::open_for_modification): New method.
   12932 	(Output_file::map_anonymous): Changed return type to bool.  Record
   12933 	map in base_ field.
   12934 	(Output_file::map_no_anonymous): New method, broken out of map.
   12935 	(Output_file::map): Use map_no_anonymous and map_anonymous.
   12936 	* output.h (class Output_file): Update declarations.
   12937 
   12938 2009-08-24  Cary Coutant  <ccoutant (a] google.com>
   12939 
   12940 	* options.h (Command_line::Pre_options): New class.
   12941 	(Command_line::pre_options): New member.
   12942 	* options.cc (gold::options::ready_to_register): New variable.
   12943 	(One_option::register_option): Do nothing if not registering options.
   12944 	Assert if same short option registered twice.
   12945 	(General_options::General_options): Turn off option registration when
   12946 	done constructing.
   12947 	(Command_line::Pre_options::Pre_options): New constructor.
   12948 
   12949 2009-08-24  Cary Coutant  <ccoutant (a] google.com>
   12950 
   12951 	* options.h (General_options::no_keep_memory): Remove incorrect
   12952 	short option.
   12953 
   12954 2009-08-24  Ralf Wildenhues  <Ralf.Wildenhues (a] gmx.de>
   12955 
   12956 	* Makefile.am (am__skiplex, am__skipyacc): New.
   12957 	* Makefile.in: Regenerate.
   12958 
   12959 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues (a] gmx.de>
   12960 
   12961 	* Makefile.am (AM_CPPFLAGS): Renamed from ...
   12962 	(INCLUDES): ... this.
   12963 	* testsuite/Makefile.am (AUTOMAKE_OPTIONS): Add -Wno-portability.
   12964 	(AM_CPPFLAGS): Renamed from ...
   12965 	(INCLUDE): ... this.
   12966 	* Makefile.in, testsuite/Makefile.in: Regenerate.
   12967 
   12968 	* Makefile.in: Regenerate.
   12969 	* aclocal.m4: Likewise.
   12970 	* config.in: Likewise.
   12971 	* configure: Likewise.
   12972 	* testsuite/Makefile.in: Likewise.
   12973 
   12974 	* Makefile.am (AUTOMAKE_OPTIONS): Add foreign.
   12975 	* testsuite/Makefile.am (AUTOMAKE_OPTIONS): Add foreign.
   12976 	* Makefile.in: Regenerate.
   12977 	* testsuite/Makefile.in: Regenerate.
   12978 
   12979 2009-08-19  Cary Coutant  <ccoutant (a] google.com>
   12980 
   12981 	* resolve.cc (Symbol_table::resolve): Don't complain about defined
   12982 	symbols in shared libraries overridden by hidden or internal symbols
   12983 	in the main program.
   12984 
   12985 2009-08-19  Chris Demetriou  <cgd (a] google.com>
   12986 
   12987 	* testsuite/debug_msg.sh: Match .* rather than ${srcdir} when
   12988 	checking source file names in error messages.
   12989 
   12990 2009-08-18  Doug Kwan  <dougkwan (a] google.com>
   12991 
   12992 	* dynobj.cc (Sized_dynobj::setup): Take a Target object instead of
   12993 	an elcpp::Ehdr as parameter.  Adjust call to set_target.
   12994 	* dynobj.h (Sized_dynobj::setup): Take a Target object instead of
   12995 	an elfcpp::Ehdr as parameter.
   12996 	* object.cc (Object::set_target): Remove the version that looks up
   12997 	a target and sets it.
   12998 	(Sized_relobj::setup): Take a Target object instead of
   12999 	an elfcpp::Ehdr as parameter.  Adjust call to set_target.
   13000 	(make_elf_sized_object): Find target and ask target to
   13001 	make an ELF object.
   13002 	* object.h: (Object::set_target): Remove the version that looks up
   13003 	a target and sets it.
   13004 	(Sized_relobj::setup): Take a Target object instead of
   13005 	an elfcpp:Ehdr as parameter.
   13006 	* target.cc: Include dynobj.h.
   13007 	(Target::do_make_elf_object_implementation): New.
   13008 	(Target::do_make_elf_object): New.
   13009 	* target.h (Target::make_elf_object): New template declaration.
   13010 	(Target::do_make_elf_object): New method declarations.
   13011 	(Target::do_make_elf_object_implementation): New template declaration.
   13012 
   13013 2009-08-14  Ian Lance Taylor  <iant (a] google.com>
   13014 
   13015 	* gold.h (FUNCTION_NAME): Define.
   13016 	(gold_unreachable): Use FUNCTION_NAME.
   13017 
   13018 2009-08-12  Sriraman Tallam  <tmsriram (a] google.com>
   13019 
   13020 	* icf.cc (Icf::find_identical_sections): Issue a warning when a
   13021 	symbol in the --keep-unique list is not found.
   13022 
   13023 2009-08-12  Sriraman Tallam  <tmsriram (a] google.com>
   13024 
   13025 	* icf.cc (Icf::find_identical_sections): Unfold symbols that have
   13026 	been maked as --keep-unique.
   13027 	(Icf::unfold_section): New function.
   13028 	* icf.h (Icf::unfold_section): New function.
   13029 	* options.h (General_options::keep_unique): New option.
   13030 	* testsuite/Makefile.am: Add commands to build icf_keep_unique_test.
   13031 	* testsuite/Makefile.in: Regenerate.
   13032 	* testsuite/icf_keep_unique_test.sh: New file.
   13033 	* testsuite/icf_keep_unique_test.cc: New file.
   13034 
   13035 2009-08-12  Cary Coutant  <ccoutant (a] google.com>
   13036 
   13037 	PR 10471
   13038 	* resolve.cc (Symbol_table::resolve): Check for references from
   13039 	dynamic objects to hidden and internal symbols.
   13040 	* testsuite/Makefile.am (hidden_test.sh): New test.
   13041 	* testsuite/Makefile.in: Regenerate.
   13042 	* testsuite/hidden_test.sh: New script.
   13043 	* testsuite/hidden_test_1.c: New test source.
   13044 	* testsuite/hidden_test_main.c: New test source.
   13045 
   13046 2009-08-11  Doug Kwan  <dougkwan (a] google.com>
   13047 
   13048 	* arm.cc: Update comments.
   13049 	(Target_arm::do_finalize_sections): Add a special PT_ARM_EXIDX
   13050 	segment to locate the .ARM.exidx section if present.
   13051 
   13052 2009-08-09  Doug Kwan  <dougkwan (a] google.com>
   13053 
   13054 	* dynobj.h (Sized_dynobj::do_section_entsize): Revert the previous
   13055 	patch.
   13056 
   13057 2009-08-07  Sriraman Tallam  <tmsriram (a] google.com>
   13058 	* dynobj.h (Sized_dynobj::do_section_entsize): Add return to avoid
   13059 	compiler warnings.
   13060 
   13061 2009-08-06  Sriraman Tallam  <tmsriram (a] google.com>
   13062 
   13063 	* x86_64.cc (Target_x86_64::Relocate::relocate_tls): Check for a
   13064 	valid tls_segment only for non-debug-section relocations.
   13065 	* testsuite/Makefile.am: Add gc_tls_test.
   13066 	* testsuite/Makefile.in: Regenerate.
   13067 	* testsuite/gc_tls_test.cc: New file.
   13068 	* testsuite/gc_tls_test.sh: New file.
   13069 
   13070 2009-08-05  Sriraman Tallam  <tmsriram (a] google.com>
   13071 
   13072 	* icf.cc: New file.
   13073 	* icf.h: New file.
   13074 	* Makefile.am (CCFILES): Add icf.cc.
   13075 	(HFILES): Add icf.h
   13076 	* Makefile.in: Regenerate.
   13077 	* dynobj.h (Sized_dynobj::do_section_entsize): New function.
   13078 	* gc.h (gc_process_relocs): Populate lists used by icf to contain
   13079 	section, symbol and addend information for the relocs.
   13080 	* gold.cc (queue_middle_tasks): Call identical code folding.
   13081 	* gold.h: Add defines for multimap.
   13082 	* layout.cc (Layout::create_symtab_sections): Add symtab as parameter
   13083 	to the call of finalize_local_symbols.
   13084 	* main.cc (main): Create object of class Icf.
   13085 	* object.cc (Sized_relobj::do_layout): Allow this function to be
   13086 	called twice during icf.
   13087 	(Sized_relobj::do_finalize_local_symbols): Fold symbols corresponding
   13088 	to sections marked as identical by icf.
   13089 	(Sized_relobj::do_section_flags): Get section_flags from Symbols_data
   13090 	when available.
   13091 	(Sized_relobj::do_section_entsize): New function.
   13092 	* object.h (Object::section_entsize): New function.
   13093 	(Object::do_section_entsize): New pure virtual function.
   13094 	(Relobj::finalize_local_symbols): Add new parameter.
   13095 	(Relobj::do_section_entsize): New function.
   13096 	* options.h (General_options::icf): New option.
   13097 	(General_options::icf_iterations): New option.
   13098 	(General_options::print_icf_sections): New option.
   13099 	* plugin.cc (Sized_pluginobj::do_section_entsize): New function.
   13100 	* plugin.h (Sized_pluginobj::do_section_entsize): New function.
   13101 	* reloc.cc (Read_relocs::run): Delay scanning relocs when doing
   13102 	icf.
   13103 	* symtab.cc (Symbol_table::is_section_folded): New function.
   13104 	(Symbol_table::sized_finalize_symbol):  Fold symbols corresponding
   13105 	to sections marked as identical by icf.
   13106 	* symtab.h (Symbol_table::set_icf): New function.
   13107 	(Symbol_table::icf): New function.
   13108 	(Symbol_table::is_section_folded): New function.
   13109 	(Symbol_table::icf_): New data member.
   13110 	* target-reloc.h (relocate_section): Ignore sections folded by icf.
   13111 	* testsuite/Makefile.am: Add commands to build icf_test.
   13112 	* testsuite/Makefile.in: Regenerate.
   13113 	* testsuite/icf_test.sh: New file.
   13114 	* testsuite/icf_test.cc: New file.
   13115 
   13116 2009-07-24  Chris Demetriou  <cgd (a] google.com>
   13117 
   13118 	* layout.cc (is_compressible_debug_section): Fix incorrect
   13119 	comment about compressed section names.
   13120 
   13121 2009-07-20  Ian Lance Taylor  <ian (a] airs.com>
   13122 
   13123 	PR 10419
   13124 	* x86_64.cc (Target_x86_64::do_code_fill): Correct nop sequences.
   13125 
   13126 2009-07-16  Ian Lance Taylor  <iant (a] google.com>
   13127 
   13128 	PR 10400
   13129 	* layout.h: #include <map>.
   13130 	(class Kept_section): Change from struct to class.  Add accessors
   13131 	and setters.  Add section size to Comdat_group mapping.  Change
   13132 	Comdat_group to std::map.  Add is_comdat_ field.  Add
   13133 	linkonce_size field in union.
   13134 	(class Layout): Update declaration of find_or_add_kept_section.
   13135 	Don't declare find_kept_object.
   13136 	* layout.cc (Layout::find_or_add_kept_section): Remove candidate
   13137 	parameter.  Add object, shndx, is_comdat, and is_group_name
   13138 	parameters.  Change all callers.  Adjust for new Kept_section.
   13139 	(Layout::find_kept_object): Remove.
   13140 	* object.cc (Sized_relobj::include_section_group): Update use of
   13141 	Kept_section.  Rename secnum to shndx.  Only record
   13142 	Kept_comdat_section if sections are the same size.
   13143 	(Sized_relobj::include_linkonce_section): Update use of
   13144 	Kept_section.  Only record Kept_comdat_section if sections are the
   13145 	same size.  Set size of linkonce section.
   13146 	(Sized_relobj::map_to_kept_section): Update call to
   13147 	get_kept_comdat_section.
   13148 	* object.h (class Sized_relobj): Rename fields in
   13149 	Kept_comdat_section to drop trailing underscores; change object
   13150 	field to Relobj*.  Change Kept_comdat_section_table to store
   13151 	struct rather than pointer.
   13152 	(Sized_relobj::set_kept_comdat_section): Remove kept parameter.
   13153 	Add kept_object and kept_shndx parameters.  Change all callers.
   13154 	(Sized_relobj::get_kept_comdat_section): Change return type to
   13155 	bool.  Add kept_object and kept_shndx parameters.  Change all
   13156 	callers.
   13157 	* plugin.cc (Pluginobj::include_comdat_group): Update call to
   13158 	Layout::find_or_add_kept_section.
   13159 
   13160 2009-07-09  Ian Lance Taylor  <iant (a] google.com>
   13161 
   13162 	* merge.cc (Object_merge_map::initialize_input_to_output_map):
   13163 	Reserve space in the hash table.
   13164 
   13165 2009-07-06  Mikolaj Zalewski  <mikolajz (a] google.com>
   13166 
   13167 	* fileread.cc (File_read::get_mtime): New method.
   13168 	* fileread.h (Timespec): New structure.
   13169 	(File_read::get_mtime): New method.
   13170 	* incremental.cc (Incremental_inputs_entry_data::timestamp_usec):
   13171 	Renamed from timestamp_nsec.
   13172 	(Incremental_inputs_entry_write::timestamp_sec): Fix argument to
   13173 	Elf_Xword.
   13174 	(Incremental_inputs_entry_write::timestamp_usec): Renamed from
   13175 	timestamp_nsec.
   13176 	(Incremental_inputs::report_archive): Save mtime; style fix.
   13177 	(Incremental_inputs::report_obejct): Save mtime; style fix.
   13178 	(Incremental_inputs::report_script): Save mtime; style fix.
   13179 	(Incremental_inputs::finalize_inputs): Style fix.
   13180 	(Incremental_inputs::finalize): Style fix.
   13181 	(Incremental_inputs::create_input_section_data): Store inputs
   13182 	mtime.
   13183 	* incremental.h (Incremental_inputs::report_script): Add mtime
   13184 	argument.
   13185 	(Incremental_inputs::Input_info::Input_info): Intialize only one
   13186 	union member.
   13187 	(Incremental_inputs::Input_info::archive): Move to nameless
   13188 	union.
   13189 	(Incremental_inputs::Input_info::obejct): Move to nameless union.
   13190 	(Incremental_inputs::Input_info::script): Move to nameless union.
   13191 	(Incremental_inputs::mtime): New field.
   13192 	* script.cc (read_input_script): Pass file mtime to
   13193 	Incremental_input.
   13194 	* script.h (Script_info::inputs): Style fix.
   13195 
   13196 2009-07-01  Ian Lance Taylor  <ian (a] airs.com>
   13197 
   13198 	* freebsd.h (Target_freebsd::do_adjust_elf_header): Use size
   13199 	instead of 32.
   13200 
   13201 2009-06-24  Ian Lance Taylor  <iant (a] google.com>
   13202 
   13203 	PR 10156
   13204 	* layout.cc (Layout::choose_output_section): If we find an
   13205 	existing section, update the flags.
   13206 	(Layout::create_notes): New function, broken out of
   13207 	Layout::finalize.
   13208 	(Layout::finalize): Don't create note sections.
   13209 	(Layout::create_note): Don't crash if linker script discards
   13210 	section.
   13211 	(Layout::create_gold_note): Likewise.
   13212 	(Layout::create_build_id): Likewise.  Don't set
   13213 	after_input_sections on the section.
   13214 	(Layout::create_executable_stack_info): Remove target parameter.
   13215 	Change caller.
   13216 	* layout.h (class Layout): Declare create_notes.  Update
   13217 	declaration of create_executable_stack_info.
   13218 	* gold.cc (queue_middle_tasks): Call create_notes.
   13219 	* output.cc (Output_section::update_flags_for_input_section): Move
   13220 	here from output.h.  If SHF_ALLOC flag is newly set, mark address
   13221 	invalid.
   13222 	* output.h (Output_data::mark_address_invalid): New function.
   13223 	(class Output_section): Only declare, not define,
   13224 	update_flags_for_input_section.  Remove set_flags.
   13225 
   13226 2009-06-24  Ian Lance Taylor  <iant (a] google.com>
   13227 
   13228 	* script-sections.cc (Output_section_definition::
   13229 	set_section_addresses): Rename shadowing local load_address to
   13230 	laddr.
   13231 
   13232 2009-06-24  Ian Lance Taylor  <iant (a] google.com>
   13233 
   13234 	PR 10244
   13235 	* reloc.cc (relocate_sections): Skip empty relocation sections.
   13236 
   13237 2009-06-23  Ian Lance Taylor  <iant (a] google.com>
   13238 
   13239 	PR 10156
   13240 	* layout.cc (Layout::create_note): Use choose_output_section
   13241 	rather than make_output_section.
   13242 
   13243 2009-06-23  Ian Lance Taylor  <iant (a] google.com>
   13244 
   13245 	PR 10237
   13246 	* options.cc (General_options::parse_V): Set printed_version_.
   13247 	(General_options::General_options): Initialize printed_version_.
   13248 	* options.h (class General_options): Add printed_version_ field.
   13249 	* gold.cc (queue_initial_tasks): If there are no input files,
   13250 	don't give a fatal error if we printed the version information.
   13251 	(queue_middle_tasks): If using -r with a shared object, give a
   13252 	fatal error rather than an ordinary error.
   13253 
   13254 2009-06-23  Ian Lance Taylor  <iant (a] google.com>
   13255 
   13256 	PR 10219
   13257 	* layout.cc (Layout::Layout): Initialize have_stabstr_section_.
   13258 	(Layout::make_output_section): Set have_stabstr_section_ if we see
   13259 	a .stab*str section.
   13260 	(Layout::finalize): Call link_stabs_sections.
   13261 	(Layout::link_stabs_sections): New file.
   13262 	* layout.h (class Layout): Add have_stabstr_section_ field.
   13263 	Declare link_stabs_sections.
   13264 
   13265 2009-06-23  Doug Kwan  <dougkwan (a] google.com>
   13266 
   13267 	* Makefile.am (libgold_a_LIBADD): New.
   13268 	(ld_new_DEPENDENCIES, ld_new_LDADD): Remove LIBOBJS
   13269 	* Makefile.in: Regenerate.
   13270 	* config.in (HAVE_DECL_MEMMEM, HAVE_DECL_STRNDUP): New.
   13271 	* configure: Regenerate.
   13272 	* configure.ac (AC_CHECK_DECLS): Add strndup and memmem.
   13273 	* fileread.cc: Include sys/state.h
   13274 	* gold.h: Declare memmem and strndup if found missing.
   13275 	* gold_reloc.h: Include byteswap.h if HAVE_BYTESWAP_H is defined.
   13276 
   13277 2009-06-23  Ian Lance Taylor  <iant (a] google.com>
   13278 
   13279 	* configure.ac: Call AC_CHECK_DECLS using C, not C++.
   13280 	* configure: Rebuild.
   13281 
   13282 2009-06-23  Ian Lance Taylor  <iant (a] google.com>
   13283 
   13284 	PR 10147
   13285 	* object.cc (Object::section_contents): Don't try to get a view if
   13286 	the section has length zero.
   13287 	(Object::handle_gnu_warning_section): If the section is empty, use
   13288 	the name of the section as the warning.
   13289 
   13290 2009-06-23  Ian Lance Taylor  <iant (a] google.com>
   13291 
   13292 	PR 10133
   13293 	* stringpool.h (class Stringpool_template): Add optimize_ field.
   13294 	(Stringpool_template::set_optimize): New function.
   13295 	* stringpool.cc (Stringpool_template::Stringpool_template):
   13296 	Initialize optimize_ field.
   13297 	(Stringpool_template::set_string_offsets): Test local optimize
   13298 	fild rather than parameter.
   13299 	* layout.cc (Layout::Layout): Call set_optimize on the section
   13300 	name stringpool.
   13301 
   13302 2009-06-22  Ian Lance Taylor  <iant (a] google.com>
   13303 
   13304 	PR 10030
   13305 	* yyscript.y: Parse TARGET.
   13306 	* script.cc (script_set_target): New function.
   13307 	* script-c.h (script_set_target): Declare.
   13308 	* options.cc (General_options::string_to_object_format): Rename
   13309 	from string_to_object_format in anonymous namespace.  Change
   13310 	callers.
   13311 	* options.h (class General_options): Declare
   13312 	string_to_object_format.
   13313 
   13314 2009-06-22  Ian Lance Taylor  <iant (a] google.com>
   13315 
   13316 	* script-sections.cc (Script_sections::create_segments): Don't put
   13317 	program headers in a PT_LOAD segment if -n or -N.
   13318 
   13319 2009-06-22  Ian Lance Taylor  <iant (a] google.com>
   13320 
   13321 	PR 10141
   13322 	* options.h (class General_options): Add -z lazy and -z now.  Sort
   13323 	-z options into alphabetical order.
   13324 	* layout.cc (Layout::finish_dynamic_section): Handle -z now.
   13325 
   13326 2009-06-21  Ian Lance Taylor  <iant (a] google.com>
   13327 
   13328 	* layout.cc (Layout::make_output_section): Call
   13329 	Target::new_output_section.
   13330 	(Layout::attach_allocated_section_to_segment): Put large section
   13331 	sections in a separate load segment with the large segment flag
   13332 	set.
   13333 	(Layout::segment_precedes): Sort large data segments after other
   13334 	load segments.
   13335 	(align_file_offset): New static function.
   13336 	(Layout::set_segment_offsets): Use align_file_offset.
   13337 	* output.h (class Output_section): Add is_small_section_ and
   13338 	is_large_section_ fields.
   13339 	(Output_section::is_small_section): New function.
   13340 	(Output_section::set_is_small_section):  New function.
   13341 	(Output_section::is_large_section): New function.
   13342 	(Output_section::set_is_large_section): New function.
   13343 	(Output_section::is_large_data_section): New function.
   13344 	(class Output_segment): Add is_large_data_segment_ field.
   13345 	(Output_segment::is_large_data_segment): New function.
   13346 	(Output_segment::set_is_large_data_segment): New function.
   13347 	* output.cc (Output_section::Output_section): Initialize new
   13348 	fields.
   13349 	(Output_segment::Output_segment): Likewise.
   13350 	(Output_segment::add_output_section): Add assertion that large
   13351 	data sections always go in large data segments.  Force small data
   13352 	sections to the end of the list of data sections.  Force small BSS
   13353 	sections to the start of the list of BSS sections.  For large BSS
   13354 	sections to the end of the list of BSS sections.
   13355 	* symtab.h (class Symbol): Declare is_common_shndx.
   13356 	(Symbol::is_defined): Check Symbol::is_common_shndx.
   13357 	(Symbol::is_common): Likewise.
   13358 	(class Symbol_table): Define enum Commons_section_type.  Update
   13359 	declarations.  Add small_commons_ and large_commons_ fields.
   13360 	* symtab.cc (Symbol::is_common_shndx): New function.
   13361 	(Symbol_table::Symbol_table): Initialize new fields.
   13362 	(Symbol_table::add_from_object): Put small and large common
   13363 	symbols in the right list.
   13364 	(Symbol_table::sized_finalized_symbol): Check
   13365 	Symbol::is_common_shndx.
   13366 	(Symbol_table::sized_write_globals): Likewise.
   13367 	* common.cc (Symbol_table::do_allocate_commons): Allocate new
   13368 	common symbol lists.  Don't call do_allocate_commons_list if the
   13369 	list is empty.
   13370 	(Symbol_table::do_allocate_commons_list): Remove is_tls
   13371 	parameter.  Add comons_section_type parameter.  Change all
   13372 	callers.  Handle small and large common symbols.
   13373 	* object.cc (Sized_relobj::do_finalize_local_symbols): Check
   13374 	Symbol::is_common_shndx.
   13375 	* resolve.cc (symbol_to_bits): Likewise.
   13376 	* target.h (Target::small_common_shndx): New function.
   13377 	(Target::small_common_section_flags): New function.
   13378 	(Target::large_common_shndx): New function.
   13379 	(Target::large_common_section_flags): New function.
   13380 	(Target::new_output_section): New function.
   13381 	(Target::Target_info): Add small_common_shndx, large_common_shndx,
   13382 	small_common_section_flags, and large_common_section_flags
   13383 	fields.
   13384 	(Target::do_new_output_section): New virtual function.
   13385 	* arm.cc (Target_arm::arm_info): Initialize new fields.
   13386 	* i386.cc (Target_i386::i386_info): Likewise.
   13387 	* powerpc.cc (Target_powerpc::powerpc_info) [all versions]:
   13388 	Likewise.
   13389 	* sparc.c (Target_sparc::sparc_info) [all versions]: Likewise.
   13390 	* x86_64.cc (Target_x86_64::x86_64_info): Likewise.
   13391 	(Target_x86_64::do_new_output_section): New function.
   13392 	* configure.ac: Define conditional MCMODEL_MEDIUM.
   13393 	* testsuite/Makefile.am (check_PROGRAMS): Add large.
   13394 	(large_SOURCES, large_CFLAGS, large_DEPENDENCIES): Define.
   13395 	(large_LDFLAGS): Define.
   13396 	* testsuite/large.c: New file.
   13397 	* testsuite/testfile.cc (Target_test::test_target_info):
   13398 	Initialize new fields.
   13399 	* configure, testsuite/Makefile.in: Rebuild.
   13400 
   13401 2009-06-05  Doug Kwan  <dougkwan (a] google.com>
   13402 
   13403 	* Makefile.am (CCFILES): Add target.cc.
   13404 	* Makefile.in: Regenerate.
   13405 	* i386.cc (class Target_i386): Define new virtual method to
   13406 	override do_is_local_label_name in parent.
   13407 	* object.cc (Sized_relobj::do_count_local_symbols): Discard
   13408 	local symbols if --discard-locals or -X is given.
   13409 	* options.h (class General_options): Declare new options
   13410 	'--discard-locals' and '-X' for discarding locals.
   13411 	* target.h (class Target): Define new methods is_local_label_name.
   13412 	Declare new virtual method do_is_local_label_name.
   13413 	* target.cc: New file.
   13414 	* testsuite/Makefile.am (check_PROGRAMS): Add discard_locals_test.
   13415 	(check_SCRIPTS): Add discard_locals_test.sh.
   13416 	(check_DATA): Add discard_local_tests.syms.
   13417 	(discard_locals_test_SOURCES, discard_locals_test_LDFLAGS): Define.
   13418 	(discard_local_tests.syms, discard_locals_test.o): New make rules.
   13419 	* testsuite/Makefile.in: Regenerate.
   13420 	* testsuite/discard_locals_test.c: New file.
   13421 	* testsuite/discard_locals_test.sh: Same.
   13422 
   13423 2009-06-05  Doug Kwan  <dougkwan (a] google.com>
   13424 
   13425 	* object.cc (Sized_relobj::Sized_relobj): Initialize
   13426 	discarded_eh_frame_shndx_ to -1U.
   13427 	(Sized_relobj::do_layout): Record index of a discard .eh_frame
   13428 	section.
   13429 	(Sized_relobj::do_count_local_symbols): Skip local symbols in
   13430 	a discarded .eh_frame section.
   13431 	(Sized_relobj::do_finalize_local_symbols): Ditto.
   13432 	* object.h (class Sized_relobj): Declare new member
   13433 	discarded_eh_frame_shndx_.
   13434 	* testsuite/Makefile.am (check_PROGRAMS): Add local_labels_test.
   13435 	(local_labels_test.o, local_labels_test): New rules.
   13436 	* testsuite/Makefile.in: Regenerate.
   13437 
   13438 2009-06-04  Doug Kwan  <dougkwan (a] google.com>
   13439 
   13440 	* layout.cc (Layout::section_name_mapping): Add mapping for
   13441 	special ARM sections.
   13442 
   13443 2009-06-03  Doug Kwan  <dougkwan (a] google.com>
   13444 
   13445 	* arm.cc (utils::sign_extend): Reverse test in gold_assert.
   13446 	(utils::has_overflow): Same.
   13447 
   13448 2009-06-03  Ian Lance Taylor  <iant (a] google.com>
   13449 
   13450 	* layout.cc (Layout::section_name_mapping): New array, replacing
   13451 	Layout::linkonce_mapping.
   13452 	(Layout::section_name_mapping_count): New variable, replacing
   13453 	Layout::linkonce_mapping_count.
   13454 	(Layout::linkonce_output_name): Remove.
   13455 	(Layout::output_section_name): Rewrite.
   13456 	* layout.h (class Layout): Rename Linkonce_mapping to
   13457 	Section_name_mapping, linkonce_mapping to section_name_mapping,
   13458 	linkonce_mapping_count to section_name_mapping_count.  Don't
   13459 	declare linkonce_output_name.
   13460 
   13461 2009-06-03  Doug Kwan  <dougkwan (a] google.com>
   13462 
   13463 	* gold/arm.cc (namespace utils): New.
   13464 	(Target_arm::reloc_is_non_pic): Define new method.
   13465 	(class Arm_relocate_functions): New.
   13466 	(Target_arm::Relocate::relocate): Handle relocation types used by
   13467 	Android.
   13468 
   13469 2009-06-03  Ian Lance Taylor  <iant (a] google.com>
   13470 
   13471 	* arm.cc (Target_arm::scan::global): Use || instead of |.
   13472 
   13473 2009-06-02  Doug Kwan  <dougkwan (a] google.com>
   13474 
   13475 	* gold/arm.cc (Target_arm::Scan::Scan):  Initialize
   13476 	issued_non_pic_error_.
   13477 	(class Target_arm::Scan): Declare new method check_non_pic.
   13478 	Define new method symbol_needs_plt_entry.
   13479 	Declare new data member issued_non_pic_error_.
   13480 	(class Target_arm::Relocate): Declare new method
   13481 	should_apply_static_reloc.
   13482 	(Target_arm::may_need_copy_reloc): Handle STT_ARM_TFUNC.
   13483 	(Target_arm::Scan::check_non_pic): Define new method.
   13484 	(Target_arm::Scan::local): Handle a small subset of reloc types used
   13485 	by Android.
   13486 	(Target_arm::Scan::local): Same.
   13487 	(Target_arm::Relocate::should_apply_statci_reloc): Define new method.
   13488 
   13489 2009-05-31  Mikolaj Zalewski  <mikolajz (a] google.com>
   13490 
   13491 	* incremental.cc (Incremental_inputs::report_command_line): Filter
   13492 	out --incremental-* options.
   13493 
   13494 2009-05-29  Doug Kwan  <dougkwan (a] google.com>
   13495 
   13496 	* gold/arm.cc (Output_data_plt_arm): Forward declaration for new
   13497 	template class.
   13498 	(class Target_arm): Update comment.
   13499 	(Target_arm::Target_arm): Initialize new data members GOT_,
   13500 	PLT_, GOT_PLT_, REL_DYN_, COPY_RELOCS_ and DYNBSS_.
   13501 	Declare new methods Target_arm::got_section, Target_arm::make_plt_entry
   13502 	and Target_arm::rel_dyn_section.
   13503 	Declare new_enum Target_arm::Got_type.
   13504 	Declare new data members GOT_, PLT_, GOT_PLT_, REL_DYN_, COPY_RELOCS_
   13505 	and DYNBSS_.
   13506 	Update commments for member do_dynsym_value.
   13507 	(Target_arm::got_size, Target_arm::plt_section,
   13508 	Target_arm::may_need_copy_reloc and Target_arm::copy_reloc): Define
   13509 	new methods inside class defintion.
   13510 	(Target_arm::got_section): Define new method.
   13511 	(Target_arm::rel_dyn_section): Same.
   13512 	(Output_data_plt_arm): New template class.
   13513 	(Output_data_plt_arm::Output_data_plt_arm): Define constructor.
   13514 	(Output_data_plt_arm:do_adjust_output_section): Define new method.
   13515 	(Output_data_plt_arm::add_entry): Same.
   13516 	(Output_data_plt_arm::first_plt_entry): Define new
   13517 	static data member for PLT instruction template.
   13518 	(Output_data_plt_arm::plt_entry): Same.
   13519 	(Output_data_plt_arm::do_write): Define new method.
   13520 	(Target_arm::make_plt_entry): Same.
   13521 	(Target_arm::do_finalize_sections): Same.
   13522 	(Target_arm::do_dynsym_value): Same.
   13523 
   13524 2009-05-28  Doug Kwan  <dougkwan (a] google.com>
   13525 
   13526 	* Makefile.am (TARGETSOURCES): Add arm.cc.
   13527 	(ALL_TARGETOBJECTS): Add arm.$(OBJEXT)
   13528 	* Makefile.in: Regenerate.
   13529 	* arm.cc: New file.
   13530 	* configure.tgt: Add armbe*-*-*, armeb*-*-* and arm*-*-* targets.
   13531 
   13532 2009-05-26  Doug Kwan  <dougkwan (a] google.com>
   13533 
   13534 	* options.cc (General_options::parse_exclude_libs).  Fix a comment.
   13535 	(General_options::check_excluded_libs): Strip off directories in
   13536 	archive name before matching like GNU ld does.
   13537 	* testsuite/Makefile.am (MOSTLYCLEANFILES,
   13538 	exclude_libs_test_DEPENDENCIES): Add alt/libexclude_libs_test_3.a
   13539 	(exclude_libs_test_LDFLAGS): Add linker option
   13540 	-Wl,--exclude-libs,libexclude_libs_test_3
   13541 	(exclude_libs_test_LADD): Add alt/libexclude_libs_test_3.a as
   13542 	an explicit archive without using -l.
   13543 	(alt/libexclude_libs_test_3.a): New make rule.
   13544 	* testsuite/Makefile.in: Regenerate.
   13545 	* testsuite/exclude_libs_test.c : Declare lib3_default().
   13546 	(main): Call it.
   13547 	* exclude_libs_test.sh: Add tests for alt/exclude_libs_test_3.a.
   13548 	* exclude_libs_test_3.c: New file.
   13549 
   13550 2009-05-26  Nick Clifton  <nickc (a] redhat.com>
   13551 
   13552 	* po/id.po: New Indonesian translation.
   13553 	* po/gold.pot: Updated template file.
   13554 
   13555 2009-05-22  Sriraman Tallam  <tmsriram (a] google.com>
   13556 
   13557 	* testsuite/Makefile.am: Add -ffunction-sections to compile
   13558 	gc_comdat_test files.  Add -Wl,--gc-sections to build
   13559 	gc_comdat_test.
   13560 	* testsuite/Makefile.in: Regenerate.
   13561 	* testsuite/gc_comdat_test.sh: Fix the condition around grep.
   13562 
   13563 2009-05-21  Sriraman Tallam  <tmsriram (a] google.com>
   13564 
   13565 	* object.cc (Sized_relobj::map_to_kept_section): Return NULL if the
   13566 	kept comdat section was garbage collected.
   13567 	* testsuite/Makefile.am: Add test gc_comdat_test.sh.
   13568 	* testsuite/Makefile.in: Regenerate.
   13569 	* testsuite/gc_comdat_test.sh: New file.
   13570 	* testsuite/gc_comdat_test_1.cc: New file.
   13571 	* testsuite/gc_comdat_test_2.cc: New file.
   13572 
   13573 2009-05-19  Doug Kwan  <dougkwan (a] google.com>
   13574 
   13575 	* archive.cc (Archive::Archive): Move constructor from archive.h
   13576 	to here.  Initialize no_export_.
   13577 	(Archive::get_elf_object_for_member): Set no_export flag of object.
   13578 	* archive.h (Archive::Archive): Move constructor body to
   13579 	archive.cc.
   13580 	(Archive::no_export): New method.
   13581 	(Archive::no_export_): New field.
   13582 	* object.h (Object::Object): Initialize no_export_ to false.
   13583 	(Object::no_export, Object::set_no_export): New methods.
   13584 	(Object::no_export_): New field.
   13585 	* options.cc (General_options::parse_exclude_libs): New method.
   13586 	(General_options::check_excluded_libs) Same.
   13587 	* options.h (exclude_libs): New option.
   13588 	(General_options::check_excluded_libs): New method declaration.
   13589 	(General_options::excluded_libs_): New field.
   13590 	* symtab.cc (Symbol_table::add_from_relobj): Hide symbols with
   13591 	default or protected visibility if an object has no-export flag set.
   13592 	testsuite/Makefile.am (check_PROGRAMS): Add exclude_libs_test.
   13593 	(check_SCRIPTS): Add exclude_libs_test.sh.
   13594 	(check_DATA): Add exclude_libs_test.syms.
   13595 	(MOSTLYCLEANFILES): Add exclude_libs_test.syms,
   13596 	libexclude_libs_test_1.a and libexclude_libs_test_2.a.
   13597 	(exclude_libs_test_SOURCES, exclude_libs_test_DEPENDENCIES,
   13598 	exclude_libs_test_LDFLAGS and exclude_libs_test_LDADD): Define.
   13599 	(exclude_libs_test.syms, libexclude_libs_test_1.a,
   13600 	libexclude_libs_test_2.a): New rules.
   13601 	* testsuite/Makefile.in: Regenerate.
   13602 	* testsuite/exclude_libs_test.c: New file.
   13603 	* testsuite/exclude_libs_test.sh: Ditto.
   13604 	* testsuite/exclude_libs_test_1.c: Ditto.
   13605 	* testsuite/exclude_libs_test_2.c: Ditto.
   13606 
   13607 2009-05-15  Ian Lance Taylor  <iant (a] google.com>
   13608 
   13609 	* configure.ac: Check for declarations for cases where libiberty.h
   13610 	checks HAVE_DECL_xxx.
   13611 	* configure, config.in: Rebuild.
   13612 
   13613 2009-05-15  Mikolaj Zalewski  <mikolajz (a] google.com>
   13614 
   13615 	* gold.h (Incremental_argument_list): Remove (invalid) forward
   13616 	declaration.
   13617 	* incremental.cc (Incremental_inputs::report_achive): New method.
   13618 	(Incremental_inputs::report_object): New method.
   13619 	(Incremental_inputs::report_script): New method.
   13620 	(Incremental_inputs::finalize_inputs): New method.
   13621 	(Incremental_inputs::finalize): Call finalize_inputs().
   13622 	(Incremental_inputs::sized_create_incremental_inputs_section_data):
   13623 	Create inputs entries.
   13624 	* incremental.h (Incremental_input_type): New enum.
   13625 	(Incremental_inputs::Incremental_input): Initialize new fields.
   13626 	(Incremental_inputs::report_inputs): New method.
   13627 	(Incremental_inputs::report_achive): New method.
   13628 	(Incremental_inputs::report_object): New method.
   13629 	(Incremental_inputs::report_script): New method.
   13630 	(Incremental_inputs::finalize_inputs): New method.
   13631 	(Incremental_inputs::Input_info): New struct.
   13632 	(Incremental_inputs::Input_info_map): New typedef.
   13633 	(Incremental_inputs::lock_): New field.
   13634 	(Incremental_inputs::Inputs_): New field.
   13635 	(Incremental_inputs::Inputs_map): New field.
   13636 	* main.cc (main): Call Incremental_input::report_inputs.
   13637 	* options.h (Input_argument_list): Typedef moved from
   13638 	Input_arguments.
   13639 	(Input_file_group::Files): Remove, use ::Input_argument_list.
   13640 	(Input_file_group::Input_argument_list): Remove, use
   13641 	::Input_argument_list.
   13642 	* plugin.cc (Plugin_manager::add_input_file): Add error in
   13643 	incremental build.
   13644 	* read_syms.cc (do_read_syms): Call Incremental_input::report_*
   13645 	functions.
   13646 	* script.cc (read_input_script): Call
   13647 	Incremental_input::report_script.
   13648 	* script.h (Script_info): New class.
   13649 
   13650 2009-04-27  Ian Lance Taylor  <iant (a] google.com>
   13651 
   13652 	* x86_64.cc (do_adjust_output_section): Set entsize to
   13653 	plt_entry_size.
   13654 
   13655 2009-04-23  Elliott Hughes  <enh (a] google.com>
   13656 
   13657 	* output.cc (Output_file::close): After short writes, continue
   13658 	writing from the correct offset in the buffer being written.
   13659 
   13660 2009-04-23  Chris Demetriou  <cgd (a] google.com>
   13661 
   13662 	* configure.ac (HAVE_TR1_UNORDERED_MAP_REHASH): New define.
   13663 	* configure: Regenerate.
   13664 	* config.in: Regenerate.
   13665 	* gold.h: Avoid std::tr1::unordered_map and std::tr1::unordered_set
   13666 	if HAVE_TR1_UNORDERED_MAP_REHASH is not defined.
   13667 
   13668 2009-04-21  Mikolaj Zalewski  <mikolajz (a] google.com>
   13669 
   13670 	* incremental.cc (Incremental_inputs_header_data): Renamed from
   13671 	Incremental_input_header_data.
   13672 	(Incremental_inputs_header_data::data_size): New field.
   13673 	(Incremental_inputs_header_data::put_input_file_count): Renamed
   13674 	from input_file_count.
   13675 	(Incremental_inputs_header_data::put_command_line_offset): Renamed
   13676 	from command_line_offset.
   13677 	(Incremental_inputs_header_data::put_reserved): Renamed from
   13678 	put_reserved.
   13679 	(Incremental_inputs_entry_data): Renamed from
   13680 	Incremental_input_entry_data.
   13681 	(Incremental_inputs_entry_data::data_size): New field.
   13682 	(Incremental_inputs::report_command_line): New method.
   13683 	(Incremental_inputs::finalize): New method.
   13684 	(Incremental_inputs::create_incremental_inputs_data): New method.
   13685 	(Incremental_inputs::sized_create_incremental_inputs_data): New method.
   13686 	* incremental.h: New file.
   13687 	* layout.cc (Layout::Layout): Handle new incremental_inputs_.
   13688 	(Layout::finalize): Create incremental inputs section in
   13689 	incremental builds.
   13690 	(Layout::create_incremental_info_sections): New method.
   13691 	* layout.h (Layout::incremental_inputs): New method.
   13692 	(Layout::create_incremental_info_sections): New method.
   13693 	(Layout::incremental_inputs_): New field.
   13694 	* main.cc (main): Notify Incremental_input of the command line.
   13695 
   13696 2009-04-01  Ian Lance Taylor  <iant (a] google.com>
   13697 	    Mikolaj Zalewski  <mikolajz (a] google.com>
   13698 
   13699 	* gold.h (reserve_unordered_map): Define, three versions, one for
   13700 	each version of Unordered_map.
   13701 	* layout.cc (Layout::Layout): Remove options parameter.  Add
   13702 	number_of_input_files parameter.  Don't initialize options_.
   13703 	Initialize number_of_input_files_ and resized_signatures_.  Move
   13704 	sections_are_attached_.
   13705 	(Layout::layout_group): Reserve space for group_signatures_.
   13706 	(Layout::find_or_add_kept_section): Change name parameter to be a
   13707 	reference.  Resize signatures_ map when it gets large enough.
   13708 	(Layout::layout_eh_frame): Use parameters->options() instead of
   13709 	this->options_.
   13710 	(Layout::make_output_section): Likewise.
   13711 	(Layout::attach_allocated_section_to_segment): Likewise.
   13712 	(Layout::finalize, Layout::create_executable_stack): Likewise.
   13713 	(Layout::set_segment_offsets, Layout::create_interp): Likewise.
   13714 	(Layout::finish_dynamic_section, Layout::write_binary): Likewise.
   13715 	* layout.h (class Layout): Update declarations.  Remove options_
   13716 	field.  Add number_of_input_files_ and resized_signatures_
   13717 	fields.  Move sections_are_attached_ field.
   13718 	* main.cc (main): Pass number of input files to Layout
   13719 	constructor.  Don't pass options.
   13720 
   13721 2009-03-30  Ian Lance Taylor  <iant (a] google.com>
   13722 
   13723 	* ffsll.c (ffsll): Correct implementation.
   13724 
   13725 2009-03-27  Ian Lance Taylor  <iant (a] google.com>
   13726 
   13727 	* ffsll.c: New file.
   13728 	* configure.ac: Call AC_REPLACE_FUNCS on ffsll.
   13729 	* gold.h (ffsll): Declare if HAVE_FFSLL is not defined.
   13730 	* ftruncate.c (ftruncate): Declare before definition.
   13731 	* mremap.c (mremap): Likewise.
   13732 	* pread.c (pread): Likewise.
   13733 	* configure, Makefile.in, config.in: Rebuild.
   13734 
   13735 	* mremap.c: New file.
   13736 	* configure.ac: Call AC_REPLACE_FUNCS on mremap.
   13737 	* gold.h (MREMAP_MAYMOVE): Define if HAVE_MREMAP is not defined.
   13738 	(mremap): Declare if HAVE_MREMAP is not defined.
   13739 	* configure, Makefile.in, config.in: Rebuild.
   13740 
   13741 2009-03-27  Cary Coutant  <ccoutant (a] google.com>
   13742 
   13743 	* powerpc.cc (Target_powerpc::check_non_pic): Assert that output is
   13744 	position independent.
   13745 	* sparc.cc (Target_sparc::check_non_pic): Likewise.
   13746 	* x86_64.cc (Target_x86_64::check_non_pic): Likewise.
   13747 
   13748 2009-03-24  Cary Coutant  <ccoutant (a] google.com>
   13749 
   13750 	* symtab.h (needs_plt_entry): Check for unsatisfied reference from
   13751 	an executable.
   13752 	(needs_dynamic_reloc): Likewise.
   13753 
   13754 2009-03-24  Ian Lance Taylor  <iant (a] google.com>
   13755 
   13756 	* yyscript.y (file_cmd): Recognize EXTERN.
   13757 	(extern_name_list, extern_name_list_body): New nonterminals.
   13758 	* script.cc (script_add_extern): Define.
   13759 	* script-c.h (script_add_extern): Declare.
   13760 
   13761 2009-03-24  Rafael Avila de Espindola  <espindola (a] google.com>
   13762 
   13763 	* object.cc (is_elf_object): Define.
   13764 	* object.h (is_elf_object): Declare.
   13765 	* archive.cc (Archive::get_elf_object_for_member): Call
   13766 	is_elf_object.
   13767 	* readsyms.cc (Read_symbols::do_read_symbols): Likewise.
   13768 
   13769 2009-03-24  Elliott Hughes  <enh (a] google.com>
   13770 
   13771 	* output.cc (Output_file::map_anonymous): Define.
   13772 	(Output_file::map): Use map_anonymous.  If the regular mmap fails,
   13773 	try an anonymous one.  Report the size if the mmap fails.
   13774 	* output.h (class Output_file): Declare map_anonymous.
   13775 
   13776 2009-03-24  Ian Lance Taylor  <iant (a] google.com>
   13777 
   13778 	* target-select.cc (instantiate_target): Don't acquire the lock if
   13779 	the instantiated_target_ field has already been set.
   13780 
   13781 2009-03-23  Ian Lance Taylor  <iant (a] google.com>
   13782 
   13783 	* gold-threads.h (class Initialize_lock): Define.
   13784 	* gold-threads.cc (class Initialize_lock_once): Define.
   13785 	(initialize_lock_control): New static variable.
   13786 	(initialize_lock_pointer): New static variable.
   13787 	(initialize_lock_once): New static function.
   13788 	(Initialize_lock::Initialize_lock): Define.
   13789 	(Initialize_lock::initialize): Define.
   13790 	* target-select.h: Include "gold-threads.h".
   13791 	(class Target_selector): Add lock_ and initialize_lock_ fields.
   13792 	Don't define instantiate_target, just declare it.
   13793 	* target-select.cc (Target_selector::Target_selector): Initialize
   13794 	new fields.
   13795 	(Target_selector::instantiate_target): Define.
   13796 	* descriptors.h: Include "gold-threads.h".
   13797 	(class Descriptors): Add initialize_lock_ field.
   13798 	* descriptors.cc (Descriptors::Descriptors): Initialize new
   13799 	field.
   13800 	(Descriptors::open): Use initialize_lock_ field
   13801 	* errors.h (class Errors): Add initialize_lock_ field.
   13802 	* errors.cc (Errors::Errors): Initialize new field.
   13803 	(Errors::initialize_lock): Use initialize_lock_ field.
   13804 	* powerpc.cc (class Target_selector_powerpc): Remove
   13805 	instantiated_target_ field.  In do_recognize call
   13806 	instantiate_target rather than do_instantiate_target.  In
   13807 	do_instantiate_target just allocate a new target.
   13808 	* sparc.cc (class Target_selector_sparc): Likewise.
   13809 
   13810 	* freebsd.h: New file.
   13811 	* i386.cc: Include "freebsd.h".
   13812 	(Target_i386): Derive from Target_freebsd rather than
   13813 	Sized_target.
   13814 	(Target_selector_i386): Derive from Target_selector_freebsd rather
   13815 	than Target_selector.
   13816 	* x86_64.cc: Include "freebsd.h".
   13817 	(Target_x86_64): Derive from Target_freebsd rather than
   13818 	Sized_target.
   13819 	(Target_selector_x86_64): Derive from Target_selector_freebsd
   13820 	rather than Target_selector.
   13821 	* target.h (class Target): Add adjust_elf_header and
   13822 	do_adjust_elf_header.
   13823 	* output.cc (Output_file_header:: do_sized_write): Call target
   13824 	adjust_elf_header routine.
   13825 	* configure.tgt: Set targ_osabi.
   13826 	* configure.ac: Define GOLD_DEFAULT_OSABI.
   13827 	* parameters.cc (Parameters::default_target): Pass
   13828 	GOLD_DEFAULT_OSABI to select_target.
   13829 	* target-select.h (class Target_selector): Make instantiate_target
   13830 	protected rather than private.
   13831 	* Makefile.am (HFILES): Add freebsd.h.
   13832 	* configure, Makefile.in, config.in: Rebuild.
   13833 
   13834 	* merge.cc (do_add_input_section): Correct pend value.  Change
   13835 	message about last entry not being null terminated from error to
   13836 	warning.
   13837 
   13838 2009-03-20  Mikolaj Zalewski  <mikolajz (a] google.com>
   13839 
   13840 	* incremental.cc: New file.
   13841 	* Makefile.am (CCFILES): Add incremental.cc.
   13842 	* Makefile.in: Rebuild.
   13843 
   13844 2009-03-19  Paul Pluzhnikov  <ppluzhnikov (a] google.com>
   13845 
   13846 	* layout.cc (Layout::output_section_name): Preserve names
   13847 	of '.note.' sections.
   13848 
   13849 2009-03-19  Ian Lance Taylor  <iant (a] google.com>
   13850 
   13851 	* descriptors.cc (Descriptors::open): Check that the options are
   13852 	valid before using them.
   13853 
   13854 2009-03-18  Ian Lance Taylor  <iant (a] google.com>
   13855 
   13856 	* script-sections.h: Include <list>.
   13857 	(class Script_sections): Change Sections_elements from std::vector
   13858 	to std::list.  Typedef public Elements_iterator.  Add
   13859 	orphan_section_placement_, data_segment_align_start_, and
   13860 	saw_data_segment_align_ fields.  Remove data_segment_align_index_
   13861 	field.
   13862 	* script-sections.cc (class Orphan_section_placement): New class.
   13863 	(class Sections_element): Add virtual functions is_relro and
   13864 	orphan_section_init.  Remove virtual function place_orphan_here.
   13865 	(class Output_section_definition): Add is_relro and
   13866 	orphan_section_init.  Remove place_orphan_here.
   13867 	(class Orphan_output_section): Likewise.
   13868 	(Script_sections::Script_sections): Update for field changes.
   13869 	(Script_sections::data_segment_align): Set saw_data_segment_align_
   13870 	and data_segment_align_start_, not data_segment_align_index.
   13871 	(Script_sections::data_segment_relro_end): Check
   13872 	saw_data_segment_align_.  Use data_segment_align_start_ rather
   13873 	than data_segment_align_index_.
   13874 	(Script_sections::place_orphan): Rewrite to use
   13875 	Orphan_section_placement.
   13876 
   13877 2009-03-17  Ian Lance Taylor  <iant (a] google.com>
   13878 
   13879 	* archive.cc (Archive::add_symbols): Check for a version attached
   13880 	to the symbol name in the archive map.
   13881 	* testsuite/Makefile.am (check_PROGRAMS): Add ver_test_11.
   13882 	(ver_test_11_SOURCES, ver_test_11_DEPENDENCIES): Define.
   13883 	(ver_test_11_LDFLAGS, ver_test_11_LDADD): Define.
   13884 	(ver_test_11.a): New target.
   13885 	* testsuite/Makefile.in: Rebuild.
   13886 
   13887 	* configure.ac: Check for chsize and posix_fallocate.  Replace
   13888 	ftruncate.
   13889 	* ftruncate.c: New file, from gnulib.
   13890 	* output.cc (posix_fallocate): Define dummy version if not
   13891 	HAVE_POSIX_FALLOCATE.
   13892 	(Output_file::map): Call posix_fallocate rather than lseek and
   13893 	write.
   13894 	* gold.h (ftruncate): Declare if not HAVE_FTRUNCATE.
   13895 	* configure, Makefile.in, config.in: Rebuild.
   13896 
   13897 2009-03-17  Paul Pluzhnikov  <ppluzhnikov (a] google.com>
   13898 
   13899 	* layout.h (Layout::create_note): Add section_name parameter.
   13900 	* layout.cc (Layout::create_note): Likewise.
   13901 	(Layout::create_build_id, Layout::create_gold_note): Fix callers.
   13902 
   13903 2009-03-17  Ian Lance Taylor  <iant (a] google.com>
   13904 
   13905 	* descriptors.cc: Include "options.h".
   13906 	(FD_CLOEXEC, O_CLOEXEC): Define if not defined.
   13907 	(Descriptors::open): Always use O_CLOEXEC when opening a new
   13908 	descriptor.  If we have a plugin, and O_CLOEXEC was not defined,
   13909 	then set FD_CLOEXEC.
   13910 
   13911 	* sparc.cc (class Target_sparc): Add has_got_section.
   13912 	(Target_sparc::Scan::global): If we see _GLOBAL_OFFSET_TABLE_,
   13913 	make sure we have a GOT section.
   13914 
   13915 	* sparc.cc (optimize_tls_reloc): Recognize R_SPARC_TLS_IE_ADD.
   13916 	(Target_sparc::Scan::local): Likewise.
   13917 	(Target_sparc::Scan::global): Likewise.
   13918 	(Target_sparc::Relocate::relocate): Likewise.
   13919 	(Target_sparc::Relocate::relocate_tls): Likewise.
   13920 
   13921 	* symtab.cc (Symbol_table::define_default_version): New function,
   13922 	broken out of add_from_object.
   13923 	(Symbol_table::add_from_object): Call define_default_version.
   13924 	(Symbol_table::define_special_symbol): Add resolve_oldsym
   13925 	parameter.  Change all callers.  If the version for a symbol comes
   13926 	from a version script, resolve it with the symbol with the same
   13927 	name with no version.  Also add the symbol without a version if
   13928 	appropriate.
   13929 	(do_define_in_output_data): If resolving with oldsym, don't delete
   13930 	sym.
   13931 	(do_define_in_output_segment): Likewise.
   13932 	(do_define_as_constant): Likewise.
   13933 	* symtab.h (class Symbol_table): Update declarations.
   13934 
   13935 2009-03-13  Ian Lance Taylor  <iant (a] google.com>
   13936 
   13937 	* readsyms.cc (Read_symbols::incompatible_warning): New function.
   13938 	(Read_symbols::requeue): New function.
   13939 	(Read_symbols::do_read_symbols): If make_elf_object fails because
   13940 	the target type is not configured, and the file was searched for,
   13941 	issue a warning and retry with the next directory.
   13942 	(Add_symbols::run): If the file has an incompatible format, and
   13943 	it was searched for, requeue the Read_symbols task.  On error,
   13944 	release the object.
   13945 	* readsyms.h (class Read_symbols): Add dirindex_ field.  Add
   13946 	dirindex parameter to constructor.  Change all callers.  Declare
   13947 	incompatible_warning and requeue.
   13948 	(class Add_symbols): Add dirpath_, dirindex_, mapfile_,
   13949 	input_argument_ and input_group_ fields.  Add them to
   13950 	constructor.  Change all callers.
   13951 	(class Read_script): Add dirindex_ field.  Add it to constructor.
   13952 	Change all callers.
   13953 	* archive.cc (Archive::setup): Remove input_objects parameter.
   13954 	Change all callers.
   13955 	(Archive::get_file_and_offset): Likewise.
   13956 	(Archive::read_all_symbols): Likewise.
   13957 	(Archive::read_symbols): Likewise.
   13958 	(Archive::get_elf_object_for_member): Remove input_objects
   13959 	parameter.  Add punconfigured parameter.  Change all callers.
   13960 	(Archive::add_symbols): Change return type to bool.  Check return
   13961 	value of include_member.
   13962 	(Archive::include_all_members): Likewise.
   13963 	(Archive::include_member): Change return type to bool.  Return
   13964 	false if first included object has incompatible target.  Set
   13965 	included_member_ field.
   13966 	(Add_archive_symbols::run): If add_symbols returns false, requeue
   13967 	Read_symbols task.
   13968 	* archive.h (class Archive): Add included_member_ field.
   13969 	Initialize it in constructor.  Add input_file and searched_for
   13970 	methods.  Update declarations.
   13971 	(class Add_archive_symbols): Add dirpath_, dirindex_, and
   13972 	input_argument_ fields.  Add them to constructor.  Change all
   13973 	callers.
   13974 	* script.cc: Include "target-select.h".
   13975 	(class Parser_closure): Add skip_on_incompatible_target_ and
   13976 	found_incompatible_target_ fields.  Add
   13977 	skip_on_incompatible_target parameter to constructor.  Change all
   13978 	callers.  Add methods skip_on_incompatible_target,
   13979 	clear_skip_on_incompatible_target, found_incompatible_target, and
   13980 	set_found_incompatible_target.
   13981 	(read_input_script): Add dirindex parameter.  Change all callers.
   13982 	If parser finds an incompatible target, requeue Read_symbols
   13983 	task.
   13984 	(script_set_symbol): Clear skip_on_incompatible_target in
   13985 	closure.
   13986 	(script_add_assertion, script_parse_option): Likewise.
   13987 	(script_start_sections, script_add_phdr): Likewise.
   13988 	(script_check_output_format): New function.
   13989 	* script.h (read_input_script): Update declaration.
   13990 	* script-c.h (script_check_output_format): Declare.
   13991 	* yyscript.y (file_cmd): Handle OUTPUT_FORMAT.
   13992 	(ignore_cmd): Remove OUTPUT_FORMAT.
   13993 	* fileread.cc (Input_file::Input_file): Add explicit this.
   13994 	(Input_file::will_search_for): New function.
   13995 	(Input_file::open): Add pindex parameter.  Change all callers.
   13996 	* fileread.h (class Input_file): Add input_file_argument method.
   13997 	Declare will_search_for.  Update declarations.
   13998 	* object.cc (make_elf_object): Add punconfigured parameter.
   13999 	Change all callers.
   14000 	* object.h (class Object): Make input_file public.  Add
   14001 	searched_for method.
   14002 	(make_elf_object): Update declaration.
   14003 	* dirsearch.cc (Dirsearch::find): Add pindex parameter.  Use it to
   14004 	restart search.
   14005 	* dirsearch.h (class Dirsearch): Update declaration.
   14006 	* options.h (class General_options): Add --warn-search-mismatch.
   14007 	* parameters.cc (Parameters::is_compatible_target): New function.
   14008 	* parameters.h (class Parameters): Declare is_compatible_target.
   14009 	* workqueue.cc (Workqueue::add_blocker): New function.
   14010 	* workqueue.h (class Workqueue): Declare add_blocker.
   14011 
   14012 	* fileread.cc (Input_file::open): Remove options parameter.
   14013 	Change all callers.
   14014 	(Input_file::open_binary): Likewise.
   14015 	* script.cc (read_input_script): Likewise.
   14016 	* readsyms.h (class Read_symbols): Remove options_ field.  Remove
   14017 	options parameter from constructor.  Change all callers.
   14018 	(class Read_script): Likewise.
   14019 	* fileread.h (class Input_file): Update declarations.
   14020 	* script.h (read_input_script): Update declaration.
   14021 
   14022 2009-03-10  Nick Clifton  <nickc (a] redhat.com>
   14023 
   14024 	* po/es.po: New Spanish translation.
   14025 
   14026 2009-03-06  Cary Coutant  <ccoutant (a] google.com>
   14027 
   14028 	* options.cc (parse_short_option): Keep dash_z from registering itself.
   14029 
   14030 2009-03-03  Ian Lance Taylor  <iant (a] google.com>
   14031 
   14032 	PR 9918
   14033 	* target-reloc.h (relocate_section): Pass output_section to
   14034 	relocate.
   14035 	* i386.cc (Target_i386::should_apply_static_reloc): Add
   14036 	output_section parameter.  Change all callers.
   14037 	(Target_i386::Relocate::relocate): Add output_section parameter.
   14038 	* x86_64.cc (Target_x86_64::Relocate::relocate): Likewise.
   14039 	* sparc.cc (Target_sparc::Relocate::relocate): Likewise.
   14040 	* powerpc.cc (Target_powerpc::Relocate::relocate): Likewise.
   14041 	* testsuite/two_file_shared.sh: New script.
   14042 	* testsuite/Makefile.am (check_SCRIPTS): Add two_file_shared.sh.
   14043 	(check_DATA): Add two_file_shared.dbg.
   14044 	(two_file_shared.dbg): New target.
   14045 	* testsuite/Makefile.in: Rebuild.
   14046 
   14047 2009-03-01  Ian Lance Taylor  <iant (a] google.com>
   14048 
   14049 	* configure.ac: Check for byteswap.h.
   14050 	* configure: Rebuild.
   14051 	* config.in: Rebuild.
   14052 
   14053 2009-03-01  Mikolaj Zalewski  <mikolajz (a] google.com>
   14054 
   14055 	* layout.cc (Layout::find_or_add_kept_section): New function.
   14056 	(Layout::add_comdat): Removed.
   14057 	* layout.h (struct Kept_section): Move out of class Layout.
   14058 	Remove trailing underscores from field names.  Add group_sections
   14059 	field.  Rename group_ field to is_group.  Change all uses.
   14060 	(class Layout): Declare find_or_add_kept_section, not add_comdat.
   14061 	* object.cc (Sized_relobj::Sized_relobj): Don't initialize
   14062 	comdat_groups_ field.
   14063 	(Sized_relobj::include_section_group): Use
   14064 	find_or_add_kept_section and Kept_section::group_sections.
   14065 	(Sized_relobj::include_linkonce_section): Likewise.
   14066 	* object.cc (class Sized_relobj): Don't define Comdat_group or
   14067 	Comdat_group_table.  Remove find_comdat_group and
   14068 	add_comdat_group.  Remove comdat_groups_ field.
   14069 	* plugin.cc (include_comdat_group): Use
   14070 	Layout::find_or_add_kept_section.
   14071 
   14072 2009-02-28  Ian Lance Taylor  <iant (a] google.com>
   14073 
   14074 	* README: --gc-sections and map files are now supported.  Document
   14075 	some build requirements.
   14076 
   14077 	PR 6992
   14078 	* symtab.cc (Symbol_table::sized_write_section_symbol): In a
   14079 	relocatable link set the value of the section symbol to zero.
   14080 	* object.cc (Sized_relobj::do_finalize_local_symbols): In a
   14081 	relocatable link don't include the section address in the local
   14082 	symbol value.
   14083 
   14084 2009-02-27  Ian Lance Taylor  <iant (a] google.com>
   14085 
   14086 	PR 6811
   14087 	* options.h (class Search_directory): Add is_system_directory.
   14088 	(class General_options): Declare is_in_system_directory.
   14089 	* options.cc (get_relative_sysroot): Make static.
   14090 	(get_default_sysroot): Make static.
   14091 	(General_optoins::is_in_system_directory): New function.
   14092 	* fileread.cc (Input_file::is_in_system_directory): New function.
   14093 	* fileread.h (class Input_file): Declare is_in_system_directory.
   14094 	* object.h (class Object): Add is_in_system_directory.
   14095 	(class Input_objects): Remove system_library_directory_ field.
   14096 	* object.cc (Input_objects::add_object): Don't set
   14097 	system_library_directory_.
   14098 	(input_objects::found_in_system_library_directory): Remove.
   14099 	* symtab.cc (Symbol_table::write_globals): Remove input_objects
   14100 	parameter.  Change all callers.
   14101 	(Symbol_table::sized_write_globals): Likewise.
   14102 	(Symbol_table::warn_about_undefined_dynobj_symbol): Likewise.
   14103 	Call Object::is_in_system_directory.
   14104 	* symtab.h (class Symbol_table): Update declarations.
   14105 
   14106 	PR 5990
   14107 	* descriptors.h (Open_descriptor): Add is_on_stack field.
   14108 	* descriptors.cc (Descriptors::open): If the descriptor is on the
   14109 	top of the stack, remove it.  Initialize is_on_stack field.
   14110 	(Descriptors::release): Only add pod to stack if it is not on the
   14111 	stack already.
   14112 	(Descriptors::close_some_descriptor): Clear stack_next and
   14113 	is_on_stack fields.
   14114 
   14115 	PR 7091
   14116 	* output.cc (Output_section::find_starting_output_address): Rename
   14117 	from starting_output_address; add PADDR parameter; change return
   14118 	type.
   14119 	* output.h (class Output_section): Declare
   14120 	find_starting_output_address instead of starting_output_address.
   14121 	* object.cc (Sized_relobj::do_finalize_local_symbols): Handle a
   14122 	section symbol for which we can't find a merge section.
   14123 
   14124 	PR 9836
   14125 	* symtab.cc (Symbol_table::add_from_object): If the visibility is
   14126 	hidden or internal, force the symbol to be local.
   14127 	* resolve.cc (Symbol::override_visibility): Define.
   14128 	(Symbol::override_base): Use override_visibility.
   14129 	(Symbol_table::resolve): Likewise.
   14130 	(Symbol::override_base_with_special): Likewise.
   14131 	(Symbol_table::override_with_special): If the visibility is hidden
   14132 	or internal, force the symbol to be local.
   14133 	* symtab.h (class Symbol): Add set_visibility and
   14134 	override_visibility.
   14135 	* testsuite/ver_test_1.sh: New file.
   14136 	* testsuite/Makefile.am (check_SCRIPTS): Add ver_test_1.sh.
   14137 	(check_DATA): Add ver_test_1.syms.
   14138 	(ver_test_1.syms): New target.
   14139 	* testsuite/Makefile.in: Rebuild.
   14140 
   14141 2009-02-25  Cary Coutant  <ccoutant (a] google.com>
   14142 
   14143 	* layout.cc (Layout::choose_output_section): Don't rename sections
   14144 	when using a linker script that has a SECTIONS clause.
   14145 	* Makefile.in: Regenerate.
   14146 
   14147 	* testsuite/Makefile.am (script_test_5.sh): New test case.
   14148 	* testsuite/Makefile.in: Regenerate.
   14149 	* testsuite/script_test_5.cc: New file.
   14150 	* testsuite/script_test_5.sh: New file.
   14151 	* testsuite/script_test_5.t: New file.
   14152 
   14153 2009-02-13  Rafael Avila de Espindola  <espindola (a] google.com>
   14154 
   14155 	* archive.cc (Archive::include_member): Update calls to add_symbols.
   14156 	* dynobj.cc (Sized_dynobj<size, big_endian>::make_version_map): Add
   14157 	the Layout argument.
   14158 	* dynobj.h (do_add_symbols): Add the Layout argument.
   14159 	* object.cc (Sized_relobj<size, big_endian>::do_add_symbols): Add the
   14160 	Layout argument.
   14161 	* object.h (Object::add_symbols): Add the Layout argument.
   14162 	(Object::do_add_symbols): Add the Layout argument.
   14163 	(Sized_relobj::do_add_symbols): Add the Layout argument.
   14164 	* plugin.cc (Sized_pluginobj<size, big_endian>::do_add_symbols):
   14165 	Unify the two versions.
   14166 	(Add_plugin_symbols): Remove.
   14167 	* plugin.h (Pluginobj::add_symbols, Pluginobj::do_add_symbols): Remove.
   14168 	(Sized_pluginobj::do_add_symbols): Unify the two versions.
   14169 	(Add_plugin_symbols): Remove.
   14170 	* readsyms.cc (Read_symbols::do_read_symbols): Update call to
   14171 	Add_symbols. Use Add_symbols instead of Add_plugin_symbols.
   14172 	(Add_symbols::run): Make it work with Pulginobj.
   14173 
   14174 2009-02-06  Ian Lance Taylor  <iant (a] google.com>
   14175 
   14176 	* object.cc (Sized_relobj::do_layout): Make info message start
   14177 	with lower case letter.
   14178 
   14179 2009-02-06  Mikolaj Zalewski  <mikolajz (a] google.com>
   14180 
   14181 	* binary.cc: Fix file comment.
   14182 
   14183 	* options.h (enum Incremental_disposition): Define.
   14184 	(class General_options): Add new options: --incremental,
   14185 	--incremental_changed, --incremental_unchanged,
   14186 	--incremental_unknown.  Add incremental_disposition_ and
   14187 	implicit_incremental_ fields.
   14188 	(General_options::incremental_disposition): New function.
   14189 	(class Position_dependent_options): Add incremental_disposition
   14190 	option.
   14191 	(Position_dependent_options::copy_from_options): Set incremental
   14192 	dispositions.
   14193 	* options.cc (General_options::parse_incremental_changed): New
   14194 	function.
   14195 	(General_options::parse_incremental_unchanged): New function.
   14196 	(General_options::parse_incremental_unknown): New function.
   14197 	(General_options::General_options): Initialize new fields
   14198 	incremental_disposition_ and implicit_incremental_.
   14199 	(General_options::finalize): Check for uasge of --incremental-*
   14200 	without --incremental.
   14201 
   14202 2009-02-06  Chris Demetriou  <cgd (a] google.com>
   14203 
   14204 	* gold.h (gold_undefined_symbol): Change to take only a Symbol
   14205 	pointer and to report location as the file name associated with
   14206 	the symbol.
   14207 	(gold_undefined_symbol_at_location): New function to replace the
   14208 	old gold_undefined_symbol functionality.
   14209 	* target-reloc.h (relocate_section): Update to use
   14210 	gold_undefined_symbol_at_location.
   14211 	* symtab.cc (Symbol_table::warn_about_undefined_dynobj_symbol):
   14212 	Call gold_undefined_symbol function rather than gold_error.
   14213 	* errors.h (Errors::undefined_symbol): Take location as a
   14214 	string, rather than calculating it from a relocation.
   14215 	* errors.cc (Errors::fatal): Print "fatal error:" before the
   14216 	formatted message.
   14217 	(Errors::error, Errors::error_at_location): Print "error: "
   14218 	before the formatted message.
   14219 	(Errors::undefined_symbol): Take location as a string, rather
   14220 	than calculating it from a relocation.
   14221 	(gold_undefined_symbol_at_location): New function akin to
   14222 	old gold_undefined_symbol, calculates location from relocation.
   14223 	(gold_undefined_symbol): Change to take only a Symbol pointer
   14224 	and to report location as the file name associated with the symbol.
   14225 	* testsuite/debug_msg.sh: Update for changed error messages.
   14226 	* testsuite/undef_symbol.sh: Likewise.
   14227 
   14228 2009-02-04  Duncan Sands  <baldrick (a] free.fr>
   14229 
   14230 	PR 9812
   14231 	* reduced_debug_output.h
   14232 	(Output_reduced_debug_abbrev_section::failed): Use format for
   14233 	gold_warning.
   14234 	(Output_reduced_debug_info_section::faild): Likewise.
   14235 
   14236 2009-01-31  Mikolaj Zalewski  <mikolajz (a] google.com>
   14237 
   14238 	* script.cc (Lazy_demangler): New class.
   14239 	(Version_script_info::get_symbol_version_helper): Demangle a
   14240 	symbol only once.
   14241 
   14242 2009-01-29  Cary Coutant  <ccoutant (a] google.com>
   14243 
   14244 	* i386.cc (Target_i386::Relocate::relocate): Recognize non-PIC calls
   14245 	to __tls_get_addr.
   14246 	* x86_64.cc (Target_x86_64::Relocate::relocate): Likewise.
   14247 
   14248 2009-01-28  Ian Lance Taylor  <iant (a] google.com>
   14249 
   14250 	* version.cc (version_string): Bump to 1.9.
   14251 
   14252 	* gold.h: Include <cstring> and <stdint.h>.
   14253 	* version.cc: Include <cstdio>.
   14254 	* object.cc (Sized_relobj::do_layout): Initialize gc_sd to avoid a
   14255 	warning.
   14256 	* reduced_debug_output.cc (insert_into_vector): Rename from
   14257 	Insert_into_vector; change all callers.  Use Swap_unaligned to
   14258 	avoid aliasing issue; remove union since it is unnecessary.
   14259 
   14260 2009-01-27  Sriraman Tallam  <tmsriram (a] google.com>
   14261 
   14262 	* Makefile.am (CCFILES): Add gc.cc.
   14263 	(HFILES): Add gc.h.
   14264 	* Makefile.in: Regenerate.
   14265 	* gold.cc (Gc_runner): New class.
   14266 	(queue_initial_tasks): Call garbage collection related tasks
   14267 	when corresponding options are invoked.
   14268 	(queue_middle_gc_tasks): New function.
   14269 	(queue_middle_tasks): Reorder tasks to allow relocs to be read and
   14270 	processed early before laying out sections during garbage collection.
   14271 	* gold.h (queue_middle_gc_tasks): New function.
   14272 	(is_prefix_of): Move from "layout.cc".
   14273 	* i386.cc (Target_i386::gc_process_relocs): New function.
   14274 	* layout.cc (is_prefix_of): Remove. Move to "gold.h"
   14275 	* main.cc (main): Create object of class "Garbage_collection".
   14276 	* object.cc (Relobj::copy_symbols_data): New function.
   14277 	(Relobj::is_section_name_included): New function.
   14278 	(Sized_relobj::do_layout): Allow this function to be called twice
   14279 	during garbage collection and defer layout of section during the
   14280 	first call.
   14281 	* object.h (Relobj::get_symbols_data): New function.
   14282 	(Relobj::is_section_name_included): New function.
   14283 	(Relobj::copy_symbols_data): New function.
   14284 	(Relobj::set_symbols_data): New function.
   14285 	(Relobj::get_relocs_data): New function.
   14286 	(Relobj::set_relocs_data): New function.
   14287 	(Relobj::is_output_section_offset_invalid): New pure virtual function.
   14288 	(Relobj::gc_process_relocs): New function.
   14289 	(Relobj::do_gc_process_relocs): New pure virtual function.
   14290 	(Relobj::sd_): New data member.
   14291 	(Sized_relobj::is_output_section_offset_invalid): New function.
   14292 	(Sized_relobj::do_gc_process_relocs): New function.
   14293 	* options.h (General_options::gc_sections): Modify to not be a no-op.
   14294 	(General_options::print_gc_sections): New option.
   14295 	* plugin.cc (Plugin_finish::run): Remove function call to
   14296 	Plugin_manager::layout_deferred_objects.  Move it to "gold.cc".
   14297 	* powerpc.cc (Target_powerpc::gc_process_relocs): New function.
   14298 	* reloc.cc (Read_relocs::run): Add task to process relocs and
   14299 	determine unreferenced sections when doing garbage collection.
   14300 	(Gc_process_relocs): New class.
   14301 	(Sized_relobj::do_gc_process_relocs): New function.
   14302 	(Sized_relobj::do_scan_relocs): Don't try to scan the relocs for
   14303 	sections that are garbage collected.
   14304 	* reloc.h (Gc_process_relocs): New class.
   14305 	* sparc.cc (Target_sparc::gc_process_relocs): New function.
   14306 	* symtab.cc (Symbol::should_add_dynsym_entry): Do not add entries for
   14307 	symbols whose corresponding sections are garbage collected.
   14308 	(Symbol_table::Symbol_table): Add new parameter for the garbage
   14309 	collection object.
   14310 	(Symbol_table::gc_mark_undef_symbols): New function.
   14311 	(Symbol_table::gc_mark_symbol_for_shlib): New function.
   14312 	(Symbol_table::gc_mark_dyn_syms): New function.
   14313 	(Symbol_table::resolve): Do not treat symbols seen in dynamic objects
   14314 	as garbage.
   14315 	(Symbol_table::add_from_object): Likewise.
   14316 	(Symbol_table::add_from_relobj): When building shared objects, do not
   14317 	treat externally visible symbols as garbage.
   14318 	(Symbol_table::sized_finalize_symbol): Do not check dynamic symbol
   14319 	table information for static and relocatable links.
   14320 	* symtab.h (Symbol_table::set_gc): New function.
   14321 	(Symbol_table::gc): New function.
   14322 	(Symbol_table::gc_mark_undef_symbols): New function.
   14323 	(Symbol_table::gc_mark_symbol_for_shlib): New function.
   14324 	(Symbol_table::gc_mark_dyn_syms): New function.
   14325 	(Symbol_table::gc_): New data member.
   14326 	* target.h (Sized_target::gc_process_relocs): New pure virtual
   14327 	function.
   14328 	* x86_64.cc (Target_x86_64::gc_process_relocs): New function.
   14329 	* testsuite/testfile.cc (Target_test::gc_process_relocs): New function.
   14330 
   14331 2009-01-20  Chris Faylor <me.sourceware (a] sourceware.org>
   14332 
   14333 	* options.h (General_options::gc_sections): Define as a no-op for now.
   14334 	(General_options::no_keep_memory): Ditto.
   14335 	(General_options::Bshareable): Define.
   14336 	* options.cc (General_options::finalize): Honor -Bshareable.
   14337 
   14338 2009-01-20  Andreas Schwab  <schwab (a] suse.de>
   14339 
   14340 	* powerpc.cc (Powerpc_relocate_functions::rel16_ha): Don't try to
   14341 	read the value in the contents, since we don't use it.  Use the
   14342 	template endianness when writing.
   14343 	(Relocate::relocate): Use it for R_PPC_REL16_HA.
   14344 
   14345 2009-01-19  Andreas Schwab  <schwab (a] suse.de>
   14346 
   14347 	* configure.tgt (powerpc64-*): Fix targ_obj.
   14348 
   14349 2009-01-15  Ian Lance Taylor  <iant (a] google.com>
   14350 
   14351 	* object.cc (Sized_relobj::write_local_symbols): Don't write out
   14352 	local symbols when stripping all symbols.
   14353 
   14354 2009-01-14  Cary Coutant  <ccoutant (a] google.com>
   14355 
   14356 	* output.cc (Output_reloc): Add explicit instantiations.
   14357 
   14358 2009-01-14  Cary Coutant  <ccoutant (a] google.com>
   14359 
   14360 	* archive.cc (Archive::get_elf_object_for_member): Remove call
   14361 	to File_read::claim_for_plugin.
   14362 	* descriptors.cc (Descriptors::open): Remove reference to
   14363 	is_claimed.
   14364 	(Descriptors::claim_for_plugin): Remove.
   14365 	* descriptors.h (Descriptors::claim_for_plugin): Remove.
   14366 	(Descriptors::is_claimed): Remove.
   14367 	(claim_descriptor_for_plugin): Remove.
   14368 	* fileread.cc (File_read::claim_for_plugin): Remove.
   14369 	* fileread.h (File_read::claim_for_plugin): Remove.
   14370 	(File_read::descriptor): Reopen descriptor if necessary.
   14371 	* plugin.cc  (Plugin::load): Add two new APIs to transfer vector.
   14372 	(Plugin_manager::all_symbols_read): Add task parameter. Change
   14373 	all callers.
   14374 	(Plugin_manager::get_input_file): New function.
   14375 	(Plugin_manager::release_input_file): New function.
   14376 	(Pluginobj::Pluginobj): Add filesize parameter and initialize
   14377 	corresponding data member.
   14378 	(Sized_pluginobj::Sized_pluginobj): Add filesize parameter
   14379 	and pass to base constructor. Change all callers.
   14380 	(get_input_file, release_input_file): New functions.
   14381 	(make_sized_plugin_object): Add filesize parameter. Change all callers.
   14382 	* plugin.h (Plugin_manager::Plugin_manager): Initialize task_ member.
   14383 	(Plugin_manager::all_symbols_read): Add task parameter.
   14384 	(Plugin_manager::get_input_file): New function.
   14385 	(Plugin_manager::release_input_file): New function.
   14386 	(Plugin_manager::task_): New data member.
   14387 	(Pluginobj::Pluginobj): Add filesize parameter.
   14388 	(Pluginobj::filename): New function.
   14389 	(Pluginobj::descriptor): New function.
   14390 	(Pluginobj::filesize): New function.
   14391 	(Pluginobj::filesize_): New data member.
   14392 	(Sized_pluginobj::Sized_pluginobj): Add filesize parameter.
   14393 	* readsyms.cc (Read_symbols::do_read_symbols): Remove call to
   14394 	File_read::claim_for_plugin; use Object::unlock to unlock the file.
   14395 
   14396 	* testsuite/Makefile.am (plugin_test_4): New test case for plugins
   14397 	with archive libraries.
   14398 	* testsuite/Makefile.in: Regenerate.
   14399 	* testsuite/plugin_test.c (struct sym_info): New type.
   14400 	(get_input_file, release_input_file): New static variables.
   14401 	(onload): Capture new transfer vector entries.
   14402 	(claim_file_hook): Stop reading at end of file according to filesize.
   14403 	Factor out parsing of readelf output into separate function.
   14404 	(all_symbols_read_hook): Exercise get_input_file and release_input_file
   14405 	APIs and get the source file name from the symbol table.  Convert
   14406 	source file name to corresponding object file name.  Print info
   14407 	message when adding new input files.
   14408 	(parse_readelf_line): New function.
   14409 	* testsuite/plugin_test_1.sh: Add checks for new info messages.
   14410 	* testsuite/plugin_test_2.sh: Likewise.
   14411 	* testsuite/plugin_test_3.sh: Likewise.
   14412 	* testsuite/plugin_test_4.sh: New test case.
   14413 
   14414 2009-01-07  Ian Lance Taylor  <iant (a] google.com>
   14415 
   14416 	* version.cc (version_string): Bump to 1.8.
   14417 
   14418 2008-12-23  Cary Coutant  <ccoutant (a] google.com>
   14419 
   14420 	* gold.cc (gold_exit): Call plugin cleanup handlers on exit.
   14421 	* plugin.cc (Plugin_manager::finish): Rename as
   14422 	layout_deferred_objects.  Move cleanup to separate function.
   14423 	(Plugin_manager::cleanup): New function.
   14424 	(Plugin_finish::run): Call layout_deferred_objects and cleanup
   14425 	separately.
   14426 	* plugin.h (Plugin_manager::finish): Rename as
   14427 	layout_deferred_objects.
   14428 	(Plugin_manager::cleanup): New function.
   14429 	(Plugin_manager::cleanup_done): New field.
   14430 
   14431 2008-12-23  Cary Coutant  <ccoutant (a] google.com>
   14432 
   14433 	* plugin.cc (is_visible_from_outside): New function.
   14434 	(Pluginobj::get_symbol_resolution_info): Call is_visible_from_outside
   14435 	so we don't return "IR only" status for exported symbols or -r links.
   14436 
   14437 	* testsuite/Makefile.am (plugin_test_3): New test case.
   14438 	* testsuite/Makefile.in: Regenerate.
   14439 	* testsuite/plugin_test_3.sh: New file.
   14440 
   14441 2008-12-22  Cary Coutant  <ccoutant (a] google.com>
   14442 
   14443 	* object.cc (Sized_relobj::layout_section): New function.
   14444 	(Sized_relobj::do_layout): Defer layout of input sections until after
   14445 	plugin has provided replacement files.
   14446 	(Sized_relobj::do_layout_deferred_sections): New function.
   14447 	* object.h (Relobj::set_section_offset): Remove virtual keyword.
   14448 	(Relobj::layout_deferred_sections): New function.
   14449 	(Relobj::do_layout_deferred_sections): New function.
   14450 	(Sized_relobj::do_layout_deferred_sections): New function.
   14451 	(Sized_relobj::layout_section): New function.
   14452 	(Sized_relobj::Deferred_layout): New structure.
   14453 	(Sized_relobj::deferred_layout_): New field.
   14454 	* plugin.cc (Plugin_manager::finish): Renamed, was cleanup.
   14455 	Change all callers.  Layout deferred sections.
   14456 	(class Plugin_finish): Renamed, was Plugin_cleanup.  Change all
   14457 	references.
   14458 	(Plugin_hook::run): Move code from do_plugin_hook inline.
   14459 	(Plugin_hook::do_plugin_hook): Remove.
   14460 	* plugin.h (Plugin_manager::Plugin_manager): Add missing initializers.
   14461 	(Plugin_manager::finish): Renamed, was cleanup.
   14462 	(Plugin_manager::should_defer_layout): New function.
   14463 	(Plugin_manager::add_deferred_layout_object): New function.
   14464 	(Plugin_manager::Deferred_layout_list): New type.
   14465 	(Plugin_manager::deferred_layout_objects_): New field.
   14466 	(Plugin_hook::do_plugin_hook): Remove.
   14467 
   14468 2008-12-17  Ian Lance Taylor  <iant (a] google.com>
   14469 
   14470 	* options.h (class General_options): Add --no case for
   14471 	--export-dynamic.
   14472 
   14473 2008-12-16  Cary Coutant  <ccoutant (a] google.com>
   14474 
   14475 	* plugin.cc (Plugin::load): Move LDPT_MESSAGE to front of transfer
   14476 	vector.
   14477 	(Plugin_manager::claim_file): Create plugin object even if
   14478 	plugin did not call the add_symbols callback.
   14479 	(Plugin_obj::get_symbol_resolution_info): Guard against plugin
   14480 	asking for more symbols than were added.
   14481 	* testsuite/Makefile.am (plugin_test_1): Add test case with
   14482 	no global symbols.
   14483 	(empty.syms): New target.
   14484 	* testsuite/Makefile.in: Regenerate.
   14485 	* testsuite/plugin_test.c (claim_file_hook): Add new debug
   14486 	message. Don't call add_symbols if no globals.
   14487 	(all_symbols_read_hook): Don't provide replacement for empty
   14488 	claimed file.
   14489 
   14490 2008-12-12  Ian Lance Taylor  <iant (a] google.com>
   14491 
   14492 	* target-reloc.h (Default_scan_relocatable_relocs): Only discard
   14493 	r_type == 0 for a local symbol with r_sym == 0.
   14494 	(scan_relocatable_relocs): Pass r_sym to
   14495 	local_non_section_strategy.
   14496 	* reloc.cc (Emit_relocs_strategy::local_non_section_strategy): Add
   14497 	r_sym parameter.
   14498 
   14499 	* configure.ac: Update test for TLS descriptors: they are
   14500 	supported as of glibc 2.9.
   14501 	* configure: Rebuild.
   14502 
   14503 2008-12-11  Ian Lance Taylor  <iant (a] google.com>
   14504 
   14505 	PR 7091
   14506 	* target-reloc.h (Default_scan_relocatable_relocs): For each
   14507 	function, map r_type == 0 to RELOC_DISCARD.
   14508 
   14509 2008-12-10  Cary Coutant  <ccoutant (a] google.com>
   14510 
   14511 	* layout.cc (Layout::add_comdat): Allow COMDAT group from a replacement
   14512 	object to override a kept COMDAT group from a plugin object.
   14513 
   14514 2008-12-09  Ian Lance Taylor  <iant (a] google.com>
   14515 
   14516 	PR 7088
   14517 	* yyscript.y (file_cmd): Handle INPUT.
   14518 
   14519 	* testsuite/initpri1.c: Change all declarations to be full
   14520 	prototypes by adding void, to avoid compiler warnings.
   14521 
   14522 2008-12-05  Rafael Avila de Espindola  <espindola (a] google.com>
   14523 
   14524 	* options.cc (General_options::parse_plugin_opt): New.
   14525 	(General_options::add_plugin): The argument now is just the filename.
   14526 	(General_options::add_plugin_option): New.
   14527 	* options.h (plugin_opt): New.
   14528 	(add_plugin): Change argument name.
   14529 	(add_plugin_option): New.
   14530 	* plugin.cc (Plugin::load): Don't parse the plugin option.
   14531 	* plugin.h (Plugin::Plugin): Rename argument. Init filename_.
   14532 	(Plugin::add_option): New.
   14533 	(Plugin::args_): Change type.
   14534 	(Plugin::filename_): New.
   14535 	(Plugin_manager::add_plugin_option): New.
   14536 	* testsuite/Makefile.am (plugin_test_1): Use new syntax.
   14537 	* testsuite/Makefile.in: Regenerate.
   14538 
   14539 2008-12-05  Cary Coutant  <ccoutant (a] google.com>
   14540 
   14541 	* layout.cc (Layout::include_section): Check for SHF_EXCLUDE.
   14542 	Handle --strip-lto-sections option.
   14543 	* options.h (strip_lto_sections): New option.
   14544 
   14545 2008-12-01  Cary Coutant  <ccoutant (a] google.com>
   14546 
   14547 	* plugin.cc (ld_plugin_message): Change format parameter to const.
   14548 	Fix mismatch between new[] and delete.
   14549 
   14550 2008-11-14  Cary Coutant  <ccoutant (a] google.com>
   14551 
   14552 	* reloc.cc (Sized_relobj::do_read_relocs): Use constant invalid_address
   14553 	instead of -1U.
   14554 
   14555 2008-11-05  Craig Silverstein  <csilvers (a] google.com>
   14556 
   14557 	* options.cc (General_options::parse_dynamic_list): New function.
   14558 	* options.h (General_options): New flags dynamic_list,
   14559 	dynamic_list_data, dynamic_list_cpp_new, and
   14560 	dynamic_list_cpp_typeinfo.  New variable dynamic_list_.
   14561 	(General_options::in_dynamic_list): New function.
   14562 	* script.cc (Lex::Mode): New enum DYNAMIC_LIST.
   14563 	(Lex::can_start_name): Add support for DYNAMIC_LIST mode.
   14564 	(Lex::can_continue_name): Likewise.
   14565 	(yylex): Likewise.
   14566 	(read_script_file): New parameter script_options.
   14567 	(read_dynamic_list): New function.
   14568 	(Script_options::define_dynamic_list): New function.
   14569 	(dynamic_list_keyword_parsecodes): New variable.
   14570 	(dynamic_list_keywords): New variable.
   14571 	* script.h (Script_options::define_dynamic_list): New function
   14572 	prototype.
   14573 	(read_dynamic_list): New function prototype.
   14574 	* symtab.cc (strprefix): New macro.
   14575 	(Symbol::should_add_dynsym_entry): Support dynamic_list,
   14576 	dynamic_list_data, dynamic_list_cpp_new, and
   14577 	dynamic_list_cpp_typeinfo.
   14578 	* yyscript.y (PARSING_DYNAMIC_LIST): New token.
   14579 	(dynamic_list_expr): New rule.
   14580 	(dynamic_list_nodes): Likewise.
   14581 	(dynamic_list_node): Likewise.
   14582 	* testsuite/Makefile.am (dynamic_list): New test.
   14583 	* testsuite/Makefile.in: Regenerated.
   14584 	* testsuite/dynamic_list.t: New file.
   14585 	* testsuite/dynamic_list.sh: New file.
   14586 
   14587 2008-11-05  Craig Silverstein  <csilvers (a] google.com>
   14588 
   14589 	* testsuite/tls_test_c.c: Add prototype for t11 and t11_last.
   14590 	* testsuite/tls_test_c.c (t11): Add explicit "void" to prototype.
   14591 	(t11_last): Likewise.
   14592 	* testsuite/ver_test_6.c (main): Likewise.
   14593 
   14594 2008-10-07  Cary Coutant  <ccoutant (a] google.com>
   14595 
   14596 	* options.c (General_options::finalize): Add check for -static and
   14597 	-shared.
   14598 	* gold.cc (queue_middle_tasks): Assert that list of dynamic objects
   14599 	is not empty.
   14600 
   14601 2008-10-02  Cary Coutant  <ccoutant (a] google.com>
   14602 
   14603 	* plugin.cc (make_sized_plugin_object): Fix conditional
   14604 	compilation to work when not all targets are enabled.
   14605 
   14606 2008-09-29  Cary Coutant  <ccoutant (a] google.com>
   14607 
   14608 	* archive.cc (Archive::get_file_and_offset): Use filename instead
   14609 	of name to get library path.
   14610 	(Archive::include_member): Unlock external member of a thin archive.
   14611 
   14612 	* testsuite/Makefile.am (TEST_AR): New variable.
   14613 	(thin_archive_test_1): New test.
   14614 	(thin_archive_test_2): New test.
   14615 	* testsuite/Makefile.in: Regenerate.
   14616 	* testsuite/thin_archive_main.cc: New file.
   14617 	* testsuite/thin_archive_test_1.cc: New file.
   14618 	* testsuite/thin_archive_test_2.cc: New file.
   14619 	* testsuite/thin_archive_test_3.cc: New file.
   14620 	* testsuite/thin_archive_test_4.cc: New file.
   14621 
   14622 2008-09-29  Cary Coutant  <ccoutant (a] google.com>
   14623 
   14624 	* mapfile.cc (Mapfile::print_input_section): Change -1U to -1ULL.
   14625 	* object.cc (Sized_relobj::do_layout): Use constant invalid_address
   14626 	instead of -1U.
   14627 	(Sized_relobj::do_finalize_local_symbols): Likewise.
   14628 	(Sized_relobj::map_to_kept_section): Likewise.
   14629 	* object.h (Sized_relobj::invalid_address): New constant.
   14630 	(Sized_relobj::do_output_section_offset): Check for invalid_address
   14631 	and return -1ULL.
   14632 	* output.cc (Output_reloc::local_section_offset): Use constant
   14633 	invalid_address instead of -1U.
   14634 	(Output_reloc::get_address): Likewise.
   14635 	(Output_section::output_address): Change -1U to -1ULL.
   14636 	* output.h (Output_reloc::invalid_address): New constant.
   14637 	* reloc.cc (Sized_relobj::write_sections): Use constant
   14638 	invalid_address instead of -1U.
   14639 	(Sized_relobj::relocate_sections): Likewise.
   14640 	* symtab.cc (Symbol_table::sized_finalize_symbol): Handle symbol
   14641 	values for merge sections.
   14642 	* target-reloc.h (relocate_for_relocatable): Use constant
   14643 	invalid_address instead of -1U.
   14644 
   14645 2008-09-19  Cary Coutant  <ccoutant (a] google.com>
   14646 
   14647 	Add plugin functionality for link-time optimization (LTO).
   14648 	* configure.ac (plugins): Add --enable-plugins option.
   14649 	* configure: Regenerate.
   14650 	* config.in: Regenerate.
   14651 	* Makefile.am (LIBDL): New variable.
   14652 	(CCFILES): Add plugin.cc.
   14653 	(HFILES): Add plugin.h.
   14654 	(ldadd_var): Add LIBDL.
   14655 	* Makefile.in: Regenerate.
   14656 
   14657 	* archive.cc: Include "plugin.h".
   14658 	(Archive::setup): Don't preread archive symbols when using a plugin.
   14659 	(Archive::get_file_and_offset): Add memsize parameter.  Change callers.
   14660 	(Archive::get_elf_object_for_member): Call plugin hooks for claiming
   14661 	files.
   14662 	(Archive::include_member): Add symbols from plugin objects.
   14663 	* archive.h (Archive::get_file_and_offset): Add memsize parameter.
   14664 	* descriptors.cc (Descriptors::open): Check for file descriptors
   14665 	abandoned by plugins.
   14666 	(Descriptors::claim_for_plugin): New function.
   14667 	* descriptors.h (Descriptors::claim_for_plugin): New function.
   14668 	(Open_descriptor::is_claimed): New field.
   14669 	(claim_descriptor_for_plugin): New function.
   14670 	* fileread.cc (File_read::claim_for_plugin): New function.
   14671 	* fileread.h (File_read::claim_for_plugin): New function.
   14672 	(File_read::descriptor): New function.
   14673 	* gold.cc: Include "plugin.h".
   14674 	(queue_initial_tasks): Add task to call plugin hooks for generating
   14675 	new object files.
   14676 	* main.cc: Include "plugin.h".
   14677 	(main): Load plugin libraries.
   14678 	* object.h (Pluginobj): Declare.
   14679 	(Object::pluginobj): New function.
   14680 	(Object::do_pluginobj): New function.
   14681 	(Object::set_target): New function.
   14682 	* options.cc: Include "plugin.h".
   14683 	(General_options::parse_plugin): New function.
   14684 	(General_options::General_options): Initialize plugins_ field.
   14685 	(General_options::add_plugin): New function.
   14686 	* options.h (Plugin_manager): Declare.
   14687 	(General_options): Add --plugin option.
   14688 	(General_options::has_plugins): New function.
   14689 	(General_options::plugins): New function.
   14690 	(General_options::add_plugin): New function.
   14691 	(General_options::plugins_): New field.
   14692 	* plugin.cc: New file.
   14693 	* plugin.h: New file.
   14694 	* readsyms.cc: Include "plugin.h".
   14695 	(Read_symbols::do_read_symbols): Check for archive before checking
   14696 	for ELF file.  Call plugin hooks to claim files.
   14697 	* resolve.cc (Symbol_table::resolve): Record when symbol is referenced
   14698 	from a real object file; force override when processing replacement
   14699 	files.
   14700 	* symtab.cc (Symbol::init_fields): Initialize in_real_elf_ field.
   14701 	(Symbol::init_base_object): Likewise.
   14702 	(Symbol::init_base_output_data): Likewise.
   14703 	(Symbol::init_base_output_segment): Likewise.
   14704 	(Symbol::init_base_constant): Likewise.
   14705 	(Symbol::init_base_undefined): Likewise.
   14706 	(Symbol::output_section): Assert that object is not a plugin.
   14707 	(Symbol_table::add_from_pluginobj): New function.
   14708 	(Symbol_table::sized_finalize_symbol): Treat symbols from plugins as
   14709 	undefined.
   14710 	(Symbol_table::sized_write_globals): Likewise.
   14711 	(Symbol_table::add_from_pluginobj): Instantiate template.
   14712 	* symtab.h (Sized_pluginobj): Declare.
   14713 	(Symbol::in_real_elf): New function.
   14714 	(Symbol::set_in_real_elf): New function.
   14715 	(Symbol::in_real_elf_): New field.
   14716 	(Symbol_table::add_from_pluginobj): New function.
   14717 
   14718 	* testsuite/Makefile.am (AM_CFLAGS): New variable.
   14719 	(LIBDL): New variable.
   14720 	(LDADD): Add LIBDL.
   14721 	(check_PROGRAMS): Add plugin_test_1 and plugin_test_2.
   14722 	(check_SCRIPTS): Add plugin_test_1.sh and plugin_test_2.sh.
   14723 	(check_DATA): Add plugin_test_1.err and plugin_test_2.err.
   14724 	(MOSTLYCLEANFILES): Likewise.
   14725 	* testsuite/Makefile.in: Regenerate.
   14726 	* testsuite/plugin_test.c: New file.
   14727 	* testsuite/plugin_test_1.sh: New file.
   14728 	* testsuite/plugin_test_2.sh: New file.
   14729 
   14730 2008-09-16  Ian Lance Taylor  <iant (a] google.com>
   14731 
   14732 	* target-reloc.h (relocate_section): Check whether a symbol is
   14733 	defined by the ABI before reporting an undefined symbol error.
   14734 	* target.h (Target::is_defined_by_abi): Make parameter const.
   14735 	(Target::do_is_defined_by_abi): Likewise.
   14736 	* i386.cc (Target_i386::do_is_defined_by_abi): Likewise.
   14737 	* powerpc.cc (Target_powerpc::do_is_defined_by_abi): Likewise.
   14738 	* sparc.cc (Target_sparc::do_is_defined_by_abi): Likewise.
   14739 	* x86_64.cc (Target_x86_64::do_is_defined_by_abi): Likewise.
   14740 	* testsuite/Makefile.am (tls_test_shared.so): Add -Wl,-z,defs.
   14741 	* testsuite/Makefile.in: Rebuild.
   14742 
   14743 	* fileread.cc (make_view): Add casts to avoid warning.
   14744 
   14745 2008-09-16  Alexandre Oliva  <aoliva (a] redhat.com>
   14746 
   14747 	* i386.cc (Target_i386::define_tls_base_symbol): Update comments.
   14748 	* x86_64.cc (Target_x86_64::define_tls_base_symbol): Likewise.
   14749 
   14750 2008-09-16  Alexandre Oliva  <aoliva (a] redhat.com>
   14751 
   14752 	* options.h (General_options::output_is_executable): New.
   14753 	(General_options::output_is_pie): New.
   14754 	* i386.cc (Target_i386::define_tls_base_symbol): Use SEGMENT_START
   14755 	for shared libraries.
   14756 	* x86_64.cc (Target_x86_64::define_tls_base_symbol): Likewise.
   14757 
   14758 2008-09-11  Chris Demetriou  <cgd (a] google.com>
   14759 
   14760 	* options.h (origin): New -z option.
   14761 	* layout.cc (Layout:finish_dynamic_section): If "-z origin"
   14762 	is specified, set DF_ORIGIN in DT_FLAGS and set DF_1_ORIGIN
   14763 	in DT_FLAGS_1.
   14764 
   14765 2008-09-05  Cary Coutant  <ccoutant (a] google.com>
   14766 
   14767 	* fileread.cc (File_read::make_view): Add check for attempt to map
   14768 	beyond end of file.
   14769 
   14770 2008-09-05  Cary Coutant  <ccoutant (a] google.com>
   14771 
   14772 	* symtab.cc (Symbol_table::add_from_dynobj): Fix typos in
   14773 	explicit instantiations.
   14774 
   14775 2008-08-28  Kris Van Hees  <kris.van.hees (a] oracle.com>
   14776 
   14777 	PR gold/6858
   14778 	* options.cc (General_options::finalize): Allow undefined symbols
   14779 	in shlibs if linking -shared.
   14780 
   14781 	PR gold/6859
   14782 	* symtab.cc (Symbol::init_base_undefined): Mark explicitly undefined
   14783 	symbols as not needing a dynsym entry.
   14784 
   14785 2008-08-20  Craig Silverstein  <csilvers (a] google.com>
   14786 
   14787 	* fileread.cc (File_read::open): Do not lock the file unless it
   14788 	was successfully opened.
   14789 
   14790 2008-08-14  Cary Coutant  <ccoutant (a] google.com>
   14791 
   14792 	* x86_64.cc (Target_x86_64::Relocate::relocat_tls):
   14793 	Use addend for DTPOFF32, DTPOFF64, and TPOFF32 relocs.
   14794 	* testsuite/tls_test.cc (struct int128): 128-bit struct
   14795 	for testing TLS relocs with non-zero addend.
   14796 	(v12): New TLS variable.
   14797 	(t12): New test.
   14798 	(t_last): Add check for v12.
   14799 	* testsuite/tls_test.h (t12): New function.
   14800 	* testsuite/tls_test_main.cc (thread_routine): Call new test.
   14801 
   14802 2008-08-13  Ian Lance Taylor  <iant (a] google.com>
   14803 
   14804 	* layout.cc (Layout::attach_allocated_section_to_segment): Don't
   14805 	set tls_segment_ or relro_segment_.
   14806 	(Layout::make_output_segment): Set tls_segment_ and relro_segment_
   14807 	when appropriate.
   14808 	* output.h (Output_section::clear_is_relro): New function.
   14809 	* output.cc (Output_segment::add_output_section): Handle SHF_TLS
   14810 	sections specially even when output_data_ is empty.
   14811 	(Output_segment::maximum_alignment): When first section is relro,
   14812 	only force alignment for PT_LOAD segments.
   14813 	* script.cc (script_data_segment_align): New function.
   14814 	(script_data_segment_relro_end): New function.
   14815 	* script-c.h (script_data_segment_align): Declare.
   14816 	(script_data_segment_relro_end): Declare.
   14817 	* script-sections.h (class Script_sections): Declare
   14818 	data_segment_align and data_segment_relro_end.  Add fields
   14819 	segment_align_index_ and saw_relro_end_.
   14820 	* script-sections.cc (class Sections_element): Add set_is_relro
   14821 	virtual function.  Add new bool* parameter to place_orphan_here.
   14822 	Add get_output_section virtual function.
   14823 	(class Output_section_definition): Add set_is_relro.  Add new
   14824 	bool* parameter to place_orphan_here.  Add get_output_section.
   14825 	Add is_relro_ field.
   14826 	(Output_section_definition::Output_section_definition): Initialize
   14827 	evaluated_address_, evaluated_load_address, evaluated_addralign_,
   14828 	and is_relro_ fields.
   14829 	(Output_section_definition::place_orphan_here): Add is_relro
   14830 	parameter.
   14831 	(Output_section_definition::set_section_addresses): Set relro for
   14832 	output section.
   14833 	(Output_section_definition::alternate_constraint): Likewise.
   14834 	(class Orphan_output_section): Add new bool* parameter to
   14835 	place_orphan_here.  Add get_output_section.
   14836 	(Orphan_output_section::place_orphan_here): Add is_relro
   14837 	parameter.
   14838 	(Script_sections::Script_sections): Initialize
   14839 	data_segment_align_index_ and saw_relro_end_.
   14840 	(Script_sections::data_segment_align): New function.
   14841 	(Script_sections::data_segment_relro_end): New function.
   14842 	(Script_sections::place_orphan): Set or clear is_relro.
   14843 	(Script_sections::set_section_addresses): Force alignment of first
   14844 	TLS section.
   14845 	* yyscript.y (exp): Call script_data_segment_align and
   14846 	script_data_segment_relro_end.
   14847 	* testsuite/relro_script_test.t: New file.
   14848 	* testsuite/relro_test.cc (using_script): Declare.
   14849 	(t1, t2): Test using_script.
   14850 	* testsuite/Makefile.am (check_PROGRAMS): Add relro_script_test.
   14851 	(relro_script_test_SOURCES): Define.
   14852 	(relro_script_test_DEPENDENCIES): Define.
   14853 	(relro_script_test_LDFLAGS): Define.
   14854 	(relro_script_test_LDADD): Define.
   14855 	(relro_script_test.so): New target.
   14856 	* testsuite/Makefile.in: Rebuild.
   14857 
   14858 2008-08-06  Cary Coutant <ccoutant (a] google.com>
   14859 
   14860 	* archive.cc (Archive::total_archives, Archive::total_members)
   14861 	(Archive::total_members_loaded): New variables.
   14862 	(Archive::setup): Add parameter.  Add option to preread
   14863 	archive symbols.
   14864 	(Archive::read_armap): Add counter.
   14865 	(Archive::get_file_and_offset): New function.
   14866 	(Archive::get_elf_object_for_member): New function.
   14867 	(Archive::read_all_symbols): New function.
   14868 	(Archive::read_symbols): New function.
   14869 	(Archive::add_symbols): Add counters.
   14870 	(Archive::include_all_members): Use armap to find members if it's
   14871 	already built.
   14872 	(Archive::include_member): Skip reading symbols if already read.
   14873 	Factored code into Archive::get_file_and_offset and
   14874 	Archive::get_elf_object_for_member.  Changed call to
   14875 	Mapfile::report_include_archive_member.
   14876 	(Archive::print_stats): New function.
   14877 	* archive.h: Declare Object and Read_symbols_data classes.
   14878 	(Archive::Archive): Add initializers for new members.
   14879 	(Archive::setup): Add parameter.
   14880 	(Archive::print_stats): New function.
   14881 	(Archive::total_archives, Archive::total_members)
   14882 	(Archive::total_members_loaded): New variables.
   14883 	(Archive::get_file_and_offset): New function.
   14884 	(Archive::get_elf_object_for_member): New function.
   14885 	(Archive::read_all_symbols): New function.
   14886 	(Archive::read_symbols): New function.
   14887 	(Archive::Archive_member): New class.
   14888 	(Archive::members_): New member.
   14889 	(Archive::num_members_): New member.
   14890 	* main.cc: Include archive.h.
   14891 	(main): Call Archive::print_stats.
   14892 	* mapfile.cc (Mapfile::report_include_archive_member): Delete
   14893 	archive parameter; member_name is now the fully-decorated name.
   14894 	* mapfile.h (Mapfile::report_include_archive_member): Likewise.
   14895 	* options.h: (General_options): Add --preread-archive-symbols option.
   14896 	* readsyms.cc (Read_symbols::do_read_symbols): Change call to
   14897 	Archive::setup.
   14898 
   14899 2008-08-04  Ian Lance Taylor  <iant (a] google.com>
   14900 
   14901 	* symtab.h (Symbol::use_plt_offset): New function.
   14902 	* i386.cc (Relocate::relocate): Call Symbol::use_plt_offset.
   14903 	* powerpc.cc (Relocate::relocate): Likewise.
   14904 	* sparc.cc (Relocate::relocate): Likewise.
   14905 	* x86_64.cc (Relocate::relocate): Likewise.
   14906 	* testsuite/weak_plt.sh: New test.
   14907 	* testsuite/weak_plt_main.cc: New test.
   14908 	* testsuite/weak_plt_shared.cc: New test.
   14909 	* testsuite/Makefile.am (check_SCRIPTS): Add weak_plt.sh.
   14910 	(check_PROGRAMS): Add weak_plt.
   14911 	(check_DATA): Add weak_plt_shared.so.
   14912 	(weak_plt_main_pic.o, weak_plt): New targets.
   14913 	(weak_plt_shared_pic.o, weak_plt_shared.so): New targets.
   14914 	* testsuite/Makefile.in: Rebuild.
   14915 
   14916 	* testsuite/Makefile.am (weak_alias_test_1.so): Depend upon
   14917 	gcctestdir/ld.
   14918 	(weak_alias_test_2.so, weak_alias_test_4.so): Likewise.
   14919 	* testsuite/Makefile.in: Rebuild.
   14920 
   14921 2008-08-04  Alan Modra  <amodra (a] bigpond.net.au>
   14922 
   14923 	* Makefile.am (POTFILES.in): Set LC_ALL=C.
   14924 	* Makefile.in: Regenerate.
   14925 	* po/POTFILES.in: Regenerate.
   14926 
   14927 2008-07-29  Ian Lance Taylor  <iant (a] google.com>
   14928 
   14929 	* script.cc (Script_options::finalize_symbols): Finalize SECTIONS
   14930 	symbols before other symbols.
   14931 	* testsuite/script_test_2.cc (test_addr): Declare.
   14932 	(test_addr_alias): Declare.
   14933 	(main): Check that test_addr and test_addr_alias have the right
   14934 	values.
   14935 	* testsuite/script_test_2.t: Define test_addr_alias and
   14936 	test_addr.
   14937 
   14938 2008-07-24  Ian Lance Taylor  <iant (a] google.com>
   14939 
   14940 	PR 5990
   14941 	* descriptors.cc: New file.
   14942 	* descriptors.h: New file.
   14943 	* gold-threads.h (class Hold_optional_lock): New class.
   14944 	* fileread.cc: Include "descriptors.h".
   14945 	(File_read::~File_read): Release descriptor rather than closing
   14946 	it.
   14947 	(File_read::open) [file]: Call open_descriptor rather than open.
   14948 	Set is_descriptor_opened_.
   14949 	(File_read::open) [memory]: Assert that descriptor is not open.
   14950 	(File_read::reopen_descriptor): New function.
   14951 	(File_read::release): Release descriptor.
   14952 	(File_read::do_read): Make non-const.  Reopen descriptor.
   14953 	(File_read::read): Make non-const.
   14954 	(File_read::make_view): Reopen descriptor.
   14955 	(File_read::do_readv): Likewise.
   14956 	* fileread.h (class File_read): Add is_descriptor_opened_ field.
   14957 	Update declarations.
   14958 	* layout.cc: Include "descriptors.h".
   14959 	(Layout::create_build_id): Use open_descriptor rather than open.
   14960 	* output.cc: Include "descriptors.h".
   14961 	(Output_file::open): Use open_descriptor rather than open.
   14962 	* archive.cc (Archive::const_iterator): Change Archive to be
   14963 	non-const.
   14964 	(Archive::begin, Archive::end): Make non-const.
   14965 	(Archive::count_members): Likewise.
   14966 	* archive.h (class Archive): Update declarations.
   14967 	* object.h (Object::read): Make non-const.
   14968 	* Makefile.am (CCFILES): Add descriptors.cc.
   14969 	(HFILES): Add descriptors.h.
   14970 	* Makefile.in: Rebuild.
   14971 
   14972 	PR 6716
   14973 	* gold.h: Always include <clocale>.  Add Solaris workarounds
   14974 	following code in binutils/sysdep.h.
   14975 
   14976 	PR 6048
   14977 	* ehframe.cc (Eh_frame::add_ehframe_input_section): Check whether
   14978 	this->eh_frame_hdr_ is NULL before using it.
   14979 
   14980 	* dynobj.cc (Versions::Versions): Update comment.
   14981 
   14982 	* dynobj.cc (Versions::Versions): If there is an soname, use it as
   14983 	the base version name.
   14984 
   14985 	* stringpool.cc (Stringpool_template::add_with_length): Set key to
   14986 	array size plus one.
   14987 	(Stringpool_template::set_string_offsets): Subtract one from key
   14988 	before using it as an array index.
   14989 	(Stringpool_template::get_offset_with_length): Likewise.
   14990 	(Stringpool_template::write_to_buffer): Likewise.
   14991 	* stringpool.h (Stringpool_template::get_offset_from_key):
   14992 	Likewise.
   14993 
   14994 2008-07-23  Ian Lance Taylor  <iant (a] google.com>
   14995 
   14996 	PR 6658
   14997 	* object.h (Merged_symbol_value::value): Do our best to handle a
   14998 	negative addend.
   14999 
   15000 	PR 6647
   15001 	* script.cc (Version_script_info::get_versions): Don't add empty
   15002 	version tag to return value.
   15003 	(Version_script_info::get_symbol_version_helper): Change return
   15004 	type to bool.  Add pversion parameter.  Change all callers.
   15005 	(script_register_vers_node): Don't require a non-NULL tag.
   15006 	* script.h (class Version_script_info): Update declarations.
   15007 	(Version_script_info::get_symbol_version): Change return type to
   15008 	bool.  Add version parameter.  Change all callers.
   15009 	* symtab.cc (Sized_symbol::add_from_relobj): Rework version
   15010 	handling.  Handle an empty version from a version script.
   15011 	(Symbol_table::define_special_symbol): Likewise.
   15012 	* testsuite/ver_test_10.script: New file.
   15013 	* testsuite/ver_test_10.sh: New file.
   15014 	* testsuite/Makefile.am (check_SCRIPTS): Add ver_test_10.sh.
   15015 	(check_DATA): Add ver_test_10.syms.
   15016 	(ver_test_10.syms, ver_test_10.so): New target.
   15017 	* testsuite/Makefile.in: Rebuild.
   15018 
   15019 2008-07-23  Simon Baldwin  <simonb (a] google.com>
   15020 
   15021 	* symtab.cc (Symbol_table::sized_write_symbol): Only set st_size
   15022 	to zero for undefined symbols from dynamic libraries.
   15023 
   15024 2008-07-23  Ian Lance Taylor  <iant (a] google.com>
   15025 
   15026 	* symtab.cc (Symbol_table::resolve): Remove version parameter.
   15027 	Change all callers.
   15028 	* symtab.h (class Symbol_table): Update declaration.
   15029 	* testsuite/ver_test_9.cc: New file.
   15030 	* testsuite/Makefile.am (check_PROGRAMS): Add ver_test_9.
   15031 	(ver_test_9_SOURCES, ver_test_9_DEPENDENCIES): Define.
   15032 	(ver_test_9_LDFLAGS, ver_test_9_LDADD): Define.
   15033 	(ver_test_9.so, ver_test_9.o): New targets.
   15034 	* testsuite/Makefile.in: Rebuild.
   15035 
   15036 2008-07-22  Ian Lance Taylor  <iant (a] google.com>
   15037 
   15038 	* options.h (class General_options): Define --check-sections.
   15039 	* layout.cc (Layout::set_segment_offsets): Handle
   15040 	--check-sections.
   15041 
   15042 	* options.h (class General_options): Define -n/--nmagic and
   15043 	-N/--omagic.
   15044 	* options.cc (General_options::finalize): For -n/--nmagic or
   15045 	-N/--omagic, set -static.
   15046 	* layout.cc (Layout::attach_allocated_section_to_segment): If
   15047 	-N/--omagic, don't put read-only and read-write sections in
   15048 	different segments.
   15049 	(Layout::find_first_load_seg): If -N/--omagic, don't insist on
   15050 	finding a read-only segment.
   15051 	(Layout::set_segment_offsets): If -N/--omagic or -n/--nmagic,
   15052 	don't set the minimum segment alignment to the common page size,
   15053 	and don't set the file offset to the address modulo the page size.
   15054 	* script-sections.cc (Script_sections::create_segments): If
   15055 	-n/--omagic, don't put read-only and read-write sections in
   15056 	different segments.
   15057 
   15058 	* cref.cc: New file.
   15059 	* cref.h: New file.
   15060 	* options.h (class General_options): Add --print-symbol-counts.
   15061 	* main.cc (main): Issue defined symbol report if requested.
   15062 	* archive.cc (Archive::interpret_header): Make into a const member
   15063 	function.
   15064 	(Archive::add_symbols): Call Input_objects::archive_start and
   15065 	archive_stop.
   15066 	(Archive::const_iterator): Define new class.
   15067 	(Archive::begin, Archive::end): New functions.
   15068 	(Archive::include_all_members): Rewrite to use iterator.
   15069 	(Archive::count_members): New function.
   15070 	* archive.h (class Archive): Update declarations.
   15071 	(Archive::filename): New function.
   15072 	* object.cc: Include "cref.h".
   15073 	(Sized_relobj::Sized_relobj): Initialize defined_count_.
   15074 	(Sized_relobj::do_get_global_symbol_counts): New function.
   15075 	(Input_objects::add_object): Add object to cross-referencer.
   15076 	(Input_objects::archive_start): New function.
   15077 	(Input_objects::archive_stop): New function.
   15078 	(Input_objects::print_symbol_counts): New function.
   15079 	* object.h: Declare Cref and Archive.
   15080 	(Object::get_global_symbol_counts): New function.
   15081 	(Object::do_get_global_symbol_counts): New pure virtual function.
   15082 	(class Sized_relobj): Add defined_count_ field.  Update
   15083 	declarations.
   15084 	(class Input_objects): Add cref_ field.  Update constructor.
   15085 	Update declarations.
   15086 	* dynobj.cc (Sized_dynobj::Sized_dynobj): Initialize symbols_ and
   15087 	defined_count_.
   15088 	(Sized_dynobj::do_add_symbols): Allocate symbols_ if printing
   15089 	symbol counts.
   15090 	(Sized_dynobj::do_get_global_symbol_counts): New function.
   15091 	* dynobj.h (class Sized_dynobj): Add fields symbols_ and
   15092 	defined_count_.  Update declarations.  Define Symbols typedef.
   15093 	* symtab.cc (Symbol_table::add_from_relobj): Add defined
   15094 	parameter.  Change all callers.
   15095 	(Symbol_table::add_from_dynobj): Add sympointers and defined
   15096 	parameters.  Change all callers.
   15097 	* symtab.h (class Symbol_table): Update declarations.
   15098 	* Makefile.am (CCFILES): Add cref.cc.
   15099 	(HFILES): Add cref.h.
   15100 	* Makefile.in: Rebuild.
   15101 
   15102 2008-07-22  Simon Baldwin  <simonb (a] google.com>
   15103 
   15104 	* symtab.cc (Symbol_table::sized_write_symbol): Set symbol size
   15105 	to zero when writing undefined symbols.
   15106 
   15107 2008-07-22  Ian Lance Taylor  <iant (a] google.com>
   15108 
   15109 	* output.cc (Output_section::add_input_section): Don't try to
   15110 	merge empty merge sections.
   15111 
   15112 2008-07-21  Craig Silverstein  <csilvers (a] google.com>
   15113 
   15114 	* symtab.cc (Symbol_table::warn_about_undefined_dynobj_symbol):
   15115 	Include symbol version in error message.
   15116 
   15117 2008-07-20  Chris Demetriou  <cgd (a] google.com>
   15118 
   15119 	* configure.ac (gold_cv_c_random_seed): New configured variable.
   15120 	(RANDOM_SEED_CFLAGS): New substituted variable.
   15121 	* Makefile.am (AM_CFLAGS, AM_CXXFLAGS): Add $(RANDOM_SEED_CFLAGS).
   15122 	* configure: Rebuild.
   15123 	* Makefile.in: Likewise.
   15124 	* testsuite/Makefile.in: Likewise.
   15125 
   15126 2008-07-18  Ian Lance Taylor  <iant (a] google.com>
   15127 
   15128 	* symtab.cc (Symbol_table::add_from_object): Rewrite the case
   15129 	where we see NAME/NULL and NAME/VERSION  as separate symbols.
   15130 	* testsuite/ver_test_main.cc (main): Call t4.
   15131 	(t4, t4_2a): Define.
   15132 	* testsuite/ver_test_2.cc (t4_2): Define.
   15133 	* testsuite/ver_test_2.script: Put t4_2a in VER2.
   15134 	* testsuite/ver_test_4.cc (t4_2a): Define.
   15135 	* testsuite/ver_test_4.script: Put t4_2a in VER2.
   15136 	* testsuite/ver_test.h (t4, t4_2, t4_2a): Declare.
   15137 
   15138 2008-07-17  Ian Lance Taylor  <iant (a] google.com>
   15139 
   15140 	* dynobj.cc (Versions::add_def): If we give an error about a
   15141 	missing version, go ahead and create the version anyhow.
   15142 
   15143 2008-07-10  Ian Lance Taylor  <iant (a] google.com>
   15144 
   15145 	Handle output sections with more than 0x7fffffff bytes.
   15146 	* object.h (class Relobj): Change map_to_output_ to
   15147 	output_sections_, and just keep a section pointer.  Change all
   15148 	uses.  Move comdat group support to Sized_relobj.
   15149 	(Relobj::is_section_specially_mapped): Remove.
   15150 	(Relobj::output_section): Remove poff parameter.  Change all
   15151 	callers.
   15152 	(Relobj::output_section_offset): New function.
   15153 	(Relobj::set_section_offset): Rewrite.
   15154 	(Relobj::map_to_output): Remove.
   15155 	(Relobj::output_sections): New function.
   15156 	(Relobj::do_output_section_offset): New pure virtual function.
   15157 	(Relobj::do_set_section_offset): Likewise.
   15158 	(class Sized_relobj): Add section_offsets_ field.  Add comdat
   15159 	group support from Relobj.  Update declarations.
   15160 	(Sized_relobj::get_output_section_offset): New function.
   15161 	(Sized_relobj::do_output_section_offset): New function.
   15162 	(Sized_relobj::do_set_section_offset): New function.
   15163 	* object.cc (Relobj::output_section_address): Remove.
   15164 	(Sized_relobj::Sized_relobj): Initialize new fields.
   15165 	(Sized_relobj::include_section_group): Cast find_kept_object to
   15166 	Sized_relobj.
   15167 	(Sized_relobj::include_linkonce_section): Likewise.
   15168 	(Sized_relobj::do_layout): Use separate arrays for output section
   15169 	and output offset.
   15170 	(Sized_relobj::do_count_local_symbols): Change map_to_output to
   15171 	output_sections.
   15172 	(Sized_relobj::do_finalize_local_symbols): Change map_to_output to
   15173 	output_sections and section_offsets.
   15174 	(Sized_relobj::write_local_symbols): Likewise.
   15175 	(map_to_kept_section): Compute output address directly.
   15176 	* reloc.cc (Sized_relobj::do_read_relocs): Change map_to_output to
   15177 	output_sections and section_offsets.
   15178 	(Sized_relobj::write_sections): Likewise.
   15179 	(Sized_relobj::relocate_sections): Likewise.
   15180 	* symtab.cc (sized_finalize_symbol): Use output_section_offset.
   15181 	* output.h (class Output_reloc): Update declarations.  Change
   15182 	u2_.relobj to Sized_relobj*.
   15183 	(class Output_data_reloc): Change add functions to use
   15184 	Sized_relobj*.
   15185 	* output.cc (Output_reloc::Output_reloc): Change relobj to
   15186 	Sized_relobj*.
   15187 	(Output_reloc::local_section_offset): Change return type to
   15188 	Elf_Addr.  Use get_output_section_offset.
   15189 	(Output_reloc::get_address): Likewise.
   15190 	(Output_section::is_input_address_mapped): Don't call
   15191 	is_section_specially_mapped.
   15192 	(Output_section::output_offset): Likewise.
   15193 	(Output_section::output_address): Likewise.
   15194 	(Output_section::starting_output_address): Likewise.
   15195 	* copy-relocs.cc (Copy_relocs::copy_reloc): Change object
   15196 	parameter to Sized_relobj*.
   15197 	(Copy_relocs::need_copy_reloc): Likewise.
   15198 	(Copy_relocs::save): Likewise.
   15199 	* copy-relocs.h (class Copy_relocs): Update declarations.
   15200 	(class Copy_relocs::Copy_reloc_entry): Change constructor to use
   15201 	Sized_relobj*.  Change relobj_ field to Sized_relobj*.
   15202 	* target-reloc.h (relocate_for_relocatable): Change
   15203 	offset_in_output_section type to Elf_Addr.  Change code that uses
   15204 	it as well.
   15205 	* layout.cc (Layout::layout): Always set *off.
   15206 	* mapfile.cc (Mapfile::print_input_section): Use
   15207 	output_section_offset.
   15208 	* i386.cc (Target_i386::copy_reloc): Change object parameter to
   15209 	Sized_relobj*.
   15210 	* powerpc.cc (Target_powerpc::copy_reloc): Likewise.
   15211 	* sparc.cc (Target_sparc::copy_reloc): Likewise.
   15212 	* x86_64.cc (Target_x86_64::copy_reloc): Likewise.
   15213 
   15214 2008-07-03  Ian Lance Taylor  <iant (a] google.com>
   15215 
   15216 	* layout.cc (Layout::include_section): Do not discard unrecognized
   15217 	SHT_STRTAB sections.
   15218 
   15219 2008-06-30  Craig Silverstein  <csilvers (a] cs.stanford.edu>
   15220 
   15221 	* script.cc (Lex::can_continue_name): Make '?' allowable in
   15222 	version-script names.
   15223 	* testsuite/version_script.map: Change glob pattern to use '?'
   15224 
   15225 2008-06-30  Manish Singh  <yosh (a] gimp.org>
   15226 
   15227 	PR 6585
   15228 	* symtab.cc (Symbol_table::add_undefined_symbols_from_command_line):
   15229 	Correct typo.
   15230 
   15231 2008-06-30  Ian Lance Taylor  <iant (a] google.com>
   15232 
   15233 	PR 6660
   15234 	PR 6682
   15235 	* powerpc.cc (Powerpc_relocate_functions::addr16_ha) [both
   15236 	versions]: Don't try to read the value in the contents, since we
   15237 	don't use it.  Use the template endianness when writing.
   15238 
   15239 2008-06-25  Cary Coutant  <ccoutant (a] google.com>
   15240 
   15241 	* fileread.cc (File_read::make_view): Assert on zero-length view.
   15242 	* object.cc (Sized_relobj::do_read_symbols): Don't try to read
   15243 	symbol table when there are no symbols to read.
   15244 
   15245 2008-06-23  Craig Silverstein  <csilvers (a] google.com>
   15246 
   15247 	* version.cc (version_string): Bump to 1.7
   15248 
   15249 2008-06-18  Craig Silverstein  <csilvers (a] google.com>
   15250 
   15251 	* powerpc.cc (Powerpc_relocate_functions::addr16_ha): cast
   15252 	constant 0xFFFF to type Valtype.
   15253 	(Powerpc_relocate_functions::rel16_ha): Likewise.
   15254 
   15255 2008-06-17  Ian Lance Taylor  <iant (a] google.com>
   15256 
   15257 	* output.h (Output_section::Input_section): Initialize p2align_ to
   15258 	zero for Output_section_data constructors.
   15259 	(Output_section::Input_section::addralign): If not an input
   15260 	section, return the alignment of the Output_section_data.
   15261 	* testsuite/copy_test.cc: New file.
   15262 	* testsuite/copy_test_1.cc: New file.
   15263 	* testsuite/copy_test_2.cc: New file.
   15264 	* testsuite/Makefile.am (check_PROGRAMS): Add copy_test.
   15265 	(copy_test_SOURCES, copy_test_DEPENDENCIES): New variables.
   15266 	(copy_test_LDFLAGS, copy_test_LDADD): New variables.
   15267 	(copy_test_1_pic.o, copy_test_1.so): New targets.
   15268 	(copy_test_2_pic.o, copy_test_2.so): New targets.
   15269 	* testsuite/Makefile.in: Rebuild.
   15270 
   15271 	* script-sections.cc (Script_sections::place_orphan): Initialize
   15272 	local variable exact.
   15273 
   15274 2008-06-13  David Edelsohn  <edelsohn (a] gnu.org>
   15275 
   15276 	* powerpc.cc (Output_data_plt_powerpc::do_write): 8 + 4 = 0xC.
   15277 
   15278 2008-06-12  David Edelsohn  <edelsohn (a] gnu.org>
   15279 	    David S. Miller  <davem (a] davemloft.net>
   15280 
   15281 	* powerpc.cc: New file.
   15282 	* Makefile.am (TARGETSOURCES): Add powerpc.cc
   15283 	(ALL_TARGETOBJS): Add powerpc.$(OBJEXT)
   15284 	* configure.tgt: Add entries for powerpc-* and powerpc64-*.
   15285 	* Makefile.in: Rebuild.
   15286 
   15287 2008-06-09  Ian Lance Taylor  <iant (a] google.com>
   15288 
   15289 	* testsuite/relro_test.cc: Include <cstdio>, <cstdlib>, and
   15290 	<exception>.
   15291 	(throwing, orig_terminate): New static variables.
   15292 	(terminate_handler): New static function.
   15293 	(t2): Set terminate handler.
   15294 
   15295 2008-06-05  Kris Van Hees  <kris.van.hees (a] oracle.com>
   15296 
   15297 	PR 6584
   15298 	* binary.cc (Binary_to_elf::sized_convert): Fix .data
   15299 	alignment.
   15300 
   15301 2008-05-30  Cary Coutant  <ccoutant (a] google.com>
   15302 
   15303 	* archive.cc (Archive::include_all_members) Correct to step
   15304 	over symbol table and extended name table in thin archives.
   15305 
   15306 2008-05-29  Kris Van Hees  <kris.van.hees (a] oracle.com>
   15307 
   15308 	PR 6407
   15309 	* target-reloc.h (relocate_for_relocatable): Fix new_offset
   15310 	calculation.
   15311 
   15312 2008-05-28  Caleb Howe  <cshowe (a] google.com>
   15313 
   15314 	* reduced_debug_output.cc: New file.
   15315 	* reduced_debug_output.h: New file.
   15316 	* options.h (class General_options): Add --strip-debug-non-line.
   15317 	* options.cc (General_options::finalize): Add strip_debug_non_line
   15318 	to the strip heirarchy.
   15319 	* layout.h (class Layout): Add debug_abbrev_ and debug_info_
   15320 	fields.
   15321 	* layout.cc: Include "reduced_debug_output.h".
   15322 	(Layout::Layout): Initialize new fields.
   15323 	(line_only_debug_sections): New static array.
   15324 	(is_lines_only_debug_sections): New static inline function.
   15325 	(Layout::include_section): Handle --strip-debug-non-line.
   15326 	(Layout::make_output_section): If --strip-debug-non-line, build
   15327 	new output sections for .debug_abbrev and .debug_info.
   15328 	* dwarf_reader.cc (read_unsigned_LEB_128): Move to namespace
   15329 	gold.  Warn about possible overflow.
   15330 	(read_signed_LEB_128): Likewise.
   15331 	* dwarf_reader.h: (read_unsigned_LEB_128): Declare.
   15332 	(read_signed_LEB_128): Declare.
   15333 	* Makefile.am (CCFILES): Add reduced_debug_output.cc.
   15334 	(HFILES): Add reduced_debug_output.h.
   15335 	* Makefile.in: Rebuild.
   15336 
   15337 2008-05-21  Ian Lance Taylor  <iant (a] google.com>
   15338 
   15339 	* mapfile.cc: New file.
   15340 	* mapfile.h: New file.
   15341 	* options.h (class General_options): Add -M/--print-map and -Map.
   15342 	* options.cc (General_options::finalize): Make -M equivalent to
   15343 	-Map -.
   15344 	* main.cc: Include <cstdio> and "mapfile.h".
   15345 	(main): Open mapfile if requested.
   15346 	* gold.cc (class Middle_runner): Add mapfile_ field.  Update
   15347 	constructor.  Change caller.
   15348 	(queue_initial_tasks): Add mapfile parameter.  Change caller.
   15349 	(queue_middle_tasks): Likewise.
   15350 	* gold.h (queue_initial_tasks, queue_middle_tasks): Update
   15351 	declarations.
   15352 	* archive.cc: Include "mapfile.h".
   15353 	(Archive::add_symbols): Add mapfile parameter.  Change all
   15354 	callers.  Pass mapfile, symbol, and reason to include_member.
   15355 	(Archive::include_all_members): Add mapfile parameter.  Change all
   15356 	callers.
   15357 	(Archive::include_member): Add mapfile, sym, and why parameters.
   15358 	Change all callers.  Report inclusion to map file.
   15359 	* archive.h: Include "fileread.h".
   15360 	(class Archive): Update declarations.
   15361 	(Archive::file): New const method.
   15362 	(class Add_archive_symbols): Add mapfile_ field.  Update
   15363 	constructor.  Change all callers.
   15364 	* readsyms.h (class Read_symbols): Likewise.
   15365 	(class Finish_group): Likewise.
   15366 	(class Read_script): Likewise.
   15367 	* common.cc: Include "mapfile.h".
   15368 	(Symbol_table::allocate_commons): Add mapfile parameter.  Change
   15369 	all callers.
   15370 	(Symbol_table::do_allocate_commons): Likewise.
   15371 	(Symbol_table::do_allocate_commons_list): Likewise.  Report common
   15372 	symbol allocation to mapfile.
   15373 	* common.h (class Allocate_commons_task): Add mapfile_ field.
   15374 	Update constructor.  Change all callers.
   15375 	* symtab.h (class Symbol_table): Update declarations.
   15376 	* layout.cc: Include "mapfile.h".
   15377 	(Layout_task_runner::run): Print information to mapfile.
   15378 	(Layout::create_gold_note): Change Output_data_fixed_space to
   15379 	Output_data_zero_fill.
   15380 	(Layout::create_build_id): Likewise.
   15381 	(Layout::print_to_mapfile): New function.
   15382 	* layout.h (class Layout_task_runner): Add mapfile_ field.  Update
   15383 	constructor.  Change caller.
   15384 	(class Layout): Declare print_to_mapfile.
   15385 	* output.cc (Output_section::Input_section::print_to_mapfile): New
   15386 	function.
   15387 	(Output_section::add_input_section): If producing a map, always
   15388 	add to input_sections_ list.
   15389 	(Output_section::do_print_to_mapfile): New function.
   15390 	(Output_segment::print_sections_to_mapfile): New function.
   15391 	(Output_segment::print_section_list_to_mapfile): New function.
   15392 	* output.h: Include "mapfile.h".
   15393 	(Output_data::print_to_mapfile): New function.
   15394 	(Output_data::do_print_to_mapfile): New virtual function.
   15395 	(Output_segment_headers::do_print_to_mapfile): New function.
   15396 	(Output_file_header::do_print_to_mapfile): New function.
   15397 	(Output_data_const::do_print_to_mapfile): New function.
   15398 	(class Output_data_const_buffer): Add map_name_ field.  Update
   15399 	constructor.  Change all callers.  Add do_print_to_mapfile
   15400 	function.
   15401 	(class Output_data_fixed_space): Likewise.
   15402 	(class Output_data_space): Likewise.
   15403 	(class Output_data_zero_fill): New class.
   15404 	(Output_data_strtab::do_print_to_mapfile): New function.
   15405 	(Output_data_reloc_base::do_print_to_mapfile): New function.
   15406 	(Output_relocatable_relocs::do_print_to_mapfile): New function.
   15407 	(Output_data_group::do_print_to_mapfile): New function.
   15408 	(Output_data_got::do_print_to_mapfile): New function.
   15409 	(Output_data_dynamic::do_print_to_mapfile): New function.
   15410 	(Output_symtab_xindex::do_print_to_mapfile): New function.
   15411 	(class Output_section): Declare do_print_to_mapflie.  Declare
   15412 	print_to_mapfile in Input_section.
   15413 	(class Output_segment): Declare new functions.
   15414 	* object.h (Sized_relobj::symbol_count): New function.
   15415 	* script-sections.cc
   15416 	(Output_section_element_dot_assignment::set_section_addresses):
   15417 	Change Output_data_fixed_space to Output_data_zero_fill.
   15418 	(Output_data_expression::do_print_to_mapfile): New function.
   15419 	* script.cc (read_input_script): Add mapfile parameter.  Change
   15420 	all callers.
   15421 	* script.h (read_input_script): Update declaration.
   15422 	* ehframe.h (Eh_frame_hdr::do_print_to_mapfile): New function.
   15423 	(Eh_frame::do_print_to_mapfile): New function.
   15424 	* merge.h (Output_merge_data::do_print_to_mapfile): New function.
   15425 	(Output_merge_string::do_print_to_mapfile): New function.
   15426 	* i386.cc (Output_data_plt_i386::do_print_to_mapfile): New
   15427 	function.
   15428 	* sparc.cc (Output_data_plt_sparc::do_print_to_mapfile): New
   15429 	function.
   15430 	* x86_64.cc (Output_data_plt_x86_64::do_print_to_mapfile): New
   15431 	function.
   15432 	* Makefile.am (CCFILES): Add mapfile.cc.
   15433 	(HFILES): Add mapfile.h.
   15434 	* Makefile.in: Rebuild.
   15435 
   15436 2008-05-19  Ian Lance Taylor  <iant (a] google.com>
   15437 
   15438 	* options.h (class General_options): Add -z relro.
   15439 	* layout.cc (Layout::Layout): Initialize relro_segment_.
   15440 	(Layout::add_output_section_data): Return the output section.
   15441 	(Layout::make_output_section): Rcognize relro sections and mark
   15442 	them appropriately.
   15443 	(Layout::attach_allocated_section_to_segment): Put relro sections
   15444 	in a PT_GNU_RELRO segment.
   15445 	(Layout::create_initial_dynamic_sections): Mark the .dynamic
   15446 	section as relro.
   15447 	(Layout::segment_precedes): Sort PT_GNU_RELRO segments after
   15448 	PT_TLS segments.
   15449 	(Layout::linkonce_mapping): Map d.rel.ro.local to
   15450 	.data.rel.ro.local.
   15451 	(Layout::output_section_name): Us .data.rel.ro.local for any
   15452 	section which begins with that.
   15453 	* layout.h (class Layout): Update add_output_section_data
   15454 	declaration.  Add relro_segment_ field.
   15455 	* output.cc (Output_section::Output_section): Initialize is_relro_
   15456 	and is_relro_local_ fields.
   15457 	(Output_segment::add_output_section): Group relro sections.
   15458 	(Output_segment::is_first_section_relro): New function.
   15459 	(Output_segment::maximum_alignment): If there is a relro section,
   15460 	align the segment to the common page size.
   15461 	(Output_segment::set_section_addresses): Track whether we are
   15462 	looking at relro sections.  If the last section is a relro
   15463 	section, align to the common page size.
   15464 	(Output_segment::set_section_list_addresses): Add in_relro
   15465 	parameter.  Change all callers.  Align to the page size when
   15466 	moving from relro to non-relro section.
   15467 	(Output_segment::set_offset): Align memsz of a PT_GNU_RELRO
   15468 	segment.
   15469 	* output.h (class Output_section): Add is_relro_ and
   15470 	is_relro_local_ fields.
   15471 	(Output_section::is_relro): New function.
   15472 	(Output_section::set_is_relro): New function.
   15473 	(Output_section::is_relro_local): New function.
   15474 	(Output_section::set_is_relro_local): New function.
   15475 	(class Output_segment): Update declarations.
   15476 	* i386.cc (Target_i386::got_section): Mark .got section as relro.
   15477 	* sparc.cc (Target_sparc::got_section): Likewise.
   15478 	* x86_64.cc (Target_x86_64::got_section): Likewise.
   15479 	* testsuite/relro_test_main.cc: New file.
   15480 	* testsuite/relro_test.cc: New file.
   15481 	* testsuite/Makefile.am (check_PROGRAMS): Add relro_test.
   15482 	(relro_test_SOURCES, relro_test_DEPENDENCIES): New variables.
   15483 	(relro_test_LDFLAGS, relro_test_LDADD): New variables.
   15484 	(relro_test.so, relro_test_pic.o): New targets.
   15485 	* testsuite/Makefile.in: Rebuild.
   15486 
   15487 2008-05-16  Ian Lance Taylor  <iant (a] google.com>
   15488 
   15489 	* output.cc (Output_segment::add_output_section): Remove front
   15490 	parameter.
   15491 	* output.h (class Output_segment): Remove
   15492 	add_initial_output_section and overloaded add_output_section.
   15493 	Update declaration of remaining add_output_section.
   15494 	* layout.cc (Layout::create_interp): Call add_output_section
   15495 	rather than add_initial_output_section.
   15496 	(Layout::finish_dynamic_section): Likewise.
   15497 
   15498 	* i386.cc (Target_i386::Relocate::relocate_tls): Set dynamic type
   15499 	for TLS_GOTDESC and TLS_DESC_CALL.  Only optimize TLS_LDO_32 if we
   15500 	know the dynamic type.
   15501 	* x86_64.cc (Target_x86_64::Relocate): Add saw_tls_block_reloc_
   15502 	field.  Initialize it in constructor.
   15503 	(Target_x86_64::Relocate::relocate_tls): Record that we saw a TLS
   15504 	block reloc for TLSGD, GOTPC32_TLSDESC, TLSDESC_CALL, and TLSLD.
   15505 	Only optimize DTPOFF32 and DTPOFF64 if we have seen a TLS block
   15506 	reloc.
   15507 
   15508 	* output.cc (Output_reloc::get_address): Change return type to
   15509 	Elf_Addr.
   15510 	* output.h (class Output_reloc): Update get_address declaration.
   15511 	* x86_64.cc (Output_data_plt_x86_64::do_write): Use 64-bit types
   15512 	for section addresses.
   15513 
   15514 2008-05-09  Ian Lance Taylor  <iant (a] google.com>
   15515 
   15516 	PR 6493
   15517 	* gold.cc (gold_nomem): Use return value of write.
   15518 
   15519 2008-05-08  Ian Lance Taylor  <iant (a] google.com>
   15520 
   15521 	* symtab.c (Symbol::init_base_output_data): Add version
   15522 	parameter.  Change all callers.
   15523 	(Symbol::init_base_output_segment): Likewise.
   15524 	(Symbol::init_base_constant): Likewise.
   15525 	(Symbol::init_base_undefined): Likewise.
   15526 	(Sized_symbol::init_output_data): Likewise.
   15527 	(Sized_symbol::init_output_segment): Likewise.
   15528 	(Sized_symbol::init_constant): Likewise.
   15529 	(Sized_symbol::init_undefined): Likewise.
   15530 	(Symbol_table::do_define_in_output_data): If the new symbol has a
   15531 	version, mark it as the default.
   15532 	(Symbol_table::do_define_in_output_segment): Likewise.
   15533 	(Symbol_table::do_define_as_constant): Likewise.
   15534 	* symtab.h (class Symbol): Update declarations.
   15535 	(class Sized_symbol): Likewise.
   15536 	* resolve.cc (Symbol::override_version): New function.
   15537 	(Symbol::override_base): Call override_version.
   15538 	(Symbol::override_base_with_special): Likewise.
   15539 	* testsuite/ver_script_8.script: New file.
   15540 	* testsuite/Makefile.am (check_PROGRAMS): Add ver_test_8.
   15541 	(ver_test_8_SOURCES, ver_test_8_DEPENDENCIES): Define.
   15542 	(ver_test_8_LDFLAGS, ver_test_8_LDADD): Define.
   15543 	(ver_test_8_1.so, ver_test_8_2.so): New targets.
   15544 
   15545 2008-05-06  Ian Lance Taylor  <iant (a] google.com>
   15546 
   15547 	PR 6049
   15548 	* options.h (DEFINE_set): Add VARNAME_begin and VARNAME_end
   15549 	functions.
   15550 	(class General_options): Remove existing --undefined, and add
   15551 	--no-undefined instead.  Add new --undefined as synonym for -u.
   15552 	* archive.cc (Archive::add_symbols): Check whether symbol was
   15553 	named with -u.
   15554 	* gold.cc (queue_middle_tasks): Add -u symbols to symbol table.
   15555 	* symtab.h (class Symbol): Rename CONSTANT to IS_CONSTANT; change
   15556 	all uses.  Add IS_UNDEFINED.  Update declarations to split
   15557 	different versions of init_base.  Declare init_base_undefined.
   15558 	(Symbol::is_defined): Handle IS_UNDEFINED.
   15559 	(Symbol::is_undefined): Likewise.
   15560 	(Symbol::is_weak_undefined): Call is_undefined.
   15561 	(Symbol::is_absolute): Handle IS_CONSTANT.
   15562 	(class Sized_symbol): Update declarations to split different
   15563 	versions of init.  Declare init_undefined.
   15564 	(class Symbol_table): Declare new functions.
   15565 	* symtab.cc (Symbol::init_base_object): Rename from init_base.
   15566 	Change all callers.
   15567 	(Symbol::init_base_output_data): Likewise.
   15568 	(Symbol::init_base_output_segment): Likewise.
   15569 	(Symbol::init_base_constant): Likewise.
   15570 	(Symbol::init_base_undefined): New function.
   15571 	(Sized_symbol::init_object): Rename from init.  Change all
   15572 	callers.
   15573 	(Sized_symbol::init_output_data): Likewise.
   15574 	(Sized_symbol::init_output_segment): Likewise.
   15575 	(Sized_symbol::init_constant): Likewise.
   15576 	(Sized_symbol::init_undefined): New function.
   15577 	(Symbol_table::add_undefined_symbols_from_command_line): New
   15578 	function.
   15579 	(Symbol_table::do_add_undefined_symbols_from_command_line): New
   15580 	function.
   15581 	(Symbol::final_value_is_known): Handle IS_UNDEFINED.
   15582 	(Symbol::output_section): Likewise.
   15583 	(Symbol::set_output_section): Likewise.
   15584 	(Symbol_table::sized_finalize_symbol): Likewise.
   15585 	(Symbol_table::sized_write_globals): Likewise.
   15586 	* resolve.cc (Symbol_table::should_override): Likewise.
   15587 	(Symbol::override_base_with_special): Likewise.
   15588 
   15589 	* symtab.cc (Symbol_table::add_from_dynobj): If we see a protected
   15590 	symbol, change it to have default visibility.
   15591 	* testsuite/protected_1.cc: New file.
   15592 	* testsuite/protected_2.cc: New file.
   15593 	* testsuite/protected_3.cc: New file.
   15594 	* testsuite/protected_main_1.cc: New file.
   15595 	* testsuite/protected_main_2.cc: New file.
   15596 	* testsuite/protected_main_3.cc: New file.
   15597 	* testsuite/Makefile.am (check_PROGRAMS): Add protected_1.
   15598 	(protected_1_SOURCES, protected_1_DEPENDENCIES): Define.
   15599 	(protected_1_LDFLAGS, protected_1_LDADD): Define.
   15600 	(protected_1.so): New target.
   15601 	(protected_1_pic.o, protected_2_pic.o): New targets.
   15602 	(protected_3_pic.o): New target.
   15603 	(check_PROGRAMS): Add protected_2.
   15604 	(protected_2_SOURCES, protected_2_DEPENDENCIES): Define.
   15605 	(protected_2_LDFLAGS, protected_2_LDADD): Define.
   15606 	* testsuite/Makefile.in: Rebuild.
   15607 
   15608 	* options.h (DEFINE_var): Add set_user_set_##varname__.
   15609 	(DEFINE_bool_alias): New macro.
   15610 	(class General_options): Define -Bstatic using DEFINE_bool_alias
   15611 	rather than DEFINE_special.  Add --undefined as an alias for -z
   15612 	defs.
   15613 	* options.cc (General_options::parse_Bstatic): Remove.
   15614 
   15615 	* options.h (class General_options): Add --fatal-warnings.
   15616 	* main.cc (main): Implement --fatal-warnings.
   15617 	* errors.h (Errors::warning_count): New function.
   15618 
   15619 	* options.h (class General_options): Add -Bsymbolic-functions.
   15620 	* symtab.h (Symbol::is_preemptible): Check for
   15621 	-Bsymbolic-functions.
   15622 
   15623 2008-05-05  Ian Lance Taylor  <iant (a] google.com>
   15624 
   15625 	* options.h (DEFINE_bool): For DASH_Z, create the negative option
   15626 	as noVARNAME rather than no-VARNAME.
   15627 	(class General_options): Add option -z combreloc.
   15628 	* output.h (class Output_reloc) [SHT_REL]: Declare compare and
   15629 	get_address.
   15630 	(Output_reloc::sort_before) [SHT_REL]: New function.
   15631 	(Output_reloc::sort_before) [SHT_RELA]: New function.
   15632 	(class Output_data_reloc_base): Add sort_relocs_ field.  Define
   15633 	Sort_relocs_comparison.
   15634 	(Output_data_reloc_base::Output_data_reloc_base): Add sort_relocs
   15635 	parameter.  Change all callers.
   15636 	(Output_data_reloc::Output_data_reloc) [both versions]: Add
   15637 	sort_relocs parameter.  Change all callers.
   15638 	* output.cc (Output_reloc::get_address): New function, broken out
   15639 	of write_rel.
   15640 	(Output_reloc::write_rel): Call it.
   15641 	(Output_reloc::compare): New function.
   15642 	(Output_data_reloc_base::do_write): Optionally sort relocs.
   15643 
   15644 	* configure.ac: If targ_extra_obj is set, link it in.
   15645 	* configure.tgt: Initialize all variables.
   15646 	(x86_64*): Set targ_extra_obj and targ_extra_size.
   15647 	* configure: Rebuild.
   15648 
   15649 	* object.cc (Sized_relobj::include_section_group): Adjust section
   15650 	indexes read from group data.  Build vector to pass to
   15651 	layout_group.
   15652 	* layout.cc (Layout::layout_group): Add flags and shndxes
   15653 	parameters.  Remove contents parameter.  Change caller.  Update
   15654 	explicit instantiations.
   15655 	* layout.h (class Layout): Update layout_group declaration.
   15656 	* output.cc (Output_data_group::Output_data_group): Add flags and
   15657 	input_shndxes parameters.  Remove contents parameter.  Change
   15658 	caller.
   15659 	(Output_data_group::do_write): Change input_sections_ to
   15660 	input_shndxes_.
   15661 	* output.h (class Output_data_group): Update constructor
   15662 	declaration.  Rename input_sections_ to input_shndxes_.
   15663 	* testsuite/many_sections_test.cc: Add template.
   15664 
   15665 2008-04-30  Cary Coutant  <ccoutant (a] google.com>
   15666 
   15667 	* target-reloc.h (relocate_section): Fix dead-pointer bug.
   15668 
   15669 	* layout.cc (Layout::include_section): Refactored check for debug
   15670 	info section.
   15671 	(Layout::add_comdat): Add new parameters.  Change type
   15672 	of signature parameter.  Add object and shndx to signatures table.
   15673 	(Layout::find_kept_object): New function.
   15674 	* layout.h: Include <cstring>.
   15675 	(Layout::is_debug_info_section): New function.
   15676 	(Layout::add_comdat): Add new parameters.
   15677 	(Layout::find_kept_object): New function.
   15678 	(Layout::Kept_section): New struct.
   15679 	(Layout::Signatures): Change type of map range.
   15680 	* object.cc (Relobj::output_section_address): New function.
   15681 	(Sized_relobj::include_section_group): Add new parameters.  Change
   15682 	calls to Layout::add_comdat.  Change to build table of kept comdat
   15683 	groups and table mapping discarded sections to kept sections.
   15684 	(Sized_relobj::include_linkonce_section): Likewise.  Add new parameter.
   15685 	(Sized_relobj::do_layout): Change calls to include_section_group and
   15686 	include_linkonce_section.
   15687 	(Sized_relobj::do_finalize_local_symbols): Do not set local symbol
   15688 	value to zero when section is discarded.
   15689 	(Sized_relobj::map_to_kept_section): New function.
   15690 	* object.h (Relobj::output_section_address): New function.
   15691 	(Relobj::Comdat_group): New type.
   15692 	(Relobj::find_comdat_group): New function.
   15693 	(Relobj::Comdat_group_table): New type.
   15694 	(Relobj::Kept_comdat_section): New type.
   15695 	(Relobj::Kept_comdat_section_table): New type.
   15696 	(Relobj::add_comdat_group): New function.
   15697 	(Relobj::set_kept_comdat_section): New function.
   15698 	(Relobj::get_kept_comdat_section): New function.
   15699 	(Relobj::comdat_groups_): New field.
   15700 	(Relobj::kept_comdat_sections_): New field.
   15701 	(Symbol_value::input_value): Update comment.
   15702 	(Sized_relobj::map_to_kept_section) New function.
   15703 	(Sized_relobj::include_linkonce_section): Add new parameter.
   15704 	* target-reloc.h (Comdat_behavior): New type.
   15705 	(get_comdat_behavior): New function.
   15706 	(relocate_section): Add code to map a discarded section to the
   15707 	corresponding kept section when applying a relocation.
   15708 
   15709 2008-04-30  Craig Silverstein  <csilvers (a] google.com>
   15710 
   15711 	* dwarf_reader.cc (next_generation_count): New static var.
   15712 	(Addr2line_cache_entry): New struct.
   15713 	(addr2line_cache): New static var.
   15714 	(Dwarf_line_info::one_addr2line): Added caching.
   15715 	(Dwarf_line_info::clear_addr2line_cache): New function.
   15716 	* dwarf_reader.h (Dwarf_line_info::one_addr2line): Add
   15717 	cache-size parameter.
   15718 	(Dwarf_line_info::one_addr2line_cache): New function.
   15719 	* symtab.cc (Symbol_table::detect_odr_violations): Pass
   15720 	new cache-size argument to one_addr2line(), and clear cache.
   15721 
   15722 2008-04-28  Cary Coutant  <ccoutant (a] google.com>
   15723 
   15724 	* i386.cc (Relocate::relocate): Fix typos for R_386_PC16 and
   15725 	R_386_PC8 relocations.
   15726 
   15727 2008-04-23  Ian Lance Taylor  <iant (a] google.com>
   15728 
   15729 	* object.cc (Sized_relobj::include_section_group): Check for
   15730 	invalid section group.
   15731 
   15732 	* object.cc (make_elf_object): Correct test for 64-bit ELF file
   15733 	header size.
   15734 
   15735 	* readsyms.cc (Read_symbols::do_read_symbols): Use get_view rather
   15736 	than read for file header.
   15737 	* archive.cc (Archive::include_member): Likewise.
   15738 
   15739 2008-04-23  Paolo Bonzini  <bonzini (a] gnu.org>
   15740 
   15741 	* aclocal.m4: Regenerate.
   15742 	* configure: Regenerate.
   15743 
   15744 2008-04-19  Ian Lance Taylor  <iant (a] google.com>
   15745 
   15746 	* version.cc (version_string): Bump to 1.6.
   15747 
   15748 	* testsuite/Makefile.am (many_sections_r_test): New target.
   15749 	(many_sections_r_test_SOURCES): Remove.
   15750 	(many_sections_r_test_DEPENDENCIES): Remove.
   15751 	(many_sections_r_test_LDFLAGS): Remove.
   15752 	(many_sections_r_test_LDADD): Remove.
   15753 
   15754 	* object.cc (Sized_relobj::do_add_symbols): Always pass
   15755 	local_symbol_count_ to add_from_relobj.
   15756 
   15757 	* testsuite/Makefile.am (many_sections_check.h): Only check one in
   15758 	every thousand variables.
   15759 	* testsuite/Makefile.in: Rebuild.
   15760 
   15761 	* object.cc (Xindex::initialize_symtab_xindex): New function.
   15762 	(Xindex::read_symtab_xindex): New function.
   15763 	(Xindex::sym_xindex_to_shndx): New function.
   15764 	(Sized_relobj::find_symtab): Pick up SHT_SYMTAB_SHNDX section if
   15765 	available.
   15766 	(Sized_relobj::do_initialize_xindex): New function.
   15767 	(Sized_relobj::do_read_symbols): Adjust section links.
   15768 	(Sized_relobj::symbol_section_and_value): Add is_ordinary
   15769 	parameter.  Change all callers.
   15770 	(Sized_relobj::include_section_group): Adjust section links and
   15771 	symbol section indexes.
   15772 	(Sized_relobj::do_layout): Adjust section links.
   15773 	(Sized_relobj::do_count_local_symbols): Adjust section links and
   15774 	symbol section indexes.
   15775 	(Sized_relobj::do_finalize_local_symbols): Distinguish between
   15776 	ordinary and special symbols.
   15777 	(Sized_relobj::write_local_symbols): Add symtab_xindex and
   15778 	dynsym_xindex parameters.  Change all callers.  Adjust section
   15779 	links.  Use SHN_XINDEX when needed.
   15780 	(Sized_relobj::get_symbol_location_info): Adjust section links.
   15781 	Don't get fooled by special symbols.
   15782 	* object.h (class Xindex): Define.
   15783 	(class Object): Add xindex_ parameter.  Declare virtual functoin
   15784 	do_initialize_xindex.
   15785 	(Object::adjust_sym_shndx): New function.
   15786 	(Object::set_xindex): New protected function.
   15787 	(class Symbol_value): Add is_ordinary_shndx_ field.
   15788 	(Symbol_value::Symbol_value): Initialize is_ordinary_shndx_.
   15789 	(Symbol_value::value): Assert ordinary section.
   15790 	(Symbol_value::initialize_input_to_output_map): Likewise.
   15791 	(Symbol_value::set_input_shndx): Add is_ordinary parameter.
   15792 	Change all callers.
   15793 	(Symbol_value::input_shndx): Add is_ordinary parameter.  Change
   15794 	all callers.
   15795 	(class Sized_relobj): Update declarations.
   15796 	(Sized_relobj::local_symbol_input_shndx): Add is_ordinary
   15797 	parameter.  Change all callers.
   15798 	(Sized_relobj::adjust_shndx): New function.
   15799 	* dynobj.cc (Sized_dynobj::Sized_dynobj): Initialize dynsym_shndx_
   15800 	field.
   15801 	(Sized_dynobj::find_dynsym_sections): Remove pdynsym_shndx
   15802 	parameter.  Change all callers.  Pick up SHT_DYNSYM_SHNDX section
   15803 	for SHT_DYNSYM section if available.  Set dynsym_shndx_ field.
   15804 	(Sized_dynobj::read_dynsym_section): Adjust section links.
   15805 	(Sized_dynobj::read_dynamic): Likewise.
   15806 	(Sized_dynobj::do_read_symbols): Use dynsym_shndx_ field.  Adjust
   15807 	section links.
   15808 	(Sized_dynobj::do_initialize_xindex): New function.
   15809 	* dynobj.h (class Sized_dynobj): Add dynsym_shndx_ field.  Declare
   15810 	do_initialize_xindex.
   15811 	(Sized_dynobj::adjust_shndx): New function.
   15812 	* layout.cc (Layout::Layout): Initialize symtab_xindex_ and
   15813 	dynsym_xindex_ fields.
   15814 	(Layout::finalize): Add a call to set_section_indexes before
   15815 	creating the symtab sections.
   15816 	(Layout::set_section_indexes): Don't do anything if the section
   15817 	already has a section index.
   15818 	(Layout::create_symtab_sections): Add shnum parameter.  Change
   15819 	caller.  Create .symtab_shndx section if needed.
   15820 	(Layout::create_shdrs): Add shstrtab_section parameter.  Change
   15821 	caller.
   15822 	(Layout::allocated_output_section_count): New function.
   15823 	(Layout::create_dynamic_symtab): Create .dynsym_shndx section if
   15824 	needed.
   15825 	* layout.h (class Layout): Add symtab_xindex_ and dynsym_xindex_
   15826 	fields.  Update declarations.
   15827 	(Layout::symtab_xindex): New function.
   15828 	(Layout::dynsym_xindex): New function.
   15829 	(class Write_symbols_task): Add layout_ field.
   15830 	(Write_symbols_task::Write_symbols_task): Add layout parameter.
   15831 	Change caller.
   15832 	* output.cc (Output_section_headers::Output_section_headers): Add
   15833 	shstrtab_section parameter.  Change all callers.
   15834 	(Output_section_headers::do_sized_write): Store overflow values
   15835 	for section count and section string table section index in
   15836 	section header zero.
   15837 	(Output_file_header::do_sized_write): Check for overflow of
   15838 	section count and section string table section index.
   15839 	(Output_symtab_xindex::do_write): New function.
   15840 	(Output_symtab_xindex::endian_do_write): New function.
   15841 	* output.h (class Output_section_headers): Add shstrtab_section_.
   15842 	Update declarations.
   15843 	(class Output_symtab_xindex): Define.
   15844 	(Output_section::has_out_shndx): New function.
   15845 	* symtab.cc (Symbol::init_fields): Initialize is_ordinary_shndx_
   15846 	field.
   15847 	(Symbol::init_base): Add st_shndx and is_ordinary parameters.
   15848 	Change all callers.
   15849 	(Sized_symbol::init): Likewise.
   15850 	(Symbol::output_section): Check for ordinary symbol.
   15851 	(Symbol_table::add_from_object): Remove orig_sym parameter.  Add
   15852 	st_shndx, is_ordinary, and orig_st_shndx parameters.  Change all
   15853 	callers.
   15854 	(Symbol_table::add_from_relobj): Add symndx_offset parameter.
   15855 	Change all callers.  Simplify handling of symbols from sections
   15856 	not included in the link.
   15857 	(Symbol_table::add_from_dynobj): Handle ordinary symbol
   15858 	distinction.
   15859 	(Weak_alias_sorter::operator()): Assert that symbols are
   15860 	ordinary.
   15861 	(Symbol_table::sized_finalize_symbol): Handle ordinary symbol
   15862 	distinction.
   15863 	(Symbol_table::write_globals): Add symtab_xindex and dynsym_xindex
   15864 	parameters.  Change all callers.
   15865 	(Symbol_table::sized_write_globals): Likewise.  Handle ordinary
   15866 	symbol distinction.  Use SHN_XINDEX when needed.
   15867 	(Symbol_table::write_section_symbol): Add symtab_xindex
   15868 	parameter.  Change all callers.
   15869 	(Symbol_table::sized_write_section_symbol): Likewise.  Use
   15870 	SHN_XINDEX when needed.
   15871 	* symtab.h (class Symbol): Add is_ordinary_shndx_ field.  Update
   15872 	declarations.
   15873 	(Symbol::shndx): Add is_ordinary parameter.  Change all callers.
   15874 	(Symbol::is_defined): Check is_ordinary.
   15875 	(Symbol::is_undefined, Symbol::is_weak_undefined): Likewise.
   15876 	(Symbol::is_absolute, Symbol::is_common): Likewise.
   15877 	(class Sized_symbol): Update declarations.
   15878 	(class Symbol_table): Update declarations.
   15879 	* resolve.cc (Symbol::override_base): Add st_shndx and is_ordinary
   15880 	parameters.  Change all callers.
   15881 	(Sized_symbol::override): Likewise.
   15882 	(Symbol_table::override): Likewise.
   15883 	(symbol_to_bits): Add is_ordinary parameter.  Change all callers.
   15884 	(Symbol_table::resolve): Remove orig_sym parameter.  Add st_shndx,
   15885 	is_ordinary, and orig_st_shndx parameters.  Change all callers.
   15886 	* copy-relocs.cc (Copy_relocs::emit_copy_reloc): Require symbol
   15887 	to be in an ordinary section.
   15888 	* dwarf_reader.cc (Sized_dwarf_line_info::symbol_section): Add
   15889 	object and is_ordinary parameters.  Change all callers.
   15890 	(Sized_dwarf_line_info::read_relocs): Add object parameter.
   15891 	Change all callers.  Don't add undefined or non-ordinary symbols
   15892 	to reloc_map_.
   15893 	(Sized_dwarf_line_info::read_line_mappings): Add object parameter.
   15894 	Change all callers.
   15895 	* dwarf_reader.h (class Sized_dwarf_line_info): Update
   15896 	declarations.
   15897 	* ehframe.cc (Eh_frame::read_fde): Check for ordinary symbol.
   15898 	* reloc.cc (Sized_relobj::do_read_relocs): Adjust section links.
   15899 	(Sized_relobj::relocate_sections): Likewise.
   15900 	* target-reloc.h (scan_relocs): Adjust section symbol index.
   15901 	(scan_relocatable_relocs): Likewise.
   15902 	* i386.cc (Scan::local): Check for ordinary symbols.
   15903 	* sparc.cc (Scan::local): Likewise.
   15904 	* x86_64.cc (Scan::local): Likewise.
   15905 	* testsuite/binary_unittest.cc (Sized_binary_test): Update calls
   15906 	to symbol_section_and_value.
   15907 	* testsuite/many_sections_test.cc: New file.
   15908 	* testsuite/Makefile.am (BUILT_SOURCES): Define.
   15909 	(check_PROGRAMS): Add many_sections_test.
   15910 	(many_sections_test_SOURCES): Define.
   15911 	(many_sections_test_DEPENDENCIES): Define.
   15912 	(many_sections_test_LDFLAGS): Define.
   15913 	(BUILT_SOURCES): Add many_sections_define.h.
   15914 	(many_sections_define.h): New target.
   15915 	(BUILT_SOURCES): Add many_sections_check.h.
   15916 	(many_sections_check.h): New target.
   15917 	(check_PROGRAMS): Add many_sections_r_test.
   15918 	(many_sections_r_test_SOURCES): Define.
   15919 	(many_sections_r_test_DEPENDENCIES): Define.
   15920 	(many_sections_r_test_LDFLAGS): Define.
   15921 	(many_sections_r_test_LDADD): Define.
   15922 	(many_sections_r_test.o): New target.
   15923 	* testsuite/Makefile.in: Rebuild.
   15924 
   15925 2008-04-17  Cary Coutant  <ccoutant (a] google.com>
   15926 
   15927 	* errors.cc (Errors::info): New function.
   15928 	(gold_info): New function.
   15929 	* errors.h (Errors::info): New function.
   15930 	* gold.h (gold_info): New function.
   15931 	* object.cc (Input_objects::add_object): Print trace output.
   15932 	* options.cc (options::parse_set): New function.
   15933 	(General_options::parse_wrap): Deleted.
   15934 	(General_options::General_options): Deleted initializer.
   15935 	* options.h (options::String_set): New typedef.
   15936 	(options::parse_set): New function.
   15937 	(DEFINE_set): New macro.
   15938 	(General_options::wrap): Changed to use DEFINE_set. Changed
   15939 	callers of any_wrap_symbols and is_wrap_symbol.
   15940 	(General_options::trace, General_options::trace_symbol):
   15941 	New options.
   15942 	(General_options::any_wrap_symbols, General_options::is_wrap_symbol)
   15943 	(General_options::wrap_symbols_): Deleted.
   15944 	* symtab.cc (Symbol_table::add_from_object): Print trace output.
   15945 
   15946 2008-04-17  David S. Miller  <davem (a] davemloft.net>
   15947 
   15948 	* options.cc (General_options::parse_V): New function.
   15949 	* options.h: Add entries for -V and -Qy.
   15950 
   15951 2008-04-17  Ian Lance Taylor  <iant (a] google.com>
   15952 
   15953 	* common.cc (Symbol_table::allocate_commons): Remove options
   15954 	parameter.  Change caller.
   15955 	(Symbol_table::do_allocate_commons): Remove options parameter.
   15956 	Change caller.  Just call do_allocate_commons_list twice.
   15957 	(Symbol_table::do_allocate_commons_list): New function, broken out
   15958 	of do_allocate_commons.
   15959 	* common.h (class Allocate_commons_task): Remove options_ field.
   15960 	Update constructor.
   15961 	* symtab.cc (Symbol_table::Symbol_table): Initialize
   15962 	tls_commons_.
   15963 	(Symbol_table::add_from_object): Put TLS common symbols on
   15964 	tls_commons_ list.
   15965 	(Symbol_table::sized_finalize_symbol): Handle STT_TLS symbols
   15966 	which are IN_OUTPUT_DATA.
   15967 	* symtab.h (class Symbol_table): Add tls_commons_ field.  Update
   15968 	allocate_commons and do_allocate_commons declarations.  Declare
   15969 	do_allocate_commons_list.
   15970 	* gold.cc (queue_middle_tasks): Update creation of
   15971 	Allocate_commons_task to not pass options.
   15972 	* testsuite/Makefile.am (INCLUDES): Add -I.. .
   15973 	(TLS_TEST_C_FLAGS): New variable.
   15974 	(tls_test_c_pic.o): New target.
   15975 	(tls_test_shared.so): Link in tls_test_c_pic.o.
   15976 	(tls_test_c_pic_ie.o): New target.
   15977 	(tls_test_ie_shared.so): Link in tls_test_c_pic_ie.o.
   15978 	(tls_test_DEPENDENCIES, tls_test_LDADD): Add tls_test_c.o.
   15979 	(tls_test_c.o): New target.
   15980 	(tls_pic_test_DEPENDENCIES): Add tls_test_c_pic.o.
   15981 	(tls_pic_test_LDADD): Likewise.
   15982 	(tls_shared_gd_to_ie_test_DEPENDENCIES): Add tls_test_c_pic.o.
   15983 	(tls_shared_gd_to_ie_test_LDADD): Likewise.
   15984 	(tls_test_c_gnu2.o): New target.
   15985 	(tls_shared_gnu2_gd_to_ie_test_DEPENDENCIES): Add
   15986 	tls_test_c_gnu2.o.
   15987 	(tls_shared_gnu2_gd_to_ie_test_LDADD): Likewise.
   15988 	(tls_test_gnu2_shared.so): Link in tls_test_c_gnu2.o.
   15989 	(tls_test_shared_nonpic.so): Link in tls_test_c.o.
   15990 	* testsuite/tls_test.cc: Include "config.h".
   15991 	(t_last): Call t11_last.
   15992 	* testsuite/tls_test.h (t11, t11_last): Declare.
   15993 	* testsuite/tls_test_c.c: New file.
   15994 	* testsuite/tls_test_main.cc (thread_routine): Call t11.
   15995 	* configure.ac: Check for OpenMP support.
   15996 	* configure, config.in, Makefile.in: Rebuild.
   15997 	* testsuite/Makefile.in: Rebuild.
   15998 
   15999 2008-04-16  Cary Coutant  <ccoutant (a] google.com>
   16000 
   16001 	* i386.cc (Target_i386::define_tls_base_symbol): New function.
   16002 	(Target_i386::tls_base_symbol_defined_): New field.
   16003 	(Target_i386::Scan::local): Define _TLS_MODULE_BASE_ symbol.
   16004 	(Target_i386::Scan::global): Likewise.
   16005 	* symtab.cc (sized_finalize_symbol): Add check for TLS symbol.
   16006 	* x86_64.cc (Target_x86_64::define_tls_base_symbol): New function.
   16007 	(Target_x86_64::tls_base_symbol_defined_): New field.
   16008 	(Target_x86_64::Scan::local): Define _TLS_MODULE_BASE_ symbol.
   16009 	(Target_x86_64::Scan::global): Likewise.
   16010 
   16011 2008-04-16  Cary Coutant  <ccoutant (a] google.com>
   16012 
   16013 	* symtab.h (Symbol::is_strong_undefined): Removed unused function.
   16014 	(Symbol::needs_plt_entry): Allow weak undefined symbols.
   16015 	(Symbol::needs_dynamic_reloc): Allow weak undefined symbols when
   16016 	building shared libraries.
   16017 	* testsuite/Makefile.am (weak_undef_nonpic_test): New target.
   16018 	(weak_undef_file1_nonpic.o, weak_undef_file2_nonpic.o)
   16019 	(weak_undef_lib_nonpic.so, alt/weak_undef_lib_nonpic.so): New targets.
   16020 	* testsuite/Makefile.in: Rebuild.
   16021 	* testsuite/weak_undef.h: New file.
   16022 	* testsuite/weak_undef_file1.cc: Add extra test cases.
   16023 	* testsuite/weak_undef_file2.cc: Likewise.
   16024 	* testsuite/weak_undef_test.cc: Likewise.
   16025 
   16026 2008-04-16  David S. Miller  <davem (a] davemloft.net>
   16027 
   16028 	* sparc.cc (Target_sparc::Scan): Change from struct to class.
   16029 	Add issued_non_pic_error_ field.  Declare check_non_pic.
   16030 	(Target_sparc::Scan::check_non_pic): New function.
   16031 	(Target_sparc::Scan::local): Call check_non_pic as appropriate.
   16032 	(Target_sparc::Scan::global): Likewise.
   16033 
   16034 	* configure.ac (FN_PTRS_IN_SO_WITHOUT_PIC): Add sparc64.
   16035 	* configure: Rebuild.
   16036 
   16037 	* options.h (DEFINE_enable): New macro.
   16038 	(new_dtags): New enable option.
   16039 	(initfirst, interpose, loadfltr, nodefaultlib,
   16040 	nodelete, nodlopen, nodump): New -z options.
   16041 	* layout.cc (Layout:finish_dynamic_section): If new
   16042 	dtags enabled, emit DT_RUNPATH.  Also, emit a
   16043 	DT_FLAGS_1 containing any specified -z flags.
   16044 
   16045 2008-04-16  Ian Lance Taylor  <iant (a] google.com>
   16046 
   16047 	* copy-relocs.cc: New file.
   16048 	* copy-relocs.h: New file.
   16049 	* reloc.cc: Remove Copy_relocs code.
   16050 	* reloc.h: Likewise.
   16051 	* reloc-types.h (struct Reloc_types) [both versions]: Add
   16052 	get_reloc_addend_noerror.
   16053 	* output.h (class Output_data_reloc<elfcpp::SHT_REL>): Add
   16054 	variants of add_global which take an addend which must be zero.
   16055 	* i386.cc: Include "copy-relocs.h".
   16056 	(class Target_i386): Change type of copy_relocs_ to variable,
   16057 	update initializer.
   16058 	(Target_i386::copy_reloc): Rewrite to pass to Copy_relocs class.
   16059 	Change all callers.
   16060 	(Target_i386::do_finalize_sections): Change handling of
   16061 	copy_relocs_.
   16062 	* sparc.cc: Include "copy-relocs.h".
   16063 	(class Target_sparc): Change type of copy_relocs_ to variable,
   16064 	update initializer.
   16065 	(Target_sparc::copy_reloc): Rewrite to pass to Copy_relocs class.
   16066 	Change all callers.
   16067 	(Target_sparc::do_finalize_sections): Change handling of
   16068 	copy_relocs_.
   16069 	* x86_64.cc: Include "copy-relocs.h".
   16070 	(class Target_x86_64): Change type of copy_relocs_ to variable,
   16071 	update initializer.
   16072 	(Target_x86_64::copy_reloc): Rewrite to pass to Copy_relocs
   16073 	class.  Change all callers.
   16074 	(Target_x86_64::do_finalize_sections): Change handling of
   16075 	copy_relocs_.
   16076 	* Makefile.am (CCFILES): Add copy-relocs.cc.
   16077 	(HFILES): Add copy-relocs.h.
   16078 
   16079 	* Makefile.in, aclocal.m4, testsuite/Makefile.in: Rebuild.
   16080 
   16081 	* testsuite/script_test_4.sh: Permit leading zeroes.
   16082 
   16083 2008-04-15  Ian Lance Taylor  <iant (a] google.com>
   16084 
   16085 	* script-sections.cc (Script_sections::create_segments): Use
   16086 	header_size_adjustment even when there is enough room for the
   16087 	headers.
   16088 	* testsuite/script_test_4.sh: New file.
   16089 	* testsuite/script_test_4.t: New file.
   16090 	* testsuite/Makefile.am (check_SCRIPTS): Add script_test_4.sh.
   16091 	(check_DATA): Add script_test_4.stdout.
   16092 	(MOSTLYCLEANFILES): Likewise.
   16093 	(script_test_4): New target.
   16094 	(script_test_4.stdout): New target.
   16095 	* testsuite/Makefile.in: Rebuild.
   16096 
   16097 	* sparc.cc: Add definitions for Output_data_plt_sparc class
   16098 	constants.
   16099 
   16100 2008-04-14  David S. Miller  <davem (a] davemloft.net>
   16101 
   16102 	* sparc.cc: New file.
   16103 	* Makefile.am (TARGETSOURCES): Add sparc.cc
   16104 	(ALL_TARGETOBJS): Add sparc.$(OBJEXT)
   16105 	* configure.tgt: Document targ_extra_size and
   16106 	targ_extra_big_endian.  Add entries for sparc-* and
   16107 	sparc64-*.
   16108 	* configure.ac: Handle targ_extra_size and
   16109 	targ_extra_big_endian.
   16110 	* Makefile.in: Rebuild.
   16111 	* configure: Likewise.
   16112 	* po/POTFILES.in: Likewise.
   16113 	* po/gold.pot: Likewise.
   16114 
   16115 2008-04-14  Ian Lance Taylor  <iant (a] google.com>
   16116 
   16117 	* layout.cc (Layout::Layout): Initialize sections_are_attached_.
   16118 	(Layout::get_output_section): Ignore SHF_WRITE and SHF_EXECINSTR
   16119 	in the name/type/flags to section mapping.  Don't call
   16120 	allocate_output_section.
   16121 	(Layout::choose_output_section): Change parameter from adjust_name
   16122 	to is_input_section.  Don't permit input sections after sections
   16123 	are attached to segments.  Don't call allocate_output_section.
   16124 	(Layout::layout_eh_frame): Call update_flags_for_input_section,
   16125 	not write_enable_output_section.
   16126 	(Layout::make_output_section): Don't push to
   16127 	unattached_section_list_ nor call attach_to_segment.  Call
   16128 	attach_section_to_segment if sections are attached.
   16129 	(Layout::attach_sections_to_segments): New function.
   16130 	(Layout::attach_section_to_segment): New function.
   16131 	(Layout::attach_allocated_section_to_segment): Rename from
   16132 	attach_to_segment.  Remove flags parameter.
   16133 	(Layout::allocate_output_section): Remove function.
   16134 	(Layout::write_enable_output_section): Remove function.
   16135 	* layout.h (class Layout): Update for above changes.  Add new
   16136 	field sections_are_attached_.
   16137 	* output.h (Output_section::update_flags_for_input_section): New
   16138 	function.
   16139 	* output.cc (Output_section::add_input_section): Call
   16140 	update_flags_for_input_section.
   16141 	* gold.cc (queue_middle_tasks): Call attach_sections_to_segments.
   16142 
   16143 2008-04-11  Cary Coutant  <ccoutant (a] google.com>
   16144 
   16145 	* i386.cc (Target_i386::got_mod_index_entry): Restore code previously
   16146 	thought unnecessary.
   16147 	* x86_64.cc (Target_x86_64::got_mod_index_entry): Likewise.
   16148 
   16149 2008-04-11  Ian Lance Taylor  <iant (a] google.com>
   16150 
   16151 	* output.h (class Output_section_data): Remove inline definition
   16152 	of set_addralign.
   16153 	* output.cc (Output_section_data::set_addralign): New function.
   16154 
   16155 2008-04-11  Cary Coutant  <ccoutant (a] google.com>
   16156 
   16157 	Add support for TLS descriptors for i386 and x86_64.
   16158 	* i386.cc (Target_i386::Relocate::tls_desc_gd_to_ie): New function.
   16159 	(Target_i386::Relocate::tls_desc_gd_to_le): New function.
   16160 	(Target_i386::Got_type): Add GOT_TYPE_TLS_NOFFSET and
   16161 	GOT_TYPE_TLS_DESC.
   16162 	(Target_i386::got_mod_index_entry): Remove unnecessary code.
   16163 	(Target_i386::Scan::local): Implement R_386_TLS_GOTDESC and
   16164 	R_386_TLS_DESC_CALL relocations.  Fix problem with initial-exec
   16165 	relocations.
   16166 	(Target_i386::Scan::global): Fix problem with GD-to-IE relaxation.
   16167 	Implement R_386_TLS_GOTDESC and R_386_TLS_DESC_CALL relocations;
   16168 	Fix problem with initial-exec relocations.
   16169 	(Target_i386::Relocate::relocate_tls): Likewise.
   16170 	(Target_i386::Relocate::tls_gd_to_ie): Fix problem with GD-to-IE
   16171 	relaxation.
   16172 	* output.cc (Output_data_dynamic::Dynamic_entry::write): Add
   16173 	support for section-plus-offset dynamic table entries.
   16174 	* output.h (Output_data_dynamic::add_section_plus_offset): New function.
   16175 	(Output_data_dynamic::Dynamic_entry): Add support for
   16176 	section-plus-offset dynamic table entries.
   16177 	(Output_data_dynamic::Classification): Likewise.
   16178 	(Output_data_dynamic::classification_): Renamed offset_.
   16179 	* x86_64.cc (Target_x86_64::Relocate::tls_desc_gd_to_ie): New function.
   16180 	(Target_x86_64::Relocate::tls_desc_gd_to_le): New function.
   16181 	(Target_x86_64::make_plt_section): New function.
   16182 	(Target_x86_64::reserve_tlsdesc_entries): New function.
   16183 	(Output_data_plt_x86_64::Output_data_plt_x86_64): Add new parameter.
   16184 	(Output_data_plt_x86_64::reserve_tlsdesc_entry): New function.
   16185 	(Output_data_plt_x86_64::has_tlsdesc_entry): New function.
   16186 	(Output_data_plt_x86_64::get_tlsdesc_got_offset): New function.
   16187 	(Output_data_plt_x86_64::get_tlsdesc_plt_offset): New function.
   16188 	(Output_data_plt_x86_64::tlsdesc_plt_entry): New field.
   16189 	(Output_data_plt_x86_64::set_final_data_size): Move out of line;
   16190 	add extra PLT entry for TLS descriptors.
   16191 	(Output_data_plt_x86_64::got_): New field.
   16192 	(Output_data_plt_x86_64::tlsdesc_got_offset_): New field.
   16193 	(Output_data_plt_x86_64::Output_data_plt_x86_64): Initialize new
   16194 	fields.
   16195 	(Output_data_plt_x86_64::do_write): Write extra PLT entry for TLS
   16196 	descriptors.
   16197 	(Target_x86_64::make_plt_entry): Factor out make_plt_section.
   16198 	(Target_x86_64::got_mod_index_entry): Remove unnecessary code.
   16199 	(Target_x86_64::Scan::local): Implement R_386_TLS_GOTDESC and
   16200 	R_386_TLS_DESC_CALL relocations.
   16201 	(Target_x86_64::Scan::global): Likewise.
   16202 	(Target_x86_64::do_finalize_sections): Add dynamic table entries
   16203 	for TLS descriptors.
   16204 	(Relocate::relocate_tls): Fix problem with GD-to-IE relaxation.
   16205 	Implement R_386_TLS_GOTDESC and R_386_TLS_DESC_CALL relocations.
   16206 	(Target_x86_64::Relocate::tls_gd_to_ie): Fix problem with
   16207 	GD-to-IE relaxation.
   16208 	* configure.ac: Export new conditional variables TLS_GNU2_DIALECT
   16209 	and TLS_DESCRIPTORS.
   16210 	* Makefile.in: Rebuild.
   16211 	* configure: Rebuild.
   16212 	* testsuite/Makefile.am (tls_shared_gd_to_ie_test): New target.
   16213 	(tls_test_shared2.so): New target.
   16214 	(tls_shared_gd_to_ie_test_SOURCES): New variable.
   16215 	(tls_shared_gd_to_ie_test_DEPENDENCIES): New variable.
   16216 	(tls_shared_gd_to_ie_test_LDFLAGS): New variable.
   16217 	(tls_shared_gd_to_ie_test_LDADD): New variable.
   16218 	(tls_shared_gnu2_gd_to_ie_test): New target.
   16219 	(tls_test_gnu2.o, tls_test_file2_gnu2.o, tls_test_gnu2_shared2.so):
   16220 	New targets.
   16221 	(tls_shared_gnu2_gd_to_ie_test_SOURCES): New variable.
   16222 	(ls_shared_gnu2_gd_to_ie_test_DEPENDENCIES): New variable.
   16223 	(tls_shared_gnu2_gd_to_ie_test_LDFLAGS): New variable.
   16224 	(tls_shared_gnu2_gd_to_ie_test_LDADD): New variable.
   16225 	(tls_shared_gnu2_test): New target.
   16226 	(tls_test_gnu2_shared.so): New target.
   16227 	(tls_shared_gnu2_test_SOURCES): New variable.
   16228 	(tls_shared_gnu2_test_DEPENDENCIES): New variable.
   16229 	(tls_shared_gnu2_test_LDFLAGS): New variable.
   16230 	(tls_shared_gnu2_test_LDADD): New variable.
   16231 	* testsuite/Makefile.in: Rebuild.
   16232 	* testsuite/Makefile.
   16233 
   16234 2008-04-11  Ian Lance Taylor  <iant (a] google.com>
   16235 
   16236 	* testsuite/Makefile.am (justsyms_2r.o): Add dependency on
   16237 	justsyms.t.
   16238 	* testsuite/Makefile.in: Rebuild.
   16239 
   16240 	* testsuite/script_test_2a.cc (script_test_string_a): Make 8 bytes
   16241 	long.
   16242 	* testsuite/script_test_2.cc (main): Adjust test.
   16243 
   16244 2008-04-11  David S. Miller  <davem (a] davemloft.net>
   16245 	    Ian Lance Taylor  <iant (a] google.com>
   16246 
   16247 	* options.h (General_options): Add entries for '-Y' and
   16248 	'-relax'.
   16249 	* options.cc (General_options:finalize): If -Y was used, add those
   16250 	entries to the library path instead of the default "/lib" and
   16251 	"/usr/lib".
   16252 
   16253 2008-04-11  David S. Miller  <davem (a] davemloft.net>
   16254 
   16255 	* testsuite/justsyms.t: Start at 0x100.
   16256 	* testsuite/justsyms_1.cc: Adjust justsyms_string assertion.
   16257 	* testsuite/script_test_2b.cc (script_test_string_b): Make 8 bytes
   16258 	long.
   16259 	* testsuite/script_test_2.cc: Adjust string and section length
   16260 	checks.
   16261 
   16262 2008-04-09  Ian Lance Taylor  <iant (a] google.com>
   16263 
   16264 	PR gold/5996
   16265 	* script-sections.cc (Sections_element::allocate_to_segment): Add
   16266 	orphan parameter.
   16267 	(Output_section_definition::allocate_to_segment): Likewise.
   16268 	(Orphan_output_section::allocate_to_segment): Likewise.
   16269 	(Script_sections::attach_sections_using_phdrs_clause): Don't
   16270 	propagate non-PT_LOAD segments to orphan sections.
   16271 	* testsuite/Makefile.am (script_test_3.stdout): Generate using
   16272 	readelf rather than objdump.
   16273 	* testsuite/script_test_3.sh: Adjust accordingly.  Test that
   16274 	.interp section and PT_INTERP segment are the same size.
   16275 	* testsuite/Makefile.in: Rebuild.
   16276 
   16277 	* symtab.cc (Symbol_table::add_from_dynobj): Only look for weak
   16278 	aliases for symbols defined in the same object.
   16279 	* testsuite/Makefile.am (check_PROGRAMS): Add weak_alias_test.
   16280 	(weak_alias_test_SOURCES): New variable.
   16281 	(weak_alias_test_DEPENDENCIES): New variable.
   16282 	(weak_alias_test_LDFLAGS): New variable.
   16283 	(weak_alias_test_LDADD): New variable.
   16284 	(weak_alias_test_1_pic.o, weak_alias_test_1.so): New targets.
   16285 	(weak_alias_test_2_pic.o, weak_alias_test_2.so): New targets.
   16286 	(weak_alias_test_3.o): New target.
   16287 	(weak_alias_test_4_pic.o, weak_alias_test_4.so): New targets.
   16288 	* testsuite/weak_alias_test_main.cc: New file.
   16289 	* testsuite/weak_alias_test_1.cc: New file.
   16290 	* testsuite/weak_alias_test_2.cc: New file.
   16291 	* testsuite/weak_alias_test_3.cc: New file.
   16292 
   16293 2008-04-08  Ian Lance Taylor  <iant (a] google.com>
   16294 
   16295 	* options.h (class General_options): Add --noinhibit-exec option.
   16296 	* main.cc (main): Check --noinhibit-exec.
   16297 
   16298 	* options.h (class General_options): Define --wrap as a special
   16299 	option.  Add wrap_symbols_ field.
   16300 	(General_options::any_wrap_symbols): New function.
   16301 	(General_options::is_wrap_symbol): New function.
   16302 	* options.cc (General_options::parse_wrap): New function.
   16303 	(General_options::General_options): Initialize wrap_symbols_.
   16304 	* symtab.cc (Symbol_table::wrap_symbol): New function.
   16305 	(Symbol_table::add_from_object): Handle --wrap.
   16306 	* symtab.h (class Symbol_table): Declare wrap_symbol.
   16307 	* target.h (Target::wrap_char): New function.
   16308 	(Target::Target_info): Add wrap_char field.
   16309 	* i386.cc (Target_i386::i386_info): Initialize wrap_char.
   16310 	* x86_64.cc (Target_x86_64::x86_64_info): Likewise.
   16311 	* testsuite/testfile.cc (Target_test::test_target_info):
   16312 	Likewise.
   16313 
   16314 	* errors.cc (Errors::undefined_symbol): Mention symbol version if
   16315 	there is one.
   16316 
   16317 	* layout.h (class Layout): Add added_eh_frame_data_ field.
   16318 	* layout.cc (Layout::Layout): Initialize new field.
   16319 	(Layout::layout_eh_frame): Don't add eh_frame_data_ to .eh_frame
   16320 	output section until we find a section we merged successfully.
   16321 	* object.cc (Sized_relobj::check_eh_frame_flags): Don't require
   16322 	that the size be non-zero.
   16323 
   16324 	* merge.cc (Object_merge_map::get_output_offset): Remove inline
   16325 	qualifier.
   16326 
   16327 2008-04-08  Craig Silverstein  <csilvers (a] google.com>
   16328 
   16329 	* configure.ac: Export new conditional variable HAVE_ZLIB.
   16330 	* testsuite/Makefile.am (flagstest_o_specialfile): Condition
   16331 	on HAVE_ZLIB.
   16332 	(flagstest_o_specialfile_and_compress_debug_sections): Likewise.
   16333 	* configure, Makefile.in, testsuite/Makefile.in: Rebuild.
   16334 
   16335 2008-04-07  Ian Lance Taylor  <iant (a] google.com>
   16336 
   16337 	* version.cc (version_string): Set to "1.5".
   16338 
   16339 	* x86_64.cc (Target_x86_64::Scan): Change from struct to class.
   16340 	Add issued_non_pic_error_ field.  Declare check_non_pic.
   16341 	(Target_x86_64::Scan::check_non_pic): New function.
   16342 	(Target_x86_64::Scan::local): Call check_non_pic as appropriate.
   16343 	(Target_x86_64::Scan::global): Likewise.
   16344 
   16345 	* output.cc (Output_reloc<SHT_REL>::local_section_offset): Add
   16346 	addend parameter.  Change caller.  Handle merge sections.
   16347 	(Output_reloc<SHT_REL>::symbol_value): Change parameter type from
   16348 	Address to Addend.  Don't add in the result of
   16349 	local_section_offset, pass down the addend and use the returned
   16350 	value.
   16351 	* output.h (class Output_reloc<SHT_REL>): Add Addend typedef.
   16352 	Update declarations of local_section_offset and symbol_value.
   16353 	* testsuite/two_file_test_1.cc (t18): New function.
   16354 	* testsuite/two_file_test_2.cc (f18): New function.
   16355 	* testsuite/two_file_test_main.cc (main): Call t18.
   16356 	* testsuite/two_file_test.h (t18, f18): Declare.
   16357 
   16358 	* configure.ac: Don't test for objdump, c++filt, or readelf.
   16359 	* testsuite/Makefile.am: Remove READELF and OBJDUMP_AND_CPPFILT
   16360 	conditionals.
   16361 	(TEST_READELF): New variable.
   16362 	(TEST_OBJDUMP, TEST_CXXFILT, TEST_STRIP): New variables.
   16363 	(check_PROGRAMS): Add two_file_strip_test.
   16364 	(two_file_strip_test): New target.
   16365 	(check_PROGRAMS): Add two_file_same_shared_strip_test.
   16366 	(two_file_same_shared_strip_test_SOURCES): New variable.
   16367 	(two_file_same_shared_strip_test_DEPENDENCIES): New variable.
   16368 	(two_file_same_shared_strip_test_LDFLAGS): New variable.
   16369 	(two_file_same_shared_strip_test_LDADD): New variable.
   16370 	(two_file_shared_strip.so): New target.
   16371 	(ver_test_2.syms, ver_test_4.syms): Use TEST_READELF.
   16372 	(ver_test_5.syms, ver_test_7.syms): Likewise.
   16373 	(ver_matching_test.stdout): Use TEST_OBJDUMP and TEST_CXXFILT.
   16374 	(strip_test_3.stdout): Use TEST_OBJDUMP.
   16375 	* configure, Makefile.in, testsuite/Makefile.in: Rebuild.
   16376 
   16377 2008-04-04  Cary Coutant  <ccoutant (a] google.com>
   16378 
   16379 	* symtab.h (Symbol::is_weak_undefined): New function.
   16380 	(Symbol::is_strong_undefined): New function.
   16381 	(Symbol::is_absolute): New function.
   16382 	(Symbol::needs_plt_entry): Exclude weak undefined symbols.
   16383 	(Symbol::needs_dynamic_reloc): Exclude weak undefined and
   16384 	absolute symbols.
   16385 	* testsuite/Makefile.am (check_PROGRAMS): Add weak_undef_test.
   16386 	(weak_undef_test): New target.
   16387 	* testsuite/Makefile.in: Rebuild.
   16388 	* testsuite/weak_undef_file1.cc: New file.
   16389 	* testsuite/weak_undef_file2.cc: New file.
   16390 	* testsuite/weak_undef_test.cc: New file.
   16391 
   16392 2008-04-03  Craig Silverstein  <csilvers (a] google.com>
   16393 
   16394 	* compressed_output.h (class Output_compressed_section): Use
   16395 	unsigned buffer.
   16396 	* compressed_output.cc (zlib_compress): Use unsigned buffers,
   16397 	add zlib header.
   16398 	(zlib_compressed_suffix): Removed.
   16399 	(Output_compressed_section::set_final_data_size): Use unsigned
   16400 	buffers.
   16401 	* testsuite/Makefile.am (flagstest_compress_debug_sections):
   16402 	Fix linker invocation.
   16403 	(flagstest_o_specialfile_and_compress_debug_sections):
   16404 	Likewise.
   16405 	* testsuite/Makefile.in: Regenerated.
   16406 
   16407 2008-04-02  David S. Miller  <davem (a] davemloft.net>
   16408 
   16409 	*  dwarf_reader.cc (Sized_dwarf_line_info::read_header_prolog,
   16410 	Sized_dwarf_line_info::process_one_opcode): Use Swap_unaligned.
   16411 
   16412 2008-04-02  Craig Silverstein  <csilvers (a] google.com>
   16413 
   16414 	* TODO: New file.
   16415 
   16416 2008-04-02  Ian Lance Taylor  <iant (a] google.com>
   16417 
   16418 	* fileread.cc (File_read::find_view): Add byteshift and vshifted
   16419 	parameters.  Update for new key type to views_.  Change all
   16420 	callers.
   16421 	(File_read::read): Adjust for byteshift in returned view.
   16422 	(File_read::add_view): New function, broken out of
   16423 	find_and_make_view.
   16424 	(File_read::make_view): New function, broken out of
   16425 	find_and_make_view.
   16426 	(File_read::find_or_make_view): Add offset and aligned
   16427 	parameters.  Rewrite accordingly.  Change all callers.
   16428 	(File_read::get_view): Add offset and aligned parameters.  Adjust
   16429 	for byteshift in return value.
   16430 	(File_read::get_lasting_view): Likewise.
   16431 	* fileread.h (class File_read): Update declarations.
   16432 	(class File_read::View): Add byteshift_ field.  Add byteshift to
   16433 	constructor.  Add byteshift method.
   16434 	* archive.h (Archive::clear_uncached_views): New function.
   16435 	(Archive::get_view): Add aligned parameter.  Change all callers.
   16436 	* object.h (Object::get_view): Add aligned parameter.  Change all
   16437 	callers.
   16438 	(Object::get_lasting_view): Likewise.
   16439 
   16440 	* fileread.cc (File_read::release): Don't call clear_views if
   16441 	there are multiple objects.
   16442 	* fileread.h (File_read::clear_uncached_views): New function.
   16443 	* archive.cc (Add_archive_symbols::run): Call clear_uncached_views
   16444 	on the archive.
   16445 
   16446 2008-03-31  Cary Coutant  <ccoutant (a] google.com>
   16447 
   16448 	Add thin archive support.
   16449 	* archive.cc (Archive::armagt): New const.
   16450 	(Archive::setup): Remove task parameter and calls to unlock.
   16451 	(Archive::unlock_nested_archives): New function.
   16452 	(Archive::read_header): Add nested_off parameter. Change
   16453 	all callers.
   16454 	(Archive::interpret_header): Likewise.
   16455 	(Archive::include_all_members): Change to handle thin
   16456 	archives.
   16457 	(Archive::include_member): Likewise.
   16458 	* archive.h (Archive::Archive): Add new parameters and
   16459 	initializers.
   16460 	(Archive::armagt): New const.
   16461 	(Archive::setup): Remove task parameter.
   16462 	(Archive::unlock_nested_archives): New function.
   16463 	(Archive::read_header): Add nested_off parameter.
   16464 	(Archive::interpret_header): Likewise.
   16465 	(Archive::Nested_archive_table): New typedef.
   16466 	(Archive::is_thin_archive_): New field.
   16467 	(Archive::nested_archives_): New field.
   16468 	(Archive::options_): New field.
   16469 	(Archive::dirpath_): New field.
   16470 	(Archive::task_): New field.
   16471 	* readsyms.cc (Read_symbols::do_read_symbols): Add check
   16472 	for thin archives.  Pass additional parameters to
   16473 	Archive::Archive.  Unlock the archive file after calling
   16474 	Archive::setup.
   16475 
   16476 2008-03-29  Ian Lance Taylor  <iant (a] google.com>
   16477 
   16478 	* symtab.cc (Symbol_table::do_define_as_constant): Don't force a
   16479 	version symbol to be local.
   16480 	* testsuite/ver_test_4.sh: New file.
   16481 	* testsuite/Makefile.am (check_SCRIPTS): Add ver_test_4.sh.
   16482 	(check_DATA): Add ver_test_4.syms.
   16483 	(ver_test_4.syms): New target.
   16484 	* testsuite/Makefile.in: Rebuild.
   16485 
   16486 	* output.cc
   16487 	(Output_section::Input_section_sort_entry::has_priority): New
   16488 	function.
   16489 	(Output_section::Input_section_sort_entry::match_file_name): New
   16490 	function.
   16491 	(Output_section::Input_section_sort_entry::match_section_name):
   16492 	Remove.
   16493 	(Output_section::Input_section_sort_entry::match_section_name_prefix):
   16494 	Remove.
   16495 	(Output_section::Input_section_sort_entry::match_section_file):
   16496 	Remove.
   16497 	(Output_section::Input_section_sort_compare::operator()): Rewrite
   16498 	using new Input_section_sort_entry functions.  Sort crtbegin and
   16499 	crtend first.  Sort sections with no priority before sections with
   16500 	a priority.
   16501 	* testsuite/initpri1.c (d3): Check j != 4.
   16502 	(cd5): New constructor/destructor function.
   16503 	(main): Check j != 2.
   16504 
   16505 	* symtab.cc (Symbol_table::add_from_object): If we don't use the
   16506 	new symbol when resolving, don't call set_is_default.
   16507 	* testsuite/ver_test_7.cc: New file.
   16508 	* testsuite/ver_test_7.sh: New file.
   16509 	* testsuite/Makefile.am (ver_test_7.so): New target.
   16510 	(ver_test_7.o): New target.
   16511 	(check_SCRIPTS): Add ver_test_7.sh.
   16512 	(check_DATA): Add ver_test_7.syms.
   16513 	(ver_test_7.syms): New target.
   16514 
   16515 2008-03-28  Ian Lance Taylor  <iant (a] google.com>
   16516 
   16517 	* layout.cc (Layout::layout): If we see an input section with a
   16518 	name that needs sorting, set the must_sort flag for the output
   16519 	section.
   16520 	(Layout::make_output_section): If the name of the output section
   16521 	indicates that it might	require sorting, set the may_sort flag.
   16522 	* output.h (Output_section::may_sort_attached_input_sections): New
   16523 	function.
   16524 	(Output_section::set_may_sort_attached_input_sections): New
   16525 	function.
   16526 	(Output_section::must_sort_attached_input_sections): New
   16527 	function.
   16528 	(Output_section::set_must_sort_attached_input_sections): New
   16529 	function.
   16530 	(class Output_section): Declare Input_section_sort_entry.  Define
   16531 	Input_section_sort_compare.  Declare
   16532 	sort_attached_input_sections.  Add new fields:
   16533 	may_sort_attached_input_sections_,
   16534 	must_sort_attached_input_sections_,
   16535 	attached_input_sections_are_sorted_.
   16536 	* output.cc (Output_section::Output_section): Initialize new
   16537 	fields.
   16538 	(Output_section::add_input_section): Add an entry to
   16539 	input_sections_ if may_sort or must_sort are true.
   16540 	(Output_section::set_final_data_size): Call
   16541 	sort_attached_input_sections if necessary.
   16542 	(Output_section::Input_section_sort_entry): Define new class.
   16543 	(Output_section::Input_section_sort_compare::operator()): New
   16544 	function.
   16545 	(Output_section::sort_attached_input_sections): New function.
   16546 	* configure.ac: Check whether the compiler supports constructor
   16547 	priorities.  Define a CONSTRUCTOR_PRIORITY automake conditional.
   16548 	* testsuite/initpri1.c: New file.
   16549 	* testsuite/Makefile.am (check_PROGRAMS): Add initpri1 if
   16550 	CONSTRUCTOR_PRIORITY.
   16551 	(initpri1_SOURCES, initpri1_DEPENDENCIES): New variables.
   16552 	(initpri1_LDFLAGS): New variable.
   16553 	* configure, Makefile.in, testsuite/Makefile.in: Rebuild.
   16554 
   16555 2008-03-27  Ian Lance Taylor  <iant (a] google.com>
   16556 
   16557 	* common.cc (Sort_commons::operator): Correct sorting algorithm.
   16558 	* testsuite/common_test_1.c: New file.
   16559 	* testsuite/Makefile.am (check_PROGRAMS): Add common_test_1.
   16560 	(common_test_1_SOURCES): New variable.
   16561 	(common_test_1_DEPENDENCIES): New variable.
   16562 	(common_test_1_LDFLAGS): New variable.
   16563 
   16564 	* symtab.cc (Symbol_table::add_from_object): Handle saw_undefined_
   16565 	and commons_ correctly when NAME/VERSION does not override
   16566 	NAME/NULL.
   16567 	* testsuite/ver_test_6.c: New file.
   16568 	* testsuite/Makefile.am (check_PROGRAMS): Add ver_test_6
   16569 	(ver_test_6_SOURCES, ver_test_6_DEPENDENCIES): New variables.
   16570 	(ver_test_6_LDFLAGS, ver_test_6_LDADD): New variables.
   16571 
   16572 2008-03-26  Ian Lance Taylor  <iant (a] google.com>
   16573 
   16574 	* symtab.cc (Symbol_table::add_from_relobj): Don't set the version
   16575 	of an undefined symbol from a version script.
   16576 	* testsuite/Makefile.am (ver_test_5.so): New target.
   16577 	(ver_test_5.o): New target.
   16578 	(check_SCRIPTS): Add ver_test_5.sh.
   16579 	(check_DATA): Add ver_test_5.syms.
   16580 	(ver_test_5.syms): New target.
   16581 	* testsuite/ver_test_5.cc: New file.
   16582 	* testsuite/ver_test_5.script: New file.
   16583 	* testsuite/ver_test_5.sh: New file.
   16584 	* Makefile.in, testsuite/Makefile.in: Rebuild.
   16585 
   16586 	PR gold/5986
   16587 	Fix problems building gold with gcc 4.3.0.
   16588 	* gold.h (TEMPLATE_ATTRIBUTE_PRINTF_4): Define.
   16589 	(gold_error_at_location, gold_warning_at_location): Use it.
   16590 	* configure.ac: Check whether we can compile and use a template
   16591 	function with a printf attribute.
   16592 	* x86_64.cc (Target_x86_64::do_code_fill): Swap out a 32-bit value
   16593 	when jumping over bytes.
   16594 	* object.cc: Instantiate Object::read_section_data.
   16595 	* debug.h: Include <cstring>
   16596 	* dwarf_reader.cc: Include <algorithm>
   16597 	* main.cc: Include <cstring>.
   16598 	* options.cc: Include <cstring>.
   16599 	* output.cc: Include <cstring>.
   16600 	* script.cc: Include <cstring>.
   16601 	* script.h: Include <string>.
   16602 	* symtab.cc: Include <cstring> and <algorithm>.
   16603 	* target-select.cc: Include <cstring>.
   16604 	* version.cc: Include <string>.
   16605 	* testsuite/testmain.cc: Include <cstdlib>.
   16606 	* configure, config.in: Rebuild.
   16607 
   16608 2008-03-25  Ian Lance Taylor  <iant (a] google.com>
   16609 
   16610 	* options.cc: Include "../bfd/bfdver.h".
   16611 	(options::help): Print bug reporting address.
   16612 
   16613 	* version.cc (print_version): Adjust output for current value of
   16614 	BFD_VERSION_STRING.
   16615 
   16616 	* NEWS: New file.
   16617 
   16618 	* options.cc (options::help): Print list of supported targets.
   16619 	* target-select.h: Include <vector>.
   16620 	(class Target_selector): Make machine_, size_, and is_big_endian_
   16621 	fields const.  Add bfd_name_ and instantiated_target_ fields.
   16622 	(Target_selector::Target_selector): Add bfd_name parameter.
   16623 	(Target_selector::recognize): Make non-virtual, call
   16624 	do_recognize.
   16625 	(Target_selector::recognize_by_name): Make non-virtual, call
   16626 	do_recognize_by_name.
   16627 	(Target_selector::supported_names): New function.
   16628 	(Target_selector::bfd_name): New function.
   16629 	(Target_selector::do_instantiate_target): New pure virtual
   16630 	function.
   16631 	(Target_selector::do_recognize): New virtual function.
   16632 	(Target_selector::do_recognize_by_name): New virtual function.
   16633 	(Target_selector::instantiate_target): New private function.
   16634 	(supported_target_names): Declare.
   16635 	* target-select.cc (Target_selector::Target_selector): Update for
   16636 	new parameter and fields.
   16637 	(select_target_by_name): Check that the name matches before
   16638 	calling recognize_by_name.
   16639 	(supported_target_names): New function.
   16640 	* i386.cc (class Target_selector_i386): Update Target_selector
   16641 	constructor call.  Remove recognize and recognize_by_name.  Add
   16642 	do_instantiate_target.
   16643 	* x86_64.cc (class Target_selector_x86_64): Likewise.
   16644 	* testsuite/testfile.cc (class Target_selector_test): Update for
   16645 	changes to Target_selector.
   16646 
   16647 	* README: Rewrite, with some notes on unsupported features.
   16648 
   16649 2008-03-24  Cary Coutant  <ccoutant (a] google.com>
   16650 
   16651 	* i386.cc (Target_i386::Got_type): New enum declaration.
   16652 	(Target_i386::Scan::local): Updated callers of Output_data_got
   16653 	member functions.
   16654 	(Target_i386::Scan::global): Likewise.
   16655 	(Target_i386::Relocate::relocate): Likewise.
   16656 	(Target_i386::Relocate::relocate_tls): Likewise.
   16657 	* object.h (Got_offset_list): New class.
   16658 	(Sized_relobj::local_has_got_offset): Added got_type parameter.
   16659 	(Sized_relobj::local_got_offset): Likewise.
   16660 	(Sized_relobj::set_local_got_offset): Likewise.
   16661 	(Sized_relobj::local_has_tls_got_offset): Removed.
   16662 	(Sized_relobj::local_tls_got_offset): Removed.
   16663 	(Sized_relobj::set_local_tls_got_offset): Removed.
   16664 	(Sized_relobj::Local_got_offsets): Changed to store a list of offsets.
   16665 	* output.cc (Output_data_got::add_global): Added got_type parameter.
   16666 	(Output_data_got::add_global_with_rel): Likewise.
   16667 	(Output_data_got::add_global_with_rela): Likewise.
   16668 	(Output_data_got::add_global_pair_with_rel): New function.
   16669 	(Output_data_got::add_global_pair_with_rela): New function.
   16670 	(Output_data_got::add_local): Added got_type parameter.
   16671 	(Output_data_got::add_local_with_rel): Likewise.
   16672 	(Output_data_got::add_local_with_rela): Likewise.
   16673 	(Output_data_got::add_local_pair_with_rel): New function.
   16674 	(Output_data_got::add_local_pair_with_rela): New function.
   16675 	(Output_data_got::add_global_tls): Removed.
   16676 	(Output_data_got::add_global_tls_with_rel): Removed.
   16677 	(Output_data_got::add_global_tls_with_rela): Removed.
   16678 	(Output_data_got::add_local_tls): Removed.
   16679 	(Output_data_got::add_local_tls_with_rel): Removed.
   16680 	(Output_data_got::add_local_tls_with_rela): Removed.
   16681 	* output.h (Output_data_got::add_global): Added got_type parameter.
   16682 	(Output_data_got::add_global_with_rel): Likewise.
   16683 	(Output_data_got::add_global_with_rela): Likewise.
   16684 	(Output_data_got::add_global_pair_with_rel): New function.
   16685 	(Output_data_got::add_global_pair_with_rela): New function.
   16686 	(Output_data_got::add_local): Added got_type parameter.
   16687 	(Output_data_got::add_local_with_rel): Likewise.
   16688 	(Output_data_got::add_local_with_rela): Likewise.
   16689 	(Output_data_got::add_local_pair_with_rel): New function.
   16690 	(Output_data_got::add_local_pair_with_rela): New function.
   16691 	(Output_data_got::add_global_tls): Removed.
   16692 	(Output_data_got::add_global_tls_with_rel): Removed.
   16693 	(Output_data_got::add_global_tls_with_rela): Removed.
   16694 	(Output_data_got::add_local_tls): Removed.
   16695 	(Output_data_got::add_local_tls_with_rel): Removed.
   16696 	(Output_data_got::add_local_tls_with_rela): Removed.
   16697 	* resolve.cc (Symbol::override_base_with_special): Removed
   16698 	reference to has_got_offset_ field.
   16699 	* symtab.cc (Symbol::init_fields): Replaced initialization
   16700 	of got_offset_ with got_offsets_.  Removed initialization
   16701 	of has_got_offset_
   16702 	* symtab.h (Symbol::has_got_offset): Aded got_type parameter.
   16703 	(Symbol::got_offset): Likewise.
   16704 	(Symbol::set_got_offset): Likewise.
   16705 	(Symbol::has_tls_got_offset): Removed.
   16706 	(Symbol::tls_got_offset): Removed.
   16707 	(Symbol::set_tls_got_offset): Removed.
   16708 	(Symbol::got_offset_): Removed.
   16709 	(Symbol::tls_mod_got_offset_): Removed.
   16710 	(Symbol::tls_pair_got_offset_): Removed.
   16711 	(Symbol::got_offsets_): New field.
   16712 	(Symbol::has_got_offset): Removed.
   16713 	(Symbol::has_tls_mod_got_offset): Removed.
   16714 	(Symbol::has_tls_pair_got_offset): Removed.
   16715 	* x86_64.cc (Target_x86_64::Got_type): New enum declaration.
   16716 	(Target_x86_64::Scan::local): Updated callers of Output_data_got
   16717 	member functions.
   16718 	(Target_x86_64::Scan::global): Likewise.
   16719 	(Target_x86_64::Relocate::relocate): Likewise.
   16720 	(Target_x86_64::Relocate::relocate_tls): Likewise.
   16721 
   16722 2008-03-25  Ben Elliston  <bje (a] au.ibm.com>
   16723 
   16724 	* yyscript.y: Fix spelling error in comment.
   16725 
   16726 2008-03-24  Ian Lance Taylor  <iant (a] google.com>
   16727 
   16728 	* options.h (class General_options): Define build_id option.
   16729 	* layout.h (class Layout): Declare write_build_id, create_note,
   16730 	create_build_id.  Add build_id_note_ member.
   16731 	* layout.cc: Include <cerrno>, <fcntl.h>, <unistd.h>,
   16732 	"libiberty.h", "md5.h", "sha1.h".
   16733 	(Layout::Layout): Initialize eh_frame_data_,
   16734 	eh_frame_hdr_section_, and build_id_note_.
   16735 	(Layout::finalize): Call create_build_id.
   16736 	(Layout::create_note): New function, broken out of
   16737 	Layout::create_gold_note.
   16738 	(Layout::create_gold_note): Call create_note.
   16739 	(Layout::create_build_id): New function.
   16740 	(Layout::write_build_id): New function.
   16741 	(Close_task_runner::run): Call write_build_id.
   16742 
   16743 	* x86_64.cc: Correct license to GPLv3.
   16744 
   16745 2008-03-23  Ian Lance Taylor  <iant (a] google.com>
   16746 
   16747 	* options.cc: Include "demangle.h".
   16748 	(parse_optional_string): New function.
   16749 	(parse_long_option): Handle takes_optional_argument.
   16750 	(parse_short_option): Update dash_z initializer.  Handle
   16751 	takes_optional_argument.
   16752 	(General_options::General_options): Initialize do_demangle_.
   16753 	(General_options::finalize): Set do_demangle_.  Handle demangling
   16754 	style.
   16755 	* options.h (parse_optional_string): Declare.
   16756 	(struct One_option): Add optional_arg field.  Update constructor.
   16757 	Update call constructor calls.  Add takes_optional_argument
   16758 	function.
   16759 	(DEFINE_var): Add optional_arg__ parameter.  Change all callers.
   16760 	(DEFINE_optional_string): Define.
   16761 	(General_options::demangle): Change from DEFINE_bool to
   16762 	DEFINE_optional_string.
   16763 	(General_options::no_demangle): New function.
   16764 	(General_options::do_demangle): New function.
   16765 	(General_options::set_do_demangle): New function.
   16766 	(General_options::execstack_status_): Move definition to end of
   16767 	class definition.
   16768 	(General_options::static_): Likewise.
   16769 	(General_options::do_demangle_): New field.
   16770 	* object.cc (big_endian>::get_symbol_location_info): Call
   16771 	Options::do_demangle, not Options::demangle.
   16772 	* symtab.cc (demangle): Likewise.
   16773 
   16774 2008-03-22  Ian Lance Taylor  <iant (a] google.com>
   16775 
   16776 	* gold.h: Include <cstddef> and <sys/types.h>
   16777 	* options.h: Include <cstring>.
   16778 
   16779 2008-03-21  Ian Lance Taylor  <iant (a] google.com>
   16780 
   16781 	* Added source code to GNU binutils.
   16782 
   16784 Copyright (C) 2008-2014 Free Software Foundation, Inc.
   16785 
   16786 Copying and distribution of this file, with or without modification,
   16787 are permitted in any medium without royalty provided the copyright
   16788 notice and this notice are preserved.
   16789 
   16790 Local Variables:
   16791 mode: change-log
   16792 left-margin: 8
   16793 fill-column: 74
   16794 version-control: never
   16795 End:
   16796