From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH] u-boot: Add wrapper blacklist
Date: Wed, 31 Jan 2018 16:09:40 +0100 [thread overview]
Message-ID: <20180131150940.37bikk6ic3pyad4k@pengutronix.de> (raw)
In-Reply-To: <20180131145730.29016-1-ada@thorsis.com>
On Wed, Jan 31, 2018 at 03:57:30PM +0100, Alexander Dahl wrote:
> u-boot had the same problem as the other bootloaders (barebox,
> at91bootstrap, …): much too big images were generated. Use the same
> wrapper blacklist approach to prevent this like in barebox package.
>
> Signed-off-by: Alexander Dahl <ada@thorsis.com>
> ---
> Out of curiosity: if I wanted to find out which of those options are
> necessary to add, instead of just blindly copying them. How would I do
> that?
Build/runtime failures or by knowing what the options mean :-).
TARGET_HARDEN_RELRO/TARGET_HARDEN_BINDNOW only makes sense for elf
binaries.
TARGET_HARDEN_PIE produces relocatable code. A bootloader may be
relocatable but that requires special handling, so it makes no sense to
force this from the outside.
TARGET_DEBUG matches any TARGET_DEBUG_* option. If debugging is enabled
then extra debug sections may be added to the binary. This can cause
problems depending on the bootloader build system and linker script. It's
not useful anyways, so blacklisting this is a good idea.
TARGET_BUILD_ID is just like TARGET_DEBUG. It adds a special elf section.
It makes no sense for a bootloader and can cause problems.
I'm not sure which one is responsible for your problem. Is
TARGET_DEBUG_ENABLE or TARGET_DEBUG_FULL enabled in your BSP?
Michael
> Greets
> Alex
> ---
> rules/u-boot.make | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/rules/u-boot.make b/rules/u-boot.make
> index 6dd2e43a45..94aa774580 100644
> --- a/rules/u-boot.make
> +++ b/rules/u-boot.make
> @@ -29,6 +29,13 @@ U_BOOT_DIR := $(BUILDDIR)/$(U_BOOT)
> # Prepare
> # ----------------------------------------------------------------------------
>
> +U_BOOT_WRAPPER_BLACKLIST := \
> + TARGET_HARDEN_RELRO \
> + TARGET_HARDEN_BINDNOW \
> + TARGET_HARDEN_PIE \
> + TARGET_DEBUG \
> + TARGET_BUILD_ID
> +
> U_BOOT_PATH := PATH=$(CROSS_PATH)
> U_BOOT_MAKE_OPT := CROSS_COMPILE=$(BOOTLOADER_CROSS_COMPILE) HOSTCC=$(HOSTCC)
> U_BOOT_MAKE_PAR := NO
> --
> 2.11.0
>
>
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
next prev parent reply other threads:[~2018-01-31 15:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-31 14:57 Alexander Dahl
2018-01-31 15:09 ` Michael Olbrich [this message]
2018-02-01 7:49 ` Alexander Dahl
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=20180131150940.37bikk6ic3pyad4k@pengutronix.de \
--to=m.olbrich@pengutronix.de \
--cc=ptxdist@pengutronix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox