This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Linking against armlink produced ELF for armv6-m (thumb only) CPU


On Mon, 2010-08-09 at 18:42 +0300, Heikki Keränen wrote:
> 
> On 9.8.2010 15:39, Matthew Gretton-Dann wrote:
> > Hi,
> > 
> > On Mon, 2010-08-09 at 15:09 +0300, Heikki Keränen wrote:
> >> Hi,
> >>
> >> I have found no good solution to this problem. Can anyone help?
> >>
> >> We have a ROM image produced by RVCT toolchain: armlink produces .axf
> >> -file which is in ELF-format. Now we would like to create an executable
> >> to the RAM by using the GNU-toolchain. Those RAM-executables should of
> >> course link against functions in ROM.
> 
> [snip]
> 
> >> Build finishes, but in the ld -linker prints out a following error
> >> message: "Conflicting CPU architectures 11/0". Also the veneers
> >> generated by the ld -linker seem to contain ARM-instructions although we
> >> have a thumb-only CPU architecture (armv6-m).
> > 
> > Can you give some sample command lines (I don't think objects are
> > necessary at the moment) please?
> 
> 
> Here is my very simple example project I used to reproduce this issue:
[test case snipped]

> Here should be all the information you asked. I can provide additional
> details if required. I have tried a large number of compiler and linker
> options so some of those options I used are probably unnecessary or stupid.

Thank you for the test case - I have managed to reproduce the behaviour
you are seeing, and also cut it down to a test case that only needs gas
and ld to exhibit the same behaviour.

The basic issue seems to be that we are treating an object with
no .ARM.attributes section as one where all the attributes take their
default value (0 or "") and not one which has all the attributes set to
undefined (as if a TAG_nodefaults attribute was present).

I have raised the following bug in BugZilla to address this:
http://sourceware.org/bugzilla/show_bug.cgi?id=11897

Thanks,

Matt

-- 
Matthew Gretton-Dann
Principal Engineer - PDSW Tools
ARM Ltd


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]