From: Peng Fan <b51431@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V2 1/3] arm: discard relocation entry for secure section
Date: Wed, 21 Oct 2015 20:09:28 +0800 [thread overview]
Message-ID: <20151021120925.GA3299@shlinux2> (raw)
In-Reply-To: <20151021134227.55a71b8c@lilith>
Hello Albert,
On Wed, Oct 21, 2015 at 01:42:27PM +0200, Albert ARIBAUD wrote:
>Hello Peng,
>
>On Wed, 21 Oct 2015 17:42:20 +0800, Peng Fan <b51431@freescale.com>
>wrote:
>> Hello Albert,
>
>> I do not know how to generate non-relocatable code only for the secure text.
>> Since -mword-relocations and -pie are global flags, I do not know how to disable
>> mword-relocations when compiling PSCI and other secure text.
>
>Actually, I haven't even found a compiler or gcc option to entirely
>remove relocations altogether.
>
>> Is this ok for you?
>>
>> diff --git a/arch/arm/cpu/u-boot.lds b/arch/arm/cpu/u-boot.lds
>> index 65986e8..fb2128a 100644
>> --- a/arch/arm/cpu/u-boot.lds
>> +++ b/arch/arm/cpu/u-boot.lds
>> @@ -14,6 +14,7 @@ OUTPUT_ARCH(arm)
>> ENTRY(_start)
>> SECTIONS
>> {
>> + /DISCARD/ : { *(.rel._secure*) }
>> . = 0x00000000;
>>
>> . = ALIGN(4);
>
>Functionally, it works -- I've just checked it by comparing u-boot.map
>files of a mx7dsabresd build with and without the DISCARD. Not a single
>symbol from the text and data section gets changed.
>
>The only missing thing left is a comment before the DISCARD line,
>explaining both why .rel._secure* input sections have to be discarded,
>and also explaining why this is done it right at the start of the output
>sections.
Ok. Will add the comments in V3.
Regards,
Peng.
>
>Thanks for your patience. :)
>
>> Regards,
>> Peng.
>
>Amicalement,
>--
>Albert.
--
prev parent reply other threads:[~2015-10-21 12:09 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-20 5:59 [U-Boot] [PATCH V2 1/3] arm: discard relocation entry for secure section Peng Fan
2015-10-20 5:59 ` [U-Boot] [PATCH V2 2/3] mx7: psci: add basic psci support Peng Fan
2015-10-20 10:50 ` Fabio Estevam
2015-10-20 14:05 ` Li Frank
2015-10-20 14:25 ` Albert ARIBAUD
2015-10-20 14:29 ` Li Frank
[not found] ` <20151020165526.1ae0c332@lilith>
[not found] ` <BY2PR0301MB163850B2C1169D80C249AB2782390@BY2PR0301MB1638.namprd03.prod.outlook.com>
2015-10-20 21:04 ` Albert ARIBAUD
2015-10-20 21:12 ` Li Frank
2015-10-20 5:59 ` [U-Boot] [PATCH V2 3/3] imx: mx7: default enable non-secure mode Peng Fan
2015-10-20 7:05 ` [U-Boot] [PATCH V2 1/3] arm: discard relocation entry for secure section Albert ARIBAUD
2015-10-20 7:20 ` Peng Fan
2015-10-20 7:32 ` Albert ARIBAUD
2015-10-20 7:41 ` Peng Fan
2015-10-20 12:59 ` Albert ARIBAUD
2015-10-21 9:42 ` Peng Fan
2015-10-21 11:42 ` Albert ARIBAUD
2015-10-21 12:09 ` Peng Fan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151021120925.GA3299@shlinux2 \
--to=b51431@freescale.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.