From: Tom Rini Date: Fri, 6 Apr 2018 17:03:43 -0400 Subject: [U-Boot] [U-Boot, v4, 12/16] common: env_embedded: allow fine placement of environment object In-Reply-To: References: Message-ID: <20180406210343.GD10996@bill-the-cat.ec.rr.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Fri, Mar 16, 2018 at 05:20:53PM +0100, Christophe Leroy wrote: > Commit 7653942b10e9e ("common/env_embedded.c: drop support for > CONFIG_SYS_USE_PPCENV") dropped the .ppcenv section which was > used in linking scripts to allow fine placement of embedded > environment sections. > > This implies that GCC randomly places objects from env/embedded.o > and environment is not guaranteed to be located at the correct address: > > 04003df8 g F .text 00000038 mii_init > 04004000 g O .text 00000004 env_size > 04004004 g O .text 00002000 environment > 04006004 g F .text 00000040 .hidden __lshrdi3 > > This patch restores this capability by allocating each object marked > with __UBOOT_ENV_SECTION__ into a different section. Hence > 'environment' will be alone in .text.environment, allowing a > fine placement in u-boot.lds with: > > . = DEFINED(env_offset) ? env_offset : .; > env/embedded.o (.text.environment) > > Fixes: 7653942b10e9e ("common/env_embedded.c: drop support for CONFIG_SYS_USE_PPCENV") > Cc: Thomas Petazzoni > Signed-off-by: Christophe Leroy Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: