This is the mail archive of the
binutils@sourceware.org
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: Thu, 04 Aug 2016 16:02:42 +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: <005401d13d58$2ef59d80$8ce0d880$@foss.arm.com> <1995011.4AUZLieU4W@e108577-lin> <dfb5d0a7-8c2c-d437-2bd3-5d6b99c013e3@arm.com>
On Thursday 04 August 2016 10:03:01 Richard Earnshaw wrote:
> On 08/07/16 10:23, Thomas Preudhomme wrote:
> > 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?
>
> No, I think that's sufficient. Patch OK.
Committed, thanks.
Best regards,
Thomas