mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-09-10 14:59:31 +08:00
Add support for --enable-target to control which template
specializations we generate.
This commit is contained in:
@ -37,6 +37,18 @@
|
|||||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||||
#undef HAVE_SYS_TYPES_H
|
#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. */
|
/* Define to 1 if you have the <tr1/unordered_map> header file. */
|
||||||
#undef HAVE_TR1_UNORDERED_MAP
|
#undef HAVE_TR1_UNORDERED_MAP
|
||||||
|
|
||||||
|
89
gold/configure
vendored
89
gold/configure
vendored
@ -858,6 +858,7 @@ if test -n "$ac_init_help"; then
|
|||||||
Optional Features:
|
Optional Features:
|
||||||
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
|
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
|
||||||
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
|
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
|
||||||
|
--enable-targets alternative target configurations
|
||||||
--disable-dependency-tracking speeds up one-time build
|
--disable-dependency-tracking speeds up one-time build
|
||||||
--enable-dependency-tracking do not reject slow dependency extractors
|
--enable-dependency-tracking do not reject slow dependency extractors
|
||||||
--disable-nls do not use Native Language Support
|
--disable-nls do not use Native Language Support
|
||||||
@ -1841,6 +1842,94 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
|
|||||||
ac_config_headers="$ac_config_headers config.h:config.in"
|
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_ext=c
|
||||||
ac_cpp='$CPP $CPPFLAGS'
|
ac_cpp='$CPP $CPPFLAGS'
|
||||||
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||||
|
@ -10,6 +10,75 @@ AM_INIT_AUTOMAKE(gold, 0.1)
|
|||||||
|
|
||||||
AM_CONFIG_HEADER(config.h:config.in)
|
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_CC
|
||||||
AC_PROG_CXX
|
AC_PROG_CXX
|
||||||
AC_PROG_YACC
|
AC_PROG_YACC
|
||||||
|
@ -1520,18 +1520,27 @@ Versions::need_section_contents(const Stringpool* dynpool,
|
|||||||
// Instantiate the templates we need. We could use the configure
|
// Instantiate the templates we need. We could use the configure
|
||||||
// script to restrict this to only the ones for implemented targets.
|
// script to restrict this to only the ones for implemented targets.
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_32_LITTLE
|
||||||
template
|
template
|
||||||
class Sized_dynobj<32, false>;
|
class Sized_dynobj<32, false>;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_32_BIG
|
||||||
template
|
template
|
||||||
class Sized_dynobj<32, true>;
|
class Sized_dynobj<32, true>;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_LITTLE
|
||||||
template
|
template
|
||||||
class Sized_dynobj<64, false>;
|
class Sized_dynobj<64, false>;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_BIG
|
||||||
template
|
template
|
||||||
class Sized_dynobj<64, true>;
|
class Sized_dynobj<64, true>;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_32_LITTLE
|
||||||
template
|
template
|
||||||
void
|
void
|
||||||
Versions::symbol_section_contents<32, false>(
|
Versions::symbol_section_contents<32, false>(
|
||||||
@ -1541,7 +1550,9 @@ Versions::symbol_section_contents<32, false>(
|
|||||||
unsigned char**,
|
unsigned char**,
|
||||||
unsigned int*
|
unsigned int*
|
||||||
ACCEPT_SIZE_ENDIAN_EXPLICIT(32, false)) const;
|
ACCEPT_SIZE_ENDIAN_EXPLICIT(32, false)) const;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_32_BIG
|
||||||
template
|
template
|
||||||
void
|
void
|
||||||
Versions::symbol_section_contents<32, true>(
|
Versions::symbol_section_contents<32, true>(
|
||||||
@ -1551,7 +1562,9 @@ Versions::symbol_section_contents<32, true>(
|
|||||||
unsigned char**,
|
unsigned char**,
|
||||||
unsigned int*
|
unsigned int*
|
||||||
ACCEPT_SIZE_ENDIAN_EXPLICIT(32, true)) const;
|
ACCEPT_SIZE_ENDIAN_EXPLICIT(32, true)) const;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_LITTLE
|
||||||
template
|
template
|
||||||
void
|
void
|
||||||
Versions::symbol_section_contents<64, false>(
|
Versions::symbol_section_contents<64, false>(
|
||||||
@ -1561,7 +1574,9 @@ Versions::symbol_section_contents<64, false>(
|
|||||||
unsigned char**,
|
unsigned char**,
|
||||||
unsigned int*
|
unsigned int*
|
||||||
ACCEPT_SIZE_ENDIAN_EXPLICIT(64, false)) const;
|
ACCEPT_SIZE_ENDIAN_EXPLICIT(64, false)) const;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_BIG
|
||||||
template
|
template
|
||||||
void
|
void
|
||||||
Versions::symbol_section_contents<64, true>(
|
Versions::symbol_section_contents<64, true>(
|
||||||
@ -1571,7 +1586,9 @@ Versions::symbol_section_contents<64, true>(
|
|||||||
unsigned char**,
|
unsigned char**,
|
||||||
unsigned int*
|
unsigned int*
|
||||||
ACCEPT_SIZE_ENDIAN_EXPLICIT(64, true)) const;
|
ACCEPT_SIZE_ENDIAN_EXPLICIT(64, true)) const;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_32_LITTLE
|
||||||
template
|
template
|
||||||
void
|
void
|
||||||
Versions::def_section_contents<32, false>(
|
Versions::def_section_contents<32, false>(
|
||||||
@ -1580,7 +1597,9 @@ Versions::def_section_contents<32, false>(
|
|||||||
unsigned int*,
|
unsigned int*,
|
||||||
unsigned int*
|
unsigned int*
|
||||||
ACCEPT_SIZE_ENDIAN_EXPLICIT(32, false)) const;
|
ACCEPT_SIZE_ENDIAN_EXPLICIT(32, false)) const;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_32_BIG
|
||||||
template
|
template
|
||||||
void
|
void
|
||||||
Versions::def_section_contents<32, true>(
|
Versions::def_section_contents<32, true>(
|
||||||
@ -1589,7 +1608,9 @@ Versions::def_section_contents<32, true>(
|
|||||||
unsigned int*,
|
unsigned int*,
|
||||||
unsigned int*
|
unsigned int*
|
||||||
ACCEPT_SIZE_ENDIAN_EXPLICIT(32, true)) const;
|
ACCEPT_SIZE_ENDIAN_EXPLICIT(32, true)) const;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_LITTLE
|
||||||
template
|
template
|
||||||
void
|
void
|
||||||
Versions::def_section_contents<64, false>(
|
Versions::def_section_contents<64, false>(
|
||||||
@ -1598,7 +1619,9 @@ Versions::def_section_contents<64, false>(
|
|||||||
unsigned int*,
|
unsigned int*,
|
||||||
unsigned int*
|
unsigned int*
|
||||||
ACCEPT_SIZE_ENDIAN_EXPLICIT(64, false)) const;
|
ACCEPT_SIZE_ENDIAN_EXPLICIT(64, false)) const;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_BIG
|
||||||
template
|
template
|
||||||
void
|
void
|
||||||
Versions::def_section_contents<64, true>(
|
Versions::def_section_contents<64, true>(
|
||||||
@ -1607,7 +1630,9 @@ Versions::def_section_contents<64, true>(
|
|||||||
unsigned int*,
|
unsigned int*,
|
||||||
unsigned int*
|
unsigned int*
|
||||||
ACCEPT_SIZE_ENDIAN_EXPLICIT(64, true)) const;
|
ACCEPT_SIZE_ENDIAN_EXPLICIT(64, true)) const;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_32_LITTLE
|
||||||
template
|
template
|
||||||
void
|
void
|
||||||
Versions::need_section_contents<32, false>(
|
Versions::need_section_contents<32, false>(
|
||||||
@ -1616,7 +1641,9 @@ Versions::need_section_contents<32, false>(
|
|||||||
unsigned int*,
|
unsigned int*,
|
||||||
unsigned int*
|
unsigned int*
|
||||||
ACCEPT_SIZE_ENDIAN_EXPLICIT(32, false)) const;
|
ACCEPT_SIZE_ENDIAN_EXPLICIT(32, false)) const;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_32_BIG
|
||||||
template
|
template
|
||||||
void
|
void
|
||||||
Versions::need_section_contents<32, true>(
|
Versions::need_section_contents<32, true>(
|
||||||
@ -1625,7 +1652,9 @@ Versions::need_section_contents<32, true>(
|
|||||||
unsigned int*,
|
unsigned int*,
|
||||||
unsigned int*
|
unsigned int*
|
||||||
ACCEPT_SIZE_ENDIAN_EXPLICIT(32, true)) const;
|
ACCEPT_SIZE_ENDIAN_EXPLICIT(32, true)) const;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_LITTLE
|
||||||
template
|
template
|
||||||
void
|
void
|
||||||
Versions::need_section_contents<64, false>(
|
Versions::need_section_contents<64, false>(
|
||||||
@ -1634,7 +1663,9 @@ Versions::need_section_contents<64, false>(
|
|||||||
unsigned int*,
|
unsigned int*,
|
||||||
unsigned int*
|
unsigned int*
|
||||||
ACCEPT_SIZE_ENDIAN_EXPLICIT(64, false)) const;
|
ACCEPT_SIZE_ENDIAN_EXPLICIT(64, false)) const;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_BIG
|
||||||
template
|
template
|
||||||
void
|
void
|
||||||
Versions::need_section_contents<64, true>(
|
Versions::need_section_contents<64, true>(
|
||||||
@ -1643,5 +1674,6 @@ Versions::need_section_contents<64, true>(
|
|||||||
unsigned int*,
|
unsigned int*,
|
||||||
unsigned int*
|
unsigned int*
|
||||||
ACCEPT_SIZE_ENDIAN_EXPLICIT(64, true)) const;
|
ACCEPT_SIZE_ENDIAN_EXPLICIT(64, true)) const;
|
||||||
|
#endif
|
||||||
|
|
||||||
} // End namespace gold.
|
} // End namespace gold.
|
||||||
|
@ -986,24 +986,52 @@ Layout::create_version_sections(const Target* target, const Versions* versions,
|
|||||||
if (target->get_size() == 32)
|
if (target->get_size() == 32)
|
||||||
{
|
{
|
||||||
if (target->is_big_endian())
|
if (target->is_big_endian())
|
||||||
this->sized_create_version_sections SELECT_SIZE_ENDIAN_NAME(32, true)(
|
{
|
||||||
|
#ifdef HAVE_TARGET_32_BIG
|
||||||
|
this->sized_create_version_sections
|
||||||
|
SELECT_SIZE_ENDIAN_NAME(32, true)(
|
||||||
versions, local_symcount, dynamic_symbols, dynstr
|
versions, local_symcount, dynamic_symbols, dynstr
|
||||||
SELECT_SIZE_ENDIAN(32, true));
|
SELECT_SIZE_ENDIAN(32, true));
|
||||||
|
#else
|
||||||
|
gold_unreachable();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
else
|
else
|
||||||
this->sized_create_version_sections SELECT_SIZE_ENDIAN_NAME(32, false)(
|
{
|
||||||
|
#ifdef HAVE_TARGET_32_LITTLE
|
||||||
|
this->sized_create_version_sections
|
||||||
|
SELECT_SIZE_ENDIAN_NAME(32, false)(
|
||||||
versions, local_symcount, dynamic_symbols, dynstr
|
versions, local_symcount, dynamic_symbols, dynstr
|
||||||
SELECT_SIZE_ENDIAN(32, false));
|
SELECT_SIZE_ENDIAN(32, false));
|
||||||
|
#else
|
||||||
|
gold_unreachable();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (target->get_size() == 64)
|
else if (target->get_size() == 64)
|
||||||
{
|
{
|
||||||
if (target->is_big_endian())
|
if (target->is_big_endian())
|
||||||
this->sized_create_version_sections SELECT_SIZE_ENDIAN_NAME(64, true)(
|
{
|
||||||
|
#ifdef HAVE_TARGET_64_BIG
|
||||||
|
this->sized_create_version_sections
|
||||||
|
SELECT_SIZE_ENDIAN_NAME(64, true)(
|
||||||
versions, local_symcount, dynamic_symbols, dynstr
|
versions, local_symcount, dynamic_symbols, dynstr
|
||||||
SELECT_SIZE_ENDIAN(64, true));
|
SELECT_SIZE_ENDIAN(64, true));
|
||||||
|
#else
|
||||||
|
gold_unreachable();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
else
|
else
|
||||||
this->sized_create_version_sections SELECT_SIZE_ENDIAN_NAME(64, false)(
|
{
|
||||||
|
#ifdef HAVE_TARGET_64_LITTLE
|
||||||
|
this->sized_create_version_sections
|
||||||
|
SELECT_SIZE_ENDIAN_NAME(64, false)(
|
||||||
versions, local_symcount, dynamic_symbols, dynstr
|
versions, local_symcount, dynamic_symbols, dynstr
|
||||||
SELECT_SIZE_ENDIAN(64, false));
|
SELECT_SIZE_ENDIAN(64, false));
|
||||||
|
#else
|
||||||
|
gold_unreachable();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
gold_unreachable();
|
gold_unreachable();
|
||||||
@ -1449,25 +1477,33 @@ Close_task_runner::run(Workqueue*)
|
|||||||
// Instantiate the templates we need. We could use the configure
|
// Instantiate the templates we need. We could use the configure
|
||||||
// script to restrict this to only the ones for implemented targets.
|
// script to restrict this to only the ones for implemented targets.
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_32_LITTLE
|
||||||
template
|
template
|
||||||
Output_section*
|
Output_section*
|
||||||
Layout::layout<32, false>(Relobj* object, unsigned int shndx, const char* name,
|
Layout::layout<32, false>(Relobj* object, unsigned int shndx, const char* name,
|
||||||
const elfcpp::Shdr<32, false>& shdr, off_t*);
|
const elfcpp::Shdr<32, false>& shdr, off_t*);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_32_BIG
|
||||||
template
|
template
|
||||||
Output_section*
|
Output_section*
|
||||||
Layout::layout<32, true>(Relobj* object, unsigned int shndx, const char* name,
|
Layout::layout<32, true>(Relobj* object, unsigned int shndx, const char* name,
|
||||||
const elfcpp::Shdr<32, true>& shdr, off_t*);
|
const elfcpp::Shdr<32, true>& shdr, off_t*);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_LITTLE
|
||||||
template
|
template
|
||||||
Output_section*
|
Output_section*
|
||||||
Layout::layout<64, false>(Relobj* object, unsigned int shndx, const char* name,
|
Layout::layout<64, false>(Relobj* object, unsigned int shndx, const char* name,
|
||||||
const elfcpp::Shdr<64, false>& shdr, off_t*);
|
const elfcpp::Shdr<64, false>& shdr, off_t*);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_BIG
|
||||||
template
|
template
|
||||||
Output_section*
|
Output_section*
|
||||||
Layout::layout<64, true>(Relobj* object, unsigned int shndx, const char* name,
|
Layout::layout<64, true>(Relobj* object, unsigned int shndx, const char* name,
|
||||||
const elfcpp::Shdr<64, true>& shdr, off_t*);
|
const elfcpp::Shdr<64, true>& shdr, off_t*);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
} // End namespace gold.
|
} // End namespace gold.
|
||||||
|
@ -909,15 +909,29 @@ make_elf_object(const std::string& name, Input_file* input_file, off_t offset,
|
|||||||
}
|
}
|
||||||
if (big_endian)
|
if (big_endian)
|
||||||
{
|
{
|
||||||
|
#ifdef HAVE_TARGET_32_BIG
|
||||||
elfcpp::Ehdr<32, true> ehdr(p);
|
elfcpp::Ehdr<32, true> ehdr(p);
|
||||||
return make_elf_sized_object<32, true>(name, input_file,
|
return make_elf_sized_object<32, true>(name, input_file,
|
||||||
offset, ehdr);
|
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
|
else
|
||||||
{
|
{
|
||||||
|
#ifdef HAVE_TARGET_32_LITTLE
|
||||||
elfcpp::Ehdr<32, false> ehdr(p);
|
elfcpp::Ehdr<32, false> ehdr(p);
|
||||||
return make_elf_sized_object<32, false>(name, input_file,
|
return make_elf_sized_object<32, false>(name, input_file,
|
||||||
offset, ehdr);
|
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
|
else
|
||||||
@ -930,15 +944,29 @@ make_elf_object(const std::string& name, Input_file* input_file, off_t offset,
|
|||||||
}
|
}
|
||||||
if (big_endian)
|
if (big_endian)
|
||||||
{
|
{
|
||||||
|
#ifdef HAVE_TARGET_64_BIG
|
||||||
elfcpp::Ehdr<64, true> ehdr(p);
|
elfcpp::Ehdr<64, true> ehdr(p);
|
||||||
return make_elf_sized_object<64, true>(name, input_file,
|
return make_elf_sized_object<64, true>(name, input_file,
|
||||||
offset, ehdr);
|
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
|
else
|
||||||
{
|
{
|
||||||
|
#ifdef HAVE_TARGET_64_LITTLE
|
||||||
elfcpp::Ehdr<64, false> ehdr(p);
|
elfcpp::Ehdr<64, false> ehdr(p);
|
||||||
return make_elf_sized_object<64, false>(name, input_file,
|
return make_elf_sized_object<64, false>(name, input_file,
|
||||||
offset, ehdr);
|
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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -946,28 +974,44 @@ make_elf_object(const std::string& name, Input_file* input_file, off_t offset,
|
|||||||
// Instantiate the templates we need. We could use the configure
|
// Instantiate the templates we need. We could use the configure
|
||||||
// script to restrict this to only the ones for implemented targets.
|
// script to restrict this to only the ones for implemented targets.
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_32_LITTLE
|
||||||
template
|
template
|
||||||
class Sized_relobj<32, false>;
|
class Sized_relobj<32, false>;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_32_BIG
|
||||||
template
|
template
|
||||||
class Sized_relobj<32, true>;
|
class Sized_relobj<32, true>;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_LITTLE
|
||||||
template
|
template
|
||||||
class Sized_relobj<64, false>;
|
class Sized_relobj<64, false>;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_BIG
|
||||||
template
|
template
|
||||||
class Sized_relobj<64, true>;
|
class Sized_relobj<64, true>;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_32_LITTLE
|
||||||
template
|
template
|
||||||
struct Relocate_info<32, false>;
|
struct Relocate_info<32, false>;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_32_BIG
|
||||||
template
|
template
|
||||||
struct Relocate_info<32, true>;
|
struct Relocate_info<32, true>;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_LITTLE
|
||||||
template
|
template
|
||||||
struct Relocate_info<64, false>;
|
struct Relocate_info<64, false>;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_BIG
|
||||||
template
|
template
|
||||||
struct Relocate_info<64, true>;
|
struct Relocate_info<64, true>;
|
||||||
|
#endif
|
||||||
|
|
||||||
} // End namespace gold.
|
} // End namespace gold.
|
||||||
|
@ -1574,6 +1574,7 @@ Output_file::close()
|
|||||||
// Instantiate the templates we need. We could use the configure
|
// Instantiate the templates we need. We could use the configure
|
||||||
// script to restrict this to only the ones for implemented targets.
|
// script to restrict this to only the ones for implemented targets.
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_32_LITTLE
|
||||||
template
|
template
|
||||||
off_t
|
off_t
|
||||||
Output_section::add_input_section<32, false>(
|
Output_section::add_input_section<32, false>(
|
||||||
@ -1581,7 +1582,9 @@ Output_section::add_input_section<32, false>(
|
|||||||
unsigned int shndx,
|
unsigned int shndx,
|
||||||
const char* secname,
|
const char* secname,
|
||||||
const elfcpp::Shdr<32, false>& shdr);
|
const elfcpp::Shdr<32, false>& shdr);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_32_BIG
|
||||||
template
|
template
|
||||||
off_t
|
off_t
|
||||||
Output_section::add_input_section<32, true>(
|
Output_section::add_input_section<32, true>(
|
||||||
@ -1589,7 +1592,9 @@ Output_section::add_input_section<32, true>(
|
|||||||
unsigned int shndx,
|
unsigned int shndx,
|
||||||
const char* secname,
|
const char* secname,
|
||||||
const elfcpp::Shdr<32, true>& shdr);
|
const elfcpp::Shdr<32, true>& shdr);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_LITTLE
|
||||||
template
|
template
|
||||||
off_t
|
off_t
|
||||||
Output_section::add_input_section<64, false>(
|
Output_section::add_input_section<64, false>(
|
||||||
@ -1597,7 +1602,9 @@ Output_section::add_input_section<64, false>(
|
|||||||
unsigned int shndx,
|
unsigned int shndx,
|
||||||
const char* secname,
|
const char* secname,
|
||||||
const elfcpp::Shdr<64, false>& shdr);
|
const elfcpp::Shdr<64, false>& shdr);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_BIG
|
||||||
template
|
template
|
||||||
off_t
|
off_t
|
||||||
Output_section::add_input_section<64, true>(
|
Output_section::add_input_section<64, true>(
|
||||||
@ -1605,66 +1612,106 @@ Output_section::add_input_section<64, true>(
|
|||||||
unsigned int shndx,
|
unsigned int shndx,
|
||||||
const char* secname,
|
const char* secname,
|
||||||
const elfcpp::Shdr<64, true>& shdr);
|
const elfcpp::Shdr<64, true>& shdr);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_32_LITTLE
|
||||||
template
|
template
|
||||||
class Output_data_reloc<elfcpp::SHT_REL, false, 32, false>;
|
class Output_data_reloc<elfcpp::SHT_REL, false, 32, false>;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_32_BIG
|
||||||
template
|
template
|
||||||
class Output_data_reloc<elfcpp::SHT_REL, false, 32, true>;
|
class Output_data_reloc<elfcpp::SHT_REL, false, 32, true>;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_LITTLE
|
||||||
template
|
template
|
||||||
class Output_data_reloc<elfcpp::SHT_REL, false, 64, false>;
|
class Output_data_reloc<elfcpp::SHT_REL, false, 64, false>;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_BIG
|
||||||
template
|
template
|
||||||
class Output_data_reloc<elfcpp::SHT_REL, false, 64, true>;
|
class Output_data_reloc<elfcpp::SHT_REL, false, 64, true>;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_32_LITTLE
|
||||||
template
|
template
|
||||||
class Output_data_reloc<elfcpp::SHT_REL, true, 32, false>;
|
class Output_data_reloc<elfcpp::SHT_REL, true, 32, false>;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_32_BIG
|
||||||
template
|
template
|
||||||
class Output_data_reloc<elfcpp::SHT_REL, true, 32, true>;
|
class Output_data_reloc<elfcpp::SHT_REL, true, 32, true>;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_LITTLE
|
||||||
template
|
template
|
||||||
class Output_data_reloc<elfcpp::SHT_REL, true, 64, false>;
|
class Output_data_reloc<elfcpp::SHT_REL, true, 64, false>;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_BIG
|
||||||
template
|
template
|
||||||
class Output_data_reloc<elfcpp::SHT_REL, true, 64, true>;
|
class Output_data_reloc<elfcpp::SHT_REL, true, 64, true>;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_32_LITTLE
|
||||||
template
|
template
|
||||||
class Output_data_reloc<elfcpp::SHT_RELA, false, 32, false>;
|
class Output_data_reloc<elfcpp::SHT_RELA, false, 32, false>;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_32_BIG
|
||||||
template
|
template
|
||||||
class Output_data_reloc<elfcpp::SHT_RELA, false, 32, true>;
|
class Output_data_reloc<elfcpp::SHT_RELA, false, 32, true>;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_LITTLE
|
||||||
template
|
template
|
||||||
class Output_data_reloc<elfcpp::SHT_RELA, false, 64, false>;
|
class Output_data_reloc<elfcpp::SHT_RELA, false, 64, false>;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_BIG
|
||||||
template
|
template
|
||||||
class Output_data_reloc<elfcpp::SHT_RELA, false, 64, true>;
|
class Output_data_reloc<elfcpp::SHT_RELA, false, 64, true>;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_32_LITTLE
|
||||||
template
|
template
|
||||||
class Output_data_reloc<elfcpp::SHT_RELA, true, 32, false>;
|
class Output_data_reloc<elfcpp::SHT_RELA, true, 32, false>;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_32_BIG
|
||||||
template
|
template
|
||||||
class Output_data_reloc<elfcpp::SHT_RELA, true, 32, true>;
|
class Output_data_reloc<elfcpp::SHT_RELA, true, 32, true>;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_LITTLE
|
||||||
template
|
template
|
||||||
class Output_data_reloc<elfcpp::SHT_RELA, true, 64, false>;
|
class Output_data_reloc<elfcpp::SHT_RELA, true, 64, false>;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_BIG
|
||||||
template
|
template
|
||||||
class Output_data_reloc<elfcpp::SHT_RELA, true, 64, true>;
|
class Output_data_reloc<elfcpp::SHT_RELA, true, 64, true>;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_32_LITTLE
|
||||||
template
|
template
|
||||||
class Output_data_got<32, false>;
|
class Output_data_got<32, false>;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_32_BIG
|
||||||
template
|
template
|
||||||
class Output_data_got<32, true>;
|
class Output_data_got<32, true>;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_LITTLE
|
||||||
template
|
template
|
||||||
class Output_data_got<64, false>;
|
class Output_data_got<64, false>;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_BIG
|
||||||
template
|
template
|
||||||
class Output_data_got<64, true>;
|
class Output_data_got<64, true>;
|
||||||
|
#endif
|
||||||
|
|
||||||
} // End namespace gold.
|
} // End namespace gold.
|
||||||
|
|
||||||
|
@ -611,128 +611,176 @@ Copy_relocs<size, big_endian>::emit(
|
|||||||
// Instantiate the templates we need. We could use the configure
|
// Instantiate the templates we need. We could use the configure
|
||||||
// script to restrict this to only the ones for implemented targets.
|
// script to restrict this to only the ones for implemented targets.
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_32_LITTLE
|
||||||
template
|
template
|
||||||
void
|
void
|
||||||
Sized_relobj<32, false>::do_read_relocs(Read_relocs_data* rd);
|
Sized_relobj<32, false>::do_read_relocs(Read_relocs_data* rd);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_32_BIG
|
||||||
template
|
template
|
||||||
void
|
void
|
||||||
Sized_relobj<32, true>::do_read_relocs(Read_relocs_data* rd);
|
Sized_relobj<32, true>::do_read_relocs(Read_relocs_data* rd);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_LITTLE
|
||||||
template
|
template
|
||||||
void
|
void
|
||||||
Sized_relobj<64, false>::do_read_relocs(Read_relocs_data* rd);
|
Sized_relobj<64, false>::do_read_relocs(Read_relocs_data* rd);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_BIG
|
||||||
template
|
template
|
||||||
void
|
void
|
||||||
Sized_relobj<64, true>::do_read_relocs(Read_relocs_data* rd);
|
Sized_relobj<64, true>::do_read_relocs(Read_relocs_data* rd);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_32_LITTLE
|
||||||
template
|
template
|
||||||
void
|
void
|
||||||
Sized_relobj<32, false>::do_scan_relocs(const General_options& options,
|
Sized_relobj<32, false>::do_scan_relocs(const General_options& options,
|
||||||
Symbol_table* symtab,
|
Symbol_table* symtab,
|
||||||
Layout* layout,
|
Layout* layout,
|
||||||
Read_relocs_data* rd);
|
Read_relocs_data* rd);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_32_BIG
|
||||||
template
|
template
|
||||||
void
|
void
|
||||||
Sized_relobj<32, true>::do_scan_relocs(const General_options& options,
|
Sized_relobj<32, true>::do_scan_relocs(const General_options& options,
|
||||||
Symbol_table* symtab,
|
Symbol_table* symtab,
|
||||||
Layout* layout,
|
Layout* layout,
|
||||||
Read_relocs_data* rd);
|
Read_relocs_data* rd);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_LITTLE
|
||||||
template
|
template
|
||||||
void
|
void
|
||||||
Sized_relobj<64, false>::do_scan_relocs(const General_options& options,
|
Sized_relobj<64, false>::do_scan_relocs(const General_options& options,
|
||||||
Symbol_table* symtab,
|
Symbol_table* symtab,
|
||||||
Layout* layout,
|
Layout* layout,
|
||||||
Read_relocs_data* rd);
|
Read_relocs_data* rd);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_BIG
|
||||||
template
|
template
|
||||||
void
|
void
|
||||||
Sized_relobj<64, true>::do_scan_relocs(const General_options& options,
|
Sized_relobj<64, true>::do_scan_relocs(const General_options& options,
|
||||||
Symbol_table* symtab,
|
Symbol_table* symtab,
|
||||||
Layout* layout,
|
Layout* layout,
|
||||||
Read_relocs_data* rd);
|
Read_relocs_data* rd);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_32_LITTLE
|
||||||
template
|
template
|
||||||
void
|
void
|
||||||
Sized_relobj<32, false>::do_relocate(const General_options& options,
|
Sized_relobj<32, false>::do_relocate(const General_options& options,
|
||||||
const Symbol_table* symtab,
|
const Symbol_table* symtab,
|
||||||
const Layout* layout,
|
const Layout* layout,
|
||||||
Output_file* of);
|
Output_file* of);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_32_BIG
|
||||||
template
|
template
|
||||||
void
|
void
|
||||||
Sized_relobj<32, true>::do_relocate(const General_options& options,
|
Sized_relobj<32, true>::do_relocate(const General_options& options,
|
||||||
const Symbol_table* symtab,
|
const Symbol_table* symtab,
|
||||||
const Layout* layout,
|
const Layout* layout,
|
||||||
Output_file* of);
|
Output_file* of);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_LITTLE
|
||||||
template
|
template
|
||||||
void
|
void
|
||||||
Sized_relobj<64, false>::do_relocate(const General_options& options,
|
Sized_relobj<64, false>::do_relocate(const General_options& options,
|
||||||
const Symbol_table* symtab,
|
const Symbol_table* symtab,
|
||||||
const Layout* layout,
|
const Layout* layout,
|
||||||
Output_file* of);
|
Output_file* of);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_BIG
|
||||||
template
|
template
|
||||||
void
|
void
|
||||||
Sized_relobj<64, true>::do_relocate(const General_options& options,
|
Sized_relobj<64, true>::do_relocate(const General_options& options,
|
||||||
const Symbol_table* symtab,
|
const Symbol_table* symtab,
|
||||||
const Layout* layout,
|
const Layout* layout,
|
||||||
Output_file* of);
|
Output_file* of);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_32_LITTLE
|
||||||
template
|
template
|
||||||
class Copy_relocs<32, false>;
|
class Copy_relocs<32, false>;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_32_BIG
|
||||||
template
|
template
|
||||||
class Copy_relocs<32, true>;
|
class Copy_relocs<32, true>;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_LITTLE
|
||||||
template
|
template
|
||||||
class Copy_relocs<64, false>;
|
class Copy_relocs<64, false>;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_BIG
|
||||||
template
|
template
|
||||||
class Copy_relocs<64, true>;
|
class Copy_relocs<64, true>;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_32_LITTLE
|
||||||
template
|
template
|
||||||
void
|
void
|
||||||
Copy_relocs<32, false>::emit<elfcpp::SHT_REL>(
|
Copy_relocs<32, false>::emit<elfcpp::SHT_REL>(
|
||||||
Output_data_reloc<elfcpp::SHT_REL, true, 32, false>*);
|
Output_data_reloc<elfcpp::SHT_REL, true, 32, false>*);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_32_BIG
|
||||||
template
|
template
|
||||||
void
|
void
|
||||||
Copy_relocs<32, true>::emit<elfcpp::SHT_REL>(
|
Copy_relocs<32, true>::emit<elfcpp::SHT_REL>(
|
||||||
Output_data_reloc<elfcpp::SHT_REL, true, 32, true>*);
|
Output_data_reloc<elfcpp::SHT_REL, true, 32, true>*);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_LITTLE
|
||||||
template
|
template
|
||||||
void
|
void
|
||||||
Copy_relocs<64, false>::emit<elfcpp::SHT_REL>(
|
Copy_relocs<64, false>::emit<elfcpp::SHT_REL>(
|
||||||
Output_data_reloc<elfcpp::SHT_REL, true, 64, false>*);
|
Output_data_reloc<elfcpp::SHT_REL, true, 64, false>*);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_BIG
|
||||||
template
|
template
|
||||||
void
|
void
|
||||||
Copy_relocs<64, true>::emit<elfcpp::SHT_REL>(
|
Copy_relocs<64, true>::emit<elfcpp::SHT_REL>(
|
||||||
Output_data_reloc<elfcpp::SHT_REL, true, 64, true>*);
|
Output_data_reloc<elfcpp::SHT_REL, true, 64, true>*);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_32_LITTLE
|
||||||
template
|
template
|
||||||
void
|
void
|
||||||
Copy_relocs<32, false>::emit<elfcpp::SHT_RELA>(
|
Copy_relocs<32, false>::emit<elfcpp::SHT_RELA>(
|
||||||
Output_data_reloc<elfcpp::SHT_RELA , true, 32, false>*);
|
Output_data_reloc<elfcpp::SHT_RELA , true, 32, false>*);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_32_BIG
|
||||||
template
|
template
|
||||||
void
|
void
|
||||||
Copy_relocs<32, true>::emit<elfcpp::SHT_RELA>(
|
Copy_relocs<32, true>::emit<elfcpp::SHT_RELA>(
|
||||||
Output_data_reloc<elfcpp::SHT_RELA, true, 32, true>*);
|
Output_data_reloc<elfcpp::SHT_RELA, true, 32, true>*);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_LITTLE
|
||||||
template
|
template
|
||||||
void
|
void
|
||||||
Copy_relocs<64, false>::emit<elfcpp::SHT_RELA>(
|
Copy_relocs<64, false>::emit<elfcpp::SHT_RELA>(
|
||||||
Output_data_reloc<elfcpp::SHT_RELA, true, 64, false>*);
|
Output_data_reloc<elfcpp::SHT_RELA, true, 64, false>*);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_BIG
|
||||||
template
|
template
|
||||||
void
|
void
|
||||||
Copy_relocs<64, true>::emit<elfcpp::SHT_RELA>(
|
Copy_relocs<64, true>::emit<elfcpp::SHT_RELA>(
|
||||||
Output_data_reloc<elfcpp::SHT_RELA, true, 64, true>*);
|
Output_data_reloc<elfcpp::SHT_RELA, true, 64, true>*);
|
||||||
|
#endif
|
||||||
|
|
||||||
} // End namespace gold.
|
} // End namespace gold.
|
||||||
|
@ -520,14 +520,7 @@ Symbol_table::resolve(Sized_symbol<size>* to,
|
|||||||
// script to restrict this to only the ones needed for implemented
|
// script to restrict this to only the ones needed for implemented
|
||||||
// targets.
|
// targets.
|
||||||
|
|
||||||
template
|
#ifdef HAVE_TARGET_32_LITTLE
|
||||||
void
|
|
||||||
Symbol_table::resolve<32, true>(
|
|
||||||
Sized_symbol<32>* to,
|
|
||||||
const elfcpp::Sym<32, true>& sym,
|
|
||||||
Object* object,
|
|
||||||
const char* version);
|
|
||||||
|
|
||||||
template
|
template
|
||||||
void
|
void
|
||||||
Symbol_table::resolve<32, false>(
|
Symbol_table::resolve<32, false>(
|
||||||
@ -535,15 +528,19 @@ Symbol_table::resolve<32, false>(
|
|||||||
const elfcpp::Sym<32, false>& sym,
|
const elfcpp::Sym<32, false>& sym,
|
||||||
Object* object,
|
Object* object,
|
||||||
const char* version);
|
const char* version);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_32_BIG
|
||||||
template
|
template
|
||||||
void
|
void
|
||||||
Symbol_table::resolve<64, true>(
|
Symbol_table::resolve<32, true>(
|
||||||
Sized_symbol<64>* to,
|
Sized_symbol<32>* to,
|
||||||
const elfcpp::Sym<64, true>& sym,
|
const elfcpp::Sym<32, true>& sym,
|
||||||
Object* object,
|
Object* object,
|
||||||
const char* version);
|
const char* version);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_LITTLE
|
||||||
template
|
template
|
||||||
void
|
void
|
||||||
Symbol_table::resolve<64, false>(
|
Symbol_table::resolve<64, false>(
|
||||||
@ -551,5 +548,16 @@ Symbol_table::resolve<64, false>(
|
|||||||
const elfcpp::Sym<64, false>& sym,
|
const elfcpp::Sym<64, false>& sym,
|
||||||
Object* object,
|
Object* object,
|
||||||
const char* version);
|
const char* version);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_BIG
|
||||||
|
template
|
||||||
|
void
|
||||||
|
Symbol_table::resolve<64, true>(
|
||||||
|
Sized_symbol<64>* to,
|
||||||
|
const elfcpp::Sym<64, true>& sym,
|
||||||
|
Object* object,
|
||||||
|
const char* version);
|
||||||
|
#endif
|
||||||
|
|
||||||
} // End namespace gold.
|
} // End namespace gold.
|
||||||
|
@ -809,13 +809,25 @@ Symbol_table::do_define_in_output_data(
|
|||||||
Sized_symbol<size>* sym;
|
Sized_symbol<size>* sym;
|
||||||
|
|
||||||
if (target->is_big_endian())
|
if (target->is_big_endian())
|
||||||
|
{
|
||||||
|
#if defined(HAVE_TARGET_32_BIG) || defined(HAVE_TARGET_64_BIG)
|
||||||
sym = this->define_special_symbol SELECT_SIZE_ENDIAN_NAME(size, true) (
|
sym = this->define_special_symbol SELECT_SIZE_ENDIAN_NAME(size, true) (
|
||||||
target, name, version, only_if_ref
|
target, name, version, only_if_ref
|
||||||
SELECT_SIZE_ENDIAN(size, true));
|
SELECT_SIZE_ENDIAN(size, true));
|
||||||
|
#else
|
||||||
|
gold_unreachable();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
#if defined(HAVE_TARGET_32_LITTLE) || defined(HAVE_TARGET_64_LITTLE)
|
||||||
sym = this->define_special_symbol SELECT_SIZE_ENDIAN_NAME(size, false) (
|
sym = this->define_special_symbol SELECT_SIZE_ENDIAN_NAME(size, false) (
|
||||||
target, name, version, only_if_ref
|
target, name, version, only_if_ref
|
||||||
SELECT_SIZE_ENDIAN(size, false));
|
SELECT_SIZE_ENDIAN(size, false));
|
||||||
|
#else
|
||||||
|
gold_unreachable();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
if (sym == NULL)
|
if (sym == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -1494,16 +1506,7 @@ Warnings::issue_warning(const Symbol* sym, const std::string& location) const
|
|||||||
// script to restrict this to only the ones needed for implemented
|
// script to restrict this to only the ones needed for implemented
|
||||||
// targets.
|
// targets.
|
||||||
|
|
||||||
template
|
#ifdef HAVE_TARGET_32_LITTLE
|
||||||
void
|
|
||||||
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);
|
|
||||||
|
|
||||||
template
|
template
|
||||||
void
|
void
|
||||||
Symbol_table::add_from_relobj<32, false>(
|
Symbol_table::add_from_relobj<32, false>(
|
||||||
@ -1513,17 +1516,21 @@ Symbol_table::add_from_relobj<32, false>(
|
|||||||
const char* sym_names,
|
const char* sym_names,
|
||||||
size_t sym_name_size,
|
size_t sym_name_size,
|
||||||
Symbol** sympointers);
|
Symbol** sympointers);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_32_BIG
|
||||||
template
|
template
|
||||||
void
|
void
|
||||||
Symbol_table::add_from_relobj<64, true>(
|
Symbol_table::add_from_relobj<32, true>(
|
||||||
Sized_relobj<64, true>* relobj,
|
Sized_relobj<32, true>* relobj,
|
||||||
const unsigned char* syms,
|
const unsigned char* syms,
|
||||||
size_t count,
|
size_t count,
|
||||||
const char* sym_names,
|
const char* sym_names,
|
||||||
size_t sym_name_size,
|
size_t sym_name_size,
|
||||||
Symbol** sympointers);
|
Symbol** sympointers);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_LITTLE
|
||||||
template
|
template
|
||||||
void
|
void
|
||||||
Symbol_table::add_from_relobj<64, false>(
|
Symbol_table::add_from_relobj<64, false>(
|
||||||
@ -1533,19 +1540,21 @@ Symbol_table::add_from_relobj<64, false>(
|
|||||||
const char* sym_names,
|
const char* sym_names,
|
||||||
size_t sym_name_size,
|
size_t sym_name_size,
|
||||||
Symbol** sympointers);
|
Symbol** sympointers);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_BIG
|
||||||
template
|
template
|
||||||
void
|
void
|
||||||
Symbol_table::add_from_dynobj<32, true>(
|
Symbol_table::add_from_relobj<64, true>(
|
||||||
Sized_dynobj<32, true>* dynobj,
|
Sized_relobj<64, true>* relobj,
|
||||||
const unsigned char* syms,
|
const unsigned char* syms,
|
||||||
size_t count,
|
size_t count,
|
||||||
const char* sym_names,
|
const char* sym_names,
|
||||||
size_t sym_name_size,
|
size_t sym_name_size,
|
||||||
const unsigned char* versym,
|
Symbol** sympointers);
|
||||||
size_t versym_size,
|
#endif
|
||||||
const std::vector<const char*>* version_map);
|
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_32_LITTLE
|
||||||
template
|
template
|
||||||
void
|
void
|
||||||
Symbol_table::add_from_dynobj<32, false>(
|
Symbol_table::add_from_dynobj<32, false>(
|
||||||
@ -1557,11 +1566,13 @@ Symbol_table::add_from_dynobj<32, false>(
|
|||||||
const unsigned char* versym,
|
const unsigned char* versym,
|
||||||
size_t versym_size,
|
size_t versym_size,
|
||||||
const std::vector<const char*>* version_map);
|
const std::vector<const char*>* version_map);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_32_BIG
|
||||||
template
|
template
|
||||||
void
|
void
|
||||||
Symbol_table::add_from_dynobj<64, true>(
|
Symbol_table::add_from_dynobj<32, true>(
|
||||||
Sized_dynobj<64, true>* dynobj,
|
Sized_dynobj<32, true>* dynobj,
|
||||||
const unsigned char* syms,
|
const unsigned char* syms,
|
||||||
size_t count,
|
size_t count,
|
||||||
const char* sym_names,
|
const char* sym_names,
|
||||||
@ -1569,7 +1580,9 @@ Symbol_table::add_from_dynobj<64, true>(
|
|||||||
const unsigned char* versym,
|
const unsigned char* versym,
|
||||||
size_t versym_size,
|
size_t versym_size,
|
||||||
const std::vector<const char*>* version_map);
|
const std::vector<const char*>* version_map);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_LITTLE
|
||||||
template
|
template
|
||||||
void
|
void
|
||||||
Symbol_table::add_from_dynobj<64, false>(
|
Symbol_table::add_from_dynobj<64, false>(
|
||||||
@ -1581,5 +1594,20 @@ Symbol_table::add_from_dynobj<64, false>(
|
|||||||
const unsigned char* versym,
|
const unsigned char* versym,
|
||||||
size_t versym_size,
|
size_t versym_size,
|
||||||
const std::vector<const char*>* version_map);
|
const std::vector<const char*>* version_map);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGET_64_BIG
|
||||||
|
template
|
||||||
|
void
|
||||||
|
Symbol_table::add_from_dynobj<64, true>(
|
||||||
|
Sized_dynobj<64, true>* dynobj,
|
||||||
|
const unsigned char* syms,
|
||||||
|
size_t count,
|
||||||
|
const char* sym_names,
|
||||||
|
size_t sym_name_size,
|
||||||
|
const unsigned char* versym,
|
||||||
|
size_t versym_size,
|
||||||
|
const std::vector<const char*>* version_map);
|
||||||
|
#endif
|
||||||
|
|
||||||
} // End namespace gold.
|
} // End namespace gold.
|
||||||
|
Reference in New Issue
Block a user