This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] gold: Add boiler-plate code for ARM target.
- From: Ian Lance Taylor <iant at google dot com>
- To: Doug Kwan (éæå) <dougkwan at google dot com>
- Cc: binutils at sourceware dot org
- Date: Thu, 28 May 2009 16:41:39 -0700
- Subject: Re: [PATCH] gold: Add boiler-plate code for ARM target.
- References: <498552560905281453n62dfff5ahdc9c6bd91e6dca3e@mail.gmail.com>
"Doug Kwan (éæå)" <dougkwan@google.com> writes:
> 009-05-28 Doug Kwan <dougkwan@google.com>
>
> ChangeLog
> * configure.ac: Support gold for target arm*-*-eabi.
> * configure: Regenerate.
>
> gold/ChangeLog
> * Makefile.am (TARGETSOURCES): Add arm.cc.
> (ALL_TARGETOBJECTS): Add arm.$(OBJEXT)
> * Makefile.in: Regenerate.
> * arm.cc: New file.
> * configure.tgt: Add arm*-*-eabi target.
That should be 2009 in the first line of the ChangeLog entry.
> case "${target}" in
> - i?86-*-* | x86_64-*-* | sparc*-*-* | powerpc*-*-*)
> + i?86-*-* | x86_64-*-* | sparc*-*-* | powerpc*-*-* | arm*-*-eabi)
> configdirs="`echo " ${configdirs} " | sed -e 's/ ld / gold /'`"
You should match "arm*-*-*" here, as the other processors do. Otherwise
you won't match arm-linux-gnu, or arm-ecos-elf, etc. I know that you
don't support all the ARM bits yet, but that's OK.
> + // Return whether SYM is defined by the ABI.
> + bool
> + do_is_defined_by_abi(Symbol* sym) const
> + { return strcmp(sym->name(), "___tls_get_addr") == 0; }
I think that should be __tls_get_addr (two underscores, not three). The
x86 does use ___tls_get_addr for weird compatibility reasons, but I
think the ARM always uses __tls_get_addr.
> Index: gold/configure.tgt
> ===================================================================
> RCS file: /cvs/src/src/gold/configure.tgt,v
> retrieving revision 1.6
> diff -u -u -p -r1.6 configure.tgt
> --- gold/configure.tgt 24 Mar 2009 00:31:28 -0000 1.6
> +++ gold/configure.tgt 28 May 2009 21:43:39 -0000
> @@ -104,6 +104,13 @@ powerpc64-*)
> targ_big_endian=true
> targ_extra_big_endian=false
> ;;
> +arm*-*-eabi)
> + targ_obj=arm
> + targ_machine=EM_ARM
> + targ_size=32
> + targ_big_endian=false
> + targ_extra_big_endian=true
> + ;;
Just match arm* here too. Also match armel*. Also add a separate case
for armeb* which sets targ_big_endian to true.
This is OK with those changes.
Thanks.
Ian