aboutsummaryrefslogtreecommitdiff
path: root/gold/symtab.cc
AgeCommit message (Collapse)AuthorFilesLines
2008-04-09 * symtab.cc (Symbol_table::add_from_dynobj): Only look for weakIan Lance Taylor1-1/+5
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-09 * options.h (class General_options): Define --wrap as a specialIan Lance Taylor1-0/+67
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.
2008-03-29 * symtab.cc (Symbol_table::do_define_as_constant): Don't force aIan Lance Taylor1-2/+7
version symbol to be local. * testsuite/ver_test_4.sh: New file. * testsuite/Makefile.am (check_SCRIPTS): Add ver_test_4.sh. (check_DATA): Add ver_test_4.syms. (ver_test_4.syms): New target. * testsuite/Makefile.in: Rebuild.
2008-03-29 * symtab.cc (Symbol_table::add_from_object): If we don't use theIan Lance Taylor1-0/+2
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-27 * symtab.cc (Symbol_table::add_from_object): Handle saw_undefined_Ian Lance Taylor1-3/+7
and commons_ correctly when NAME/VERSION does not override NAME/NULL. * testsuite/ver_test_6.c: New file. * testsuite/Makefile.am (check_PROGRAMS): Add ver_test_6 (ver_test_6_SOURCES, ver_test_6_DEPENDENCIES): New variables. (ver_test_6_LDFLAGS, ver_test_6_LDADD): New variables.
2008-03-27 * symtab.cc (Symbol_table::add_from_relobj): Don't set the versionIan Lance Taylor1-1/+5
of an undefined symbol from a version script. * testsuite/Makefile.am (ver_test_5.so): New target. (ver_test_5.o): New target. (check_SCRIPTS): Add ver_test_5.sh. (check_DATA): Add ver_test_5.syms. (ver_test_5.syms): New target. * testsuite/ver_test_5.cc: New file. * testsuite/ver_test_5.script: New file. * testsuite/ver_test_5.sh: New file. * Makefile.in, testsuite/Makefile.in: Rebuild.
2008-03-26 PR gold/5986Ian Lance Taylor1-0/+2
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-25 * i386.cc (Target_i386::Got_type): New enum declaration.Cary Coutant1-2/+1
(Target_i386::Scan::local): Updated callers of Output_data_got member functions. (Target_i386::Scan::global): Likewise. (Target_i386::Relocate::relocate): Likewise. (Target_i386::Relocate::relocate_tls): Likewise. * object.h (Got_offset_list): New class. (Sized_relobj::local_has_got_offset): Added got_type parameter. (Sized_relobj::local_got_offset): Likewise. (Sized_relobj::set_local_got_offset): Likewise. (Sized_relobj::local_has_tls_got_offset): Removed. (Sized_relobj::local_tls_got_offset): Removed. (Sized_relobj::set_local_tls_got_offset): Removed. (Sized_relobj::Local_got_offsets): Changed to store a list of offsets. * output.cc (Output_data_got::add_global): Added got_type parameter. (Output_data_got::add_global_with_rel): Likewise. (Output_data_got::add_global_with_rela): Likewise. (Output_data_got::add_global_pair_with_rel): New function. (Output_data_got::add_global_pair_with_rela): New function. (Output_data_got::add_local): Added got_type parameter. (Output_data_got::add_local_with_rel): Likewise. (Output_data_got::add_local_with_rela): Likewise. (Output_data_got::add_local_pair_with_rel): New function. (Output_data_got::add_local_pair_with_rela): New function. (Output_data_got::add_global_tls): Removed. (Output_data_got::add_global_tls_with_rel): Removed. (Output_data_got::add_global_tls_with_rela): Removed. (Output_data_got::add_local_tls): Removed. (Output_data_got::add_local_tls_with_rel): Removed. (Output_data_got::add_local_tls_with_rela): Removed. * output.h (Output_data_got::add_global): Added got_type parameter. (Output_data_got::add_global_with_rel): Likewise. (Output_data_got::add_global_with_rela): Likewise. (Output_data_got::add_global_pair_with_rel): New function. (Output_data_got::add_global_pair_with_rela): New function. (Output_data_got::add_local): Added got_type parameter. (Output_data_got::add_local_with_rel): Likewise. (Output_data_got::add_local_with_rela): Likewise. (Output_data_got::add_local_pair_with_rel): New function. (Output_data_got::add_local_pair_with_rela): New function. (Output_data_got::add_global_tls): Removed. (Output_data_got::add_global_tls_with_rel): Removed. (Output_data_got::add_global_tls_with_rela): Removed. (Output_data_got::add_local_tls): Removed. (Output_data_got::add_local_tls_with_rel): Removed. (Output_data_got::add_local_tls_with_rela): Removed. * resolve.cc (Symbol::override_base_with_special): Removed reference to has_got_offset_ field. * symtab.cc (Symbol::init_fields): Replaced initialization of got_offset_ with got_offsets_. Removed initialization of has_got_offset_ *symtab.h (Symbol::has_got_offset): Aded got_type parameter. (Symbol::got_offset): Likewise. (Symbol::set_got_offset): Likewise. (Symbol::has_tls_got_offset): Removed. (Symbol::tls_got_offset): Removed. (Symbol::set_tls_got_offset): Removed. (Symbol::got_offset_): Removed. (Symbol::tls_mod_got_offset_): Removed. (Symbol::tls_pair_got_offset_): Removed. (Symbol::got_offsets_): New field. (Symbol::has_got_offset): Removed. (Symbol::has_tls_mod_got_offset): Removed. (Symbol::has_tls_pair_got_offset): Removed. * x86_64.cc (Target_x86_64::Got_type): New enum declaration. (Target_x86_64::Scan::local): Updated callers of Output_data_got member functions. (Target_x86_64::Scan::global): Likewise. (Target_x86_64::Relocate::relocate): Likewise. (Target_x86_64::Relocate::relocate_tls): Likewise.
2008-03-24 * options.cc: Include "demangle.h".Ian Lance Taylor1-1/+1
(parse_optional_string): New function. (parse_long_option): Handle takes_optional_argument. (parse_short_option): Update dash_z initializer. Handle takes_optional_argument. (General_options::General_options): Initialize do_demangle_. (General_options::finalize): Set do_demangle_. Handle demangling style. * options.h (parse_optional_string): Declare. (struct One_option): Add optional_arg field. Update constructor. Update call constructor calls. Add takes_optional_argument function. (DEFINE_var): Add optional_arg__ parameter. Change all callers. (DEFINE_optional_string): Define. (General_options::demangle): Change from DEFINE_bool to DEFINE_optional_string. (General_options::no_demangle): New function. (General_options::do_demangle): New function. (General_options::set_do_demangle): New function. (General_options::execstack_status_): Move definition to end of class definition. (General_options::static_): Likewise. (General_options::do_demangle_): New field. * object.cc (big_endian>::get_symbol_location_info): Call Options::do_demangle, not Options::demangle. * symtab.cc (demangle): Likewise.
2008-03-14Don't get confused about whether a symbol is the default version if weIan Lance Taylor1-1/+2
see a later reference to it. Add tests for this case.
2008-02-29Remove gcc 3.2 compatibility hacks.Ian Lance Taylor1-43/+25
2008-02-28Support -d/--define-common.Ian Lance Taylor1-4/+7
2008-02-28From Craig Silverstein: Have Parameters point to General_options.Ian Lance Taylor1-97/+67
2008-02-13Assignments in linker scripts override definitions from object files.Ian Lance Taylor1-7/+13
2008-02-09Track sections for expressions.Ian Lance Taylor1-6/+43
2008-02-07Even when stripping all symbols, we need to write out the dynamicIan Lance Taylor1-2/+6
symbol table.
2008-02-07Implement --just-symbols, including -R FILE. Fix symbol values whenIan Lance Taylor1-4/+39
doing a relocatable link.
2008-02-06Support creating empty output when there are no input objects.Ian Lance Taylor1-2/+2
2008-02-04Fully implement the SECTIONS clause.Ian Lance Taylor1-6/+29
2008-02-01From Cary Coutant: Ignore hidden symbols in a dynamic object.Ian Lance Taylor1-2/+5
2008-01-26Don't pass around the target in order to define symbols; get it fromIan Lance Taylor1-44/+47
the parameters instead.
2008-01-24Originally from Craig Silverstein, with changes: support using aIan Lance Taylor1-134/+221
version script to force symbols to be local.
2008-01-15From Andrew Chatham and Craig Silverstein: Add support for versionIan Lance Taylor1-15/+33
scripts.
2008-01-09Support assignments and expressions in linker scripts.Ian Lance Taylor1-13/+19
2008-01-02Reduce the number of system calls. Use readv instead of pread. DoIan Lance Taylor1-24/+7
better handling of cached views.
2007-12-21From Cary Coutant: Fix handling of versioned symbols, add some tests.Ian Lance Taylor1-2/+10
2007-12-20Convert more instances of off_t to be 32-bit types.Ian Lance Taylor1-9/+15
2007-12-19Use string length when available when calling Stringpool. CompareIan Lance Taylor1-1/+2
pointers first when looking up Stringpool entries.
2007-12-18Add section_size_type and section_offset_type, use them to replace aIan Lance Taylor1-3/+3
lot of instances of off_t.
2007-12-14Rewrite workqueue. This version eliminates the master thread, andIan Lance Taylor1-12/+13
reduces the amount of locking required to find a new thread to run.
2007-12-14From Craig Silverstein: size hash tables to avoid resizing.Ian Lance Taylor1-2/+3
2007-12-07From Cary Coutant: Fix handling of RELATIVE RELA relocs.Ian Lance Taylor1-1/+0
2007-12-06From Cary Coutant: More support for generating shared libraries.Ian Lance Taylor1-2/+5
2007-12-05Stringpool stats. Also make Symbol_table support functions inline.Ian Lance Taylor1-7/+6
2007-12-04Print symbol table statistics with --stats.Ian Lance Taylor1-0/+14
2007-11-22Add threading support.Ian Lance Taylor1-0/+33
2007-11-17From Craig Silverstein: Quote the symbol name in the ODR violationIan Lance Taylor1-2/+2
message to avoid a gcc collect2 demangling bug.
2007-11-16When looking for ODR violations, only check the file base name. Also,Ian Lance Taylor1-5/+33
never demangle if --no-demangle was used.
2007-11-15Workaround bug in gcc 4.0.3 STL.Ian Lance Taylor1-3/+4
2007-11-15From Craig Silverstein: Add support for --demangle.Ian Lance Taylor1-4/+32
2007-11-14From Craig Silverstein: Report output file name with ODR violationIan Lance Taylor1-3/+4
warning message.
2007-11-14Add heuristics for undefined symbol warnings.Ian Lance Taylor1-25/+51
2007-11-14Revert last patch.Ian Lance Taylor1-2/+1
2007-11-14Support special always-defined symbols for targets.Ian Lance Taylor1-1/+2
2007-11-14Warn about undefined references in shared libraries if we have seenIan Lance Taylor1-0/+20
all the DT_NEEDED entries for that library.
2007-11-14From Craig Silverstein: Rework debug info code a bit, add option forIan Lance Taylor1-50/+2
ODR violations, add test case.
2007-11-13From Craig Silverstein: First cut at detecting ODR violations.Ian Lance Taylor1-10/+109
2007-11-09From Cary Coutant: More shared library support, some refactorization.Ian Lance Taylor1-0/+1
2007-11-09Generate a complete exception frame header. Discard duplicateIan Lance Taylor1-6/+6
exception frame information.
2007-10-23Add support for PT_GNU_STACK.Ian Lance Taylor1-3/+2