This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [patch] Add arm .object_arch directive
- From: Paul Koning <pkoning at equallogic dot com>
- To: paul at codesourcery dot com
- Cc: binutils at sourceware dot org
- Date: Fri, 8 Sep 2006 17:37:30 -0400
- Subject: Re: [patch] Add arm .object_arch directive
- References: <200609082233.54304.paul@codesourcery.com>
>>>>> "Paul" == Paul Brook <paul@codesourcery.com> writes:
Paul> Under some circumstances it's desirable to have the assembler
Paul> accept one set of instructions, but mark the object file as
Paul> using a different (older) architecture.
Paul> Current there is no way to achieve this. An object is marked as
Paul> requiring an architecture if either insns from that
Paul> architecture are used, or if the user requests a specific
Paul> architecture.
Paul> My motivation for this is libgcc. It contains unwinding code
Paul> for several different CPUs, with the appropriate code being
Paul> selected at runtime. Some of these routines contain armv5
Paul> code. However marking the object as armv5 is wrong because that
Paul> will make the linker think it can use armv5 instructions in the
Paul> rest of the application.
Paul> The attached patch adds a .object_arch directive which allows
Paul> the user to override the architecture recorded in the object
Paul> file.
Paul> Ok?
I like that, except that the place I wanted it is MIPS, not ARM. Any
reason why you made it an ARM-specific feature rather than a general
feature?
paul