+2008-04-11 Ian Lance Taylor <iant@google.com>
+
+ * testsuite/Makefile.am (justsyms_2r.o): Add dependency on
+ justsyms.t.
+ * testsuite/Makefile.in: Rebuild.
+
+ * testsuite/script_test_2a.cc (script_test_string_a): Make 8 bytes
+ long.
+ * testsuite/script_test_2.cc (main): Adjust test.
+
+2008-04-11 David S. Miller <davem@davemloft.net>
+ Ian Lance Taylor <iant@google.com>
+
+ * options.h (General_options): Add entries for '-Y' and
+ '-relax'.
+ * options.cc (General_options:finalize): If -Y was used, add those
+ entries to the library path instead of the default "/lib" and
+ "/usr/lib".
+
+2008-04-11 David S. Miller <davem@davemloft.net>
+
+ * testsuite/justsyms.t: Start at 0x100.
+ * testsuite/justsyms_1.cc: Adjust justsyms_string assertion.
+ * testsuite/script_test_2b.cc (script_test_string_b): Make 8 bytes
+ long.
+ * testsuite/script_test_2.cc: Adjust string and section length
+ checks.
+
+2008-04-09 Ian Lance Taylor <iant@google.com>
+
+ PR gold/5996
+ * script-sections.cc (Sections_element::allocate_to_segment): Add
+ orphan parameter.
+ (Output_section_definition::allocate_to_segment): Likewise.
+ (Orphan_output_section::allocate_to_segment): Likewise.
+ (Script_sections::attach_sections_using_phdrs_clause): Don't
+ propagate non-PT_LOAD segments to orphan sections.
+ * testsuite/Makefile.am (script_test_3.stdout): Generate using
+ readelf rather than objdump.
+ * testsuite/script_test_3.sh: Adjust accordingly. Test that
+ .interp section and PT_INTERP segment are the same size.
+ * testsuite/Makefile.in: Rebuild.
+
+ * symtab.cc (Symbol_table::add_from_dynobj): Only look for weak
+ aliases for symbols defined in the same object.
+ * testsuite/Makefile.am (check_PROGRAMS): Add weak_alias_test.
+ (weak_alias_test_SOURCES): New variable.
+ (weak_alias_test_DEPENDENCIES): New variable.
+ (weak_alias_test_LDFLAGS): New variable.
+ (weak_alias_test_LDADD): New variable.
+ (weak_alias_test_1_pic.o, weak_alias_test_1.so): New targets.
+ (weak_alias_test_2_pic.o, weak_alias_test_2.so): New targets.
+ (weak_alias_test_3.o): New target.
+ (weak_alias_test_4_pic.o, weak_alias_test_4.so): New targets.
+ * testsuite/weak_alias_test_main.cc: New file.
+ * testsuite/weak_alias_test_1.cc: New file.
+ * testsuite/weak_alias_test_2.cc: New file.
+ * testsuite/weak_alias_test_3.cc: New file.
+
+2008-04-08 Ian Lance Taylor <iant@google.com>
+
+ * options.h (class General_options): Add --noinhibit-exec option.
+ * main.cc (main): Check --noinhibit-exec.
+
+ * options.h (class General_options): Define --wrap as a special
+ option. Add wrap_symbols_ field.
+ (General_options::any_wrap_symbols): New function.
+ (General_options::is_wrap_symbol): New function.
+ * options.cc (General_options::parse_wrap): New function.
+ (General_options::General_options): Initialize wrap_symbols_.
+ * symtab.cc (Symbol_table::wrap_symbol): New function.
+ (Symbol_table::add_from_object): Handle --wrap.
+ * symtab.h (class Symbol_table): Declare wrap_symbol.
+ * target.h (Target::wrap_char): New function.
+ (Target::Target_info): Add wrap_char field.
+ * i386.cc (Target_i386::i386_info): Initialize wrap_char.
+ * x86_64.cc (Target_x86_64::x86_64_info): Likewise.
+ * testsuite/testfile.cc (Target_test::test_target_info):
+ Likewise.
+
+ * errors.cc (Errors::undefined_symbol): Mention symbol version if
+ there is one.
+
+ * layout.h (class Layout): Add added_eh_frame_data_ field.
+ * layout.cc (Layout::Layout): Initialize new field.
+ (Layout::layout_eh_frame): Don't add eh_frame_data_ to .eh_frame
+ output section until we find a section we merged successfully.
+ * object.cc (Sized_relobj::check_eh_frame_flags): Don't require
+ that the size be non-zero.
+
+ * merge.cc (Object_merge_map::get_output_offset): Remove inline
+ qualifier.
+
+2008-04-08 Craig Silverstein <csilvers@google.com>
+
+ * configure.ac: Export new conditional variable HAVE_ZLIB.
+ * testsuite/Makefile.am (flagstest_o_specialfile): Condition
+ on HAVE_ZLIB.
+ (flagstest_o_specialfile_and_compress_debug_sections): Likewise.
+ * configure, Makefile.in, testsuite/Makefile.in: Rebuild.
+
+2008-04-07 Ian Lance Taylor <iant@google.com>
+
+ * version.cc (version_string): Set to "1.5".
+
+ * x86_64.cc (Target_x86_64::Scan): Change from struct to class.
+ Add issued_non_pic_error_ field. Declare check_non_pic.
+ (Target_x86_64::Scan::check_non_pic): New function.
+ (Target_x86_64::Scan::local): Call check_non_pic as appropriate.
+ (Target_x86_64::Scan::global): Likewise.
+
+ * output.cc (Output_reloc<SHT_REL>::local_section_offset): Add
+ addend parameter. Change caller. Handle merge sections.
+ (Output_reloc<SHT_REL>::symbol_value): Change parameter type from
+ Address to Addend. Don't add in the result of
+ local_section_offset, pass down the addend and use the returned
+ value.
+ * output.h (class Output_reloc<SHT_REL>): Add Addend typedef.
+ Update declarations of local_section_offset and symbol_value.
+ * testsuite/two_file_test_1.cc (t18): New function.
+ * testsuite/two_file_test_2.cc (f18): New function.
+ * testsuite/two_file_test_main.cc (main): Call t18.
+ * testsuite/two_file_test.h (t18, f18): Declare.
+
+ * configure.ac: Don't test for objdump, c++filt, or readelf.
+ * testsuite/Makefile.am: Remove READELF and OBJDUMP_AND_CPPFILT
+ conditionals.
+ (TEST_READELF): New variable.
+ (TEST_OBJDUMP, TEST_CXXFILT, TEST_STRIP): New variables.
+ (check_PROGRAMS): Add two_file_strip_test.
+ (two_file_strip_test): New target.
+ (check_PROGRAMS): Add two_file_same_shared_strip_test.
+ (two_file_same_shared_strip_test_SOURCES): New variable.
+ (two_file_same_shared_strip_test_DEPENDENCIES): New variable.
+ (two_file_same_shared_strip_test_LDFLAGS): New variable.
+ (two_file_same_shared_strip_test_LDADD): New variable.
+ (two_file_shared_strip.so): New target.
+ (ver_test_2.syms, ver_test_4.syms): Use TEST_READELF.
+ (ver_test_5.syms, ver_test_7.syms): Likewise.
+ (ver_matching_test.stdout): Use TEST_OBJDUMP and TEST_CXXFILT.
+ (strip_test_3.stdout): Use TEST_OBJDUMP.
+ * configure, Makefile.in, testsuite/Makefile.in: Rebuild.
+
+2008-04-04 Cary Coutant <ccoutant@google.com>
+
+ * 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 Craig Silverstein <csilvers@google.com>
+
+ * compressed_output.h (class Output_compressed_section): Use
+ 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-02 David S. Miller <davem@davemloft.net>
+
+ * dwarf_reader.cc (Sized_dwarf_line_info::read_header_prolog,
+ Sized_dwarf_line_info::process_one_opcode): Use Swap_unaligned.
+
+2008-04-02 Craig Silverstein <csilvers@google.com>
+
+ * TODO: New file.
+
+2008-04-02 Ian Lance Taylor <iant@google.com>
+
+ * fileread.cc (File_read::find_view): Add byteshift and vshifted
+ 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-03-31 Cary Coutant <ccoutant@google.com>
+
+ 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 Ian Lance Taylor <iant@google.com>
+
+ * symtab.cc (Symbol_table::do_define_as_constant): Don't force a
+ 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.
+
+ * output.cc
+ (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.
+
+ * symtab.cc (Symbol_table::add_from_object): If we don't use the
+ 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 Ian Lance Taylor <iant@google.com>
+
+ * layout.cc (Layout::layout): If we see an input section with a
+ 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 Ian Lance Taylor <iant@google.com>
+
+ * common.cc (Sort_commons::operator): Correct sorting algorithm.
+ * 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.
+
+ * symtab.cc (Symbol_table::add_from_object): Handle saw_undefined_
+ 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-26 Ian Lance Taylor <iant@google.com>
+ * symtab.cc (Symbol_table::add_from_relobj): Don't set the version
+ 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.
+
PR gold/5986
Fix problems building gold with gcc 4.3.0.
* gold.h (TEMPLATE_ATTRIBUTE_PRINTF_4): Define.