This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
re: Subject: [gold commit] PR gold/19019: Add support for STT_SPARC_REGISTER symbols
- From: Than McIntosh <thanm at google dot com>
- To: Binutils <binutils at sourceware dot org>
- Date: Fri, 4 Mar 2016 11:11:51 -0500
- Subject: re: Subject: [gold commit] PR gold/19019: Add support for STT_SPARC_REGISTER symbols
- Authentication-results: sourceware.org; auth=none
Cary Coutant wrote:
>I've committed the attached patch to better support REGISTER symbols
>on Sparc. I've only done limited testing of it with a sparc
>cross-assembler; additional native testing on Sparc would be
>appreciated.
Hi Cary,
I am seeing a build failure following this change:
binutils-build/gold/../../binutils/gold/sparc.cc:3249: undefined
reference to `gold::Sized_symbol<32>::init_undefined(char const*, char
const*, unsigned int, elfcpp::STT, elfcpp::STB, elfcpp::STV, unsigned
char)'
binutils-build/gold/../../binutils/gold/sparc.cc:3253: undefined
reference to `gold::Sized_symbol<32>::init_constant(char const*, char
const*, unsigned int, unsigned int, elfcpp::STT, elfcpp::STB,
elfcpp::STV, unsigned char, bool)'
I've attached a patch that fixes the issue.
Thanks, Than
---
diff --git a/gold/symtab.cc b/gold/symtab.cc
index a53f6c9..ec2641f 100644
--- a/gold/symtab.cc
+++ b/gold/symtab.cc
@@ -3864,4 +3864,42 @@ Warnings::issue_warning<64, true>(const Symbol* sym,
size_t relnum, off_t reloffset) const;
#endif
+#if defined(HAVE_TARGET_32_LITTLE) || defined(HAVE_TARGET_32_BIG)
+template
+void
+Sized_symbol<32>::init_undefined(const char* name, const char* version,
+ Value_type value, elfcpp::STT type,
+ elfcpp::STB binding, elfcpp::STV visibility,
+ unsigned char nonvis);
+#endif
+
+#if defined(HAVE_TARGET_64_LITTLE) || defined(HAVE_TARGET_64_BIG)
+template
+void
+Sized_symbol<64>::init_undefined(const char* name, const char* version,
+ Value_type value, elfcpp::STT type,
+ elfcpp::STB binding, elfcpp::STV visibility,
+ unsigned char nonvis);
+#endif
+
+#if defined(HAVE_TARGET_32_LITTLE) || defined(HAVE_TARGET_32_BIG)
+template
+void
+Sized_symbol<32>::init_constant(const char* name, const char* version,
+ Value_type value, Size_type symsize,
+ elfcpp::STT type, elfcpp::STB binding,
+ elfcpp::STV visibility, unsigned char nonvis,
+ bool is_predefined);
+#endif
+
+#if defined(HAVE_TARGET_64_LITTLE) || defined(HAVE_TARGET_64_BIG)
+template
+void
+Sized_symbol<64>::init_constant(const char* name, const char* version,
+ Value_type value, Size_type symsize,
+ elfcpp::STT type, elfcpp::STB binding,
+ elfcpp::STV visibility, unsigned char nonvis,
+ bool is_predefined);
+#endif
+
} // End namespace gold.