This is the mail archive of the
mailing list for the binutils project.
Re: Linking against armlink produced ELF for armv6-m (thumb only) CPU
- From: Matthew Gretton-Dann <matthew dot gretton-dann at arm dot com>
- To: Gus Sabina <gussabina at yahoo dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Tue, 12 Jul 2011 10:43:25 +0100
- Subject: Re: Linking against armlink produced ELF for armv6-m (thumb only) CPU
- References: <4C5FEFEB.firstname.lastname@example.org> <email@example.com> <4C6021C8.firstname.lastname@example.org> <email@example.com> <firstname.lastname@example.org> <4E145FEA.email@example.com> <1310448299.35910.YahooMailRC@web34301.mail.mud.yahoo.com>
[Re-including firstname.lastname@example.org on cc-list].
On 12/07/11 06:24, Gus Sabina wrote:
Thanks for your response. Actually, I didn't not include any
.ARM.attributes section at all but I'm still getting the "Conflicting
CPU architectures 0/11" error.
What target was gas configured for? To find this out do:
.ARM.attributes sections are only supported for EABI targets
(arm*-*-*eabi) and not for the older ELF targets (for instance
As you seem to be trying to link against objects which have been
assembled targeting the EABI you should ensure your assembler is using
an EABI target.
Let me explain what I'm doing. I 'm creating a tool which goal is to
create some "pattern" which should be located somewhere in memory (where
the linker decides it). I'm not using a compiler so I'm creating the
object file directly. So, I'm creating all sections (.emb_text including
the pattern). The problem is that when I link my object file with the
embedded system project, I'm getting the above error... It still works
but I would really like to get rid of this error...
My question is, should I include an .ARM.attributes to avoid this, and
if so, which would be the most appropriate?
When targeting EABI targets gas will automatically generate an
.ARM.attributes section. It will 'guess' the values to put in this
section from the command-line options you specify (in particular -mcpu,
-mfpu, -march). You can also specify other attributes by using the
.eabi_attribute directive (see
A fuller description of attributes is available in the ARM EABI
I can't tell you which directives to use. The general guidance is that
they should reflect your intentions as to what CPUs you expect the code
to be run on.
I'm attaching an example of the object file I'm creating so you can
I would really appreciate if you can help me with this issue...
I hope the above helps.
Principal Engineer, PD Software - Tools, ARM Ltd