From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7840 invoked by alias); 12 Jul 2011 09:43:46 -0000 Received: (qmail 7832 invoked by uid 22791); 12 Jul 2011 09:43:45 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from service87.mimecast.com (HELO service87.mimecast.com) (94.185.240.25) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Tue, 12 Jul 2011 09:43:31 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Tue, 12 Jul 2011 10:43:27 +0100 Received: from [10.1.77.49] ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 12 Jul 2011 10:43:25 +0100 Message-ID: <4E1C173D.6050104@arm.com> Date: Tue, 12 Jul 2011 22:33:00 -0000 From: Matthew Gretton-Dann User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18pre) Gecko/20110608 Lightning/1.0b3pre Lanikai/3.1.11pre MIME-Version: 1.0 To: Gus Sabina CC: "binutils@sourceware.org" Subject: Re: Linking against armlink produced ELF for armv6-m (thumb only) CPU References: <4C5FEFEB.4070004@finwe.fi> <1281357579.15516.9.camel@e102319-lin.cambridge.arm.com> <4C6021C8.8090306@finwe.fi> <1281432433.7027.39.camel@e102319-lin.cambridge.arm.com> <31998893.post@talk.nabble.com> <4E145FEA.5040305@arm.com> <1310448299.35910.YahooMailRC@web34301.mail.mud.yahoo.com> In-Reply-To: <1310448299.35910.YahooMailRC@web34301.mail.mud.yahoo.com> X-MC-Unique: 111071210432707101 Content-Type: text/plain; charset=WINDOWS-1252; format=flowed Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2011-07/txt/msg00119.txt.bz2 [Re-including binutils@sourceware.org on cc-list]. On 12/07/11 06:24, Gus Sabina wrote: > Hello Matthew: > 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: .../as --version .ARM.attributes sections are only supported for EABI targets=20 (arm*-*-*eabi) and not for the older ELF targets (for instance=20 arm-none-elf). As you seem to be trying to link against objects which have been=20 assembled targeting the EABI you should ensure your assembler is using=20 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=20 .ARM.attributes section. It will 'guess' the values to put in this=20 section from the command-line options you specify (in particular -mcpu,=20 -mfpu, -march). You can also specify other attributes by using the=20 .eabi_attribute directive (see=20 http://sourceware.org/binutils/docs-2.21/as/ARM-Directives.html#ARM-Directi= ves=20 for documentation). A fuller description of attributes is available in the ARM EABI=20 documentation here: http://infocenter.arm.com/help/topic/com.arm.doc.ihi0045c/index.html I can't tell you which directives to use. The general guidance is that=20 they should reflect your intentions as to what CPUs you expect the code=20 to be run on. > I'm attaching an example of the object file I'm creating so you can > inspect it. > I would really appreciate if you can help me with this issue... I hope the above helps. Thanks, Matt --=20 Matthew Gretton-Dann Principal Engineer, PD Software - Tools, ARM Ltd