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: Cary Coutant <ccoutant at gmail dot com>
- To: Than McIntosh <thanm at google dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Fri, 4 Mar 2016 08:17:53 -0800
- Subject: Re: Subject: [gold commit] PR gold/19019: Add support for STT_SPARC_REGISTER symbols
- Authentication-results: sourceware.org; auth=none
- References: <CA+Ur55FH0P02m--boiHOeNMRUkeqBuXa+5i2XMi0mVpyPRKBgA at mail dot gmail dot com>
Thanks; I just committed a fix.
-cary
On Fri, Mar 4, 2016 at 8:11 AM, Than McIntosh <thanm@google.com> wrote:
> 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.