[U-Boot] [PATCH] armv7: fix linker file for newer ld support

Steve Sakoman sakoman at gmail.com
Tue Nov 2 14:08:36 CET 2010


On Tue, Nov 2, 2010 at 12:48 AM, Albert ARIBAUD <albert.aribaud at free.fr> wrote:
> Le 02/11/2010 05:05, Steve Sakoman a écrit :
>
>> I've been using gcc 4.3.3, so I haven't run into the issue that this
>> patch is attempting to fix.
>>
>> I tested this patch using gcc 4.3.3, and while it produces a usable
>> image, it causes the size of the image to grow from 227K to 433K!
>>
>> So perhaps we need a patch that uses a more restrictive wildcard.
>>
>> Steve
>
> Thanks for pointing this out, Steve. That'll go into V3 of my patch set I
> guess, as Alexander's patch derives from mine and I most probably hit the
> same size increase issue as he does.
>
> Wolfgang: that may mean the tx25 config file patch is unneeded. Stay tuned.

I should have stated that I was using gcc 4.3.3 and binutils 2.18.50,
since indeed it does seem to be binutils related.

I have had a couple of reports that the following patch works with
recent gcc/binutils without increasing the size of the binary.

Could others check and report results?

Steve


ARMV7: Fix build issue with recent versions of gcc/binutils
---

diff --git a/arch/arm/cpu/armv7/u-boot.lds b/arch/arm/cpu/armv7/u-boot.lds
index 88a0fec..e690b58 100644
--- a/arch/arm/cpu/armv7/u-boot.lds
+++ b/arch/arm/cpu/armv7/u-boot.lds
@@ -55,7 +55,7 @@ SECTIONS
 	}
 	. = ALIGN(4);
 	__rel_dyn_start = .;
-	.rel.dyn : { *(.rel.dyn) }
+	.rel.dyn : { *(.rel.*) }
 	__rel_dyn_end = .;

 	__dynsym_start = .;


More information about the U-Boot mailing list