aboutsummaryrefslogtreecommitdiff
path: root/gold/layout.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-09-04 20:00:53 +0000
committerIan Lance Taylor <iant@google.com>2007-09-04 20:00:53 +0000
commit193a53d920ac7248cf6a3d8e36f74e9b9100b93b (patch)
treefe5c87514693b22f2705d4f8d92fd94d7978781e /gold/layout.cc
parent64707334c75cdf16a0c2d317fc381c9b158beed9 (diff)
downloadgdb-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/layout.cc')
-rw-r--r--gold/layout.cc60
1 files changed, 48 insertions, 12 deletions
diff --git a/gold/layout.cc b/gold/layout.cc
index 1e8df22..d533722 100644
--- a/gold/layout.cc
+++ b/gold/layout.cc
@@ -986,24 +986,52 @@ Layout::create_version_sections(const Target* target, const Versions* versions,
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();
@@ -1449,25 +1477,33 @@ Close_task_runner::run(Workqueue*)
// 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.