specializations we generate.
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
+/* Define to support 32-bit big-endian targets */
+#undef HAVE_TARGET_32_BIG
+
+/* Define to support 32-bit little-endian targets */
+#undef HAVE_TARGET_32_LITTLE
+
+/* Define to support 64-bit big-endian targets */
+#undef HAVE_TARGET_64_BIG
+
+/* Define to support 64-bit little-endian targets */
+#undef HAVE_TARGET_64_LITTLE
+
/* Define to 1 if you have the <tr1/unordered_map> header file. */
#undef HAVE_TR1_UNORDERED_MAP
Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-targets alternative target configurations
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
--disable-nls do not use Native Language Support
ac_config_headers="$ac_config_headers config.h:config.in"
+# Check whether --enable-targets or --disable-targets was given.
+if test "${enable_targets+set}" = set; then
+ enableval="$enable_targets"
+ case "${enableval}" in
+ yes | "")
+ { { echo "$as_me:$LINENO: error: --enable-targets option must specify target names or 'all'" >&5
+echo "$as_me: error: --enable-targets option must specify target names or 'all'" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+ no)
+ enable_targets=
+ ;;
+ *)
+ enable_targets=$enableval
+ ;;
+esac
+else
+ # For now, enable all targets by default
+ enable_targets=all
+
+fi;
+
+# Canonicalize the enabled targets.
+if test -n "$enable_targets"; then
+ for targ in `echo $enable_targets | sed -e 's/,/ /g'`; do
+ result=`$ac_config_sub $targ 2>/dev/null`
+ if test -n "$result"; then
+ canon_targets="$canon_targets $result"
+ else
+ # Permit unrecognized target names, like "all".
+ canon_targets="$canon_targets $targ"
+ fi
+ done
+fi
+
+# See which specific instantiations we need.
+for targ in $target $canon_targets; do
+ targ_32_little=
+ targ_32_big=
+ targ_64_little=
+ targ_64_big=
+ if test "$targ" = "all"; then
+ targ_32_little=yes
+ targ_32_big=yes
+ targ_64_little=yes
+ targ_64_big=yes
+ else
+ case "$targ" in
+ i?86-*) targ_32_little=yes ;;
+ x86_64-*) targ_64_little=yes ;;
+ *)
+ { { echo "$as_me:$LINENO: error: \"target $targ: unknown size and endianness\"" >&5
+echo "$as_me: error: \"target $targ: unknown size and endianness\"" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+ esac
+ fi
+done
+
+if test -n "$targ_32_little"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TARGET_32_LITTLE 1
+_ACEOF
+
+fi
+if test -n "$targ_32_big"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TARGET_32_BIG 1
+_ACEOF
+
+fi
+if test -n "$targ_64_little"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TARGET_64_LITTLE 1
+_ACEOF
+
+fi
+if test -n "$targ_64_big"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TARGET_64_BIG 1
+_ACEOF
+
+fi
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
AM_CONFIG_HEADER(config.h:config.in)
+AC_ARG_ENABLE([targets],
+[ --enable-targets alternative target configurations],
+[case "${enableval}" in
+ yes | "")
+ AC_MSG_ERROR([--enable-targets option must specify target names or 'all'])
+ ;;
+ no)
+ enable_targets=
+ ;;
+ *)
+ enable_targets=$enableval
+ ;;
+esac],
+[# For now, enable all targets by default
+ enable_targets=all
+])
+
+# Canonicalize the enabled targets.
+if test -n "$enable_targets"; then
+ for targ in `echo $enable_targets | sed -e 's/,/ /g'`; do
+ result=`$ac_config_sub $targ 2>/dev/null`
+ if test -n "$result"; then
+ canon_targets="$canon_targets $result"
+ else
+ # Permit unrecognized target names, like "all".
+ canon_targets="$canon_targets $targ"
+ fi
+ done
+fi
+
+# See which specific instantiations we need.
+for targ in $target $canon_targets; do
+ targ_32_little=
+ targ_32_big=
+ targ_64_little=
+ targ_64_big=
+ if test "$targ" = "all"; then
+ targ_32_little=yes
+ targ_32_big=yes
+ targ_64_little=yes
+ targ_64_big=yes
+ else
+ case "$targ" in
+ i?86-*) targ_32_little=yes ;;
+ x86_64-*) targ_64_little=yes ;;
+ *)
+ AC_MSG_ERROR("target $targ: unknown size and endianness")
+ ;;
+ esac
+ fi
+done
+
+if test -n "$targ_32_little"; then
+ AC_DEFINE(HAVE_TARGET_32_LITTLE, 1,
+ [Define to support 32-bit little-endian targets])
+fi
+if test -n "$targ_32_big"; then
+ AC_DEFINE(HAVE_TARGET_32_BIG, 1,
+ [Define to support 32-bit big-endian targets])
+fi
+if test -n "$targ_64_little"; then
+ AC_DEFINE(HAVE_TARGET_64_LITTLE, 1,
+ [Define to support 64-bit little-endian targets])
+fi
+if test -n "$targ_64_big"; then
+ AC_DEFINE(HAVE_TARGET_64_BIG, 1,
+ [Define to support 64-bit big-endian targets])
+fi
+
AC_PROG_CC
AC_PROG_CXX
AC_PROG_YACC
// Instantiate the templates we need. We could use the configure
// script to restrict this to only the ones for implemented targets.
+#ifdef HAVE_TARGET_32_LITTLE
template
class Sized_dynobj<32, false>;
+#endif
+#ifdef HAVE_TARGET_32_BIG
template
class Sized_dynobj<32, true>;
+#endif
+#ifdef HAVE_TARGET_64_LITTLE
template
class Sized_dynobj<64, false>;
+#endif
+#ifdef HAVE_TARGET_64_BIG
template
class Sized_dynobj<64, true>;
+#endif
+#ifdef HAVE_TARGET_32_LITTLE
template
void
Versions::symbol_section_contents<32, false>(
unsigned char**,
unsigned int*
ACCEPT_SIZE_ENDIAN_EXPLICIT(32, false)) const;
+#endif
+#ifdef HAVE_TARGET_32_BIG
template
void
Versions::symbol_section_contents<32, true>(
unsigned char**,
unsigned int*
ACCEPT_SIZE_ENDIAN_EXPLICIT(32, true)) const;
+#endif
+#ifdef HAVE_TARGET_64_LITTLE
template
void
Versions::symbol_section_contents<64, false>(
unsigned char**,
unsigned int*
ACCEPT_SIZE_ENDIAN_EXPLICIT(64, false)) const;
+#endif
+#ifdef HAVE_TARGET_64_BIG
template
void
Versions::symbol_section_contents<64, true>(
unsigned char**,
unsigned int*
ACCEPT_SIZE_ENDIAN_EXPLICIT(64, true)) const;
+#endif
+#ifdef HAVE_TARGET_32_LITTLE
template
void
Versions::def_section_contents<32, false>(
unsigned int*,
unsigned int*
ACCEPT_SIZE_ENDIAN_EXPLICIT(32, false)) const;
+#endif
+#ifdef HAVE_TARGET_32_BIG
template
void
Versions::def_section_contents<32, true>(
unsigned int*,
unsigned int*
ACCEPT_SIZE_ENDIAN_EXPLICIT(32, true)) const;
+#endif
+#ifdef HAVE_TARGET_64_LITTLE
template
void
Versions::def_section_contents<64, false>(
unsigned int*,
unsigned int*
ACCEPT_SIZE_ENDIAN_EXPLICIT(64, false)) const;
+#endif
+#ifdef HAVE_TARGET_64_BIG
template
void
Versions::def_section_contents<64, true>(
unsigned int*,
unsigned int*
ACCEPT_SIZE_ENDIAN_EXPLICIT(64, true)) const;
+#endif
+#ifdef HAVE_TARGET_32_LITTLE
template
void
Versions::need_section_contents<32, false>(
unsigned int*,
unsigned int*
ACCEPT_SIZE_ENDIAN_EXPLICIT(32, false)) const;
+#endif
+#ifdef HAVE_TARGET_32_BIG
template
void
Versions::need_section_contents<32, true>(
unsigned int*,
unsigned int*
ACCEPT_SIZE_ENDIAN_EXPLICIT(32, true)) const;
+#endif
+#ifdef HAVE_TARGET_64_LITTLE
template
void
Versions::need_section_contents<64, false>(
unsigned int*,
unsigned int*
ACCEPT_SIZE_ENDIAN_EXPLICIT(64, false)) const;
+#endif
+#ifdef HAVE_TARGET_64_BIG
template
void
Versions::need_section_contents<64, true>(
unsigned int*,
unsigned int*
ACCEPT_SIZE_ENDIAN_EXPLICIT(64, true)) const;
+#endif
} // End namespace gold.
if (target->get_size() == 32)
{
if (target->is_big_endian())
- this->sized_create_version_sections SELECT_SIZE_ENDIAN_NAME(32, true)(
- versions, local_symcount, dynamic_symbols, dynstr
- SELECT_SIZE_ENDIAN(32, true));
+ {
+#ifdef HAVE_TARGET_32_BIG
+ this->sized_create_version_sections
+ SELECT_SIZE_ENDIAN_NAME(32, true)(
+ versions, local_symcount, dynamic_symbols, dynstr
+ SELECT_SIZE_ENDIAN(32, true));
+#else
+ gold_unreachable();
+#endif
+ }
else
- this->sized_create_version_sections SELECT_SIZE_ENDIAN_NAME(32, false)(
- versions, local_symcount, dynamic_symbols, dynstr
- SELECT_SIZE_ENDIAN(32, false));
+ {
+#ifdef HAVE_TARGET_32_LITTLE
+ this->sized_create_version_sections
+ SELECT_SIZE_ENDIAN_NAME(32, false)(
+ versions, local_symcount, dynamic_symbols, dynstr
+ SELECT_SIZE_ENDIAN(32, false));
+#else
+ gold_unreachable();
+#endif
+ }
}
else if (target->get_size() == 64)
{
if (target->is_big_endian())
- this->sized_create_version_sections SELECT_SIZE_ENDIAN_NAME(64, true)(
- versions, local_symcount, dynamic_symbols, dynstr
- SELECT_SIZE_ENDIAN(64, true));
+ {
+#ifdef HAVE_TARGET_64_BIG
+ this->sized_create_version_sections
+ SELECT_SIZE_ENDIAN_NAME(64, true)(
+ versions, local_symcount, dynamic_symbols, dynstr
+ SELECT_SIZE_ENDIAN(64, true));
+#else
+ gold_unreachable();
+#endif
+ }
else
- this->sized_create_version_sections SELECT_SIZE_ENDIAN_NAME(64, false)(
- versions, local_symcount, dynamic_symbols, dynstr
- SELECT_SIZE_ENDIAN(64, false));
+ {
+#ifdef HAVE_TARGET_64_LITTLE
+ this->sized_create_version_sections
+ SELECT_SIZE_ENDIAN_NAME(64, false)(
+ versions, local_symcount, dynamic_symbols, dynstr
+ SELECT_SIZE_ENDIAN(64, false));
+#else
+ gold_unreachable();
+#endif
+ }
}
else
gold_unreachable();
// Instantiate the templates we need. We could use the configure
// script to restrict this to only the ones for implemented targets.
+#ifdef HAVE_TARGET_32_LITTLE
template
Output_section*
Layout::layout<32, false>(Relobj* object, unsigned int shndx, const char* name,
const elfcpp::Shdr<32, false>& shdr, off_t*);
+#endif
+#ifdef HAVE_TARGET_32_BIG
template
Output_section*
Layout::layout<32, true>(Relobj* object, unsigned int shndx, const char* name,
const elfcpp::Shdr<32, true>& shdr, off_t*);
+#endif
+#ifdef HAVE_TARGET_64_LITTLE
template
Output_section*
Layout::layout<64, false>(Relobj* object, unsigned int shndx, const char* name,
const elfcpp::Shdr<64, false>& shdr, off_t*);
+#endif
+#ifdef HAVE_TARGET_64_BIG
template
Output_section*
Layout::layout<64, true>(Relobj* object, unsigned int shndx, const char* name,
const elfcpp::Shdr<64, true>& shdr, off_t*);
+#endif
} // End namespace gold.
const char* sym_names =
reinterpret_cast<const char*>(sd->symbol_names->data());
- symtab->add_from_relobj(this, sd->symbols->data(), symcount, sym_names,
+ symtab->add_from_relobj(this, sd->symbols->data(), symcount, sym_names,
sd->symbol_names_size, this->symbols_);
delete sd->symbols;
}
if (big_endian)
{
+#ifdef HAVE_TARGET_32_BIG
elfcpp::Ehdr<32, true> ehdr(p);
return make_elf_sized_object<32, true>(name, input_file,
offset, ehdr);
+#else
+ fprintf(stderr,
+ _("%s: %s: not configured to support 32-bit big-endian object\n"),
+ program_name, name.c_str());
+ gold_exit(false);
+#endif
}
else
{
+#ifdef HAVE_TARGET_32_LITTLE
elfcpp::Ehdr<32, false> ehdr(p);
return make_elf_sized_object<32, false>(name, input_file,
offset, ehdr);
+#else
+ fprintf(stderr,
+ _("%s: %s: not configured to support 32-bit little-endian object\n"),
+ program_name, name.c_str());
+ gold_exit(false);
+#endif
}
}
else
}
if (big_endian)
{
+#ifdef HAVE_TARGET_64_BIG
elfcpp::Ehdr<64, true> ehdr(p);
return make_elf_sized_object<64, true>(name, input_file,
offset, ehdr);
+#else
+ fprintf(stderr,
+ _("%s: %s: not configured to support 64-bit big-endian object\n"),
+ program_name, name.c_str());
+ gold_exit(false);
+#endif
}
else
{
+#ifdef HAVE_TARGET_64_LITTLE
elfcpp::Ehdr<64, false> ehdr(p);
return make_elf_sized_object<64, false>(name, input_file,
offset, ehdr);
+#else
+ fprintf(stderr,
+ _("%s: %s: not configured to support 64-bit little-endian object\n"),
+ program_name, name.c_str());
+ gold_exit(false);
+#endif
}
}
}
// Instantiate the templates we need. We could use the configure
// script to restrict this to only the ones for implemented targets.
+#ifdef HAVE_TARGET_32_LITTLE
template
class Sized_relobj<32, false>;
+#endif
+#ifdef HAVE_TARGET_32_BIG
template
class Sized_relobj<32, true>;
+#endif
+#ifdef HAVE_TARGET_64_LITTLE
template
class Sized_relobj<64, false>;
+#endif
+#ifdef HAVE_TARGET_64_BIG
template
class Sized_relobj<64, true>;
+#endif
+#ifdef HAVE_TARGET_32_LITTLE
template
struct Relocate_info<32, false>;
+#endif
+#ifdef HAVE_TARGET_32_BIG
template
struct Relocate_info<32, true>;
+#endif
+#ifdef HAVE_TARGET_64_LITTLE
template
struct Relocate_info<64, false>;
+#endif
+#ifdef HAVE_TARGET_64_BIG
template
struct Relocate_info<64, true>;
+#endif
} // End namespace gold.
// Instantiate the templates we need. We could use the configure
// script to restrict this to only the ones for implemented targets.
+#ifdef HAVE_TARGET_32_LITTLE
template
off_t
Output_section::add_input_section<32, false>(
unsigned int shndx,
const char* secname,
const elfcpp::Shdr<32, false>& shdr);
+#endif
+#ifdef HAVE_TARGET_32_BIG
template
off_t
Output_section::add_input_section<32, true>(
unsigned int shndx,
const char* secname,
const elfcpp::Shdr<32, true>& shdr);
+#endif
+#ifdef HAVE_TARGET_64_LITTLE
template
off_t
Output_section::add_input_section<64, false>(
unsigned int shndx,
const char* secname,
const elfcpp::Shdr<64, false>& shdr);
+#endif
+#ifdef HAVE_TARGET_64_BIG
template
off_t
Output_section::add_input_section<64, true>(
unsigned int shndx,
const char* secname,
const elfcpp::Shdr<64, true>& shdr);
+#endif
+#ifdef HAVE_TARGET_32_LITTLE
template
class Output_data_reloc<elfcpp::SHT_REL, false, 32, false>;
+#endif
+#ifdef HAVE_TARGET_32_BIG
template
class Output_data_reloc<elfcpp::SHT_REL, false, 32, true>;
+#endif
+#ifdef HAVE_TARGET_64_LITTLE
template
class Output_data_reloc<elfcpp::SHT_REL, false, 64, false>;
+#endif
+#ifdef HAVE_TARGET_64_BIG
template
class Output_data_reloc<elfcpp::SHT_REL, false, 64, true>;
+#endif
+#ifdef HAVE_TARGET_32_LITTLE
template
class Output_data_reloc<elfcpp::SHT_REL, true, 32, false>;
+#endif
+#ifdef HAVE_TARGET_32_BIG
template
class Output_data_reloc<elfcpp::SHT_REL, true, 32, true>;
+#endif
+#ifdef HAVE_TARGET_64_LITTLE
template
class Output_data_reloc<elfcpp::SHT_REL, true, 64, false>;
+#endif
+#ifdef HAVE_TARGET_64_BIG
template
class Output_data_reloc<elfcpp::SHT_REL, true, 64, true>;
+#endif
+#ifdef HAVE_TARGET_32_LITTLE
template
class Output_data_reloc<elfcpp::SHT_RELA, false, 32, false>;
+#endif
+#ifdef HAVE_TARGET_32_BIG
template
class Output_data_reloc<elfcpp::SHT_RELA, false, 32, true>;
+#endif
+#ifdef HAVE_TARGET_64_LITTLE
template
class Output_data_reloc<elfcpp::SHT_RELA, false, 64, false>;
+#endif
+#ifdef HAVE_TARGET_64_BIG
template
class Output_data_reloc<elfcpp::SHT_RELA, false, 64, true>;
+#endif
+#ifdef HAVE_TARGET_32_LITTLE
template
class Output_data_reloc<elfcpp::SHT_RELA, true, 32, false>;
+#endif
+#ifdef HAVE_TARGET_32_BIG
template
class Output_data_reloc<elfcpp::SHT_RELA, true, 32, true>;
+#endif
+#ifdef HAVE_TARGET_64_LITTLE
template
class Output_data_reloc<elfcpp::SHT_RELA, true, 64, false>;
+#endif
+#ifdef HAVE_TARGET_64_BIG
template
class Output_data_reloc<elfcpp::SHT_RELA, true, 64, true>;
+#endif
+#ifdef HAVE_TARGET_32_LITTLE
template
class Output_data_got<32, false>;
+#endif
+#ifdef HAVE_TARGET_32_BIG
template
class Output_data_got<32, true>;
+#endif
+#ifdef HAVE_TARGET_64_LITTLE
template
class Output_data_got<64, false>;
+#endif
+#ifdef HAVE_TARGET_64_BIG
template
class Output_data_got<64, true>;
+#endif
} // End namespace gold.
-
// Instantiate the templates we need. We could use the configure
// script to restrict this to only the ones for implemented targets.
+#ifdef HAVE_TARGET_32_LITTLE
template
void
Sized_relobj<32, false>::do_read_relocs(Read_relocs_data* rd);
+#endif
+#ifdef HAVE_TARGET_32_BIG
template
void
Sized_relobj<32, true>::do_read_relocs(Read_relocs_data* rd);
+#endif
+#ifdef HAVE_TARGET_64_LITTLE
template
void
Sized_relobj<64, false>::do_read_relocs(Read_relocs_data* rd);
+#endif
+#ifdef HAVE_TARGET_64_BIG
template
void
Sized_relobj<64, true>::do_read_relocs(Read_relocs_data* rd);
+#endif
+#ifdef HAVE_TARGET_32_LITTLE
template
void
Sized_relobj<32, false>::do_scan_relocs(const General_options& options,
Symbol_table* symtab,
Layout* layout,
Read_relocs_data* rd);
+#endif
+#ifdef HAVE_TARGET_32_BIG
template
void
Sized_relobj<32, true>::do_scan_relocs(const General_options& options,
Symbol_table* symtab,
Layout* layout,
Read_relocs_data* rd);
+#endif
+#ifdef HAVE_TARGET_64_LITTLE
template
void
Sized_relobj<64, false>::do_scan_relocs(const General_options& options,
Symbol_table* symtab,
Layout* layout,
Read_relocs_data* rd);
+#endif
+#ifdef HAVE_TARGET_64_BIG
template
void
Sized_relobj<64, true>::do_scan_relocs(const General_options& options,
Symbol_table* symtab,
Layout* layout,
Read_relocs_data* rd);
+#endif
+#ifdef HAVE_TARGET_32_LITTLE
template
void
Sized_relobj<32, false>::do_relocate(const General_options& options,
const Symbol_table* symtab,
const Layout* layout,
Output_file* of);
+#endif
+#ifdef HAVE_TARGET_32_BIG
template
void
Sized_relobj<32, true>::do_relocate(const General_options& options,
const Symbol_table* symtab,
const Layout* layout,
Output_file* of);
+#endif
+#ifdef HAVE_TARGET_64_LITTLE
template
void
Sized_relobj<64, false>::do_relocate(const General_options& options,
const Symbol_table* symtab,
const Layout* layout,
Output_file* of);
+#endif
+#ifdef HAVE_TARGET_64_BIG
template
void
Sized_relobj<64, true>::do_relocate(const General_options& options,
const Symbol_table* symtab,
const Layout* layout,
Output_file* of);
+#endif
+#ifdef HAVE_TARGET_32_LITTLE
template
class Copy_relocs<32, false>;
+#endif
+#ifdef HAVE_TARGET_32_BIG
template
class Copy_relocs<32, true>;
+#endif
+#ifdef HAVE_TARGET_64_LITTLE
template
class Copy_relocs<64, false>;
+#endif
+#ifdef HAVE_TARGET_64_BIG
template
class Copy_relocs<64, true>;
+#endif
+#ifdef HAVE_TARGET_32_LITTLE
template
void
Copy_relocs<32, false>::emit<elfcpp::SHT_REL>(
Output_data_reloc<elfcpp::SHT_REL, true, 32, false>*);
+#endif
+#ifdef HAVE_TARGET_32_BIG
template
void
Copy_relocs<32, true>::emit<elfcpp::SHT_REL>(
Output_data_reloc<elfcpp::SHT_REL, true, 32, true>*);
+#endif
+#ifdef HAVE_TARGET_64_LITTLE
template
void
Copy_relocs<64, false>::emit<elfcpp::SHT_REL>(
Output_data_reloc<elfcpp::SHT_REL, true, 64, false>*);
+#endif
+#ifdef HAVE_TARGET_64_BIG
template
void
Copy_relocs<64, true>::emit<elfcpp::SHT_REL>(
Output_data_reloc<elfcpp::SHT_REL, true, 64, true>*);
+#endif
+#ifdef HAVE_TARGET_32_LITTLE
template
void
Copy_relocs<32, false>::emit<elfcpp::SHT_RELA>(
Output_data_reloc<elfcpp::SHT_RELA , true, 32, false>*);
+#endif
+#ifdef HAVE_TARGET_32_BIG
template
void
Copy_relocs<32, true>::emit<elfcpp::SHT_RELA>(
Output_data_reloc<elfcpp::SHT_RELA, true, 32, true>*);
+#endif
+#ifdef HAVE_TARGET_64_LITTLE
template
void
Copy_relocs<64, false>::emit<elfcpp::SHT_RELA>(
Output_data_reloc<elfcpp::SHT_RELA, true, 64, false>*);
+#endif
+#ifdef HAVE_TARGET_64_BIG
template
void
Copy_relocs<64, true>::emit<elfcpp::SHT_RELA>(
Output_data_reloc<elfcpp::SHT_RELA, true, 64, true>*);
+#endif
} // End namespace gold.
// script to restrict this to only the ones needed for implemented
// targets.
+#ifdef HAVE_TARGET_32_LITTLE
template
void
-Symbol_table::resolve<32, true>(
+Symbol_table::resolve<32, false>(
Sized_symbol<32>* to,
- const elfcpp::Sym<32, true>& sym,
+ const elfcpp::Sym<32, false>& sym,
Object* object,
const char* version);
+#endif
+#ifdef HAVE_TARGET_32_BIG
template
void
-Symbol_table::resolve<32, false>(
+Symbol_table::resolve<32, true>(
Sized_symbol<32>* to,
- const elfcpp::Sym<32, false>& sym,
+ const elfcpp::Sym<32, true>& sym,
Object* object,
const char* version);
+#endif
+#ifdef HAVE_TARGET_64_LITTLE
template
void
-Symbol_table::resolve<64, true>(
+Symbol_table::resolve<64, false>(
Sized_symbol<64>* to,
- const elfcpp::Sym<64, true>& sym,
+ const elfcpp::Sym<64, false>& sym,
Object* object,
const char* version);
+#endif
+#ifdef HAVE_TARGET_64_BIG
template
void
-Symbol_table::resolve<64, false>(
+Symbol_table::resolve<64, true>(
Sized_symbol<64>* to,
- const elfcpp::Sym<64, false>& sym,
+ const elfcpp::Sym<64, true>& sym,
Object* object,
const char* version);
+#endif
} // End namespace gold.
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;
// 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,
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,
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,
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,
const unsigned char* versym,
size_t versym_size,
const std::vector<const char*>* version_map);
+#endif
} // End namespace gold.