diff options
author | Ian Lance Taylor <iant@google.com> | 2007-09-04 20:00:53 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2007-09-04 20:00:53 +0000 |
commit | 193a53d920ac7248cf6a3d8e36f74e9b9100b93b (patch) | |
tree | fe5c87514693b22f2705d4f8d92fd94d7978781e /gold/symtab.cc | |
parent | 64707334c75cdf16a0c2d317fc381c9b158beed9 (diff) | |
download | gdb-193a53d920ac7248cf6a3d8e36f74e9b9100b93b.zip gdb-193a53d920ac7248cf6a3d8e36f74e9b9100b93b.tar.gz gdb-193a53d920ac7248cf6a3d8e36f74e9b9100b93b.tar.bz2 |
Add support for --enable-target to control which template
specializations we generate.
Diffstat (limited to 'gold/symtab.cc')
-rw-r--r-- | gold/symtab.cc | 72 |
1 files changed, 50 insertions, 22 deletions
diff --git a/gold/symtab.cc b/gold/symtab.cc index e4acb31..b7f4aaa 100644 --- a/gold/symtab.cc +++ b/gold/symtab.cc @@ -809,13 +809,25 @@ Symbol_table::do_define_in_output_data( Sized_symbol<size>* sym; if (target->is_big_endian()) - sym = this->define_special_symbol SELECT_SIZE_ENDIAN_NAME(size, true) ( - target, name, version, only_if_ref - SELECT_SIZE_ENDIAN(size, true)); + { +#if defined(HAVE_TARGET_32_BIG) || defined(HAVE_TARGET_64_BIG) + sym = this->define_special_symbol SELECT_SIZE_ENDIAN_NAME(size, true) ( + target, name, version, only_if_ref + SELECT_SIZE_ENDIAN(size, true)); +#else + gold_unreachable(); +#endif + } else - sym = this->define_special_symbol SELECT_SIZE_ENDIAN_NAME(size, false) ( - target, name, version, only_if_ref - SELECT_SIZE_ENDIAN(size, false)); + { +#if defined(HAVE_TARGET_32_LITTLE) || defined(HAVE_TARGET_64_LITTLE) + sym = this->define_special_symbol SELECT_SIZE_ENDIAN_NAME(size, false) ( + target, name, version, only_if_ref + SELECT_SIZE_ENDIAN(size, false)); +#else + gold_unreachable(); +#endif + } if (sym == NULL) return NULL; @@ -1494,50 +1506,59 @@ Warnings::issue_warning(const Symbol* sym, const std::string& location) const // script to restrict this to only the ones needed for implemented // targets. +#ifdef HAVE_TARGET_32_LITTLE template void -Symbol_table::add_from_relobj<32, true>( - Sized_relobj<32, true>* relobj, +Symbol_table::add_from_relobj<32, false>( + Sized_relobj<32, false>* relobj, const unsigned char* syms, size_t count, const char* sym_names, size_t sym_name_size, Symbol** sympointers); +#endif +#ifdef HAVE_TARGET_32_BIG template void -Symbol_table::add_from_relobj<32, false>( - Sized_relobj<32, false>* relobj, +Symbol_table::add_from_relobj<32, true>( + Sized_relobj<32, true>* relobj, const unsigned char* syms, size_t count, const char* sym_names, size_t sym_name_size, Symbol** sympointers); +#endif +#ifdef HAVE_TARGET_64_LITTLE template void -Symbol_table::add_from_relobj<64, true>( - Sized_relobj<64, true>* relobj, +Symbol_table::add_from_relobj<64, false>( + Sized_relobj<64, false>* relobj, const unsigned char* syms, size_t count, const char* sym_names, size_t sym_name_size, Symbol** sympointers); +#endif +#ifdef HAVE_TARGET_64_BIG template void -Symbol_table::add_from_relobj<64, false>( - Sized_relobj<64, false>* relobj, +Symbol_table::add_from_relobj<64, true>( + Sized_relobj<64, true>* relobj, const unsigned char* syms, size_t count, const char* sym_names, size_t sym_name_size, Symbol** sympointers); +#endif +#ifdef HAVE_TARGET_32_LITTLE template void -Symbol_table::add_from_dynobj<32, true>( - Sized_dynobj<32, true>* dynobj, +Symbol_table::add_from_dynobj<32, false>( + Sized_dynobj<32, false>* dynobj, const unsigned char* syms, size_t count, const char* sym_names, @@ -1545,11 +1566,13 @@ Symbol_table::add_from_dynobj<32, true>( const unsigned char* versym, size_t versym_size, const std::vector<const char*>* version_map); +#endif +#ifdef HAVE_TARGET_32_BIG template void -Symbol_table::add_from_dynobj<32, false>( - Sized_dynobj<32, false>* dynobj, +Symbol_table::add_from_dynobj<32, true>( + Sized_dynobj<32, true>* dynobj, const unsigned char* syms, size_t count, const char* sym_names, @@ -1557,11 +1580,13 @@ Symbol_table::add_from_dynobj<32, false>( const unsigned char* versym, size_t versym_size, const std::vector<const char*>* version_map); +#endif +#ifdef HAVE_TARGET_64_LITTLE template void -Symbol_table::add_from_dynobj<64, true>( - Sized_dynobj<64, true>* dynobj, +Symbol_table::add_from_dynobj<64, false>( + Sized_dynobj<64, false>* dynobj, const unsigned char* syms, size_t count, const char* sym_names, @@ -1569,11 +1594,13 @@ Symbol_table::add_from_dynobj<64, true>( const unsigned char* versym, size_t versym_size, const std::vector<const char*>* version_map); +#endif +#ifdef HAVE_TARGET_64_BIG template void -Symbol_table::add_from_dynobj<64, false>( - Sized_dynobj<64, false>* dynobj, +Symbol_table::add_from_dynobj<64, true>( + Sized_dynobj<64, true>* dynobj, const unsigned char* syms, size_t count, const char* sym_names, @@ -1581,5 +1608,6 @@ Symbol_table::add_from_dynobj<64, false>( const unsigned char* versym, size_t versym_size, const std::vector<const char*>* version_map); +#endif } // End namespace gold. |