aboutsummaryrefslogtreecommitdiff
path: root/gold/configure.ac
AgeCommit message (Collapse)AuthorFilesLines
2008-12-12 * configure.ac: Update test for TLS descriptors: they areIan Lance Taylor1-5/+5
supported as of glibc 2.9. * configure: Rebuild.
2008-09-19Add plugin functionality for link-time optimization (LTO).Cary Coutant1-0/+14
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-07-212008-07-20 Chris Demetriou <cgd@google.com>Chris Demetriou1-0/+14
* 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-05-05 * configure.ac: If targ_extra_obj is set, link it in.Ian Lance Taylor1-0/+3
* configure.tgt: Initialize all variables. (x86_64*): Set targ_extra_obj and targ_extra_size. * configure: Rebuild.
2008-04-17 * common.cc (Symbol_table::allocate_commons): Remove optionsIan Lance Taylor1-0/+16
parameter. Change caller. (Symbol_table::do_allocate_commons): Remove options parameter. Change caller. Just call do_allocate_commons_list twice. (Symbol_table::do_allocate_commons_list): New function, broken out of do_allocate_commons. * common.h (class Allocate_commons_task): Remove options_ field. Update constructor. * symtab.cc (Symbol_table::Symbol_table): Initialize tls_commons_. (Symbol_table::add_from_object): Put TLS common symbols on tls_commons_ list. (Symbol_table::sized_finalize_symbol): Handle STT_TLS symbols which are IN_OUTPUT_DATA. * symtab.h (class Symbol_table): Add tls_commons_ field. Update allocate_commons and do_allocate_commons declarations. Declare do_allocate_commons_list. * gold.cc (queue_middle_tasks): Update creation of Allocate_commons_task to not pass options. * testsuite/Makefile.am (INCLUDES): Add -I.. . (TLS_TEST_C_FLAGS): New variable. (tls_test_c_pic.o): New target. (tls_test_shared.so): Link in tls_test_c_pic.o. (tls_test_c_pic_ie.o): New target. (tls_test_ie_shared.so): Link in tls_test_c_pic_ie.o. (tls_test_DEPENDENCIES, tls_test_LDADD): Add tls_test_c.o. (tls_test_c.o): New target. (tls_pic_test_DEPENDENCIES): Add tls_test_c_pic.o. (tls_pic_test_LDADD): Likewise. (tls_shared_gd_to_ie_test_DEPENDENCIES): Add tls_test_c_pic.o. (tls_shared_gd_to_ie_test_LDADD): Likewise. (tls_test_c_gnu2.o): New target. (tls_shared_gnu2_gd_to_ie_test_DEPENDENCIES): Add tls_test_c_gnu2.o. (tls_shared_gnu2_gd_to_ie_test_LDADD): Likewise. (tls_test_gnu2_shared.so): Link in tls_test_c_gnu2.o. (tls_test_shared_nonpic.so): Link in tls_test_c.o. * testsuite/tls_test.cc: Include "config.h". (t_last): Call t11_last. * testsuite/tls_test.h (t11, t11_last): Declare. * testsuite/tls_test_c.c: New file. * testsuite/tls_test_main.cc (thread_routine): Call t11. * configure.ac: Check for OpenMP support. * configure, config.in, Makefile.in: Rebuild. * testsuite/Makefile.in: Rebuild.
2008-04-17 * configure.ac (FN_PTRS_IN_SO_WITHOUT_PIC): Add sparc64.David S. Miller1-0/+1
* configure: Rebuild.
2008-04-15toplevel/David S. Miller1-18/+19
* configure.ac: Add sparc*-*-* to gold supported targets. * configure: Regenerate. gold/ * sparc.cc: New file. * Makefile.am (TARGETSOURCES): Add sparc.cc (ALL_TARGETOBJS): Add sparc.$(OBJEXT) * configure.tgt: Document targ_extra_size and targ_extra_big_endian. Add entries for sparc-* and sparc64-*. * configure.ac: Handle targ_extra_size and targ_extra_big_endian. * Makefile.in: Rebuild. * configure: Likewise. * po/POTFILES.in: Likewise. * po/gold.pot: Likewise.
2008-04-112008-04-11 Cary Coutant <ccoutant@google.com>Cary Coutant1-0/+21
Add support for TLS descriptors for i386 and x86_64. * i386.cc (Target_i386::Relocate::tls_desc_gd_to_ie): New function. (Target_i386::Relocate::tls_desc_gd_to_le): New function. (Target_i386::Got_type): Add GOT_TYPE_TLS_NOFFSET and GOT_TYPE_TLS_DESC. (Target_i386::got_mod_index_entry): Remove unnecessary code. (Target_i386::Scan::local): Implement R_386_TLS_GOTDESC and R_386_TLS_DESC_CALL relocations. Fix problem with initial-exec relocations. (Target_i386::Scan::global): Fix problem with GD-to-IE relaxation. Implement R_386_TLS_GOTDESC and R_386_TLS_DESC_CALL relocations; Fix problem with initial-exec relocations. (Target_i386::Relocate::relocate_tls): Likewise. (Target_i386::Relocate::tls_gd_to_ie): Fix problem with GD-to-IE relaxation. * output.cc (Output_data_dynamic::Dynamic_entry::write): Add support for section-plus-offset dynamic table entries. * output.h (Output_data_dynamic::add_section_plus_offset): New function. (Output_data_dynamic::Dynamic_entry): Add support for section-plus-offset dynamic table entries. (Output_data_dynamic::Classification): Likewise. (Output_data_dynamic::classification_): Renamed offset_. * x86_64.cc (Target_x86_64::Relocate::tls_desc_gd_to_ie): New function. (Target_x86_64::Relocate::tls_desc_gd_to_le): New function. (Target_x86_64::make_plt_section): New function. (Target_x86_64::reserve_tlsdesc_entries): New function. (Output_data_plt_x86_64::Output_data_plt_x86_64): Add new parameter. (Output_data_plt_x86_64::reserve_tlsdesc_entry): New function. (Output_data_plt_x86_64::has_tlsdesc_entry): New function. (Output_data_plt_x86_64::get_tlsdesc_got_offset): New function. (Output_data_plt_x86_64::get_tlsdesc_plt_offset): New function. (Output_data_plt_x86_64::tlsdesc_plt_entry): New field. (Output_data_plt_x86_64::set_final_data_size): Move out of line; add extra PLT entry for TLS descriptors. (Output_data_plt_x86_64::got_): New field. (Output_data_plt_x86_64::tlsdesc_got_offset_): New field. (Output_data_plt_x86_64::Output_data_plt_x86_64): Initialize new fields. (Output_data_plt_x86_64::do_write): Write extra PLT entry for TLS descriptors. (Target_x86_64::make_plt_entry): Factor out make_plt_section. (Target_x86_64::got_mod_index_entry): Remove unnecessary code. (Target_x86_64::Scan::local): Implement R_386_TLS_GOTDESC and R_386_TLS_DESC_CALL relocations. (Target_x86_64::Scan::global): Likewise. (Target_x86_64::do_finalize_sections): Add dynamic table entries for TLS descriptors. (Relocate::relocate_tls): Fix problem with GD-to-IE relaxation. Implement R_386_TLS_GOTDESC and R_386_TLS_DESC_CALL relocations. (Target_x86_64::Relocate::tls_gd_to_ie): Fix problem with GD-to-IE relaxation. * configure.ac: Export new conditional variables TLS_GNU2_DIALECT and TLS_DESCRIPTORS. * Makefile.in: Rebuild. * configure: Rebuild. * testsuite/Makefile.am (tls_shared_gd_to_ie_test): New target. (tls_test_shared2.so): New target. (tls_shared_gd_to_ie_test_SOURCES): New variable. (tls_shared_gd_to_ie_test_DEPENDENCIES): New variable. (tls_shared_gd_to_ie_test_LDFLAGS): New variable. (tls_shared_gd_to_ie_test_LDADD): New variable. (tls_shared_gnu2_gd_to_ie_test): New target. (tls_test_gnu2.o, tls_test_file2_gnu2.o, tls_test_gnu2_shared2.so): New targets. (tls_shared_gnu2_gd_to_ie_test_SOURCES): New variable. (ls_shared_gnu2_gd_to_ie_test_DEPENDENCIES): New variable. (tls_shared_gnu2_gd_to_ie_test_LDFLAGS): New variable. (tls_shared_gnu2_gd_to_ie_test_LDADD): New variable. (tls_shared_gnu2_test): New target. (tls_test_gnu2_shared.so): New target. (tls_shared_gnu2_test_SOURCES): New variable. (tls_shared_gnu2_test_DEPENDENCIES): New variable. (tls_shared_gnu2_test_LDFLAGS): New variable. (tls_shared_gnu2_test_LDADD): New variable. * testsuite/Makefile.in: Rebuild. * testsuite/Makefile.
2008-04-08 * configure.ac: Export new conditional variable HAVE_ZLIB.Ian Lance Taylor1-0/+1
* 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 * configure.ac: Don't test for objdump, c++filt, or readelf.Ian Lance Taylor1-4/+0
* 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-03-28 * layout.cc (Layout::layout): If we see an input section with aIan Lance Taylor1-0/+8
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-26 PR gold/5986Ian Lance Taylor1-0/+16
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-14Don't get confused about whether a symbol is the default version if weIan Lance Taylor1-0/+2
see a later reference to it. Add tests for this case.
2008-02-29Remove gcc 3.2 compatibility hacks.Ian Lance Taylor1-13/+0
2008-02-06Support creating empty output when there are no input objects.Ian Lance Taylor1-16/+45
2008-01-23Parse a SECTIONS clause in a linker script.Ian Lance Taylor1-2/+2
2008-01-15From Andrew Chatham and Craig Silverstein: Add support for versionIan Lance Taylor1-0/+2
scripts.
2007-11-30From Craig Silverstein: Add support for compressing .debug_str section.Ian Lance Taylor1-0/+3
2007-10-24Use AC_GNU_SOURCE.Ian Lance Taylor1-0/+3
2007-10-17Add infrastructure for threading support.Ian Lance Taylor1-0/+15
2007-10-14Only run static TLS tests on glibc 2.4 or later.Ian Lance Taylor1-5/+27
2007-10-12Add --stats option to print runtime and memory usage statistics.Ian Lance Taylor1-0/+1
2007-10-07Add --version option.Ian Lance Taylor1-3/+4
2007-10-07Add a TLS test case.Ian Lance Taylor1-0/+4
2007-10-04Full support for --sysroot.Ian Lance Taylor1-0/+27
2007-10-02From Craig Silverstein: don't run function pointer non-PIC tests whenIan Lance Taylor1-0/+11
they won't work.
2007-09-30Clean up target handling--only build required files, warn aboutIan Lance Taylor1-3/+19
unsupported targets.
2007-09-25Rework File_read interface. Get file size. Use pread whenIan Lance Taylor1-0/+2
available.
2007-09-22Add bootstrap test.Ian Lance Taylor1-0/+5
2007-09-04Add support for --enable-target to control which templateIan Lance Taylor1-0/+69
specializations we generate.
2006-11-30Added a testsuite. More support for COPY relocations.Ian Lance Taylor1-1/+2
2006-11-14More dynamic object support, initial scripting support.Ian Lance Taylor1-0/+1
2006-10-20Framework for relocation scanning. Implement simple static TLSIan Lance Taylor1-0/+2
relocations.
2006-09-26g++ 3.2.2 portability for grhat.Ian Lance Taylor1-0/+10
2006-09-26More section layout code.Ian Lance Taylor1-0/+5
2006-08-04Initial CVS checkin of goldIan Lance Taylor1-0/+33