+2008-07-24 Ian Lance Taylor <iant@google.com>
+
+ PR 6048
+ * ehframe.cc (Eh_frame::add_ehframe_input_section): Check whether
+ this->eh_frame_hdr_ is NULL before using it.
+
+ * dynobj.cc (Versions::Versions): Update comment.
+
+ * dynobj.cc (Versions::Versions): If there is an soname, use it as
+ the base version name.
+
+ * stringpool.cc (Stringpool_template::add_with_length): Set key to
+ array size plus one.
+ (Stringpool_template::set_string_offsets): Subtract one from key
+ before using it as an array index.
+ (Stringpool_template::get_offset_with_length): Likewise.
+ (Stringpool_template::write_to_buffer): Likewise.
+ * stringpool.h (Stringpool_template::get_offset_from_key):
+ Likewise.
+
+2008-07-23 Ian Lance Taylor <iant@google.com>
+
+ PR 6658
+ * object.h (Merged_symbol_value::value): Do our best to handle a
+ negative addend.
+
+ PR 6647
+ * script.cc (Version_script_info::get_versions): Don't add empty
+ version tag to return value.
+ (Version_script_info::get_symbol_version_helper): Change return
+ type to bool. Add pversion parameter. Change all callers.
+ (script_register_vers_node): Don't require a non-NULL tag.
+ * script.h (class Version_script_info): Update declarations.
+ (Version_script_info::get_symbol_version): Change return type to
+ bool. Add version parameter. Change all callers.
+ * symtab.cc (Sized_symbol::add_from_relobj): Rework version
+ handling. Handle an empty version from a version script.
+ (Symbol_table::define_special_symbol): Likewise.
+ * testsuite/ver_test_10.script: New file.
+ * testsuite/ver_test_10.sh: New file.
+ * testsuite/Makefile.am (check_SCRIPTS): Add ver_test_10.sh.
+ (check_DATA): Add ver_test_10.syms.
+ (ver_test_10.syms, ver_test_10.so): New target.
+ * testsuite/Makefile.in: Rebuild.
+
+2008-07-23 Simon Baldwin <simonb@google.com>
+
+ * symtab.cc (Symbol_table::sized_write_symbol): Only set st_size
+ to zero for undefined symbols from dynamic libraries.
+
+2008-07-23 Ian Lance Taylor <iant@google.com>
+
+ * symtab.cc (Symbol_table::resolve): Remove version parameter.
+ Change all callers.
+ * symtab.h (class Symbol_table): Update declaration.
+ * testsuite/ver_test_9.cc: New file.
+ * testsuite/Makefile.am (check_PROGRAMS): Add ver_test_9.
+ (ver_test_9_SOURCES, ver_test_9_DEPENDENCIES): Define.
+ (ver_test_9_LDFLAGS, ver_test_9_LDADD): Define.
+ (ver_test_9.so, ver_test_9.o): New targets.
+ * testsuite/Makefile.in: Rebuild.
+
+2008-07-22 Ian Lance Taylor <iant@google.com>
+
+ * options.h (class General_options): Define --check-sections.
+ * layout.cc (Layout::set_segment_offsets): Handle
+ --check-sections.
+
+ * options.h (class General_options): Define -n/--nmagic and
+ -N/--omagic.
+ * options.cc (General_options::finalize): For -n/--nmagic or
+ -N/--omagic, set -static.
+ * layout.cc (Layout::attach_allocated_section_to_segment): If
+ -N/--omagic, don't put read-only and read-write sections in
+ different segments.
+ (Layout::find_first_load_seg): If -N/--omagic, don't insist on
+ finding a read-only segment.
+ (Layout::set_segment_offsets): If -N/--omagic or -n/--nmagic,
+ don't set the minimum segment alignment to the common page size,
+ and don't set the file offset to the address modulo the page size.
+ * script-sections.cc (Script_sections::create_segments): If
+ -n/--omagic, don't put read-only and read-write sections in
+ different segments.
+
+ * cref.cc: New file.
+ * cref.h: New file.
+ * options.h (class General_options): Add --print-symbol-counts.
+ * main.cc (main): Issue defined symbol report if requested.
+ * archive.cc (Archive::interpret_header): Make into a const member
+ function.
+ (Archive::add_symbols): Call Input_objects::archive_start and
+ archive_stop.
+ (Archive::const_iterator): Define new class.
+ (Archive::begin, Archive::end): New functions.
+ (Archive::include_all_members): Rewrite to use iterator.
+ (Archive::count_members): New function.
+ * archive.h (class Archive): Update declarations.
+ (Archive::filename): New function.
+ * object.cc: Include "cref.h".
+ (Sized_relobj::Sized_relobj): Initialize defined_count_.
+ (Sized_relobj::do_get_global_symbol_counts): New function.
+ (Input_objects::add_object): Add object to cross-referencer.
+ (Input_objects::archive_start): New function.
+ (Input_objects::archive_stop): New function.
+ (Input_objects::print_symbol_counts): New function.
+ * object.h: Declare Cref and Archive.
+ (Object::get_global_symbol_counts): New function.
+ (Object::do_get_global_symbol_counts): New pure virtual function.
+ (class Sized_relobj): Add defined_count_ field. Update
+ declarations.
+ (class Input_objects): Add cref_ field. Update constructor.
+ Update declarations.
+ * dynobj.cc (Sized_dynobj::Sized_dynobj): Initialize symbols_ and
+ defined_count_.
+ (Sized_dynobj::do_add_symbols): Allocate symbols_ if printing
+ symbol counts.
+ (Sized_dynobj::do_get_global_symbol_counts): New function.
+ * dynobj.h (class Sized_dynobj): Add fields symbols_ and
+ defined_count_. Update declarations. Define Symbols typedef.
+ * symtab.cc (Symbol_table::add_from_relobj): Add defined
+ parameter. Change all callers.
+ (Symbol_table::add_from_dynobj): Add sympointers and defined
+ parameters. Change all callers.
+ * symtab.h (class Symbol_table): Update declarations.
+ * Makefile.am (CCFILES): Add cref.cc.
+ (HFILES): Add cref.h.
+ * Makefile.in: Rebuild.
+
+2008-07-22 Simon Baldwin <simonb@google.com>
+
+ * symtab.cc (Symbol_table::sized_write_symbol): Set symbol size
+ to zero when writing undefined symbols.
+
+2008-07-22 Ian Lance Taylor <iant@google.com>
+
+ * output.cc (Output_section::add_input_section): Don't try to
+ merge empty merge sections.
+
+2008-07-21 Craig Silverstein <csilvers@google.com>
+
+ * symtab.cc (Symbol_table::warn_about_undefined_dynobj_symbol):
+ Include symbol version in error message.
+
+2008-07-20 Chris Demetriou <cgd@google.com>
+
+ * configure.ac (gold_cv_c_random_seed): New configured variable.
+ (RANDOM_SEED_CFLAGS): New substituted variable.
+ * Makefile.am (AM_CFLAGS, AM_CXXFLAGS): Add $(RANDOM_SEED_CFLAGS).
+ * configure: Rebuild.
+ * Makefile.in: Likewise.
+ * testsuite/Makefile.in: Likewise.
+
+2008-07-18 Ian Lance Taylor <iant@google.com>
+
+ * symtab.cc (Symbol_table::add_from_object): Rewrite the case
+ where we see NAME/NULL and NAME/VERSION as separate symbols.
+ * testsuite/ver_test_main.cc (main): Call t4.
+ (t4, t4_2a): Define.
+ * testsuite/ver_test_2.cc (t4_2): Define.
+ * testsuite/ver_test_2.script: Put t4_2a in VER2.
+ * testsuite/ver_test_4.cc (t4_2a): Define.
+ * testsuite/ver_test_4.script: Put t4_2a in VER2.
+ * testsuite/ver_test.h (t4, t4_2, t4_2a): Declare.
+
+2008-07-17 Ian Lance Taylor <iant@google.com>
+
+ * dynobj.cc (Versions::add_def): If we give an error about a
+ missing version, go ahead and create the version anyhow.
+
+2008-07-10 Ian Lance Taylor <iant@google.com>
+
+ Handle output sections with more than 0x7fffffff bytes.
+ * object.h (class Relobj): Change map_to_output_ to
+ output_sections_, and just keep a section pointer. Change all
+ uses. Move comdat group support to Sized_relobj.
+ (Relobj::is_section_specially_mapped): Remove.
+ (Relobj::output_section): Remove poff parameter. Change all
+ callers.
+ (Relobj::output_section_offset): New function.
+ (Relobj::set_section_offset): Rewrite.
+ (Relobj::map_to_output): Remove.
+ (Relobj::output_sections): New function.
+ (Relobj::do_output_section_offset): New pure virtual function.
+ (Relobj::do_set_section_offset): Likewise.
+ (class Sized_relobj): Add section_offsets_ field. Add comdat
+ group support from Relobj. Update declarations.
+ (Sized_relobj::get_output_section_offset): New function.
+ (Sized_relobj::do_output_section_offset): New function.
+ (Sized_relobj::do_set_section_offset): New function.
+ * object.cc (Relobj::output_section_address): Remove.
+ (Sized_relobj::Sized_relobj): Initialize new fields.
+ (Sized_relobj::include_section_group): Cast find_kept_object to
+ Sized_relobj.
+ (Sized_relobj::include_linkonce_section): Likewise.
+ (Sized_relobj::do_layout): Use separate arrays for output section
+ and output offset.
+ (Sized_relobj::do_count_local_symbols): Change map_to_output to
+ output_sections.
+ (Sized_relobj::do_finalize_local_symbols): Change map_to_output to
+ output_sections and section_offsets.
+ (Sized_relobj::write_local_symbols): Likewise.
+ (map_to_kept_section): Compute output address directly.
+ * reloc.cc (Sized_relobj::do_read_relocs): Change map_to_output to
+ output_sections and section_offsets.
+ (Sized_relobj::write_sections): Likewise.
+ (Sized_relobj::relocate_sections): Likewise.
+ * symtab.cc (sized_finalize_symbol): Use output_section_offset.
+ * output.h (class Output_reloc): Update declarations. Change
+ u2_.relobj to Sized_relobj*.
+ (class Output_data_reloc): Change add functions to use
+ Sized_relobj*.
+ * output.cc (Output_reloc::Output_reloc): Change relobj to
+ Sized_relobj*.
+ (Output_reloc::local_section_offset): Change return type to
+ Elf_Addr. Use get_output_section_offset.
+ (Output_reloc::get_address): Likewise.
+ (Output_section::is_input_address_mapped): Don't call
+ is_section_specially_mapped.
+ (Output_section::output_offset): Likewise.
+ (Output_section::output_address): Likewise.
+ (Output_section::starting_output_address): Likewise.
+ * copy-relocs.cc (Copy_relocs::copy_reloc): Change object
+ parameter to Sized_relobj*.
+ (Copy_relocs::need_copy_reloc): Likewise.
+ (Copy_relocs::save): Likewise.
+ * copy-relocs.h (class Copy_relocs): Update declarations.
+ (class Copy_relocs::Copy_reloc_entry): Change constructor to use
+ Sized_relobj*. Change relobj_ field to Sized_relobj*.
+ * target-reloc.h (relocate_for_relocatable): Change
+ offset_in_output_section type to Elf_Addr. Change code that uses
+ it as well.
+ * layout.cc (Layout::layout): Always set *off.
+ * mapfile.cc (Mapfile::print_input_section): Use
+ output_section_offset.
+ * i386.cc (Target_i386::copy_reloc): Change object parameter to
+ Sized_relobj*.
+ * powerpc.cc (Target_powerpc::copy_reloc): Likewise.
+ * sparc.cc (Target_sparc::copy_reloc): Likewise.
+ * x86_64.cc (Target_x86_64::copy_reloc): Likewise.
+
+2008-07-03 Ian Lance Taylor <iant@google.com>
+
+ * layout.cc (Layout::include_section): Do not discard unrecognized
+ SHT_STRTAB sections.
+
+2008-06-30 Craig Silverstein <csilvers@cs.stanford.edu>
+
+ * script.cc (Lex::can_continue_name): Make '?' allowable in
+ version-script names.
+ * testsuite/version_script.map: Change glob pattern to use '?'
+
+2008-06-30 Manish Singh <yosh@gimp.org>
+
+ PR 6585
+ * symtab.cc (Symbol_table::add_undefined_symbols_from_command_line):
+ Correct typo.
+
+2008-06-30 Ian Lance Taylor <iant@google.com>
+
+ PR 6660
+ PR 6682
+ * powerpc.cc (Powerpc_relocate_functions::addr16_ha) [both
+ versions]: Don't try to read the value in the contents, since we
+ don't use it. Use the template endianness when writing.
+
+2008-06-25 Cary Coutant <ccoutant@google.com>
+
+ * fileread.cc (File_read::make_view): Assert on zero-length view.
+ * object.cc (Sized_relobj::do_read_symbols): Don't try to read
+ symbol table when there are no symbols to read.
+
+2008-06-23 Craig Silverstein <csilvers@google.com>
+
+ * version.cc (version_string): Bump to 1.7
+
+2008-06-18 Craig Silverstein <csilvers@google.com>
+
+ * powerpc.cc (Powerpc_relocate_functions::addr16_ha): cast
+ constant 0xFFFF to type Valtype.
+ (Powerpc_relocate_functions::rel16_ha): Likewise.
+
+2008-06-17 Ian Lance Taylor <iant@google.com>
+
+ * output.h (Output_section::Input_section): Initialize p2align_ to
+ zero for Output_section_data constructors.
+ (Output_section::Input_section::addralign): If not an input
+ section, return the alignment of the Output_section_data.
+ * testsuite/copy_test.cc: New file.
+ * testsuite/copy_test_1.cc: New file.
+ * testsuite/copy_test_2.cc: New file.
+ * testsuite/Makefile.am (check_PROGRAMS): Add copy_test.
+ (copy_test_SOURCES, copy_test_DEPENDENCIES): New variables.
+ (copy_test_LDFLAGS, copy_test_LDADD): New variables.
+ (copy_test_1_pic.o, copy_test_1.so): New targets.
+ (copy_test_2_pic.o, copy_test_2.so): New targets.
+ * testsuite/Makefile.in: Rebuild.
+
+ * script-sections.cc (Script_sections::place_orphan): Initialize
+ local variable exact.
+
+2008-06-13 David Edelsohn <edelsohn@gnu.org>
+
+ * powerpc.cc (Output_data_plt_powerpc::do_write): 8 + 4 = 0xC.
+
+2008-06-12 David Edelsohn <edelsohn@gnu.org>
+ David S. Miller <davem@davemloft.net>
+
+ * powerpc.cc: New file.
+ * Makefile.am (TARGETSOURCES): Add powerpc.cc
+ (ALL_TARGETOBJS): Add powerpc.$(OBJEXT)
+ * configure.tgt: Add entries for powerpc-* and powerpc64-*.
+ * Makefile.in: Rebuild.
+
+2008-06-09 Ian Lance Taylor <iant@google.com>
+
+ * testsuite/relro_test.cc: Include <cstdio>, <cstdlib>, and
+ <exception>.
+ (throwing, orig_terminate): New static variables.
+ (terminate_handler): New static function.
+ (t2): Set terminate handler.
+
+2008-06-05 Kris Van Hees <kris.van.hees@oracle.com>
+
+ PR 6584
+ * binary.cc (Binary_to_elf::sized_convert): Fix .data
+ alignment.
+
+2008-05-30 Cary Coutant <ccoutant@google.com>
+
+ * archive.cc (Archive::include_all_members) Correct to step
+ over symbol table and extended name table in thin archives.
+
+2008-05-29 Kris Van Hees <kris.van.hees@oracle.com>
+
+ PR 6407
+ * target-reloc.h (relocate_for_relocatable): Fix new_offset
+ calculation.
+
+2008-05-28 Caleb Howe <cshowe@google.com>
+
+ * reduced_debug_output.cc: New file.
+ * reduced_debug_output.h: New file.
+ * options.h (class General_options): 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-05-21 Ian Lance Taylor <iant@google.com>
* mapfile.cc: New file.
* symtab.h (class Symbol): Update declarations.
(class Sized_symbol): Likewise.
* resolve.cc (Symbol::override_version): New function.
- (Symbol::override_base: Call override_version.
+ (Symbol::override_base): Call override_version.
(Symbol::override_base_with_special): Likewise.
* testsuite/ver_script_8.script: New file.
* testsuite/Makefile.am (check_PROGRAMS): Add ver_test_8.