aboutsummaryrefslogtreecommitdiff
path: root/gold
AgeCommit message (Collapse)AuthorFilesLines
2008-04-042008-04-04 Cary Coutant <ccoutant@google.com>Cary Coutant7-5/+227
* symtab.h (Symbol::is_weak_undefined): New function. (Symbol::is_strong_undefined): New function. (Symbol::is_absolute): New function. (Symbol::needs_plt_entry): Exclude weak undefined symbols. (Symbol::needs_dynamic_reloc): Exclude weak undefined and absolute symbols. * testsuite/Makefile.am (check_PROGRAMS): Add weak_undef_test. (weak_undef_test): New target. * testsuite/Makefile.in: Rebuild. * testsuite/weak_undef_file1.cc: New file. * testsuite/weak_undef_file2.cc: New file. * testsuite/weak_undef_test.cc: New file.
2008-04-03 * compressed_output.h (class Output_compressed_section): UseIan Lance Taylor6-27/+43
unsigned buffer. * compressed_output.cc (zlib_compress): Use unsigned buffers, add zlib header. (zlib_compressed_suffix): Removed. (Output_compressed_section::set_final_data_size): Use unsigned buffers. * testsuite/Makefile.am (flagstest_compress_debug_sections): Fix linker invocation. (flagstest_o_specialfile_and_compress_debug_sections): Likewise. * testsuite/Makefile.in: Regenerated.
2008-04-03 * dwarf_reader.cc (Sized_dwarf_line_info::read_header_prolog,David S. Miller2-7/+12
Sized_dwarf_line_info::process_one_opcode): Use Swap_unaligned.
2008-04-03 * TODO: New file.Ian Lance Taylor2-0/+30
2008-04-02 * fileread.cc (File_read::find_view): Add byteshift and vshiftedIan Lance Taylor10-108/+285
parameters. Update for new key type to views_. Change all callers. (File_read::read): Adjust for byteshift in returned view. (File_read::add_view): New function, broken out of find_and_make_view. (File_read::make_view): New function, broken out of find_and_make_view. (File_read::find_or_make_view): Add offset and aligned parameters. Rewrite accordingly. Change all callers. (File_read::get_view): Add offset and aligned parameters. Adjust for byteshift in return value. (File_read::get_lasting_view): Likewise. * fileread.h (class File_read): Update declarations. (class File_read::View): Add byteshift_ field. Add byteshift to constructor. Add byteshift method. * archive.h (Archive::clear_uncached_views): New function. (Archive::get_view): Add aligned parameter. Change all callers. * object.h (Object::get_view): Add aligned parameter. Change all callers. (Object::get_lasting_view): Likewise. * fileread.cc (File_read::release): Don't call clear_views if there are multiple objects. * fileread.h (File_read::clear_uncached_views): New function. * archive.cc (Add_archive_symbols::run): Call clear_uncached_views on the archive.
2008-04-012008-03-31 Cary Coutant <ccoutant@google.com>Cary Coutant4-30/+178
Add thin archive support. * archive.cc (Archive::armagt): New const. (Archive::setup): Remove task parameter and calls to unlock. (Archive::unlock_nested_archives): New function. (Archive::read_header): Add nested_off parameter. Change all callers. (Archive::interpret_header): Likewise. (Archive::include_all_members): Change to handle thin archives. (Archive::include_member): Likewise. * archive.h (Archive::Archive): Add new parameters and initializers. (Archive::armagt): New const. (Archive::setup): Remove task parameter. (Archive::unlock_nested_archives): New function. (Archive::read_header): Add nested_off parameter. (Archive::interpret_header): Likewise. (Archive::Nested_archive_table): New typedef. (Archive::is_thin_archive_): New field. (Archive::nested_archives_): New field. (Archive::options_): New field. (Archive::dirpath_): New field. (Archive::task_): New field. * readsyms.cc (Read_symbols::do_read_symbols): Add check for thin archives. Pass additional parameters to Archive::Archive. Unlock the archive file after calling Archive::setup.
2008-03-29 * symtab.cc (Symbol_table::do_define_as_constant): Don't force aIan Lance Taylor5-2/+68
version symbol to be local. * testsuite/ver_test_4.sh: New file. * testsuite/Makefile.am (check_SCRIPTS): Add ver_test_4.sh. (check_DATA): Add ver_test_4.syms. (ver_test_4.syms): New target. * testsuite/Makefile.in: Rebuild.
2008-03-29 * output.ccIan Lance Taylor3-63/+63
(Output_section::Input_section_sort_entry::has_priority): New function. (Output_section::Input_section_sort_entry::match_file_name): New function. (Output_section::Input_section_sort_entry::match_section_name): Remove. (Output_section::Input_section_sort_entry::match_section_name_prefix): Remove. (Output_section::Input_section_sort_entry::match_section_file): Remove. (Output_section::Input_section_sort_compare::operator()): Rewrite using new Input_section_sort_entry functions. Sort crtbegin and crtend first. Sort sections with no priority before sections with a priority. * testsuite/initpri1.c (d3): Check j != 4. (cd5): New constructor/destructor function. (main): Check j != 2.
2008-03-29 * symtab.cc (Symbol_table::add_from_object): If we don't use theIan Lance Taylor6-2/+119
new symbol when resolving, don't call set_is_default. * testsuite/ver_test_7.cc: New file. * testsuite/ver_test_7.sh: New file. * testsuite/Makefile.am (ver_test_7.so): New target. (ver_test_7.o): New target. (check_SCRIPTS): Add ver_test_7.sh. (check_DATA): Add ver_test_7.syms. (ver_test_7.syms): New target.
2008-03-28 * layout.cc (Layout::layout): If we see an input section with aIan Lance Taylor10-25/+576
name that needs sorting, set the must_sort flag for the output section. (Layout::make_output_section): If the name of the output section indicates that it might require sorting, set the may_sort flag. * output.h (Output_section::may_sort_attached_input_sections): New function. (Output_section::set_may_sort_attached_input_sections): New function. (Output_section::must_sort_attached_input_sections): New function. (Output_section::set_must_sort_attached_input_sections): New function. (class Output_section): Declare Input_section_sort_entry. Define Input_section_sort_compare. Declare sort_attached_input_sections. Add new fields: may_sort_attached_input_sections_, must_sort_attached_input_sections_, attached_input_sections_are_sorted_. * output.cc (Output_section::Output_section): Initialize new fields. (Output_section::add_input_section): Add an entry to input_sections_ if may_sort or must_sort are true. (Output_section::set_final_data_size): Call sort_attached_input_sections if necessary. (Output_section::Input_section_sort_entry): Define new class. (Output_section::Input_section_sort_compare::operator()): New function. (Output_section::sort_attached_input_sections): New function. * configure.ac: Check whether the compiler supports constructor priorities. Define a CONSTRUCTOR_PRIORITY automake conditional. * testsuite/initpri1.c: New file. * testsuite/Makefile.am (check_PROGRAMS): Add initpri1 if CONSTRUCTOR_PRIORITY. (initpri1_SOURCES, initpri1_DEPENDENCIES): New variables. (initpri1_LDFLAGS): New variable. * configure, Makefile.in, testsuite/Makefile.in: Rebuild.
2008-03-27 * common.cc (Sort_commons::operator): Correct sorting algorithm.Ian Lance Taylor5-6/+117
* testsuite/common_test_1.c: New file. * testsuite/Makefile.am (check_PROGRAMS): Add common_test_1. (common_test_1_SOURCES): New variable. (common_test_1_DEPENDENCIES): New variable. (common_test_1_LDFLAGS): New variable.
2008-03-27 * symtab.cc (Symbol_table::add_from_object): Handle saw_undefined_Ian Lance Taylor5-6/+74
and commons_ correctly when NAME/VERSION does not override NAME/NULL. * testsuite/ver_test_6.c: New file. * testsuite/Makefile.am (check_PROGRAMS): Add ver_test_6 (ver_test_6_SOURCES, ver_test_6_DEPENDENCIES): New variables. (ver_test_6_LDFLAGS, ver_test_6_LDADD): New variables.
2008-03-27 * symtab.cc (Symbol_table::add_from_relobj): Don't set the versionIan Lance Taylor8-5/+149
of an undefined symbol from a version script. * testsuite/Makefile.am (ver_test_5.so): New target. (ver_test_5.o): New target. (check_SCRIPTS): Add ver_test_5.sh. (check_DATA): Add ver_test_5.syms. (ver_test_5.syms): New target. * testsuite/ver_test_5.cc: New file. * testsuite/ver_test_5.script: New file. * testsuite/ver_test_5.sh: New file. * Makefile.in, testsuite/Makefile.in: Rebuild.
2008-03-26 PR gold/5986Ian Lance Taylor18-7/+171
Fix problems building gold with gcc 4.3.0. * gold.h (TEMPLATE_ATTRIBUTE_PRINTF_4): Define. (gold_error_at_location, gold_warning_at_location): Use it. * configure.ac: Check whether we can compile and use a template function with a printf attribute. * x86_64.cc (Target_x86_64::do_code_fill): Swap out a 32-bit value when jumping over bytes. * object.cc: Instantiate Object::read_section_data. * debug.h: Include <cstring> * dwarf_reader.cc: Include <algorithm> * main.cc: Include <cstring>. * options.cc: Include <cstring>. * output.cc: Include <cstring>. * script.cc: Include <cstring>. * script.h: Include <string>. * symtab.cc: Include <cstring> and <algorithm>. * target-select.cc: Include <cstring>. * version.cc: Include <string>. * testsuite/testmain.cc: Include <cstdlib>. * configure, config.in: Rebuild.
2008-03-26Fix a ChangeLog formatting problem.Ben Elliston1-1/+1
2008-03-25 * options.cc: Include "../bfd/bfdver.h".Ian Lance Taylor2-0/+9
(options::help): Print bug reporting address.
2008-03-25 * version.cc (print_version): Adjust output for current value ofIan Lance Taylor2-3/+20
BFD_VERSION_STRING.
2008-03-25 * NEWS: New file.Ian Lance Taylor1-0/+1
2008-03-25 * options.cc (options::help): Print list of supported targets.Ian Lance Taylor7-80/+177
* target-select.h: Include <vector>. (class Target_selector): Make machine_, size_, and is_big_endian_ fields const. Add bfd_name_ and instantiated_target_ fields. (Target_selector::Target_selector): Add bfd_name parameter. (Target_selector::recognize): Make non-virtual, call do_recognize. (Target_selector::recognize_by_name): Make non-virtual, call do_recognize_by_name. (Target_selector::supported_names): New function. (Target_selector::bfd_name): New function. (Target_selector::do_instantiate_target): New pure virtual function. (Target_selector::do_recognize): New virtual function. (Target_selector::do_recognize_by_name): New virtual function. (Target_selector::instantiate_target): New private function. (supported_target_names): Declare. * target-select.cc (Target_selector::Target_selector): Update for new parameter and fields. (select_target_by_name): Check that the name matches before calling recognize_by_name. (supported_target_names): New function. * i386.cc (class Target_selector_i386): Update Target_selector constructor call. Remove recognize and recognize_by_name. Add do_instantiate_target. * x86_64.cc (class Target_selector_x86_64): Likewise. * testsuite/testfile.cc (class Target_selector_test): Update for changes to Target_selector.
2008-03-25 * README: Rewrite, with some notes on unsupported features.Ian Lance Taylor2-10/+49
2008-03-25 * i386.cc (Target_i386::Got_type): New enum declaration.Cary Coutant9-416/+418
(Target_i386::Scan::local): Updated callers of Output_data_got member functions. (Target_i386::Scan::global): Likewise. (Target_i386::Relocate::relocate): Likewise. (Target_i386::Relocate::relocate_tls): Likewise. * object.h (Got_offset_list): New class. (Sized_relobj::local_has_got_offset): Added got_type parameter. (Sized_relobj::local_got_offset): Likewise. (Sized_relobj::set_local_got_offset): Likewise. (Sized_relobj::local_has_tls_got_offset): Removed. (Sized_relobj::local_tls_got_offset): Removed. (Sized_relobj::set_local_tls_got_offset): Removed. (Sized_relobj::Local_got_offsets): Changed to store a list of offsets. * output.cc (Output_data_got::add_global): Added got_type parameter. (Output_data_got::add_global_with_rel): Likewise. (Output_data_got::add_global_with_rela): Likewise. (Output_data_got::add_global_pair_with_rel): New function. (Output_data_got::add_global_pair_with_rela): New function. (Output_data_got::add_local): Added got_type parameter. (Output_data_got::add_local_with_rel): Likewise. (Output_data_got::add_local_with_rela): Likewise. (Output_data_got::add_local_pair_with_rel): New function. (Output_data_got::add_local_pair_with_rela): New function. (Output_data_got::add_global_tls): Removed. (Output_data_got::add_global_tls_with_rel): Removed. (Output_data_got::add_global_tls_with_rela): Removed. (Output_data_got::add_local_tls): Removed. (Output_data_got::add_local_tls_with_rel): Removed. (Output_data_got::add_local_tls_with_rela): Removed. * output.h (Output_data_got::add_global): Added got_type parameter. (Output_data_got::add_global_with_rel): Likewise. (Output_data_got::add_global_with_rela): Likewise. (Output_data_got::add_global_pair_with_rel): New function. (Output_data_got::add_global_pair_with_rela): New function. (Output_data_got::add_local): Added got_type parameter. (Output_data_got::add_local_with_rel): Likewise. (Output_data_got::add_local_with_rela): Likewise. (Output_data_got::add_local_pair_with_rel): New function. (Output_data_got::add_local_pair_with_rela): New function. (Output_data_got::add_global_tls): Removed. (Output_data_got::add_global_tls_with_rel): Removed. (Output_data_got::add_global_tls_with_rela): Removed. (Output_data_got::add_local_tls): Removed. (Output_data_got::add_local_tls_with_rel): Removed. (Output_data_got::add_local_tls_with_rela): Removed. * resolve.cc (Symbol::override_base_with_special): Removed reference to has_got_offset_ field. * symtab.cc (Symbol::init_fields): Replaced initialization of got_offset_ with got_offsets_. Removed initialization of has_got_offset_ *symtab.h (Symbol::has_got_offset): Aded got_type parameter. (Symbol::got_offset): Likewise. (Symbol::set_got_offset): Likewise. (Symbol::has_tls_got_offset): Removed. (Symbol::tls_got_offset): Removed. (Symbol::set_tls_got_offset): Removed. (Symbol::got_offset_): Removed. (Symbol::tls_mod_got_offset_): Removed. (Symbol::tls_pair_got_offset_): Removed. (Symbol::got_offsets_): New field. (Symbol::has_got_offset): Removed. (Symbol::has_tls_mod_got_offset): Removed. (Symbol::has_tls_pair_got_offset): Removed. * x86_64.cc (Target_x86_64::Got_type): New enum declaration. (Target_x86_64::Scan::local): Updated callers of Output_data_got member functions. (Target_x86_64::Scan::global): Likewise. (Target_x86_64::Relocate::relocate): Likewise. (Target_x86_64::Relocate::relocate_tls): Likewise.
2008-03-25 * yyscript.y: Fix spelling error in comment.Ben Elliston2-1/+5
2008-03-25 * options.h (class General_options): Define build_id option.Ian Lance Taylor4-20/+230
* layout.h (class Layout): Declare write_build_id, create_note, create_build_id. Add build_id_note_ member. * layout.cc: Include <cerrno>, <fcntl.h>, <unistd.h>, "libiberty.h", "md5.h", "sha1.h". (Layout::Layout): Initialize eh_frame_data_, eh_frame_hdr_section_, and build_id_note_. (Layout::finalize): Call create_build_id. (Layout::create_note): New function, broken out of Layout::create_gold_note. (Layout::create_gold_note): Call create_note. (Layout::create_build_id): New function. (Layout::write_build_id): New function. (Close_task_runner::run): Call write_build_id.
2008-03-24 * x86_64.cc: Correct license to GPLv3.Ian Lance Taylor2-21/+16
2008-03-24 * options.cc: Include "demangle.h".Ian Lance Taylor5-24/+131
(parse_optional_string): New function. (parse_long_option): Handle takes_optional_argument. (parse_short_option): Update dash_z initializer. Handle takes_optional_argument. (General_options::General_options): Initialize do_demangle_. (General_options::finalize): Set do_demangle_. Handle demangling style. * options.h (parse_optional_string): Declare. (struct One_option): Add optional_arg field. Update constructor. Update call constructor calls. Add takes_optional_argument function. (DEFINE_var): Add optional_arg__ parameter. Change all callers. (DEFINE_optional_string): Define. (General_options::demangle): Change from DEFINE_bool to DEFINE_optional_string. (General_options::no_demangle): New function. (General_options::do_demangle): New function. (General_options::set_do_demangle): New function. (General_options::execstack_status_): Move definition to end of class definition. (General_options::static_): Likewise. (General_options::do_demangle_): New field. * object.cc (big_endian>::get_symbol_location_info): Call Options::do_demangle, not Options::demangle. * symtab.cc (demangle): Likewise.
2008-03-22 * gold.h: Include <cstddef> and <sys/types.h>Ian Lance Taylor3-0/+9
* options.h: Include <cstring>.
2008-03-21Add ChangeLog file now that the sources are part of the GNU binutils.Ian Lance Taylor1-0/+4
2008-03-21Bump version for general release.Ian Lance Taylor2-40/+44
2008-03-20From Craig Silverstein: implement -z defs.Ian Lance Taylor2-1/+5
2008-03-19Make sure the start and size of the TLS segment are aligned.Ian Lance Taylor4-20/+89
2008-03-17Up the version number to 1.3, which was just pushed to devtools.Craig Silverstein1-1/+1
2008-03-16Fix handling of RELA relative relocs against local symbols in mergeIan Lance Taylor8-27/+48
sections.
2008-03-14Don't get confused about whether a symbol is the default version if weIan Lance Taylor9-17/+152
see a later reference to it. Add tests for this case.
2008-03-13Update copyright years. Update language files.Ian Lance Taylor88-446/+637
2008-03-13Don't crash if we change the address of the .eh_frame section after weIan Lance Taylor3-2/+23
find its size.
2008-03-13From Craig Silverstein: Implement --debug=files to track file opens,Ian Lance Taylor6-9/+37
and implement --verbose as a synonym.
2008-03-12Combine read-only .eh_frame sections with read-write .eh_frameIan Lance Taylor5-4/+89
sections.
2008-03-11Up version to 1.2, as the 1.2 binary was pushed to users today.Craig Silverstein1-1/+1
2008-03-11If we a section with no flags followed by a section with the same nameIan Lance Taylor2-85/+147
with flags, put them in the same output section.
2008-03-07From Craig Silverstein: sort options into alphabetical order.Ian Lance Taylor1-29/+36
2008-03-07Increase maximum bucket size for dynamic hash tables.Ian Lance Taylor1-2/+2
2008-03-07From Craig Silverstein: implement --hash-bucket-empty-fraction for real.Ian Lance Taylor1-1/+3
2008-03-07Recognize --hash-bucket-empty-fraction.Ian Lance Taylor2-1/+32
2008-03-06Use absolute address for relocations when not doing a relocatableIan Lance Taylor1-1/+7
link.
2008-03-06Use N_ for option help strings, and call gettext when printing them.Ian Lance Taylor2-73/+72
2008-03-06From Craig Silverstein: accept any string for input format, warn ifIan Lance Taylor2-6/+23
thread options when not supported.
2008-03-06Don't use the user-specified output format unless the user actuallyIan Lance Taylor1-1/+1
specified one.
2008-03-06Support --hash-style=gnu.Ian Lance Taylor2-16/+46
2008-03-04From Craig Silverstein: rework option handling to make it easier toIan Lance Taylor8-1632/+1150
add a new option.
2008-03-04From Craig Silverstein: rename some option functions in preparationIan Lance Taylor8-23/+27
for reworking option handling.