From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Wed, 17 Oct 2012 21:17:45 -0600 Subject: [U-Boot] [PATCH 1/4] ARM: fix u-boot.lds for -ffunction-sections/-fdata-sections In-Reply-To: References: <1350424209-11186-1-git-send-email-swarren@wwwdotorg.org> Message-ID: <507F74D9.7050306@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 10/17/2012 05:58 PM, Simon Glass wrote: > Hi Stephen, > > On Tue, Oct 16, 2012 at 2:50 PM, Stephen Warren wrote: >> From: Stephen Warren >> >> When -ffunction-sections or -fdata-section are used, symbols are placed >> into sections such as .data.eserial1_device and .bss.serial_current. >> Update the linker script to explicitly include these. Without this >> change (at least with my gcc-4.5.3 built using crosstool-ng), I see that >> the sections do end up being included, but __bss_end__ gets set to the >> same value as __bss_start. >> >> Signed-off-by: Stephen Warren >> --- >> This series fixes an SPL size overflow problem on Tegra. Tom Warren is >> out on vacation until Oct 25th, so he certainly won't be able to review >> this. Perhaps it could be applied directly to the ARM tree if enough >> Tegra people ack the series? >> >> Note that this series is not enough to make Tegra support work; either >> you must hack ./arch/arm/cpu/arm720t/tegra-common/spl.c to call >> serial_initialize() right before serial_init() in preloader_console_init() >> or wait for Allen Martin to rework Tegra's SPL support using the common >> SPL code. > > Are you going to submit a patch to enable function-sections, or is > that a separate discussion? For the SPL on Tegra, those flags were already on; this patch fixes a bug rather than prepares for new functionality. >> diff --git a/arch/arm/cpu/u-boot.lds b/arch/arm/cpu/u-boot.lds >> - .u_boot_cmd : { *(.u_boot_cmd) } >> + .u_boot_cmd : { *(.u_boot_cmd*) } > > I don't think this line is needed? > ... >> - *(.dynsym) >> + *(.dynsym*) > > Nor this one? Possibly. I changed all the section names to be future-proof. Perhaps a more targeted patch is warranted.