From 6cfaf60bc2581b5ef9028a4157d203adbd2ae9c2 Mon Sep 17 00:00:00 2001 From: Doug Kwan Date: Fri, 5 Feb 2010 00:30:35 +0000 Subject: [PATCH] 2010-02-04 Doug Kwan PR 11247 * arm-reloc-property.cc (cstdio): Include. * configure.ac (targetobjs): Remove duplicates. * configure: Regenerate. * resolve.cc (Symbol_table::resolve): Explicit instantiate both big and little endian version for a given address size. --- gold/ChangeLog | 9 +++++++++ gold/arm-reloc-property.cc | 1 + gold/configure | 3 +++ gold/configure.ac | 3 +++ gold/resolve.cc | 11 +++++------ 5 files changed, 21 insertions(+), 6 deletions(-) diff --git a/gold/ChangeLog b/gold/ChangeLog index 05cfc715dbc..e4c6d0391ca 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,12 @@ +2010-02-04 Doug Kwan + + PR 11247 + * arm-reloc-property.cc (cstdio): Include. + * configure.ac (targetobjs): Remove duplicates. + * configure: Regenerate. + * resolve.cc (Symbol_table::resolve): Explicit instantiate both + big and little endian version for a given address size. + 2010-02-03 Doug Kwan * arm-reloc-property.cc diff --git a/gold/arm-reloc-property.cc b/gold/arm-reloc-property.cc index ab372636133..4f8fa9e4582 100644 --- a/gold/arm-reloc-property.cc +++ b/gold/arm-reloc-property.cc @@ -22,6 +22,7 @@ #include "gold.h" +#include #include #include #include diff --git a/gold/configure b/gold/configure index 4817e444dc5..dbc6319c8ad 100755 --- a/gold/configure +++ b/gold/configure @@ -3410,6 +3410,9 @@ fi fi done +# Remove any duplicates. +targetobjs=`echo $targetobjs | tr ' ' '\n' | sort | uniq | tr '\n' ' '` + if test -n "$targ_32_little"; then $as_echo "#define HAVE_TARGET_32_LITTLE 1" >>confdefs.h diff --git a/gold/configure.ac b/gold/configure.ac index 7102670dedf..4bf223cb514 100644 --- a/gold/configure.ac +++ b/gold/configure.ac @@ -162,6 +162,9 @@ for targ in $target $canon_targets; do fi done +# Remove any duplicates. +targetobjs=`echo $targetobjs | tr ' ' '\n' | sort | uniq | tr '\n' ' '` + if test -n "$targ_32_little"; then AC_DEFINE(HAVE_TARGET_32_LITTLE, 1, [Define to support 32-bit little-endian targets]) diff --git a/gold/resolve.cc b/gold/resolve.cc index 3c7c7a83824..8b1c3216251 100644 --- a/gold/resolve.cc +++ b/gold/resolve.cc @@ -916,7 +916,10 @@ Symbol_table::override_with_special(Sized_symbol* tosym, // script to restrict this to only the ones needed for implemented // targets. -#ifdef HAVE_TARGET_32_LITTLE +// We have to instantiate both big and little endian versions because +// these are used by other templates that depends on size only. + +#if defined(HAVE_TARGET_32_LITTLE) || defined(HAVE_TARGET_32_BIG) template void Symbol_table::resolve<32, false>( @@ -927,9 +930,7 @@ Symbol_table::resolve<32, false>( unsigned int orig_st_shndx, Object* object, const char* version); -#endif -#ifdef HAVE_TARGET_32_BIG template void Symbol_table::resolve<32, true>( @@ -942,7 +943,7 @@ Symbol_table::resolve<32, true>( const char* version); #endif -#ifdef HAVE_TARGET_64_LITTLE +#if defined(HAVE_TARGET_64_LITTLE) || defined(HAVE_TARGET_64_BIG) template void Symbol_table::resolve<64, false>( @@ -953,9 +954,7 @@ Symbol_table::resolve<64, false>( unsigned int orig_st_shndx, Object* object, const char* version); -#endif -#ifdef HAVE_TARGET_64_BIG template void Symbol_table::resolve<64, true>( -- 2.30.2