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: [patch] Add arm .object_arch directive


>>>>> "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


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