This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH v2] [Gold,MIPS] Detect 64-bit MIPS targets
- From: Aurelien Jarno <aurelien at aurel32 dot net>
- To: binutils at sourceware dot org
- Cc: "Maciej W. Rozycki" <macro at imgtec dot com>
- Date: Sun, 21 Aug 2016 17:56:05 +0200
- Subject: Re: [PATCH v2] [Gold,MIPS] Detect 64-bit MIPS targets
- Authentication-results: sourceware.org; auth=none
- References: <1470770674-20068-1-git-send-email-aurelien@aurel32.net>
Ping.
On 2016-08-09 21:24, Aurelien Jarno wrote:
> When building gold targetting a 64-bit target like for example
> mips64el-linux-gnu or mipsisa64r6-linux-gnu, the configure script does
> not set HAVE_TARGET_64_LITTLE or HAVE_TARGET_64_BIG. This causes the
> link of gold to fail:
>
> mips.o: In function `(anonymous namespace)::Target_mips<64, true>::set_gp(gold::Layout*, gold::Symbol_table*) [clone .isra.1854]':
> /home/aurel32/git/binutils-gdb/gold/mips.cc:8377: undefined reference to `gold::Sized_symbol<64>::init_output_data(char const*, char const*, gold::Output_data*, unsigned long, unsigned long, elfcpp::STT, elfcpp::STB, elfcpp::STV, unsigned char, bool, bool)'
> mips.o: In function `gold::Merged_symbol_value<64>::value(gold::Relobj const*, unsigned int, unsigned long) const':
> /home/aurel32/git/binutils-gdb/gold/object.h:1649: undefined reference to `gold::Merged_symbol_value<64>::value_from_output_section(gold::Relobj const*, unsigned int, unsigned long) const'
> /home/aurel32/git/binutils-gdb/gold/object.h:1649: undefined reference to `gold::Merged_symbol_value<64>::value_from_output_section(gold::Relobj const*, unsigned int, unsigned long) const'
> ...
>
> Fix that by adding mips*64*el and mips*64* entries in gold/configure.tgt
>
> gold/Changelog:
> * configure.tgt: Add mips*64*el*-*-*|mips*64*le*-*-* and mips*64*-*-*.
> ---
> gold/ChangeLog | 4 ++++
> gold/configure.tgt | 14 ++++++++++++++
> 2 files changed, 18 insertions(+)
>
> I have been pointed that it doesn't fix the mips64r6 targets. This new
> patch takes them into account.
>
> diff --git a/gold/ChangeLog b/gold/ChangeLog
> index 239df36..45b10f5 100644
> --- a/gold/ChangeLog
> +++ b/gold/ChangeLog
> @@ -1,3 +1,7 @@
> +2016-08-09 Aurelien Jarno <aurelien@aurel32.net>
> +
> + * configure.tgt: Add mips*64*el*-*-*|mips*64*le*-*-* and mips*64*-*-*.
> +
> 2016-06-29 Cary Coutant <ccoutant@gmail.com>
>
> gold/
> diff --git a/gold/configure.tgt b/gold/configure.tgt
> index f1fd132..e119df0 100644
> --- a/gold/configure.tgt
> +++ b/gold/configure.tgt
> @@ -153,6 +153,13 @@ aarch64*-*)
> targ_big_endian=false
> targ_extra_big_endian=true
> ;;
> +mips*64*el*-*-*|mips*64*le*-*-*)
> + targ_obj=mips
> + targ_machine=EM_MIPS_RS3_LE
> + targ_size=64
> + targ_big_endian=false
> + targ_extra_big_endian=true
> + ;;
> mips*el*-*-*|mips*le*-*-*)
> targ_obj=mips
> targ_machine=EM_MIPS_RS3_LE
> @@ -160,6 +167,13 @@ mips*el*-*-*|mips*le*-*-*)
> targ_big_endian=false
> targ_extra_big_endian=true
> ;;
> +mips*64*-*-*)
> + targ_obj=mips
> + targ_machine=EM_MIPS
> + targ_size=64
> + targ_big_endian=true
> + targ_extra_big_endian=false
> + ;;
> mips*-*-*)
> targ_obj=mips
> targ_machine=EM_MIPS
> --
> 2.8.1
>
>
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurelien@aurel32.net http://www.aurel32.net