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: [RFC PATCH, binutils, ARM 10/11] Add support for creating ARM v8-M secure extensions import libraries


On Thursday 07 July 2016 11:55:28 Richard Earnshaw wrote:
> On 29/03/16 15:46, Thomas Preudhomme wrote:
> > On Wednesday 23 December 2015 16:01:50 Thomas Preud'homme wrote:
> >> Hi,
> >> 
> >> [Posting patch series as RFC]
> >> 
> >> This patch is part of a patch series to add support for ARMv8-M security
> >> extension[1] to GNU ld. This specific patch adds support for creating
> >> *Secure Gateway* import libraries.
> >> 
> >> ARM v8-M security extensions require [3] a secure gateway import library
> >> to
> >> be generated for non-secure executable to link against entry points in
> >> secure executable. Such an import library must contain all global
> >> function
> >> symbols from the secure executable that have a corresponding special (ie
> >> prefixed by "__acle_se_") symbol and these symbol should be made
> >> absolute.
> >> 
> >> This patch adds support for generating such an import library. It reuses
> >> the code to generate an import library by requiring the user to add an
> >> extra --cmse-implib option for him/her to state the intent to create a
> >> *secure gateway* import library.
> >> 
> >> 
> >> [1] Software requirements for ARMv8-M security extension are described in
> >> document ARM-ECM-0359818 [2] [2] Available on http://infocenter.arm.com
> >> in
> >> Developer guides and articles > Software development > ARM®v8-M Security
> >> Extensions: Requirements on Development Tools [3] See requirement 9 of
> >> ARM-ECM-0359818 [2]
> > 
> > Please find an updated patch below.
> 
> One question: What happens if the user tries to use the new option
> --cmse-implib on a target that doesn't support v8-M SE?  We should get
> some sensible diagnostic in that case.

It depends whether the object file has __acle_se symbols or not. If it doesn't 
(eg. normal armv7-m object file), the following happens:

./ld/ld-new: implib.lib: no symbol found for import library
./ld/ld-new: implib.lib: failed to generate import library

Indeed, there is no entry function so the import library would be empty. This 
is a generic error message, it could be improved indeed with specific logic to 
detect such a case.

If one of the object file has an __acle_se symbol but is still not v8-m, the 
following happens:

./ld/ld-new: cmse-implib.o: Special symbol `__acle_se_exported_entry_veneer2' 
only allowed for ARMv8-M architecture or later
./ld/ld-new: cannot size stub section: Invalid operation

Are the messages enough in your opinion or should we improve the wordings?

Best regards,

Thomas


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