This is the mail archive of the
mailing list for the binutils project.
Re: [RFC PATCH, binutils, ARM 10/11] Add support for creating ARM v8-M secure extensions import libraries
- From: Thomas Preudhomme <thomas dot preudhomme at foss dot arm dot com>
- To: "Richard Earnshaw (lists)" <Richard dot Earnshaw at arm dot com>
- Cc: binutils at sourceware dot org
- Date: Fri, 08 Jul 2016 10:23:11 +0100
- Subject: Re: [RFC PATCH, binutils, ARM 10/11] Add support for creating ARM v8-M secure extensions import libraries
- Authentication-results: sourceware.org; auth=none
- References: <email@example.com> <4425036.gJq85AxEeD@e108577-lin> <577E3520.firstname.lastname@example.org>
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 to GNU ld. This specific patch adds support for creating
> >> *Secure Gateway* import libraries.
> >> ARM v8-M security extensions require  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.
> >>  Software requirements for ARMv8-M security extension are described in
> >> document ARM-ECM-0359818   Available on http://infocenter.arm.com
> >> in
> >> Developer guides and articles > Software development > ARM®v8-M Security
> >> Extensions: Requirements on Development Tools  See requirement 9 of
> >> ARM-ECM-0359818 
> > 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
./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?