aboutsummaryrefslogtreecommitdiff
path: root/gold/testsuite/Makefile.in
AgeCommit message (Collapse)AuthorFilesLines
2010-02-122010-02-11 Doug Kwan <dougkwan@google.com>Doug Kwan1-3/+17
* arm.cc (Target_arm::Scan::local): Fix bugs in relocation handling. (Target_arm::Scan::global): Ditto. Also remove a comment before the beginning of function. (Target_arm::Relocate::relocate): Remove error messages for MOVW_ABS and MOVT_ABS relocations. Those are non issued in scanning. Fix parameter is_32bit in calls to should_apply_static_reloc. * testsuite/Makefile.am (check_SCRIPTS): Add arm_abs_global.sh. (check_DATA): Add arm_abs_global.stdout. (arm_abs_lib.o, libarm_abs.so, arm_abs_global.o, arm_abs_global, arm_abs_global.stdout): New rules. (MOSTLLYCLEANFILES): Add arm_abs_global * Makefile.in: Regenerate. * testsuite/arm_abs_global.s: New file. * testsuite/arm_abs_global.sh: Ditto. * testsuite/arm_abs_lib.s: Ditto.
2010-02-10 * i386.cc (Relocate::relocate_tls): A local symbol is final if notIan Lance Taylor1-3/+25
shared, not if not position independent. * x86_64.cc (Relocate::relocate_tls): Likewise. * testsuite/Makefile.am (check_PROGRAMS): Add tls_pie_pic_test. (tls_pie_pic_test): New target. * testsuite/Makefile.in: Rebuild.
2010-02-10 * testsuite/Makefile.am (check_PROGRAMS): Add tls_pie_test.Ian Lance Taylor1-2/+33
(tls_test_main_pie.o, tls_test_pie.o): New targets. (tls_test_file2_pie.o, tls_test_c_pie.o, tls_pie_test): Likewise. * testsuite/Makefile.in: Rebuild.
2010-01-12 * target-reloc.h (visibility_error): New inline function.Ian Lance Taylor1-2/+11
(relocate_section): Call visibility_error. * testsuite/Makefile.am (check_DATA): Add protected_3.err. (MOSTLYCLEANFILES): Likewise. (protected_4_pic.o, protected_3.err): New targets. * testsuite/protected_4.cc: New file.
2010-01-11Use --dyn-syms instead of -DsH.J. Lu1-1/+1
2010-01-11 H.J. Lu <hongjiu.lu@intel.com> PR gold/11144 * testsuite/Makefile.am (dynamic_list.stdout): Use --dyn-syms instead of -Ds. * testsuite/Makefile.in: Regenerated.
2010-01-07 * gc.h (Garbage_collection::Cident_section_map): New typedef.Sriraman Tallam1-1/+10
(Garbage_collection::cident_sections): New function. (Garbage_collection::add_cident_section): New function. (Garbage_collection::cident_sections_): New member. (gc_process_relocs): Add references to sections whose names are C identifiers. * gold.h (cident_section_start_prefix): New constant. (cident_section_stop_prefix): New constant. (is_cident): New function. * layout.cc (Layout::define_section_symbols): Replace string constants with the newly defined constants. * object.cc (Sized_relobj::do_layout): Track sections whose names are C identifiers. * testsuite/Makefile.am: Add gc_orphan_section_test. * testsuite/Makefile.in: Regenerate. * testsuite/gc_orphan_section_test.cc: New file. * testsuite/gc_orphan_section_test.sh: New file.
2009-12-31 PR 10979Ian Lance Taylor1-4/+28
* common.cc (Sort_commons::operator()): Stabilize sort when both entries are NULL. (Symbol_table::do_allocate_commons_list): When allocating common symbols, skip a symbol which is no longer common. * symtab.h (Symbol::is_common): Test whether the symbol comes from an object before checking its type. * testsuite/common_test_2.c: New file. * testsuite/common_test_3.c: New file. * testsuite/Makefile.am (check_PROGRAMS): Add common_test_2. (common_test_2_SOURCES, common_test_2_DEPENDENCIES): Define. (common_test_2_LDFLAGS, common_test_2_LDADD): Define. (common_test_2_pic.o, common_test_2.so): New targets. (common_test_3_pic.o, common_test_3.so): New targets. * testsuite/Makefile.in: Rebuild.
2009-12-30 PR 10861Ian Lance Taylor1-1/+1
* script.h (class Version_script_info): Define Language enum. Update declarations. Define Glob, Exact, and Lookup types. Add new fields globals_, locals_, and is_finalized_. * script.cc: Various formatting fixes. (class Parser_closure): Change language_stack_ from a vector of std::string to one of Version_script_info::Language. Adjust all uses accordingly. (class Lazy_demangler): Remove. (struct Version_expression): Change language from std::string to Version_script_info::Language. (Version_script_info::Version_script_info): New function. (Version_script_info::~Version_script_info): Don't call clear. (Version_script_info::finalize): New function. (Version_script_info::build_lookup_tables): New function. (Version_script_info::build_expression_list_lookup): New function. (Version_script_info::get_symbol_version_helper): Rewrite to use lookup tables. (Version_script_info::print_expression_list): Adjust to use Version_script_info::Language. (script_push_lex_into_version_mode): Check that the version script has not been finalized. (version_script_push_lang): Change language string to Version_script_info::Language. * options.cc (Command_line::version_script): New function. * options.h (class General_options): Add finalize_dynamic_list function. Change version_script from declaration to definition. * testsuite/ver_test_4.script: Remove duplicate def of t2_2. * testsuite/version_script.map: Remove duplicate def of foo. * testsuite/Makefile.am (ver_matching_def.so): Depend upon version_script.map. * testsuite/Makefile.in: Rebuild.
2009-12-092009-12-09 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu1-1/+1
* testsuite/Makefile.am (two_file_shared_1_pic_2_test_DEPENDENCIES): Replace two_file_shared_1.so with two_file_shared_2.so. * testsuite/Makefile.in: Regenerated.
2009-12-052009-12-05 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu1-153/+41
* testsuite/Makefile.am (constructor_test_LDADD): New. Empty. (two_file_test_LDADD): Likewise. (common_test_1_LDADD): Likewise. (exception_test_LDADD) Likewise. (weak_test_LDADD): Likewise. (many_sections_test_LDADD): Likewise. (initpri1_LDADD): Likewise. (script_test_1_LDADD): Likewise. (script_test_2_LDADD): Likewise. (justsyms_LDADD): Likewise. (binary_test_LDADD): Likewise. (large_LDADD): Likewise. * testsuite/Makefile.in: Regenerated.
2009-12-04pdaRafael Ávila de Espíndola1-6/+16
2009-10-28 * symtab.cc (add_from_pluginobj): Pass correct value for is_ordinary.Cary Coutant1-13/+42
* testsuite/Makefile.am (plugin_test_5): New test case. * testsuite/Makefile.in: Regenerate.
2009-10-162009-10-16 Doug Kwan <dougkwan@google.com>Doug Kwan1-3/+18
* dynobj.cc (Versions::Versions): Initialize version_script_. Only insert base version symbol definition for a shared object if version script defines any version versions. (Versions::define_base_version): New method definition. (Versions::add_def): Check that base version is not needed. (Versions::add_need): Define base version lazily. * dynobj.h (Versions::define_base_version): New method declaration. (Versions::needs_base_version_): New data member declaration. * testsuite/Makefile.am (check_SCRIPTS): Add no_version_test.sh (check_DATA): Add no_version_test.stdout. (libno_version_test.so, no_version_test.o no_version_test.stdout): New make rules. * testsuite/Makefile.in: Regenerate. * testsuite/no_version_test.c: New file. * testsuite/no_version_test.sh: Ditto.
2009-10-162009-10-16 Doug Kwan <dougkwan@google.com>Doug Kwan1-4/+25
* expression.cc (class Segment_start_expression): New class definition. (Segment_start_expression::value): New method definition. (script_exp_function_segment_start): Return a new Segment_start_expression. * gold/script-c.h (script_saw_segment_start_expression): New function prototype. * script-sections.cc (Script_sections::Script_sections): Initialize SAW_SEGMENT_START_EXPRESSION_ to false. (Script_sections::set_section_addresses): Use -Ttext, -Tdata and -Tbbs options to specify section addresses if given in command line and no SEGMENT_START expression is seen in a script. * script-sections.h (Script_sections::saw_segment_start_expression, Script_sections::set_saw_segment_start_expression): New method definition. (Script_sections::saw_segment_start_expression_): New data member declaration. * script.cc (script_saw_segment_start_expression): New function. * yyscript.y (SEGMENT_START): Call script_saw_segment_start_expression. * testsuite/Makefile.am (check_SCRIPTS): Add script_test_6.sh, script_test_7.sh and script_test_8.sh. (check_DATA): Add script_test_6.stdout, script_test_7.stdout and script_test_8.stdout. (MOSTLYCLEANFILES): Add script_test_6, script_test_7 and script_test_8. (script_test_6, script_test_6.stdout, script_test_7, script_test_7.stdout, script_test_8, script_test_8.stdout): New rules. * Makefile.in: Regenerate. * testsuite/script_test_6.sh: New file. * testsuite/script_test_6.t: Same. * testsuite/script_test_7.sh: Same. * testsuite/script_test_7.t: Same. * testsuite/script_test_8.sh: Same.
2009-10-14 Add support for -pie.Ian Lance Taylor1-9/+53
* options.h (class General_options): Add -pie and --pic-executable. (General_options::output_is_position_independent): Test -pie. (General_options::output_is_executable): Return true if not shared and not relocatable. (General_options::output_is_pie): Remove. * options.cc (General_options::finalize): Reject incompatible uses of -pie. * gold.cc (queue_middle_tasks): A -pie link is not static. * symtab.h (Symbol::needs_plt_entry): Return false if -pie. * symtab.cc (Symbol::final_value_is_known): Return false if output_is_position_independent. * layout.cc (Layout::set_segment_offsets): Start at address 0 if output_is_position_independent. * output.cc (Output_file_header::do_sized_write): Use ET_DYN if output_is_position_independent. * i386.cc (Output_data_plt_i386::do_write): Use the PIC PLT if output_is_position_independent. * testsuite/Makefile.am (check_PROGRAMS): Add basic_pie_test and two_file_pie_test. (basic_pie_test.o, basic_pie_test): New targets. (two_file_test_1_pie.o, two_file_test_1b_pie.o): New targets. (two_file_test_2_pie.o, two_file_test_main_pie.o): New targets. (two_file_pie_test): New target. * testsuite/Makefile.in: Rebuild. * README: Remove note saying that -pie is not supported.
2009-10-13 * gc.h (gc_process_relocs): Check if icf is enabled using newSriraman Tallam1-2/+11
function. * gold.cc (queue_initial_tasks): Likewise. (queue_middle_tasks): Likewise. * object.cc (do_layout): Likewise. * symtab.cc (is_section_folded): Likewise. * main.cc (main): Likewise. * reloc.cc (Read_relocs::run): Likewise. (Sized_relobj::do_scan_relocs): Likewise. * icf.cc (is_function_ctor_or_dtor): New function. (Icf::find_identical_sections): Check if function is ctor or dtor when safe icf is chosen. * options.h (General_options::icf): Change option to be an enum. (Icf_status): New enum. (icf_enabled): New method. (icf_safe_folding): New method. (set_icf_status): New method. (icf_status_): New variable. * (options.cc) (General_options::finalize): Set icf_status_. * testsuite/Makefile.am: Add commands to build icf_safe_test. Modify icf_test and icf_keep_unique_test to use the --icf enum flag. * testsuite/icf_safe_test.sh: New file. * testsuite/icf_safe_test.cc: New file.
2009-10-102009-10-10 Chris Demetriou <cgd@google.com>Chris Demetriou1-5/+35
* options.h (Input_file_argument::Input_file_type): New enum. (Input_file_argument::is_lib_): Replace with... (Input_file_argument::type_): New member. (Input_file_argument::Input_file_argument): Take Input_file_type 'type' rather than boolean 'is_lib' as second argument. (Input_file_argument::is_lib): Use type_. (Input_file_argument::is_searched_file): New function. (Input_file_argument::may_need_search): Handle is_searched_file. * options.cc (General_options::parse_library): Support -l:filename. (General_options::parse_just_symbols): Update for Input_file_argument changes. (Command_line::process): Likewise. * archive.cc (Archive::get_file_and_offset): Likewise. * plugin.cc (Plugin_manager::release_input_file): Likewise. * script.cc (read_script_file, script_add_file): Likewise. * fileread.cc (Input_file::Input_file): Likewise. (Input_file::will_search_for): Handle is_searched_file. (Input_file::open): Likewise. * readsyms.cc (Read_symbols::get_name): Likewise. * testsuite/Makefile.am (searched_file_test): New test. * testsuite/Makefile.in: Regenerate. * testsuite/searched_file_test.cc: New file. * testsuite/searched_file_test_lib.cc: New file.
2009-10-06 * options.h (class General_options): DefineIan Lance Taylor1-3/+76
split_stack_adjust_size parameter. * object.h (class Object): Add uses_split_stack_ and has_no_split_stack_ fields. Add uses_split_stack and has_no_split_stack accessor functions. Declare handle_split_stack_section. (class Reloc_symbol_changes): Define. (class Sized_relobj): Define Function_offsets. Declare split_stack_adjust, split_stack_adjust_reltype, and find_functions. * object.cc (Object::handle_split_stack_section): New function. (Sized_relobj::do_layout): Call handle_split_stack_section. * dynobj.cc (Sized_dynobj::do_layout): Call handle_split_stack_section. * reloc.cc (Sized_relobj::relocate_sections): Call split_stack_adjust for executable sections in split_stack objects. Pass reloc_map to relocate_section. (Sized_relobj::split_stack_adjust): New function. (Sized_relobj::split_stack_adjust_reltype): New function. (Sized_relobj::find_functions): New function. * target-reloc.h: Include "object.h". (relocate_section): Add reloc_symbol_changes parameter. Change all callers. * target.h (class Target): Add calls_non_split method. Declare do_calls_non_split virtual method. Declare match_view and set_view_to_nop. * target.cc: Include "elfcpp.h". (Target::do_calls_non_split): New function. (Target::match_view): New function. (Target::set_view_to_nop): New function. * gold.cc (queue_middle_tasks): Give an error if mixing split-stack and non-split-stack objects with -r. * i386.cc (Target_i386::relocate_section): Add reloc_symbol_changes parameter. (Target_i386::do_calls_non_split): New function. * x86_64.cc (Target_x86_64::relocate_section): Add reloc_symbol_changes parameter. (Target_x86_64::do_calls_non_split): New function. * arm.cc (Target_arm::relocate_section): Add reloc_symbol_changes parameter. * powerpc.cc (Target_powerpc::relocate_section): Add reloc_symbol_changes parameter. * sparc.cc (Target_sparc::relocate_section): Add reloc_symbol_changes parameter. * configure.ac: Call AM_CONDITIONAL for the default target. * configure: Rebuild. * testsuite/Makefile.am (TEST_AS): New variable. (check_SCRIPTS): Add split_i386.sh and split_x86_64.sh. (check_DATA): Add split_i386 and split_x86_64 files. (SPLIT_DEFSYMS): Define. (split_i386_[1234n].o): New targets. (split_i386_[124]): New targets. (split_i386_[1234r].stdout): New targets. (split_x86_64_[1234n].o): New targets. (split_x86_64_[124]): New targets. (split_x86_64_[1234r].stdout): New targets. (MOSTLYCLEANFILES): Add new executables. * testsuite/split_i386.sh: New file. * testsuite/split_x86_64.sh: New file. * testsuite/split_i386_1.s: New file. * testsuite/split_i386_2.s: New file. * testsuite/split_i386_3.s: New file. * testsuite/split_i386_4.s: New file. * testsuite/split_i386_n.s: New file. * testsuite/split_x86_64_1.s: New file. * testsuite/split_x86_64_2.s: New file. * testsuite/split_x86_64_3.s: New file. * testsuite/split_x86_64_4.s: New file. * testsuite/split_x86_64_n.s: New file. * testsuite/testfile.cc (Target_test): Update relocation_section function. * testsuite/Makefile.in: Rebuild.
2009-09-18 * object.cc (Sized_relobj::do_count): Test should_retain_symbol map.Craig Silverstein1-3/+20
* options.cc: Include <cerrno> and <fstream>. (General_options::finalize): Parse -retain-symbols-file tag. * options.h: New flag. (General_options): New method should_retain_symbol, new variable symbols_to_retain. * symtab.cc (Symbol_table::sized_finalize_symbol): Test should_retain_symbol map. * testsuite/Makefile.am (retain_symbols_file_test): New test. * testsuite/Makefile.in: Regenerate. * testsuite/retain_symbols_file_test.sh: New file.
2009-09-16 * testsuite/Makefile.am (MOSTLYCLEANFILES): Add more generated files.Cary Coutant1-40/+54
* testsuite/Makefile.in: Regenerate.
2009-09-08 * output.cc (Output_file::open): Add execute permission to empty file.Cary Coutant1-10/+36
* testsuite/Makefile.am (permission_test): New test. * testsuite/Makefile.in: Regenerate.
2009-08-22Cleanups in binutils makefiles.Ralf Wildenhues1-2/+4
ld/: * Makefile.am (bin_PROGRAMS): Renamed from ... (noinst_PROGRAMS): ... this. (transform): Override, including the renaming of ld-new to ld. (install-exec-local): Installation of ld in $(bindir) not needed here any more. (AM_CPPFLAGS): Renamed from ... (INCLUDES): ... this. (MAINTAINERCLEANFILES): Add ld.1. * Makefile.in: Regenerate. gold/: * Makefile.am (AM_CPPFLAGS): Renamed from ... (INCLUDES): ... this. * testsuite/Makefile.am (AUTOMAKE_OPTIONS): Add -Wno-portability. (AM_CPPFLAGS): Renamed from ... (INCLUDE): ... this. * Makefile.in, testsuite/Makefile.in: Regenerate. bfd/: * Makefile.am (libbfd_la_LDFLAGS): Initialize early, to allow appending. [INSTALL_LIBBFD] (bfdlib_LTLIBRARIES, bfdinclude_HEADERS): Set only in this condition. [!INSTALL_LIBBFD] (noinst_LTLIBRARIES, libbfd_la_LDFLAGS): New, to build but not install libbfd.la in this condition. (install-bfdlibLTLIBRARIES, uninstall-bfdlibLTLIBRARIES) (install_libbfd, install_libbfd): Remove. * Makefile.in: Regenerate. binutils/: * Makefile.am (AM_CPPFLAGS): Renamed from ... (INCLUDES): ... this. (bin2c$(EXEEXT_FOR_BUILD): Adjust rule. (installcheck-local): Renamed from ... (installcheck): ... this. * Makefile.in: Regenerate. gas/: * Makefile.am (YFLAGS): Remove, not needed any more. (AM_CPPFLAGS): Renamed from ... (INCLUDES): ... this. * Makefile.in: Regenerate. gprof/: * Makefile.am (AM_CPPFLAGS): Renamed from ... (INCLUDES): ... this. * Makefile.in: Regenerate. opcodes/: * Makefile.am (libopcodes_la_LDFLAGS): Initialize early. [INSTALL_LIBBFD] (bfdlib_LTLIBRARIES): Set only in this condition. [INSTALL_LIBBFD] (bfdinclude_DATA): New. [!INSTALL_LIBBFD] (noinst_LTLIBRARIES): New. [!INSTALL_LIBBFD] (libopcodes_la_LDFLAGS): Ensure libopcodes.la is built shared even if it is not to be installed. (install-bfdlibLTLIBRARIES,uninstall-bfdlibLTLIBRARIES) (install_libopcodes, uninstall_libopcodes): Remove. (AM_CPPFLAGS): Renamed from ... (INCLUDES): ... this. * Makefile.in: Regenerate.
2009-08-22Regenerate tree using Autoconf 2.64 and Automake 1.11.Ralf Wildenhues1-221/+403
config/: * override.m4 (_GCC_AUTOCONF_VERSION): Bump to 2.64. /: * configure: Regenerate. etc/: * configure: Regenerate. sim/common/: * config.in: Regenerate. * configure: Likewise. sim/iq2000/: * config.in: Regenerate. * configure: Likewise. sim/d10v/: * config.in: Regenerate. * configure: Likewise. sim/igen/: * config.in: Regenerate. * configure: Likewise. sim/m32r/: * config.in: Regenerate. * configure: Likewise. sim/frv/: * config.in: Regenerate. * configure: Likewise. sim/: * avr/config.in: Regenerate. * avr/configure: Likewise. * configure: Likewise. * cris/config.in: Likewise. * cris/configure: Likewise. sim/h8300/: * config.in: Regenerate. * configure: Likewise. sim/mn10300/: * config.in: Regenerate. * configure: Likewise. sim/ppc/: * config.in: Regenerate. * configure: Likewise. sim/erc32/: * config.in: Regenerate. * configure: Likewise. sim/arm/: * config.in: Regenerate. * configure: Likewise. sim/m68hc11/: * config.in: Regenerate. * configure: Likewise. sim/lm32/: * config.in: Regenerate. * configure: Likewise. sim/sh64/: * config.in: Regenerate. * configure: Likewise. sim/v850/: * config.in: Regenerate. * configure: Likewise. sim/cr16/: * config.in: Regenerate. * configure: Likewise. sim/moxie/: * config.in: Regenerate. * configure: Likewise. sim/m32c/: * config.in: Regenerate. * configure: Likewise. sim/mips/: * config.in: Regenerate. * configure: Likewise. sim/mcore/: * config.in: Regenerate. * configure: Likewise. sim/testsuite/d10v-elf/: * configure: Regenerate. sim/testsuite/: * configure: Regenerate. sim/testsuite/frv-elf/: * configure: Regenerate. sim/testsuite/m32r-elf/: * configure: Regenerate. sim/testsuite/mips64el-elf/: * configure: Regenerate. sim/sh/: * config.in: Regenerate. * configure: Likewise. gold/: * Makefile.in: Regenerate. * aclocal.m4: Likewise. * config.in: Likewise. * configure: Likewise. * testsuite/Makefile.in: Likewise. gprof/: * Makefile.in: Regenerate. * aclocal.m4: Likewise. * configure: Likewise. * gconfig.in: Likewise. opcodes/: * Makefile.in: Regenerate. * aclocal.m4: Likewise. * config.in: Likewise. * configure: Likewise. gas/: * Makefile.in: Regenerate. * aclocal.m4: Likewise. * config.in: Likewise. * configure: Likewise. * doc/Makefile.in: Likewise. ld/: * Makefile.in: Regenerate. * aclocal.m4: Likewise. * config.in: Likewise. * configure: Likewise. gdb/: * aclocal.m4: Regenerate. * config.in: Likewise. * configure: Likewise. * gnulib/Makefile.in: Likewise. gdb/doc/: * configure: Regenerate. gdb/gdbserver/: * aclocal.m4: Regenerate. * config.in: Likewise. * configure: Likewise. gdb/testsuite/: * configure: Regenerate. * gdb.hp/configure: Likewise. * gdb.hp/gdb.aCC/configure: Likewise. * gdb.hp/gdb.base-hp/configure: Likewise. * gdb.hp/gdb.compat/configure: Likewise. * gdb.hp/gdb.defects/configure: Likewise. * gdb.hp/gdb.objdbg/configure: Likewise. * gdb.stabs/configure: Likewise. binutils/: * Makefile.in: Regenerate. * aclocal.m4: Likewise. * config.in: Likewise. * configure: Likewise. * doc/Makefile.in: Likewise. bfd/: * Makefile.in: Regenerate. * aclocal.m4: Likewise. * config.in: Likewise. * configure: Likewise. bfd/doc/: * Makefile.in: Regenerate. readline/: * configure: Regenerate. readline/examples/rlfe/: * configure: Regenerate.
2009-08-22Minor fixes in sim, gold, gdb for Autoconf 2.64, Automake 1.11.Ralf Wildenhues1-1/+1
gold/: * Makefile.am (AUTOMAKE_OPTIONS): Add foreign. * testsuite/Makefile.am (AUTOMAKE_OPTIONS): Add foreign. * Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. gdb/: * configure.ac: Use AC_USE_SYSTEM_EXTENSIONS instead of AC_GNU_SOURCE, AC_AIX, AC_ISC_POSIX. sim/common/: * aclocal.m4 (SIM_CHECK_MEMBER): Replace definition with definition of AC_CHECK_MEMBER.
2009-08-12Sriraman Tallam <tmsriram@google.com>Sriraman Tallam1-0/+8
* icf.cc (Icf::find_identical_sections): Unfold symbols that have been maked as --keep-unique. (Icf::unfold_section): New function. * icf.h (Icf::unfold_section): New function. * options.h (General_options::keep_unique): New option. * testsuite/Makefile.am: Add commands to build icf_keep_unique_test. * testsuite/Makefile.in: Regenerate. * testsuite/icf_keep_unique_test.sh: New file. * testsuite/icf_keep_unique_test.cc: New file.
2009-08-12 PR 10471Cary Coutant1-3/+15
* resolve.cc (Symbol_table::resolve): Check for references from dynamic objects to hidden and internal symbols. * testsuite/Makefile.am (hidden_test.sh): New test. * testsuite/Makefile.in: Regenerate. * testsuite/hidden_test.sh: New script. * testsuite/hidden_test_1.c: New test source. * testsuite/hidden_test_main.c: New test source.
2009-08-07*** empty log message ***Sriraman Tallam1-7/+14
2009-08-05*** empty log message ***Sriraman Tallam1-6/+14
2009-06-22 * layout.cc (Layout::make_output_section): CallIan Lance Taylor1-12/+56
Target::new_output_section. (Layout::attach_allocated_section_to_segment): Put large section sections in a separate load segment with the large segment flag set. (Layout::segment_precedes): Sort large data segments after other load segments. (align_file_offset): New static function. (Layout::set_segment_offsets): Use align_file_offset. * output.h (class Output_section): Add is_small_section_ and is_large_section_ fields. (Output_section::is_small_section): New function. (Output_section::set_is_small_section): New function. (Output_section::is_large_section): New function. (Output_section::set_is_large_section): New function. (Output_section::is_large_data_section): New function. (class Output_segment): Add is_large_data_segment_ field. (Output_segment::is_large_data_segment): New function. (Output_segment::set_is_large_data_segment): New function. * output.cc (Output_section::Output_section): Initialize new fields. (Output_segment::Output_segment): Likewise. (Output_segment::add_output_section): Add assertion that large data sections always go in large data segments. Force small data sections to the end of the list of data sections. Force small BSS sections to the start of the list of BSS sections. For large BSS sections to the end of the list of BSS sections. * symtab.h (class Symbol): Declare is_common_shndx. (Symbol::is_defined): Check Symbol::is_common_shndx. (Symbol::is_common): Likewise. (class Symbol_table): Define enum Commons_section_type. Update declarations. Add small_commons_ and large_commons_ fields. * symtab.cc (Symbol::is_common_shndx): New function. (Symbol_table::Symbol_table): Initialize new fields. (Symbol_table::add_from_object): Put small and large common symbols in the right list. (Symbol_table::sized_finalized_symbol): Check Symbol::is_common_shndx. (Symbol_table::sized_write_globals): Likewise. * common.cc (Symbol_table::do_allocate_commons): Allocate new common symbol lists. Don't call do_allocate_commons_list if the list is empty. (Symbol_table::do_allocate_commons_list): Remove is_tls parameter. Add comons_section_type parameter. Change all callers. Handle small and large common symbols. * object.cc (Sized_relobj::do_finalize_local_symbols): Check Symbol::is_common_shndx. * resolve.cc (symbol_to_bits): Likewise. * target.h (Target::small_common_shndx): New function. (Target::small_common_section_flags): New function. (Target::large_common_shndx): New function. (Target::large_common_section_flags): New function. (Target::new_output_section): New function. (Target::Target_info): Add small_common_shndx, large_common_shndx, small_common_section_flags, and large_common_section_flags fields. (Target::do_new_output_section): New virtual function. * arm.cc (Target_arm::arm_info): Initialize new fields. * i386.cc (Target_i386::i386_info): Likewise. * powerpc.cc (Target_powerpc::powerpc_info) [all versions]: Likewise. * sparc.c (Target_sparc::sparc_info) [all versions]: Likewise. * x86_64.cc (Target_x86_64::x86_64_info): Likewise. (Target_x86_64::do_new_output_section): New function. * configure.ac: Define conditional MCMODEL_MEDIUM. * testsuite/Makefile.am (check_PROGRAMS): Add large. (large_SOURCES, large_CFLAGS, large_DEPENDENCIES): Define. (large_LDFLAGS): Define. * testsuite/large.c: New file. * testsuite/testfile.cc (Target_test::test_target_info): Initialize new fields. * configure, testsuite/Makefile.in: Rebuild.
2009-06-052009-06-05 Doug Kwan <dougkwan@google.com>Doug Kwan1-10/+36
* Makefile.am (CCFILES): Add target.cc. * Makefile.in: Regenerate. * i386.cc (class Target_i386): Define new virtual method to override do_is_local_label_name in parent. * object.cc (Sized_relobj::do_count_local_symbols): Discard local symbols if --discard-locals or -X is given. * options.h (class General_options): Declare new options '--discard-locals' and '-X' for discarding locals. * target.h (class Target): Define new methods is_local_label_name. Declare new virtual method do_is_local_label_name. * target.cc: New file. * testsuite/Makefile.am (check_PROGRAMS): Add discard_locals_test. (check_SCRIPTS): Add discard_locals_test.sh. (check_DATA): Add discard_local_tests.syms. (discard_locals_test_SOURCES, discard_locals_test_LDFLAGS): Define. (discard_local_tests.syms, discard_locals_test.o): New make rules. * testsuite/Makefile.in: Regenerate. * testsuite/discard_locals_test.c: New file. * testsuite/discard_locals_test.sh: Same.
2009-06-052009-06-05 Doug Kwan <dougkwan@google.com>Doug Kwan1-12/+33
* object.cc (Sized_relobj::Sized_relobj): Initialize discarded_eh_frame_shndx_ to -1U. (Sized_relobj::do_layout): Record index of a discard .eh_frame section. (Sized_relobj::do_count_local_symbols): Skip local symbols in a discarded .eh_frame section. (Sized_relobj::do_finalize_local_symbols): Ditto. * object.h (class Sized_relobj): Declare new member discarded_eh_frame_shndx_. * testsuite/Makefile.am (check_PROGRAMS): Add local_labels_test. (local_labels_test.o, local_labels_test): New rules. * testsuite/Makefile.in: Regenerate.
2009-05-262009-05-26 Doug Kwan <dougkwan@google.com>Doug Kwan1-9/+13
* options.cc (General_options::parse_exclude_libs). Fix a comment. (General_options::check_excluded_libs): Strip off directories in archive name before matching like GNU ld does. * testsuite/Makefile.am (MOSTLYCLEANFILES, exclude_libs_test_DEPENDENCIES): Add alt/libexclude_libs_test_3.a (exclude_libs_test_LDFLAGS): Add linker option -Wl,--exclude-libs,libexclude_libs_test_3 (exclude_libs_test_LADD): Add alt/libexclude_libs_test_3.a as an explicit archive without using -l. (alt/libexclude_libs_test_3.a): New make rule. * testsuite/Makefile.in: Regenerate. * testsuite/exclude_libs_test.c : Declare lib3_default(). (main): Call it. * exclude_libs_test.sh: Add tests for alt/exclude_libs_test_3.a. * exclude_libs_test_3.c: New file.
2009-05-22 * testsuite/Makefile.am: Add -ffunction-sections to compileSriraman Tallam1-3/+3
gc_comdat_test files. Add -Wl,--gc-sections to build gc_comdat_test. * testsuite/Makefile.in: Regenerate. * testsuite/gc_comdat_test.sh: Fix the condition around grep.
2009-05-22 * object.cc (Sized_relobj::map_to_kept_section): Return NULL if theSriraman Tallam1-42/+52
kept comdat section was garbage collected. * testsuite/Makefile.am: Add test gc_comdat_test.sh. * testsuite/Makefile.in: Regenerate. * testsuite/gc_comdat_test.sh: New file. * testsuite/gc_comdat_test_1.cc: New file. * testsuite/gc_comdat_test_2.cc: New file.
2009-05-192009-05-19 Doug Kwan <dougkwan@google.com>Cary Coutant1-6/+41
* archive.cc (Archive::Archive): Move constructor from archive.h to here. Initialize no_export_. (Archive::get_elf_object_for_member): Set no_export flag of object. * archive.h (Archive::Archive): Move constructor body to archive.cc. (Archive::no_export): New method. (Archive::no_export_): New field. * object.h (Object::Object): Initialize no_export_ to false. (Object::no_export, Object::set_no_export): New methods. (Object::no_export_): New field. * options.cc (General_options::parse_exclude_libs): New method. (General_options::check_excluded_libs) Same. * options.h (exclude_libs): New option. (General_options::check_excluded_libs): New method declaration. (General_options::excluded_libs_): New field. * symtab.cc (Symbol_table::add_from_relobj): Hide symbols with default or protected visibility if an object has no-export flag set. testsuite/Makefile.am (check_PROGRAMS): Add exclude_libs_test. (check_SCRIPTS): Add exclude_libs_test.sh. (check_DATA): Add exclude_libs_test.syms. (MOSTLYCLEANFILES): Add exclude_libs_test.syms, libexclude_libs_test_1.a and libexclude_libs_test_2.a. (exclude_libs_test_SOURCES, exclude_libs_test_DEPENDENCIES, exclude_libs_test_LDFLAGS and exclude_libs_test_LDADD): Define. (exclude_libs_test.syms, libexclude_libs_test_1.a, libexclude_libs_test_2.a): New rules. * testsuite/Makefile.in: Regenerate. * testsuite/exclude_libs_test.c: New file. * testsuite/exclude_libs_test.sh: Ditto. * testsuite/exclude_libs_test_1.c: Ditto. * testsuite/exclude_libs_test_2.c: Ditto.
2009-03-18 * archive.cc (Archive::add_symbols): Check for a version attachedIan Lance Taylor1-11/+27
to the symbol name in the archive map. * testsuite/Makefile.am (check_PROGRAMS): Add ver_test_11. (ver_test_11_SOURCES, ver_test_11_DEPENDENCIES): Define. (ver_test_11_LDFLAGS, ver_test_11_LDADD): Define. (ver_test_11.a): New target. * testsuite/Makefile.in: Rebuild.
2009-03-04 PR 9918Ian Lance Taylor1-41/+45
* target-reloc.h (relocate_section): Pass output_section to relocate. * i386.cc (Target_i386::should_apply_static_reloc): Add output_section parameter. Change all callers. (Target_i386::Relocate::relocate): Add output_section parameter. * x86_64.cc (Target_x86_64::Relocate::relocate): Likewise. * sparc.cc (Target_sparc::Relocate::relocate): Likewise. * powerpc.cc (Target_powerpc::Relocate::relocate): Likewise. * testsuite/two_file_shared.sh: New script. * testsuite/Makefile.am (check_SCRIPTS): Add two_file_shared.sh. (check_DATA): Add two_file_shared.dbg. (two_file_shared.dbg): New target. * testsuite/Makefile.in: Rebuild.
2009-02-27 PR 9836Ian Lance Taylor1-6/+10
* symtab.cc (Symbol_table::add_from_object): If the visibility is hidden or internal, force the symbol to be local. * resolve.cc (Symbol::override_visibility): Define. (Symbol::override_base): Use override_visibility. (Symbol_table::resolve): Likewise. (Symbol::override_base_with_special): Likewise. (Symbol_table::override_with_special): If the visibility is hidden or internal, force the symbol to be local. * symtab.h (class Symbol): Add set_visibility and override_visibility. * testsuite/ver_test_1.sh: New file. * testsuite/Makefile.am (check_SCRIPTS): Add ver_test_1.sh. (check_DATA): Add ver_test_1.syms. (ver_test_1.syms): New target. * testsuite/Makefile.in: Rebuild.
2009-02-25 * layout.cc (Layout::choose_output_section): Don't rename sectionsCary Coutant1-1/+8
when using a linker script that has a SECTIONS clause. * Makefile.in: Regenerate. * testsuite/Makefile.am (script_test_5.sh): New test case. * testsuite/Makefile.in: Regenerate. * testsuite/script_test_5.cc: New file. * testsuite/script_test_5.sh: New file. * testsuite/script_test_5.t: New file.
2009-01-15 * archive.cc (Archive::get_elf_object_for_member): Remove callCary Coutant1-7/+36
to File_read::claim_for_plugin. * descriptors.cc (Descriptors::open): Remove reference to is_claimed. (Descriptors::claim_for_plugin): Remove. * descriptors.h (Descriptors::claim_for_plugin): Remove. (Descriptors::is_claimed): Remove. (claim_descriptor_for_plugin): Remove. * fileread.cc (File_read::claim_for_plugin): Remove. * fileread.h (File_read::claim_for_plugin): Remove. (File_read::descriptor): Reopen descriptor if necessary. * plugin.cc (Plugin::load): Add two new APIs to transfer vector. (Plugin_manager::all_symbols_read): Add task parameter. Change all callers. (Plugin_manager::get_input_file): New function. (Plugin_manager::release_input_file): New function. (Pluginobj::Pluginobj): Add filesize parameter and initialize corresponding data member. (Sized_pluginobj::Sized_pluginobj): Add filesize parameter and pass to base constructor. Change all callers. (get_input_file, release_input_file): New functions. (make_sized_plugin_object): Add filesize parameter. Change all callers. * plugin.h (Plugin_manager::Plugin_manager): Initialize task_ member. (Plugin_manager::all_symbols_read): Add task parameter. (Plugin_manager::get_input_file): New function. (Plugin_manager::release_input_file): New function. (Plugin_manager::task_): New data member. (Pluginobj::Pluginobj): Add filesize parameter. (Pluginobj::filename): New function. (Pluginobj::descriptor): New function. (Pluginobj::filesize): New function. (Pluginobj::filesize_): New data member. (Sized_pluginobj::Sized_pluginobj): Add filesize parameter. * readsyms.cc (Read_symbols::do_read_symbols): Remove call to File_read::claim_for_plugin; use Object::unlock to unlock the file. * testsuite/Makefile.am (plugin_test_4): New test case for plugins with archive libraries. * testsuite/Makefile.in: Regenerate. * testsuite/plugin_test.c (struct sym_info): New type. (get_input_file, release_input_file): New static variables. (onload): Capture new transfer vector entries. (claim_file_hook): Stop reading at end of file according to filesize. Factor out parsing of readelf output into separate function. (all_symbols_read_hook): Exercise get_input_file and release_input_file APIs and get the source file name from the symbol table. Convert source file name to corresponding object file name. Print info message when adding new input files. (parse_readelf_line): New function. * testsuite/plugin_test_1.sh: Add checks for new info messages. * testsuite/plugin_test_2.sh: Likewise. * testsuite/plugin_test_3.sh: Likewise. * testsuite/plugin_test_4.sh: New test case.
2008-12-23 * plugin.cc (is_visible_from_outside): New function.Cary Coutant1-12/+38
(Pluginobj::get_symbol_resolution_info): Call is_visible_from_outside so we don't return "IR only" status for exported symbols or -r links. * testsuite/Makefile.am (plugin_test_3): New test case. * testsuite/Makefile.in: Regenerate. * testsuite/plugin_test_3.sh: New file.
2008-12-16 * plugin.cc (Plugin::load): Move LDPT_MESSAGE to front of transferCary Coutant1-4/+7
vector. (Plugin_manager::claim_file): Create plugin object even if plugin did not call the add_symbols callback. (Plugin_obj::get_symbol_resolution_info): Guard against plugin asking for more symbols than were added. * testsuite/Makefile.am (plugin_test_1): Add test case with no global symbols. (empty.syms): New target. * testsuite/Makefile.in: Regenerate. * testsuite/plugin_test.c (claim_file_hook): Add new debug message. Don't call add_symbols if no globals. (all_symbols_read_hook): Don't provide replacement for empty claimed file.
2008-12-052008-12-05 Rafael Avila de Espindola <espindola@google.com>Cary Coutant1-1/+1
* options.cc (General_options::parse_plugin_opt): New. (General_options::add_plugin): The argument now is just the filename. (General_options::add_plugin_option): New. * options.h (plugin_opt): New. (add_plugin): Change argument name. (add_plugin_option): New. * plugin.cc (Plugin::load): Don't parse the plugin option. * plugin.h (Plugin::Plugin): Rename argument. Init filename_. (Plugin::add_option): New. (Plugin::args_): Change type. (Plugin::filename_): New. (Plugin_manager::add_plugin_option): New. * testsuite/Makefile.am (plugin_test_1): Use new syntax. * testsuite/Makefile.in: Regenerate.
2008-11-06 * options.cc (General_options::parse_dynamic_list): New function.Craig Silverstein1-5/+18
* options.h (General_options): New flags dynamic_list, dynamic_list_data, dynamic_list_cpp_new, and dynamic_list_cpp_typeinfo. New variable dynamic_list_. (General_options::in_dynamic_list): New function. * script.cc (Lex::Mode): New enum DYNAMIC_LIST. (Lex::can_start_name): Add support for DYNAMIC_LIST mode. (Lex::can_continue_name): Likewise. (yylex): Likewise. (read_script_file): New parameter script_options. (read_dynamic_list): New function. (Script_options::define_dynamic_list): New function. (dynamic_list_keyword_parsecodes): New variable. (dynamic_list_keywords): New variable. * script.h (Script_options::define_dynamic_list): New function prototype. (read_dynamic_list): New function prototype. * symtab.cc (strprefix): New macro. (Symbol::should_add_dynsym_entry): Support dynamic_list, dynamic_list_data, dynamic_list_cpp_new, and dynamic_list_cpp_typeinfo. * yyscript.y (PARSING_DYNAMIC_LIST): New token. (dynamic_list_expr): New rule. (dynamic_list_nodes): Likewise. (dynamic_list_node): Likewise. * testsuite/Makefile.am (dynamic_list): New test. * testsuite/Makefile.in: Regenerated. * testsuite/dynamic_list.t: New file. * testsuite/dynamic_list.sh: New file.
2008-09-29 * archive.cc (Archive::get_file_and_offset): Use filename insteadCary Coutant1-2/+57
of name to get library path. (Archive::include_member): Unlock external member of a thin archive. * testsuite/Makefile.am (TEST_AR): New variable. (thin_archive_test_1): New test. (thin_archive_test_2): New test.
2008-09-19Add plugin functionality for link-time optimization (LTO).Cary Coutant1-38/+132
include/: * plugin-api.h: New file. gold/: * configure.ac (plugins): Add --enable-plugins option. * configure: Regenerate. * config.in: Regenerate. * Makefile.am (LIBDL): New variable. (CCFILES): Add plugin.cc. (HFILES): Add plugin.h. (ldadd_var): Add LIBDL. * Makefile.in: Regenerate. * archive.cc: Include "plugin.h". (Archive::setup): Don't preread archive symbols when using a plugin. (Archive::get_file_and_offset): Add memsize parameter. Change callers. (Archive::get_elf_object_for_member): Call plugin hooks for claiming files. (Archive::include_member): Add symbols from plugin objects. * archive.h (Archive::get_file_and_offset): Add memsize parameter. * descriptors.cc (Descriptors::open): Check for file descriptors abandoned by plugins. (Descriptors::claim_for_plugin): New function. * descriptors.h (Descriptors::claim_for_plugin): New function. (Open_descriptor::is_claimed): New field. (claim_descriptor_for_plugin): New function. * fileread.cc (File_read::claim_for_plugin): New function. * fileread.h (File_read::claim_for_plugin): New function. (File_read::descriptor): New function. * gold.cc: Include "plugin.h". (queue_initial_tasks): Add task to call plugin hooks for generating new object files. * main.cc: Include "plugin.h". (main): Load plugin libraries. * object.h (Pluginobj): Declare. (Object::pluginobj): New function. (Object::do_pluginobj): New function. (Object::set_target): New function. * options.cc: Include "plugin.h". (General_options::parse_plugin): New function. (General_options::General_options): Initialize plugins_ field. (General_options::add_plugin): New function. * options.h (Plugin_manager): Declare. (General_options): Add --plugin option. (General_options::has_plugins): New function. (General_options::plugins): New function. (General_options::add_plugin): New function. (General_options::plugins_): New field. * plugin.cc: New file. * plugin.h: New file. * readsyms.cc: Include "plugin.h". (Read_symbols::do_read_symbols): Check for archive before checking for ELF file. Call plugin hooks to claim files. * resolve.cc (Symbol_table::resolve): Record when symbol is referenced from a real object file; force override when processing replacement files. * symtab.cc (Symbol::init_fields): Initialize in_real_elf_ field. (Symbol::init_base_object): Likewise. (Symbol::init_base_output_data): Likewise. (Symbol::init_base_output_segment): Likewise. (Symbol::init_base_constant): Likewise. (Symbol::init_base_undefined): Likewise. (Symbol::output_section): Assert that object is not a plugin. (Symbol_table::add_from_pluginobj): New function. (Symbol_table::sized_finalize_symbol): Treat symbols from plugins as undefined. (Symbol_table::sized_write_globals): Likewise. (Symbol_table::add_from_pluginobj): Instantiate template. * symtab.h (Sized_pluginobj): Declare. (Symbol::in_real_elf): New function. (Symbol::set_in_real_elf): New function. (Symbol::in_real_elf_): New field. (Symbol_table::add_from_pluginobj): New function. * testsuite/Makefile.am (AM_CFLAGS): New variable. (LIBDL): New variable. (LDADD): Add LIBDL. (check_PROGRAMS): Add plugin_test_1 and plugin_test_2. (check_SCRIPTS): Add plugin_test_1.sh and plugin_test_2.sh. (check_DATA): Add plugin_test_1.err and plugin_test_2.err. (MOSTLYCLEANFILES): Likewise. * testsuite/Makefile.in: Regenerate. * testsuite/plugin_test.c: New file. * testsuite/plugin_test_1.sh: New file. * testsuite/plugin_test_2.sh: New file.
2008-09-16 * target-reloc.h (relocate_section): Check whether a symbol isIan Lance Taylor1-1/+1
defined by the ABI before reporting an undefined symbol error. * target.h (Target::is_defined_by_abi): Make parameter const. (Target::do_is_defined_by_abi): Likewise. * i386.cc (Target_i386::do_is_defined_by_abi): Likewise. * powerpc.cc (Target_powerpc::do_is_defined_by_abi): Likewise. * sparc.cc (Target_sparc::do_is_defined_by_abi): Likewise. * x86_64.cc (Target_x86_64::do_is_defined_by_abi): Likewise. * testsuite/Makefile.am (tls_test_shared.so): Add -Wl,-z,defs. * testsuite/Makefile.in: Rebuild.
2008-08-13 * layout.cc (Layout::attach_allocated_section_to_segment): Don'tIan Lance Taylor1-7/+25
set tls_segment_ or relro_segment_. (Layout::make_output_segment): Set tls_segment_ and relro_segment_ when appropriate. * output.h (Output_section::clear_is_relro): New function. * output.cc (Output_segment::add_output_section): Handle SHF_TLS sections specially even when output_data_ is empty. (Output_segment::maximum_alignment): When first section is relro, only force alignment for PT_LOAD segments. * script.cc (script_data_segment_align): New function. (script_data_segment_relro_end): New function. * script-c.h (script_data_segment_align): Declare. (script_data_segment_relro_end): Declare. * script-sections.h (class Script_sections): Declare data_segment_align and data_segment_relro_end. Add fields segment_align_index_ and saw_relro_end_. * script-sections.cc (class Sections_element): Add set_is_relro virtual function. Add new bool* parameter to place_orphan_here. Add get_output_section virtual function. (class Output_section_definition): Add set_is_relro. Add new bool* parameter to place_orphan_here. Add get_output_section. Add is_relro_ field. (Output_section_definition::Output_section_definition): Initialize evaluated_address_, evaluated_load_address, evaluated_addralign_, and is_relro_ fields. (Output_section_definition::place_orphan_here): Add is_relro parameter. (Output_section_definition::set_section_addresses): Set relro for output section. (Output_section_definition::alternate_constraint): Likewise. (class Orphan_output_section): Add new bool* parameter to place_orphan_here. Add get_output_section. (Orphan_output_section::place_orphan_here): Add is_relro parameter. (Script_sections::Script_sections): Initialize data_segment_align_index_ and saw_relro_end_. (Script_sections::data_segment_align): New function. (Script_sections::data_segment_relro_end): New function. (Script_sections::place_orphan): Set or clear is_relro. (Script_sections::set_section_addresses): Force alignment of first TLS section. * yyscript.y (exp): Call script_data_segment_align and script_data_segment_relro_end. * testsuite/relro_script_test.t: New file. * testsuite/relro_test.cc (using_script): Declare. (t1, t2): Test using_script. * testsuite/Makefile.am (check_PROGRAMS): Add relro_script_test. (relro_script_test_SOURCES): Define. (relro_script_test_DEPENDENCIES): Define. (relro_script_test_LDFLAGS): Define. (relro_script_test_LDADD): Define. (relro_script_test.so): New target. * testsuite/Makefile.in: Rebuild.
2008-08-04 * symtab.h (Symbol::use_plt_offset): New function.Ian Lance Taylor1-44/+67
* i386.cc (Relocate::relocate): Call Symbol::use_plt_offset. * powerpc.cc (Relocate::relocate): Likewise. * sparc.cc (Relocate::relocate): Likewise. * x86_64.cc (Relocate::relocate): Likewise. * testsuite/weak_plt.sh: New test. * testsuite/weak_plt_main.cc: New test. * testsuite/weak_plt_shared.cc: New test. * testsuite/Makefile.am (check_SCRIPTS): Add weak_plt.sh. (check_PROGRAMS): Add weak_plt. (check_DATA): Add weak_plt_shared.so. (weak_plt_main_pic.o, weak_plt): New targets. (weak_plt_shared_pic.o, weak_plt_shared.so): New targets. * testsuite/Makefile.in: Rebuild. * testsuite/Makefile.am (weak_alias_test_1.so): Depend upon gcctestdir/ld. (weak_alias_test_2.so, weak_alias_test_4.so): Likewise. * testsuite/Makefile.in: Rebuild.
2008-07-23 PR 6647Ian Lance Taylor1-2/+6
* 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.