aboutsummaryrefslogtreecommitdiff
path: root/elfcpp
AgeCommit message (Collapse)AuthorFilesLines
2012-01-28 * mips.h: New fileIan Lance Taylor3-1/+395
* elfcpp.h (SHT_MIPS_REGINFO): New enums for processor-specific flags. (SHF_MIPS_GPREL): Likewise. (PT_MIPS_REGINFO, PT_MIPS_RTPROC, PT_MIPS_OPTIONS): Likewise. (DT_MIPS_RLD_VERSION, DT_MIPS_TIME_STAMP, DT_MIPS_ICHECKSUM, DT_MIPS_IVERSION, DT_MIPS_FLAGS, DT_MIPS_BASE_ADDRESS, DT_MIPS_MSYM, DT_MIPS_CONFLICT, DT_MIPS_LIBLIST, DT_MIPS_LOCAL_GOTNO, DT_MIPS_CONFLICTNO, DT_MIPS_LIBLISTNO, DT_MIPS_SYMTABNO, DT_MIPS_UNREFEXTNO, DT_MIPS_GOTSYM, DT_MIPS_HIPAGENO, DT_MIPS_RLD_MAP, DT_MIPS_DELTA_CLASS, DT_MIPS_DELTA_CLASS_NO, DT_MIPS_DELTA_INSTANCE, DT_MIPS_DELTA_INSTANCE_NO, DT_MIPS_DELTA_RELOC, DT_MIPS_DELTA_RELOC_NO, DT_MIPS_DELTA_SYM, DT_MIPS_DELTA_SYM_NO, DT_MIPS_DELTA_CLASSSYM, DT_MIPS_DELTA_CLASSSYM_NO, DT_MIPS_CXX_FLAGS, DT_MIPS_PIXIE_INIT, DT_MIPS_SYMBOL_LIB, DT_MIPS_LOCALPAGE_GOTIDX, DT_MIPS_LOCAL_GOTIDX, DT_MIPS_HIDDEN_GOTIDX, DT_MIPS_PROTECTED_GOTIDX, DT_MIPS_OPTIONS, DT_MIPS_INTERFACE, DT_MIPS_DYNSTR_ALIGN, DT_MIPS_INTERFACE_SIZE, DT_MIPS_RLD_TEXT_RESOLVE_ADDR, DT_MIPS_PERF_SUFFIX, DT_MIPS_COMPACT_SIZE, DT_MIPS_GP_VALUE, DT_MIPS_AUX_DYNAMIC, DT_MIPS_PLTGOT, DT_MIPS_RWPLT): Likewise.
2012-01-28 * elfcpp.h (STT_GNU_IFUNC): Add comment.Ian Lance Taylor2-2/+11
2011-07-03ELFOSABI_GNUThomas Schwinge1-0/+1
bfd/ * elf.c (_bfd_elf_set_osabi): Use ELFOSABI_GNU name instead of ELFOSABI_LINUX alias. * elf32-hppa.c: Likewise. * elf32-i370.c: Likewise. * elf64-hppa.c: Likewise. binutils/ * elfedit.c (osabis): Use ELFOSABI_GNU name instead of ELFOSABI_LINUX alias and ELFOSABI_HURD. Add GNU alias. * readelf.c (get_osabi_name, get_symbol_binding, get_symbol_type): Likewise. * doc/binutils.texi <elfedit>: Update accordingly. elfcpp/ * elfcpp.h (ELFOSABI): Add ELFOSABI_GNU with value of ELFOSABI_LINUX, keep ELFOSABI_LINUX as an alias. Remove ELFOSABI_HURD. gas/ * config/obj-elf.c (obj_elf_type): Use ELFOSABI_GNU name instead of ELFOSABI_LINUX alias. * config/tc-ia64.c: Likewise. include/elf/ * common.h (ELFOSABI_GNU): Define, replaces... (ELFOSABI_LINUX): ... this, kept as an alias. (ELFOSABI_HURD): Remove. ld/testsuite/ * ld-ifunc/ifunc.exp: Update for changed output. * ld-unique/unique.exp: Likewise.
2011-07-03ELFOSABI_GNUThomas Schwinge2-3/+8
bfd/ * elf.c (_bfd_elf_set_osabi): Use ELFOSABI_GNU name instead of ELFOSABI_LINUX alias. * elf32-hppa.c: Likewise. * elf32-i370.c: Likewise. * elf64-hppa.c: Likewise. binutils/ * elfedit.c (osabis): Use ELFOSABI_GNU name instead of ELFOSABI_LINUX alias and ELFOSABI_HURD. Add GNU alias. * readelf.c (get_osabi_name, get_symbol_binding, get_symbol_type): Likewise. * doc/binutils.texi <elfedit>: Update accordingly. elfcpp/ * elfcpp.h (ELFOSABI): Add ELFOSABI_GNU with value of ELFOSABI_LINUX, keep ELFOSABI_LINUX as an alias. Remove ELFOSABI_HURD. gas/ * config/obj-elf.c (obj_elf_type): Use ELFOSABI_GNU name instead of ELFOSABI_LINUX alias. * config/tc-ia64.c: Likewise. include/elf/ * common.h (ELFOSABI_GNU): Define, replaces... (ELFOSABI_LINUX): ... this, kept as an alias. (ELFOSABI_HURD): Remove. ld/testsuite/ * ld-ifunc/ifunc.exp: Update for changed output. * ld-unique/unique.exp: Likewise.
2011-07-02 * dwarf.h (enum DW_CFA): Define.Ian Lance Taylor2-1/+51
2010-08-12 * elfcpp.h (enum SHT): Add SHT_GNU_INCREMENTAL_GOT_PLT.Cary Coutant2-0/+5
2010-08-12elfcpp/ChangeLog:Cary Coutant2-0/+7
* elfcpp.h (enum SHT): Add SHT_GNU_INCREMENTAL_SYMTAB, SHT_GNU_INCREMENTAL_RELOCS. gold/ChangeLog: * archive.cc: Include incremental.h. (Archive::Archive): Initialize incremental_info_. (Archive::include_member): Record archive members in incremental info. (Add_archive_symbols::run): Record begin and end of an archive in incremental info. (Lib_group::include_member): Record objects in incremental info. * archive.h (Incremental_archive_entry): Forward declaration. (Archive::set_incremental_info): New member function. (Archive::incremental_info): New member function. (Archive::Unused_symbol_iterator): New class. (Archive::unused_symbols_begin): New member function. (Archive::unused_symbols_end): New member function. (Archive::incremental_info_): New data member. * incremental-dump.cc (find_input_containing_global): New function. (dump_incremental_inputs): Dump new incremental info sections. * incremental.cc: Include symtab.h. (Output_section_incremental_inputs): New class. (Sized_incremental_binary::do_find_incremental_inputs_sections): Support new incremental info sections. (Sized_incremental_binary::do_check_inputs): Likewise. (Incremental_inputs::report_archive): Remove. (Incremental_inputs::report_archive_begin): New function. (Incremental_inputs::report_archive_end): New function. (Incremental_inputs::report_object): New function. (Incremental_inputs::finalize_inputs): Remove. (Incremental_inputs::report_input_section): New function. (Incremental_inputs::report_script): Rewrite. (Incremental_inputs::finalize): Do nothing but finalize string table. (Incremental_inputs::create_incremental_inputs_section_data): Remove. (Incremental_inputs::sized_create_inputs_section_data): Remove. (Incremental_inputs::create_data_sections): New function. (Incremental_inputs::relocs_entsize): New function. (Output_section_incremental_inputs::set_final_data_size): New function. (Output_section_incremental_inputs::do_write): New function. (Output_section_incremental_inputs::write_header): New function. (Output_section_incremental_inputs::write_input_files): New function. (Output_section_incremental_inputs::write_info_blocks): New function. (Output_section_incremental_inputs::write_symtab): New function. * incremental.h (Incremental_script_entry): Forward declaration. (Incremental_object_entry): Forward declaration. (Incremental_archive_entry): Forward declaration. (Incremental_inputs): Forward declaration. (Incremental_inputs_header_data): Remove. (Incremental_inputs_header): Remove. (Incremental_inputs_header_write): Remove. (Incremental_inputs_entry_data): Remove. (Incremental_inputs_entry): Remove. (Incremental_inputs_entry_write): Remove. (enum Incremental_input_type): Add INCREMENTAL_INPUT_ARCHIVE_MEMBER. (Incremental_binary::find_incremental_inputs_sections): Add parameters. (Incremental_binary::do_find_incremental_inputs_sections): Likewise. (Sized_ncremental_binary::do_find_incremental_inputs_sections): Likewise. (Incremental_input_entry): New class. (Incremental_script_entry): New class. (Incremental_object_entry): New class. (Incremental_archive_entry): New class. (Incremental_inputs::Incremental_inputs): Initialize new data members. (Incremental_inputs::report_inputs): Remove. (Incremental_inputs::report_archive): Remove. (Incremental_inputs::report_archive_begin): New function. (Incremental_inputs::report_archive_end): New function. (Incremental_inputs::report_object): Change prototype. (Incremental_inputs::report_input_section): New function. (Incremental_inputs::report_script): Change prototype. (Incremental_inputs::get_reloc_count): New function. (Incremental_inputs::set_reloc_count): New function. (Incremental_inputs::create_data_sections): New function. (Incremental_inputs::create_incremental_inputs_section_data): Remove. (Incremental_inputs::inputs_section): New function. (Incremental_inputs::symtab_section): New function. (Incremental_inputs::relocs_section): New function. (Incremental_inputs::get_stringpool): Add const. (Incremental_inputs::command_line): Add const. (Incremental_inputs::inputs): Remove. (Incremental_inputs::command_line_key): New function. (Incremental_inputs::input_file_count): New function. (Incremental_inputs::input_files): New function. (Incremental_inputs::relocs_entsize): New function. (Incremental_inputs::sized_create_inputs_section_data): Remove. (Incremental_inputs::finalize_inputs): Remove. (Incremental_inputs::Input_info): Remove. (Incremental_inputs::lock_): Remove. (Incremental_inputs::inputs_): Change type. (Incremental_inputs::inputs_map_): Remove. (Incremental_inputs::current_object_entry_): New data member. (Incremental_inputs::inputs_section_): New data member. (Incremental_inputs::symtab_section_): New data member. (Incremental_inputs::relocs_section_): New data member. (Incremental_inputs::reloc_count_): New data member. (Incremental_inputs_reader): New class. (Incremental_symtab_reader): New class. (Incremental_relocs_reader): New class. * layout.cc (Layout::finalize): Move finalization of incremental info and creation of incremental info sections to follow finalization of symbol table. Set offsets for postprocessing sections. (Layout::create_incremental_info_sections): Call Incremental_inputs::create_data_sections. Add incremental symtab and relocs sections. Set sh_entsize and sh_link fields. Arrange for sections to layout after input sections. * layout.h (struct Timespec): Forward declaration. (Layout::incremental_inputs): Add const. (Layout::create_incremental_info_sections): Add parameter. * main.cc (main): Remove call to Incremental_inputs::report_inputs. * object.cc: Include incremental.h. (Relobj::finalize_incremental_relocs): New function. (Sized_relobj::do_layout): Record input sections in incremental info. * object.h (Object::output_section): New function. (Object::output_section_offset): Moved from Relobj. (Object::get_incremental_reloc_base): New function. (Object::get_incremental_reloc_count): New function. (Object::do_output_section): New function. (Object::do_output_section_offset): Moved from Relobj. (Object::do_get_incremental_reloc_base): New function. (Object::do_get_incremental_reloc_count): New function. (Object::Object): Initialize new data members. (Relobj::output_section): Renamed do_output_section and moved to protected. (Relobj::output_section_offset): Moved to Object. (Relobj::do_get_incremental_reloc_base): New function. (Relobj::do_get_incremental_reloc_count): New function. (Relobj::allocate_incremental_reloc_counts): New function. (Relobj::count_incremental_reloc): New function. (Relobj::finalize_incremental_relocs): New function. (Relobj::next_incremental_reloc_index): New function. (Relobj::reloc_counts_): New data member. (Relobj::reloc_bases_): New data member. (Sized_relobj::do_relocate_sections): Add parameter. Change caller. (Sized_relobj::relocate_sections): Add parameter. Change all callers. (Sized_relobj::incremental_relocs_scan): New function. (Sized_relobj::incremental_relocs_scan_reltype): New function. (Sized_relobj::incremental_relocs_write): New function. (Sized_relobj::incremental_relocs_write_reltype): New function. * plugin.cc (Plugin_manager::add_input_file): Rewrite test for incremental link. * readsyms.cc (Read_symbols::do_read_symbols): Move reporting of archives and object files elsewhere. (Add_symbols::run): Report object files here. (Finish_group::run): Report end of archive at end of group. * reloc.cc: Include layout.h, incremental.h. (Sized_relobj::do_read_relocs): Need relocations for incremental link. (Sized_relobj::do_scan_relocs): Record relocations for incremental link. (Sized_relobj::incremental_relocs_scan): New function. (Sized_relobj::incremental_relocs_scan_reltype): New function. (Sized_relobj::do_relocate_sections): Write incremental relocations. (Sized_relobj::incremental_relocs_write): New function. (Sized_relobj::incremental_relocs_write_reltype): New function. * script.cc (read_input_script): Rewrite test for incremental link. Change call to Incremental_inputs::report_script. * symtab.h (Symbol_table::first_global_index): New function. (Symbol_table::output_count): New function.
2010-08-04elfcpp:/Ian Lance Taylor5-11/+24
* i386.h (R_386_IRELATIVE): Define. * powerpc.h (R_POWERPC_IRELATIVE): Define. (R_PPC_RELAX32, R_PPC_RELAX32PC): Don't define. (R_PPC_RELAX32_PLT, R_PPC_RELAX32PC_PLT): Don't define. * sparc.h (R_SPARC_IRELATIVE): Define. * x86_64.h (R_X86_64_IRELATIVE): Define. (R_X86_64_GNU_VTINHERIT): Rename from R_386_GNU_VTINHERIT. (R_X86_64_GNU_VTENTRY): Rename from R_386_GNU_VTENTRY. gold:/ * x86_64.cc (Target_x86_64::Scan::local): Use R_X86_64_GNU_VTINHERIT instead of R_386_GNU_VTINHERIT and R_X86_64_GNU_VTENTRY instead of R_386_GNU_VTENTRY. (Target_x86_64::Scan::global): Likewise. (Target_x86_64::Relocate::relocate): Likewise. (Target_x86_64::Relocatable_size_for_reloc::get_size_for_reloc): Likewise.
2010-05-132010-05-12 Doug Kwan <dougkwan@google.com>Doug Kwan2-5/+26
elfcpp/ChangeLog * arm.h (Tag_FP_arch, Tag_ABI_align_needed, Tag_ABI_align_preserved, Tag_FP_HP_extension, Tag_MPextension_use_legacy): Rename from existing tags. (Tag_undefined40, Tag_undefined41, Tag_MPextension_use, Tag_undefined43): New tags. (Targ_VFP_arch, Tag_ABI_align8_needed, TAG_ABI_align8_preserved, Tag_VFP_HP_extension): Define aliases for backward compatiblity. gold/ChangeLog * arm.cc (Target_arm::do_finalize_sections): Create an empty attributes section only if there no attributes section after merging. (Target_arm::merge_object_attributes): Move value of Tag_MPextension_use_legacy to that of Tag_MPextension_use. Handle Tag_DIV_use and Tag_MPextension_use_legacy. * testsuite/Makefile.am (check_SCRIPTS): Add arm_attr_merge.sh (check_DATA): Add arm_attr_merge_6.stdout, arm_attr_merge_6r_stdout and arm_attr_merge_7.stdout. (arm_attr_merge_6.stdout, arm_attr_merge_6 arm_attr_merge_6a.o arm_attr_merge_6b.o, arm_attr_merge_6r.stdout, arm_attr_merge_6r, arm_attr_merge_7.stdout, arm_attr_merge_7, arm_attr_merge_7a.o, arm_attr_merge_7b.o): New rules. (MOSTLYCLEANFILES): Add arm_attr_merge_6, arm_attr_merge_6r and arm_attr_merge_7 * testsuite/Makefile.in: Regenerate. * testsuite/arm_attr_merge.sh: New file. * testsuite/arm_attr_merge_[67][ab].s: Same.
2010-03-05 include:Rainer Orth2-1/+6
* elf/common.h (VER_FLG_*): Document. (VER_FLG_INFO): Define. gold: * dynobj.h (Verdef::Verdef): Add is_info arg, is_info member function, is_info_ member. * dynobj.cc (Verdef::write): Set VER_FLG_INFO if this->is_info_. (Versions::Versions): Update caller. (Versions::define_base_version): Likewise. (Versions::add_def): Likewise. elfcpp: * elfcpp.h (VER_FLG_INFO): Define. binutils: * readelf.c (get_ver_flags): Handle VER_FLG_INFO.
2010-01-222010-01-21 Doug Kwan <dougkwan@google.com>Doug Kwan2-0/+11
elfcpp/ChangeLog: * arm.h (EXIDX_CANTUNWIND): New enum. gold/ChangeLog: * arm.cc (Arm_exidx_cantunwind, Arm_exidx_merged_section): New classes. (Arm_exidx_section_offset_map): New type.
2010-01-19elfcpp/:Ian Lance Taylor2-0/+13
* elfcpp.h (PN_XNUM): Define. gold/: * output.cc (Output_section_headers::do_sized_write): Write large segment count to sh_info field. (Output_file_header::do_sized_write): For large segment count, write PN_XNUM to e_phnum field.
2009-12-14 * elfcpp_file.h: Revert last patch.Ian Lance Taylor2-5/+9
2009-12-11Add -Wshadow to the gcc command line options used when compiling the binutils.Nick Clifton2-5/+9
Fix up all warnings generated by the addition of this switch.
2009-12-102009-12-10 Doug Kwan <dougkwan@google.com>Doug Kwan2-0/+80
elfcpp/ChangeLog * arm.h: New enums for EABI object attribute tags and values. gold/ChangeLog * arm.cc (attributes.h): New include. (Arm_relobj::Arm_relobj): Initialize attributes_section_data_. (Arm_relobj::~Arm_relobj): Delete object pointed by attributes_section_data_. (Arm_relobj::attributes_section_data): New method definition. (Arm_relobj::attributes_section_data_): New data member declaration. (Arm_dynobj::Arm_dynobj): Initialize attributes_section_data_. (Arm_dynobj::~Arm_dynobj): Delete object pointed by attributes_section_data_. (Arm_dynobj::attributes_section_data): New method definition. (Arm_dynobj::attributes_section_data_): New data member declaration. (Target_arm::Target_arm): Initialize attributes_section_data_. Change initialization value of may_use_blx_ to false. (Target_arm::using_thumb2, Target_arm::using_thumb_only, Target_arm::may_use_arm_nop, Target_arm::may_use_thumb2_nop): Use object attributes to compute results instead of hard-coding. (Target_arm::do_attribute_arg_type, Target_arm::do_attributes_order, Target_arm::get_secondary_compatible_arch, Target_arm::set_secondary_compatible_arch Target_arm::tag_cpu_arch_combine, Target_arm::aeabi_enum_name, Target_arm::tag_cpu_name_value, Target_arm::merge_object_attributes): New method declarations. (Target_arm::get_aeabi_object_attribute): New method definition. (Target_arm::attributes_section_data_): New data member declaration. (read_arm_attributes_section): New template definition. (Arm_relobj::do_read_symbols): Read attributes section if it exists. (Arm_dynobj::do_read_symbols): Ditto. (Target_arm::do_finalize_sections): Merge attributes sections from input. Check for BLX use after attributes section merging. Fix __exidx_start and __exidx_end visibility. Create an .ARM.attributes section if necessary. (Target_arm::get_secondary_compatible_arch, Target_arm::set_secondary_compatible_arch, Target_arm::tag_cpu_arch_combine, Target_arm::aeabi_enum_name, Target_arm::tag_cpu_name_value, Target_arm::merge_object_attributes, Target_arm::do_attribute_arg_type, Target_arm::do_attributes_order): New method definitions.
2009-12-062009-12-05 Doug Kwan <dougkwan@google.com>Doug Kwan2-0/+27
elfcpp/ChangeLog: * arm.h: Define enums for Tag_CPU_arch EABI attribute. gold/ChangeLog: * arm.cc (Target_arm::arm_info): Initialize new fields attributes_section and attributes_vendor. * i386.cc (Target_i386::i386_info): Same. * object.cc (Sized_relobj::do_layout): Skip attribute section. * gold/powerpc.cc (Target_powerpc::powerpc_info): Initialize new fields attributes_section and attributes_vendor. * sparc.cc (Target_sparc::sparc_info): Same. * target.h (Target::attributes_section, Target::attributes_vendor, Target::is_attributes_section, Target::attribute_arg_type, Target::attributes_order): New method definitions. (Target::Target_info::attributes_section, Target::Target_info::attributes_vendor): New fields. (Target::do_attribute_arg_type, Target::do_attributes_order): New virtual method definitions. * x86_64.cc (Target_x86_64::x86_64_info): Initialize new fields attributes_section and attributes_vendor. * testsuite/testfile.cc (Target_test::test_target_info): Same.
2009-11-252009-11-24 Rafael Avila de Espindola <espindola@google.com>Rafael Ávila de Espíndola2-0/+6
* Makefile.am: Build incremental-dump * Makefile.in: Regenerate. * incremental-dump.cc: New. * incremental.cc (Incremental_inputs_header_data, Incremental_inputs_entry_data): Move to incremental.h * incremental.h: (Incremental_inputs_header_data, Incremental_inputs_entry_data): Move from incremental.cc 2009-11-24 Rafael Avila de Espindola <espindola@google.com> * elfcpp_file.h: Include elfcpp.h.
2009-11-03 * elfcpp.h: Remove trailing commas from enum definitions.Ian Lance Taylor2-4/+8
2009-10-302009-10-30 Doug Kwan <dougkwan@google.com>Doug Kwan3-0/+36
elfcpp/ChangeLog: * arm.h (EF_ARM_BE8, EF_ARM_EABIMASK, EF_ARM_EABI_UNKNOWN, EF_ARM_EABI_VER1, EF_ARM_EABI_VER2, EF_ARM_EABI_VER3, EF_ARM_EABI_VER4, EF_ARM_EABI_VER5): New enums for processor-specific flags. (arm_eabi_version): New inline function. * elfcpp.h: Add a comment about DT_ENCODING. gold/ChangeLog: * arm.cc (Arm_relobj::processor_specific_flags): New method definition. (Arm_relobj::do_read_symbols): New method declaration. (Arm_relobj::processor_specific_flags_): New data member declaration. (Arm_dynobj): New class definition. (Target_arm::do_finalize_sections): Add input_objects parameter. (Target_arm::do_adjust_elf_header): New method declaration. (Target_arm::are_eabi_versions_compatible, (Target_arm::merge_processor_specific_flags): New method declaration. (Target_arm::do_make_elf_object): New overloaded method definitions and declaration. (Arm_relobj::do_read_symbols): New method definition. (Arm_dynobj::do_read_symbols): Ditto. (Target_arm::do_finalize_sections): Add input_objects parameters. Merge processor-specific flags from all input objects. (Target_arm::are_eabi_versions_compatible, Target_arm::merge_processor_specific_flags, Target_arm::do_adjust_elf_header, Target_arm::do_make_elf_object): New method definitions. * i386.cc (Target_i386::do_finalize_sections): Add unnamed Input_objects pointer type parameter. * layout.cc (Layout::finalize): Pass input objects to target's. finalize_sections function. * output.cc (Output_file_header::do_sized_write): Set ELF file header's processor-specific flags. * powerpc.cc (Target_powerpc::do_finalize_sections): Add unnamed Input_objects pointer type parameter. * sparc.cc (Target_sparc::do_finalize_sections): Same. * target.h (Input_objects): New forward class declaration. (Target::processor_specific_flags, Target::are_processor_specific_flags_sect): New method definitions. (Target::finalize_sections): Add input_objects parameter. (Target::Target): Initialize processor_specific_flags_ and are_processor_specific_flags_set_. (Target::do_finalize_sections): Add unnamed Input_objects pointer type parameter. (Target::set_processor_specific_flags): New method definition. (Target::processor_specific_flags_, Target::are_processor_specific_flags_set_): New data member declarations. * x86_64.cc (Target_x86_64::do_finalize_sections): Add unnamed Input_objects pointer type parameter.
2009-10-162009-10-16 Doug Kwan <dougkwan@google.com>Doug Kwan2-1/+5
* elfcpp/elfcpp.h (DT_PREINIT_ARRAY): Correct enum value.
2009-10-09 * elfcpp/elfcpp_file.h (Elf_file::section_name): Change shstr_sizeIan Lance Taylor2-1/+6
to Elf_WXword.
2009-10-09elfcpp/:Ian Lance Taylor2-0/+43
* elf_file.h: (class Elf_strtab): New class. gold/: * gold.cc: (queue_initial_tasks): Pass incremental_inputs to Incremental_checker. * incremental.cc: (INCREMENTAL_LINK_VERSION): Change type to unsigned int. (class Incremental_inputs_header): New class. (Incremental_inputs_header_writer): Edit comment. (Incremental_inputs_entry): New class. (Incremental_inputs_entry_writer): Edit comment. (Sized_incremental_binary::do_find_incremental_inputs_section): Add *strtab_shndx parameter, fill it. (Sized_incremental_binary::do_check_inputs): New method. (Incremental_checker::can_incrementally_link_output_file): Use Sized_incremental_binary::check_inputs. (Incremental_inputs::report_command_line): Save command line in command_line_. * incremental.h: (Incremental_binary::find_incremental_inputs_section): New method. (Incremental_binary::do_find_incremental_inputs_section): Add strtab_shndx parameter. (Incremental_binary::do_check_inputs): New pure virtual method. (Sized_incremental_binary::do_check_inputs): Declare. (Incremental_checker::Incremental_checker): Add incremental_inputs parameter, use it to initialize incremental_inputs_. (Incremental_checker::incremental_inputs_): New field. (Incremental_checker::command_line): New method. (Incremental_checker::inputs): New method. (Incremental_checker::command_line_): New field.
2009-10-09elfcpp/:Ian Lance Taylor2-1/+170
* elfcpp_file.h: Fix header guard. Include <cstdio>. (class Elf_recognizer): New class, code from gold/object.cc. (Elf_file::find_section_by_type): New method. gold/: * incremental.cc: Include <cstdarg> and "target-select.h". (vexplain_no_incremental): New function. (explain_no_incremental): New function. (Incremental_binary::error): New method. (Sized_incremental_binary::do_find_incremental_inputs_section): New method. (make_sized_incremental_binary): New function. (open_incremental_binary): New function. (can_incrementally_link_file): Add checks if output is ELF and has inputs section. * incremental.h: Include "elfcpp_file.h" and "output.h". (Incremental_binary): New class. (Sized_incremental_binary): New class. (open_incremental_binary): Declare. * object.cc (is_elf_object): Use elfcpp::Elf_recognizer::is_elf_file. (make_elf_object): Use elfcpp::Elf_recognizer::is_valid_header. * output.h (Output_file::filesize): New method.
2009-07-23 * config/obj-elf.c (obj_elf_type): Add code to support a type ofNick Clifton2-0/+5
gnu_unique_object. * doc/as.texinfo: Document new feature of .type directive. * NEWS: Mention support for gnu_unique_object symbol type. * common.h (STB_GNU_UNIQUE): Define. * NEWS: Mention the linker's support for symbols with a binding of STB_GNU_UNIQUE. * gas/elf/type.s: Add unique global symbol definition. * gas/elf/type.e: Add expected readelf output for global unique symbol. * elfcpp.h (enum STB): Add STB_GNU_UNIQUE. * readelf.c (get_symbol_binding): For Linux targeted files return UNIQUE for symbols with the STB_GNU_UNIQUE binding. * doc/binutils.texi: Document the meaning of the 'u' symbol binding in the output of nm and objdump --syms. * elf-bfd.h (struct elf_link_hash_entry): Add unique_global field. * elf.c (swap_out_syms): Set binding to STB_GNU_UNIQUE for symbols with the BSF_GNU_UNIQUE flag bit set. * elfcode.h (elf_slurp_symbol_table): Set the BSF_GNU_UNIQUE flag for symbols with STB_GNU_UNIQUE binding. * elflink.c (_bfd_elf_merge_symbol): Set unique_global for symbols with the STB_GNU_UNIQUE binding. (elf_link_add_object_symbols): Set the BSF_GNU_UNIQUE flag for symbols with STB_GNU_UNIQUE binding. Set STB_GNU_UNIQUE for symbols with the unique_global field set. (elf_link_output_extsym): Set unique_global field for symbols with the STB_GNU_UNIQUE binding. * syms.c (struct bfd_symbol): Define BSF_GNU_UNIQUE flag bit. (bfd_print_symbol_vandf): Print a 'u' character for BSF_GNU_UNIQUE symbols. (bfd_decode_symclass): Return a 'u' character for BSF_GNU_UNIQUE symbols. * bfd-in2.h: Regenerate.
2009-06-22 * elfcpp.h (SHN_X86_64_LCOMMON): Define enum constant.Ian Lance Taylor2-1/+16
(enum SHT): Add SHT_X86_64_UNWIND. (enum SHF): Add SHT_X86_64_LARGE.
2009-05-272009-05-27 Doug Kwan <dougkwan@google.com>Doug Kwan3-1/+231
* arm.h: New file. * elfcpp.h (enum SHT): Add ARM-specific special sections. (enum PT): Add ARM-specific section types. (enum SST): Add STT_ARM_TFUNC.
2009-05-01Fix typoNick Clifton1-1/+1
2009-04-30include/elfNick Clifton2-0/+5
2009-04-30 Nick Clifton <nickc@redhat.com> * common.h (STT_GNU_IFUNC): Define. elfcpp 2009-04-30 Nick Clifton <nickc@redhat.com> * (enum STT): Add STT_GNU_IFUNC. gas 2009-04-30 Nick Clifton <nickc@redhat.com> * config/obj-elf.c (obj_elf_type): Add support for a gnu_indirect_function type. * config/tc-i386.c (tc_i386_fix_adjustable): Do not adjust fixups against indirect function symbols. * doc/as.texinfo (.type): Document the support for the gnu_indirect_function symbol type. * NEWS: Mention the new feature. gas/testsuite 2009-04-30 Nick Clifton <nickc@redhat.com> * gas/elf/elf.exp: Extend type test to include an ifunc symbol. Provide an alternative test for targets which do not support ifunc symbols. (type.s): Add entry for an ifunc symbol. (type.e): Add ifunc entry to expected symbol dump. (section2.e-armelf): Add entry for ifunc symbol. (type-noifunc.s): New file. (type-noifunc.e): New file. bfd/ 2009-04-30 Nick Clifton <nickc@redhat.com> * elf-bfd.h (struct bfd_elf_section_data): Add indirect_relocs section pointer. (struct elf_obj_data): Add has_ifunc_symbols boolean. * elf.c (swap_out_syms): Convert BSF_GNU_INDIRECT_FUNCTION flags into a STT_GNU_IFUNC symbol type. (_bfd_elf_is_function_type): Accept STT_GNU_IFUNC as a function type. (_bfd_elf_set_osabi): Set the osasbi field to ELFOSABI_LINUX if the binary contains ifunc symbols. * elfcode.h (elf_slurp_symbol_table): Translate the STT_GNU_IFUNC symbol type into a BSF_GNU_INDIRECT_FUNCTION flag. * elf32-i386.c (is_indirect_function): New function. (elf_i386_check_relocs): Create an ifunc output section. (allocate_dynrelocs): Create dynamic relocs in the ifunc output section if necessary. (elf_i386_relocate_section): Emit a reloc against an ifunc symbol if necessary. (elf_i386_add_symbol_hook): New function. Set the has_ifunc_symbols field of the elf_obj_data structure if an ifunc symbol is encountered. (elf_backend_post_process_headers): Define. (elf_backend_add_symbol_hook): Define. (elf_i386_post_process_headers): Rename to elf_i388_fbsd_post_process_headers. * elf64-x86_64.c (IS_X86_64_PCREL_TYPE): New macro. (is_indirect_function): New function. (elf64_x86_64_check_relocs): Create an ifunc output section. (allocate_dynrelocs): Create dynamic relocs in the ifunc output section if necessary. (elf64_x86_64_relocate_section): Emit a reloc against an ifunc symbol if necessary. (elf_i386_add_symbol_hook): Set the has_ifunc_symbols field of the elf_obj_data structure if an ifunc symbol is encountered. (elf_backend_post_process_headers): Define. * elflink.c (_bfd_elf_adjust_dynamic_symbol): Always create a PLT if we have ifunc symbols to handle. (get_ifunc_reloc_section_name): New function. Computes the name for an ifunc section. (_bfd_elf_make_ifunc_reloc_section): New function. Creates a section to hold ifunc relocs. * syms.c (BSF_GNU_INDIRECT_FUNCTION): Define. (bfd_print_symbol_vandf): Handle ifunc symbols. (bfd_decode_symclass): Likewise. * bfd-in2.h: Regenerate. binutils 2009-04-30 Nick Clifton <nickc@redhat.com> * readelf.c (dump_relocations): Display a relocation against an ifunc symbol as if it were a function invocation. (get_symbol_type): Handle STT_GNU_IFUNC. ld 2009-04-30 Nick Clifton <nickc@redhat.com> * NEWS: Mention support for IFUNC symbols. ld/testsuite 2009-04-30 Nick Clifton <nickc@redhat.com> * ld-ifunc: New directory. * ld-ifunc/ifunc.exp: New file: Run the IFUNC tests. * ld-ifunc/prog.c: New file. * ld-ifunc/lib.c: New file.
2009-03-20include/elf:Ian Lance Taylor2-2/+8
* common.h (SHT_GNU_INCREMENTAL_INPUTS): Define. elfcpp: * elfcpp.h (SHT_GNU_INCREMENTAL_INPUTS): Define. gold: * incremental.cc: New file. * Makefile.am (CCFILES): Add incremental.cc. * Makefile.in: Rebuild.
2009-03-02elfcpp:/Ian Lance Taylor2-3/+62
* elfcpp_swap.h: #include "config.h". Only #include <byteswap.h> if HAVE_BYTESWAP_H is defined; if not, provide definitions for bswap_{16,32,64}. For gcc 4.3 and later, use the builtin bswap functions. Check WORDS_BIGENDIAN rather than __BYTE_ORDER. gold:/ * configure.ac: Check for byteswap.h. * configure: Rebuild. * config.in: Rebuild.
2009-01-062009-01-06 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu2-1/+4
* elfcpp.h (enum STT): Remove STT_IFUNC.
2008-12-03include/elf/Nick Clifton2-1/+6
* common.h (STT_IFUNC): Define. elfcpp/ * elfcpp.h (enum STT): Add STT_IFUNC. bfd/ * syms.c (struct bfd_symbol): Add new flag BSF_INDIRECT_FUNCTION. Remove redundant flag BFD_FORT_COMM_DEFAULT_VALUE. Renumber flags to remove gaps. (bfd_print_symbol_vandf): Return 'i' for BSF_INDIRECT_FUNCTION. (bfd_decode_symclass): Likewise. * elf.c (swap_out_syms): Translate BSF_INDIRECT_FUNCTION into STT_IFUNC. (elf_find_function): Treat STT_IFUNC in the same way as STT_FUNC. (_bfd_elf_is_function_type): Likewise. * elf32-arm.c (arm_elf_find_function): Likewise. (elf32_arm_adjust_dynamic_symbol): Likewise. (elf32_arm_swap_symbol_in): Likewise. (elf32_arm_additional_program_headers): Likewise. * elf32-i386.c (is_indirect_symbol): New function. (elf_i386_check_relocs): Also generate dynamic relocs for relocations against STT_IFUNC symbols. (allocate_dynrelocs): Likewise. (elf_i386_relocate_section): Likewise. * elf64-x86-64.c (is_indirect_symbol): New function. (elf64_x86_64_check_relocs): Also generate dynamic relocs for relocations against STT_IFUNC symbols. (allocate_dynrelocs): Likewise. (elf64_x86_64_relocate_section): Likewise. * elfcode.h (elf_slurp_symbol_table): Translate STT_IFUNC into BSF_INDIRECT_FUNCTION. * elflink.c (_bfd_elf_adjust_dynamic_reloc_section): Add support for STT_IFUNC symbols. (get_ifunc_reloc_section_name): New function. (_bfd_elf_make_ifunc_reloc_section): New function. * elf-bfd.h (struct bfd_elf_section_data): Add indirect_relocs field. * bfd-in2.h: Regenerate. gas/ * config/obj-elf.c (obj_elf_type): Add support for STT_IFUNC type. * doc/as.texinfo: Document new feature. * NEWS: Mention new feature. gas/testsuite/ * gas/elf/type.s: Add test of STT_IFUNC symbol type. * gas/elf/type.e: Update expected disassembly. * gas/elf/elf.exp: Update grep of symbol types. ld/ * NEWS: Mention new feature. * pe-dll.c (process_def_file): Replace use of redundant BFD_FORT_COMM_DEFAULT_VALUE with 0. * scripttempl/elf.sc: Add .rel.ifunc.dyn and .rela.ifunc.dyn sections. ld/testsuite/ * ld-mips-elf/reloc-1-n32.d: Updated expected output for reloc descriptions. * ld-mips-elf/reloc-1-n64.d: Likewise. * ld-i386/ifunc.d: New test. * ld-i386/ifunc.s: Source file for the new test. * ld-i386/i386.exp: Run the new test.
2008-06-122008-06-12 David S. Miller <davem@davemloft.net>David Edelsohn3-0/+211
* powerpc.h: New file. * elfcpp.h (SHT_ORDERED): New enum constant. (DT_PPC_GOT, DT_PPC64_GLINK, DT_PPC64_OPD, DT_PPC64_OPDSZ): Same.
2008-05-28elfcpp/:Ian Lance Taylor2-2/+32
* dwarf.h (enum DW_FORM): Define. gold/: * reduced_debug_output.cc: New file. * reduced_debug_output.h: New file. * options.h (class General_optoins): Add --strip-debug-non-line. * options.cc (General_options::finalize): Add strip_debug_non_line to the strip heirarchy. * layout.h (class Layout): Add debug_abbrev_ and debug_info_ fields. * layout.cc: Include "reduced_debug_output.h". (Layout::Layout): Initialize new fields. (line_only_debug_sections): New static array. (is_lines_only_debug_sections): New static inline function. (Layout::include_section): Handle --strip-debug-non-line. (Layout::make_output_section): If --strip-debug-non-line, build new output sections for .debug_abbrev and .debug_info. * dwarf_reader.cc (read_unsigned_LEB_128): Move to namespace gold. Warn about possible overflow. (read_signed_LEB_128): Likewise. * dwarf_reader.h: (read_unsigned_LEB_128): Declare. (read_signed_LEB_128): Declare. * Makefile.am (CCFILES): Add reduced_debug_output.cc. (HFILES): Add reduced_debug_output.h. * Makefile.in: Rebuild.
2008-04-19 * elfcpp_file.h (class Elf_file): Add large_shndx_offset_ field.Ian Lance Taylor2-1/+48
(Elf_file::large_shndx_offset): New function. (Elf_file::construct): Initialize large_shndx_offset_. (Elf_File::initialize_shnum): If necessary, adjust shstrndx_ and set large_shndx_offset_.
2008-04-16elfcpp/David S. Miller2-0/+28
* elfcpp.h (DF_1_NOW, DF_1_GLOBAL, DF_1_GROUP, DF_1_NODELETE, DF_1_LOADFLTR, DF_1_INITFIRST, DF_1_NOOPEN, DF_1_ORIGIN, DF_1_DIRECT, DF_1_TRANS, DF_1_INTERPOSE, DF_1_NODEFLIB, DF_1_NODUMP, DF_1_CONLFAT): New enum constants. gold/ * options.h (DEFINE_enable): New macro. (new_dtags): New enable option. (initfirst, interpose, loadfltr, nodefaultlib, nodelete, nodlopen, nodump): New -z options. * layout.cc (Layout:finish_dynamic_section): If new dtags enabled, emit DT_RUNPATH. Also, emit a DT_FLAGS_1 containing any specified -z flags.
2008-04-16 * sparc.h (EF_SPARC_EXT_MASK, EF_SPARC_32PLUS_MASK,David S. Miller2-0/+24
EF_SPARC_32PLUS, EF_SPARC_SUN_US1, EF_SPARC_HAL_R1, EF_SPARC_SUN_US3, EF_SPARC_LEDATA, EF_SPARCV9_MM, EF_SPARCV9_TSO, EF_SPARCV9_PSO, EF_SPARCV9_RMO): Define as enum constants.
2008-04-11 * sparc.h: New fileDavid S. Miller3-3/+191
* elfcpp.h (SHN_BEFORE, SHN_AFTER): New enum constants. (SHT_SPARC_GOTDATA, SHF_ORDERED, SHF_EXCLUDE, STT_SPARC_REGISTER, DT_SPARC_REGISTER): Likewise.
2008-04-03 * elfcpp_swap.h (Swap_unaligned<64, true>::writeval): CorrectIan Lance Taylor2-8/+13
byte order.
2008-03-25 * elfcpp.h (NT_VERSION, NT_ARCH): Define as enum constants.Ian Lance Taylor2-0/+57
(NT_GNU_ABI_TAG, NT_GNU_HWCAP): Likewise. (NT_GNU_BUILD_ID, NT_GNU_GOLD_VERSION): Likewise. (ELF_NOTE_OS_LINUX, ELF_NOTE_OS_GNU): Likewise. (ELF_NOTE_OS_SOLARIS2, ELF_NOTE_OS_NETBSD): Likewise. (ELF_NOTE_OS_SYLLABLE): Likewise.
2008-03-22Add ChangeLog file.Ian Lance Taylor1-0/+4
2008-03-06Support --hash-style=gnu.Ian Lance Taylor1-0/+4
2008-02-07Implement --just-symbols, including -R FILE. Fix symbol values whenIan Lance Taylor1-0/+23
doing a relocatable link.
2008-02-04Fully implement the SECTIONS clause.Ian Lance Taylor1-0/+45
2008-01-09Remove Andrew's e-mail address.Ian Lance Taylor1-1/+1
2007-11-09From Craig Silverstein: Implement section_info.Ian Lance Taylor1-0/+24
2007-11-02From Craig Silverstein: Add first version of generating error messagesIan Lance Taylor1-10/+0
with file name and line number.
2007-11-02From Craig Silverstein: Add more DWARF info, add some i386 comments.Ian Lance Taylor2-3/+242
2007-11-02Reworked from Andrew Chatham: report error locations.Ian Lance Taylor1-0/+23
2007-10-04From Craig Silverstein: update comments.Ian Lance Taylor1-1/+7