aboutsummaryrefslogtreecommitdiff
path: root/gold
AgeCommit message (Collapse)AuthorFilesLines
2012-10-17 PR gold/14726Alan Modra2-3/+14
* gold.cc (queue_middle_tasks): Call gc_mark_symbol on _init and _fini.
2012-10-162012-10-16 Sriraman Tallam <tmsriram@google.com>Sriraman Tallam2-1/+7
* layout.cc (Layout::include_section): Keep sections marked SHF_EXCLUDE when doing relocatable links.
2012-10-16 * powerpc.cc (Target_powerpc::define_save_restore_funcs): New func.Alan Modra2-0/+371
(Target_powerpc::do_finalize_sections): Call it. (Output_data_save_res): New class and supporting functions. (Target_powerpc::symval_for_branch): Only look up .opd entry for normal symbols defined in object files.
2012-10-12 * powerpc.cc (Powerpc_relobj::add_gc_mark, process_gc_mark): New.Alan Modra2-3/+40
(struct Opd_ent): Make "discard" a bit field. Add "gc_mark". (Target_powerpc::do_gc_mark_symbol): Delay marking function code section if scan_opd_relocs not yet called. (Target_powerpc::gc_process_relocs): Call process_gc_mark.
2012-10-12 * powerpc.cc (Output_data_plt_powerpc::add_entry, add_ifunc_entry,Alan Modra2-18/+17
add_local_ifunc_entry): Revert last change. (Target_powerpc::make_plt_entry, make_local_ifunc_plt_entry): Likewise.
2012-10-05 * powerpc.cc (Target_powerpc::do_plt_address_for_local,Alan Modra2-105/+258
do_plt_address_for_global): New functions. (Output_data_got_powerpc::do_write): Don't segfault when linking statically. (Output_data_plt_powerpc::add_entry, add_ifunc_entry, add_local_ifunc_entry): Return true on adding entry.. (Target_powerpc::make_plt_entry): ..use to avoid unnecessary glink->add_entry call. Remove unused symtab param. Adjust calls. (Target_powerpc::make_local_ifunc_plt_entry): Likewise. (Target_powerpc::make_iplt_section): Remove symtab param. Don't set up symbols here. (Target_powerpc::do_finalize_sections): Instead set up __rela_iplt syms here. Do so even when no .iplt. Don't segfault when linking statically. (Output_data_glink::add_entry, find_entry): Rearrange params. Add new variants without reloc param. (Glink_sym_ent::Glink_sym_ent): Likewise. (Target_powerpc::Scan::reloc_needs_plt_for_ifunc): Accept any reloc when refs will resolve to plt call stub. (Target_powerpc::Scan::local): Correct ifunc handling. Allow R_PPC_PLTREL24 to resolve locally. (Target_powerpc::Scan::global): Correct ifunc handling. (Target_powerpc::Relocate::relocate): Correct local sym glink lookup. Don't destroy "value" when we have a plt call stub, and when checking plt call validity. (Target_powerpc::do_dynsym_value): Simplify.
2012-10-05 * i386.cc (Output_data_plt_i386::address_for_global,Alan Modra8-61/+63
address_for_local): Add plt offset to returned value. Adjust uses. * sparc.cc (Output_data_plt_sparc::address_for_global, address_for_local): Likewise. * tilegx.cc (Output_data_plt_tilegx::address_for_global, address_for_local): Likewise. * x86_64.cc (Output_data_plt_x86_64::address_for_global, address_for_local): Likewise. * target.h (Target::plt_address_for_global, plt_address_for_local): Update comment. * output.cc (Output_reloc::symbol_value): Don't add plt offset here. (Output_data_got::Got_entry::write): Nor here. * output.h: Comment fix.
2012-10-03Adjust the value of _GLOBAL_OFFSET_TABLE_ for got bigger than 0x8000Walter Lee2-5/+23
bytes, so that the 16 bit relocations have a greater chance of working. * tilegx.cc (Target_tilegx::do_finalize_sections): Adjust global_offset_table_ value for larget got. (Target_tilegx::Relocate::relocate): Handle adjusted got value.
2012-09-29 * powerpc.cc (Target_powerpc::iplt_): New output section.Alan Modra2-97/+466
(Target_powerpc::iplt_section, make_iplt_section, reloc_needs_plt_for_ifunc, make_local_ifunc_plt_entry): New functions. (Target_powerpc::make_plt_entry): Handle ifunc syms. Target_powerpc::plt_entry_count): Count iplt entries too. (Output_data_plt_powerpc::Output_data_plt_powerpc): Don't create reloc section in constructor. New params. (Target_powerpc::make_plt_section): Create reloc section here instead. (Output_data_plt_powerpc::add_ifunc_entry, add_local_ifunc_entry): New functions. (Output_data_plt_powerpc::initial_plt_entry_size_, name_): New vars. (Output_data_glink::add_entry, find_entry): New functions to deal with local syms. (Glink_sym_ent): Add support for local syms. (Output_data_glink::do_write): Handle ifunc plt entries. (Target_powerpc::Scan::get_reference_flags): Handle more relocs. (Target_powerpc::Scan::local, global): Handle ifunc syms. (Target_powerpc::Relocate::relocate): Likewise. (Target_powerpc::do_dynsym_value): Use glink stub, not plt entry.
2012-09-25 * object.h (Sized_relobj_file::adjust_local_symbol,Alan Modra4-5/+122
do_adjust_local_symbol): New functions. * object.cc (Sized_relobj_file::do_count_local_symbols): Use the above. * powerpc.cc (Powerpc_relobj::do_adjust_local_symbol): New function. (Powerpc_relobj::scan_opd_relocs): Warn on unexpected opd relocs and irregular opd entry spacing. (Powerpc_relobj::do_read_relocs): Add opd size checks. (Global_symbol_visitor_opd): New functor. (Target_powerpc::do_finalize_sections): Omit global symbols defined on deleted opd entries.
2012-09-15Add support for tilegx in gold.Walter Lee8-5/+4942
* configure.ac (ENABLE_GOLD): support tilegx* * configure: rebuild elfcpp: * tilegx.h: New file. * elfcpp.h: add EM_TILEGX. gold: * tilegx.cc: New file. * Makefile.am (TARGETSOURCES): Add tilegx.cc (ALL_TARGETOBJS): Add tilegx.$(OBJEXT) * configure.tgt: Add entries for tilegx*. * configure.ac: Likewise. * Makefile.in: Rebuild. * configure: Likewise. * testsuite/icf_safe_test.sh (arch_specific_safe_fold): Handle tilegx.
2012-09-12 * target-reloc.h (scan_relocs): Call scan.local for relocsAlan Modra7-77/+208
against symbols in discarded sections. Pass is_discarded param. * arm.cc, * i386.cc, * sparc.cc, * x86_64.cc (Target_*::Scan::local): Add is_discarded param. * powerpc (Target_powerpc::Scan::local): Likewise. Use is_discarded to flag opd entry as discarded. Don't emit dyn relocs on such entries. (Target_powerpc::Scan::global): Similarly detect and handle such opd entries. (Powerpc_relobj): Replace opd_ent_shndx_ and opd_ent_off_ with opd_ent_. Update all uses. (Powerpc_relobj::get_opd_discard, set_opd_discard): New functions. (Target_powerpc::relocate_section): Zero out discarded opd entry relocs.
2012-09-12 PR gold/14570Ian Lance Taylor4-61/+110
* output.cc: Rename Output_data_got template parameter from size to got_size for all functions. Compile all variants of Output_data_got. (Output_data_got::Got_entry::write): Correct use of size for symbol value. Use local_is_tls rather than casting to Sized_relobj_file. * object.h (class Object): Add local_is_tls and do_local_is_tls. (class Sized_relobj_file): Add do_local_is_tls. * incremental.h (class Sized_relobj_incr): Add do_local_is_tls.
2012-09-10 PR gold/14566Alan Modra3-3/+15
* layout.cc (Layout::set_segment_offsets): When using common-page-size alignment, ensure we are on a new max-page-size page. * output.cc (Output_segment::set_section_addresses): Use abi_pagesize, not common_pagesize for relro boundary. (Output_segment::set_offset): Likewise.
2012-09-10 * output.h (Output_data_got::add_global_tls, add_local_tls,Alan Modra9-59/+242
add_local_tls_pair): New functions. (Output_data_got::add_local_pair_with_rel): Remove second reloc param. Expand comment. (Output_data_got::Got_entry): Rename use_plt_offset_ to use_plt_or_tls_offset_, similarly for constructor param. (Output_data_got::Got_entry::write): Add got_index param. * output.cc (Output_data_got::add_global_tls, add_local_tls, add_local_tls_pair): New functions. (Output_data_got::Got_entry::write): Handle tls symbols with use_plt_or_tls_offset_ set specially. (Output_data_got::add_local_pair_with_rel): Only one reloc. (Output_data_got::do_write): Replace iterator with index, pass index to entry write function. * target.h (Target::tls_offset_for_local, tls_offset_for_global, do_tls_offset_for_local, do_tls_offset_for_global): New functions. * arm.cc (Target_arm::Scan::local): Update add_local_pair_with_rel call. * i386.cc (Target_i386::Scan::local): Likewise. * sparc.cc (Target_sparc::Scan::local): Likewise. * x86_64.cc (Target_x86_64::Scan::local): Likewise. * powerpc.cc (Target_powerpc::do_tls_offset_for_local, do_tls_offset_for_global): New functions. (Target_powerpc::Scan::local): Correct TLS relocations and got entry values. (Target_powerpc::Scan::global): Don't emit unnecessary dynamic relocations on TLS GOT entries.
2012-09-10 * config.in: Disable sanity check for kfreebsd.Alan Modra2-1/+5
2012-09-102012-09-10 Sterling Augustine <saugustine@google.com>Sterling Augustine3-14/+33
* gdb-index.cc (Gdb_index::pubnames_read): New parameter. (Gdb_index::pubtypes_read): New parameter. (Gdb_index_info_reader::read_pubnames_and_pubtypes): Add parameters to calls. * gdb-index.h (Gdb_index): New fields pubnames_object_ and pubtypes_object_.
2012-09-09 * target.h (Target::gc_mark_symbol, do_gc_mark_symbol): New functions.Alan Modra6-43/+215
(Sized_target::gc_add_reference, do_gc_add_reference): New functions. * gc.h (gc_process_relocs): Call target gc_add_reference. * gold.cc (queue_middle_tasks): Use gc_mark_symbol on start sym. * symtab.cc (Symbol_table::gc_mark_undef_symbols): Use gc_mark_symbol. (Symbol_table::gc_mark_symbol): Call target gc_mark_symbol. Remove unnecessary cast. * powerpc.cc (Powerpc_relobj::get_opd_ent): Rearrange parameters to cater for when we don't need code offset. Update use. (Powerpc_relobj::access_from_map_, opd_valid_): New vars. (Powerpc_relobj::access_from_map, add_reference, opd_valid, set_opd_valid): New functions. (Target_powerpc::do_gc_add_reference): New function. (Target_powerpc::gc_process_relocs): Call gc()->add_reference on stashed refs. (Target_powerpc::do_gc_mark_symbol): New function.
2012-09-072012-09-06 Cary Coutant <ccoutant@google.com>Cary Coutant5-1/+28
gold/ * dwarf_reader.cc (Dwarf_die::read_attributes): Add DW_FORM_GNU_addr_index and DW_FORM_GNU_str_index. (Dwarf_die::skip_attributes): Likewise. * object.cc (Read_symbols_data::~Read_symbols_data): Update comment. * testsuite/gdb_index_test.cc (inline_func_1): New function. (main): Call it. * testsuite/gdb_index_test_comm.sh: Check index for inline function.
2012-09-06Add .got.plt output section statementH.J. Lu3-0/+8
* testsuite/script_test_3.t: Add .got.plt output section statement. * testsuite/script_test_4.t: Likewise.
2012-09-05 * powerpc.cc (Powerpc_relocate_functions): Upcase enum values,Alan Modra2-61/+63
update all uses and lose "enum" when using type.
2012-09-05 * configure.ac (FN_PTRS_IN_SO_WITHOUT_PIC): False for powerpc.Alan Modra15-10/+43
* configure: Regenerate. * testsuite/Makefile.am (final_layout.stdout): Pass --synthetic to nm. (plugin_final_layout.stdout): Likewise. (memory_test): Set page sizes to 0x1000. * testsuite/Makefile.in: Regenerate. * testsuite/discard_locals_test.sh: Add FIXME comment. * testsuite/justsyms_exec.c: Disable function test for powerpc64. * testsuite/pr14265.t: Add .got output section statement. * testsuite/script_test_2.t: Likewise. * testsuite/script_test_3.t: Likewise. * testsuite/script_test_4.t: Likewise. * testsuite/script_test_5.t: Likewise. * testsuite/script_test_6.t: Likewise. * testsuite/script_test_7.t: Likewise. * testsuite/script_test_9.t: Likewise.
2012-09-05 * powerpc.cc (Powerpc_relobj::get_opd_ent): Make const.Alan Modra2-89/+172
(Powerpc_relocate_functions::Status): New typedef. (Target_powerpc::Scan::get_reference_flags): Handle more relocs. (Target_powerpc::Scan::local): Handle REL64. (Target_powerpc::Scan::global): Likewise, and dynamic relocs for REL32 and REL64. (Target_powerpc::symval_for_branch): New function, extracted from.. (Target_powerpc::Relocate::relocate): ..here. Correct plt call checks. Report overflow errors.
2012-09-05 * object.h (Sized_relobj_file::emit_relocs): Delete.Alan Modra13-235/+325
(Sized_relobj_file::emit_relocs_reltype): Delete. * reloc.cc (Sized_relobj_file::do_relocate_sections): Call target relocate_relocs for --emit-relocs. (Sized_relobj_file::emit_relocs, emit_relocs_reltype): Delete. * output.h: Update comment. (Output_segment::first_section): New function. (Output_segment::first_section_load_address): Use first_section. * output.cc (Output_segment::first_section): New function extracted.. (Output_segment::first_section_load_address): ..from here. Delete. * target-reloc.h (relocate_for_relocatable): Rename to relocate_relocs. * target.h (Sized_target::relocate_for_relocatable): Likewise. * arm.cc (Target_arm::relocate_for_relocatable): Likewise, and adjust call to target.h function. * i386.cc (Target_i386): Likewise. * sparc.cc (Target_sparc): Likewise. * x86_64.cc (Target_x86_64): Likewise. * powerpc.cc (Target_powerpc): Likewise. (Target_powerpc::Scan::local, global): Handle R_POWERPC_TLS. Ensure first tls section has section symbol for optimised local dynamic output relocs. (Target_powerpc::Relocate::relocate): Correct local dynamic value. (Target_powerpc::relocate_relocs): Adjust relocs emitted for optimised tls code. * testsuite/testfile.cc (Target_test::relocate_for_relocatable): Rename to relocate_relocs. Update error message.
2012-09-04* powerpc.cc (do_make_elf_object): Allow ET_EXEC files withAndreas Schwab2-1/+9
--just-symbols.
2012-08-31 * powerpc.cc (Powerpc_relobj): Add and use Address typedef.Alan Modra2-315/+1477
(Powerpc_relobj::toc_base_offset): New stub function. (Target_powerpc): Add tp_offset, dtp_offset. Rename got_mod_index_offset to tlsld_got_offset. Update all refs. (Target_powerpc::Relocate::enum skip_tls): New. (Target_powerpc::call_tls_get_addr_): New var. (Target_powerpc::is_branch_reloc): Move to file scope. (Target_powerpc::relocate_tls, optimize_tls_reloc): Delete. (Target_powerpc::optimize_tls_gd, optimize_tls_ld, optimize_tls_ie): New functions. (Target_powerpc::enum Got_type): Delete old values, add new ones. (powerpc_info): Correct common_pagesize for ppc64. (at_tls_transform, needs_dynamic_reloc, use_plt_offset): New functions. (Powerpc_relocate_functions): Add overflow check enums and functions. Add non-shift version of rela, rela_ua. Delete all rel public functions. Delete addr16_lo. Add addr64, addr64_u, addr32, addr32_u, addr24, addr16_u, addr16_hi2, addr16_ha2, addr16_hi3, addr16_ha3, addr14 functions. (Output_data_got_powerpc::add_constant_pair): New function. (Output_data_got_powerpc::got_base_offset): Likewise. (Output_data_got_powerpc::do_write): Correct 64-bit got header. (instruction constants): Sort, add some more. (Output_data_glink::do_write): Add and use Address typedef. Use object->toc_base_offset() stub for 64-bit. (Target_powerpc::tlsld_got_offset): Use add_constant_pair. (Target_powerpc::Scan::get_reference_flags): Handle more relocs. (Target_powerpc::Scan::local, global): Emit relative dynamic reloc for R_PPC64_TOC. Handle more relocs. Generate got entries for TLS. Always treat .opd relocs as against locally defined symbol. Correct condition for RELATIVE relocs. (Target_powerpc::do_finalize_sections): Test for NULL sections. (Target_powerpc::Relocate::relocate): Use plt call stub as value for 32-bit syms with a plt entry. Correct ppc64 toc base calculations. Handle TLS relocs, and more. Add overflow checking and adjust for Powerpc_relocate_functions changes. (Target_powerpc::relocate_for_relocatable): Handle zero r_sym. Reinstate --emit-relocs code with FIXME.
2012-08-30 * layout.cc (Layout::set_segment_offsets): Set p_align toAlan Modra2-2/+9
abi_pagesize, not common_pagesize. (Layout::relaxation_loop_body): Similarly use abi_pagesize to determine whether file header can go in segment.
2012-08-30 * output.h (Output_reloc::Output_reloc <output section>): AddAlan Modra3-71/+122
is_relative param. Adjust calls. (Output_reloc::add_output_section_relative): New functions. * output.cc (Output_reloc::Output_reloc <output section>): Handle is_relative. (Output_reloc::symbol_value): Handle SECTION_CODE.
2012-08-24Patch adds support to allow plugins to map selected subset of sections to uniqueSriraman Tallam12-114/+484
segments. 2012-08-24 Sriraman Tallam <tmsriram@google.com> * gold.cc (queue_middle_tasks): Call layout again when unique segments for sections is desired. * layout.cc (Layout::Layout): Initialize new members. (Layout::get_output_section_flags): New function. (Layout::choose_output_section): Call get_output_section_flags. (Layout::layout): Make output section for mapping to a unique segment. (Layout::insert_section_segment_map): New function. (Layout::attach_allocated_section_to_segment): Make unique segment for output sections marked so. (Layout::segment_precedes): Check for unique segments when sorting. * layout.h (Layout::Unique_segment_info): New struct. (Layout::Section_segment_map): New typedef. (Layout::insert_section_segment_map): New function. (Layout::get_output_section_flags): New function. (Layout::is_unique_segment_for_sections_specified): New function. (Layout::set_unique_segment_for_sections_specified): New function. (Layout::unique_segment_for_sections_specified_): New member. (Layout::section_segment_map_): New member. * object.cc (Sized_relobj_file<size, big_endian>::do_layout): Rename is_gc_pass_one to is_pass_one. Rename is_gc_pass_two to is_pass_two. Rename is_gc_or_icf to is_two_pass. Check for which pass based on whether symbols data is present. Make it two pass when unique segments for sections is desired. * output.cc (Output_section::Output_section): Initialize new members. * output.h (Output_section::is_unique_segment): New function. (Output_section::set_is_unique_segment): New function. (Output_section::is_unique_segment_): New member. (Output_section::extra_segment_flags): New function. (Output_section::set_extra_segment_flags): New function. (Output_section::extra_segment_flags_): New member. (Output_section::segment_alignment): New function. (Output_section::set_segment_alignment): New function. (Output_section::segment_alignment_): New member. (Output_segment::Output_segment): Initialize is_unique_segment_. (Output_segment::is_unique_segment): New function. (Output_segment::set_is_unique_segment): New function. (Output_segment::is_unique_segment_): New member. * plugin.cc (allow_unique_segment_for_sections): New function. (unique_segment_for_sections): New function. (Plugin::load): Add new functions to transfer vector. * Makefile.am (plugin_final_layout.readelf.stdout): Add readelf output. * Makefile.in: Regenerate. * testsuite/plugin_final_layout.sh: Check if unique segment functionality works. * testsuite/plugin_section_order.c (onload): Check if new interfaces are available. (allow_unique_segment_for_sections): New global. (unique_segment_for_sections): New global. (claim_file_hook): Call allow_unique_segment_for_sections. (all_symbols_read_hook): Call unique_segment_for_sections. 2012-08-24 Sriraman Tallam <tmsriram@google.com> * plugin-api.h (ld_plugin_allow_unique_segment_for_sections): New interface. (ld_plugin_unique_segment_for_sections): New interface. (LDPT_ALLOW_UNIQUE_SEGMENT_FOR_SECTIONS): New enum val. (LDPT_UNIQUE_SEGMENT_FOR_SECTIONS): New enum val. (tv_allow_unique_segment_for_sections): New member. (tv_unique_segment_for_sections): New member.
2012-08-222012-08-22 Cary Coutant <ccoutant@google.com>Cary Coutant2-2/+6
gold/ * layout.cc (Layout::include_section): Don't assert on GROUP sections with --emit-relocs.
2012-08-212012-08-21 Cary Coutant <ccoutant@google.com>Cary Coutant2-2/+9
gold/ * symtab.cc (Symbol_table::gc_mark_undef_symbols): Don't assert if --export-dynamic-symbol names an undef symbol.
2012-08-18 * powerpc.cc: Formatting and white space.Alan Modra3-212/+409
(Powerpc_relobj): Rename got2_section_ to special_. Add opd_ent_shndx_ and opd_ent_off_ vectors. (Powerpc_relobj::opd_shndx, init_opd, get_opd_ent, set_opd_ent, scan_opd_relocs, do_read_relocs, opd_ent_ndx): New functions. (Target_powerpc): Add Address typedef and invalid_address. Use throughout. (Target_powerpc::is_branch_reloc): New function. (Powerpc_relocate_functions): Add Address typedef, use throughout. (Powerpc_relocate_functions:rela, rela_ua): Correct type used for dst_mask, value and addend. (Powerpc_relobj::do_find_special_sections): Find .opd for 64-bit. (ld_2_1, cror_15_15_15, cror_31_31_31): New insn constants. (Output_data_glink::do_write): Correct toc base. Don't try to use uint16_t for 24-bit offset. Use get_output_section_offset and check return. (Target_powerpc::Scan::local): Handle more relocs. (Target_powerpc::do_finalize_sections): Set up DT_PPC64_GLINK. (Target_powerpc::Relocate::relocate): Correct toc base calculation. Plug in toc restoring insn after plt calls. Translate branches to function descriptor symbols to corresponding entry point. (Target_powerpc::relocate_for_relocatable): Check return from get_output_section_offset. * symtab.h: Comment typo.
2012-08-15 * x86_64.cc (Target_x86_64::Scan::global): Fix erroneous call toIan Lance Taylor2-1/+6
unsupported_relocal_local to call unsupported_reloc_global.
2012-08-14 PR ld/14265Nick Clifton11-18/+178
* script-sections.cc (Sections_element::output_section_name): Add keep return parameter. (Output_section_element::match_name): Add keep return parameter. Return the value of the keep_ member. * script-sections.h (class Output_section): Update output_section_name prototype. * layout.cc (Layout::keep_input_section): New public member function. (Layout::choose_output_section): Pass keep parameter to output_section_name. * layout.h (class Layout): Add keep_input_section. * object.cc (Sized_relobj_file::do_layout): Check for kept input sections. * testsuite/Makefile.am: Add a test. * testsuite/Makefile.in: Regenerate. * testsuite/pr14265.c: Source file for the test. * testsuite/pr14265.t: Linker script for the test. * testsuite/pr14265.sh: Shell script for the test. * ld-gc/gc.exp: Add a new test. * ld-gc/pr14265.c: Source file for the new test. * ld-gc/pr14265.t: Linker script for the new test. * ld-gc/pr14265.d: Expected symbol dump.
2012-08-14 * target.h (Target::output_section_name): New function.Alan Modra4-1/+40
(Target::do_output_section_name): New function. * layout.cc (Layout::choose_output_section): Call the above. * powerpc.cc (Target_powerpc::do_output_section_name): New function.
2012-08-14elfcpp/Alan Modra2-21/+47
* powerpc.h: Add more relocs. (R_PPC_REL16*): Rename to R_POWERPC_REL16*. gold/ * powerpc.cc: Update for renamed R_PPC_REL16 relocs. (Output_data_got_powerpc::do_write): Don't rely on base class lookup for replace_constant call. (Output_data_plt_powerpc::do_print_to_mapfile): New function. (Output_data_glink::do_print_to_mapfile): New function. (Target_powerpc::Scan::local): Ignore R_PPC64_TOCSAVE. (Target_powerpc::Relocate::relocate): Likewise.
2012-08-14 * powerpc.cc (Powerpc_relobj::set_got2_shndx): Delete.Alan Modra2-61/+50
(Powerpc_relobj::do_find_special_sections): Don't use set_got2_shndx. (Output_data_glink::add_entry,find_entry): Remove shndx param. (class Glink_sym_ent): Rename from struct Glink_sym_ent. Remove all references to shndx_. Handle special case for R_PPC_PLTREL24 here. (class Glink_sym_ent_hash): Rename from struct Glink_sym_ent_hash. (Output_data_glink::do_write): Retrieve got2_shdnx from object. (Target_powerpc::make_plt_entry): Don't special case R_PPC_PLTREL24 here. (Target_powerpc::Scan::global): Nor on make_plt_entry call. (Target_powerpc::Relocate::relocate): Nor on glink->find_entry call.
2012-08-12 * powerpc.cc: Whitespace fixes. Wrap overly long lines.Alan Modra2-156/+169
(glink insn constants): Use uint32_t. (Output_data_glink::add_entry): Use insert, not [] operator.
2012-08-11 * object.h (Sized_relobj_file::find_shdr): New function.Alan Modra6-599/+1367
(Sized_relobj_file::find_special_sections): New function. * object.cc (Sized_relobj_file::find_shdr): New function. (Sized_relobj_file::find_eh_frame): Use find_shdr. (Sized_relobj_file::find_special_sections): New function, split out.. (Sized_relobj_file::do_read_symbols): ..from here. * output.h (Output_data_got::replace_constant): New function. (Output_data_got::num_entries): New function. (Output_data_got::last_got_offset,set_got_size): Use num_entries. (Output_data_got::got_offset): Protected rather than private. (Output_data_got::replace_got_entry): New function. * output.cc (Output_data_got::replace_got_entry): New function. * powerpc.cc (class Powerpc_relobj): New. (class Powerpc_relocate_functions): Delete all psymval variants or convert to value,addend type. Delete pcrela, pcrela_unaligned. Implement _ha functions using corresponding _hi function. (Powerpc_relobj::find_special_sections): New function. (Target_powerpc::do_make_elf_object): New function. (class Output_data_got_powerpc): New. (class Output_data_glink): New. (class Powerpc_scan_relocatable_reloc): New. Many more changes througout file.
2012-08-09Updated Vietnamese translation.Nick Clifton2-98/+107
2012-08-07 * layout.cc (Layout::add_target_dynamic_tags): IfIan Lance Taylor2-9/+22
dynrel_includes_plt but no dyn_rel, emit dynamic reloc tags for plt_rel.
2012-07-30Updated translationsNick Clifton2-5/+10
2012-07-192012-07-18 Cary Coutant <ccoutant@google.com>Cary Coutant10-180/+257
PR gold/14344 * configure.ac: Add check for -gpubnames support. * configure: Regenerate. * testsuite/Makefile.am (gdb_index_test_1): Add check for -gpubnames support; force -gno-pubnames. (gdb_index_test_2, gdb_index_test_3): Add check for -gpubnames support. (gdb_index_test_4): New test. * testsuite/Makefile.in: Regenerate. * testsuite/gdb_index_test_1.sh: Refactor code into common file. * testsuite/gdb_index_test_2.sh: Likewise. * testsuite/gdb_index_test_3.sh: Don't look for space after colon. * testsuite/gdb_index_test_4.sh: New script. * testsuite/gdb_index_test_comm.sh: New script with common code; don't look for space after colon.
2012-07-162012-07-16 Sriraman Tallam <tmsriram@google.com>Sriraman Tallam2-8/+13
* gold.cc (queue_middle_tasks): Update function order only after deferred objects due to plugins are processed.
2012-07-11 * arm.cc (Arm_relocate_functions::abs16): Remove unused typedef.Ian Lance Taylor7-16/+14
(Arm_exidx_cantunwind::do_fixed_endian_write): Likewise. (Target_arm::scan_reloc_for_stub): Likewise. * common.cc (Symbol_table::do_allocate_commons_list): Likewise. * dwarf_reader.cc (Dwarf_die::skip_attributes): Likewise. * ehframe.cc (Eh_frame::do_add_ehframe_input_section): Likewise. * incremental.cc (Sized_incr_dynobj::do_add_symbols): Likewise. * powerpc.cc (Target_powerpc::relocate_tls): Likewise.
2012-07-10 PR gold/14309Ian Lance Taylor6-0/+85
* configure.ac: Test whether std::tr1::hash<off_t> works. * gold.h: Add a specialization for std::tr1::hash<off_t> if needed. * output.h (class Output_fill): Add virtual destructor. * configure, config.in: Rebuild.
2012-06-22gold/Roland McGrath2-0/+14
* layout.cc (finalize): Define __ehdr_start symbol if applicable.
2012-06-122012-06-12 Rafael Ávila de Espíndola <respindola@mozilla.com>Rafael Ávila de Espíndola2-0/+6
* plugin.cc (Plugin::load): Handle position independent executables.
2012-06-07gold/Cary Coutant3-38/+108
* layout.cc (gdb_sections): Remove ".debug_" prefixes, add .debug_macro. (lines_only_debug_sections): Likewise. (gdb_fast_lookup_sections): New static array. (is_gdb_debug_section): Rename formal parameter. (is_lines_only_debug_section): Likewise. (is_gdb_fast_lookup_section): New function. (Layout::include_section): Check for ".zdebug_" prefix; pass section name suffix to is_gdb_debug_section, et al.; check for fast-lookup sections when building .gdb_index. * options.h (--strip-debug-gdb): Update GDB version number.
2012-06-06gold/Cary Coutant6-18/+52
* configure.ac: Add check for fallocate. * configure: Regenerate. * config.in: Regenerate. * options.h (class General_options): Add --mmap-output-file and --posix-fallocate options. * output.cc: (posix_fallocate): Remove; replace with... (gold_fallocate): New function. (Output_file::map_no_anonymous): Call gold_fallocate. (Output_file::map): Check --mmap-output-file option.