diff mbox

[U-Boot,V4,1/2] arm926ejs: fix linker file for newer ld support

Message ID 20101115114356.GC26767@safe.home.local
State RFC
Headers show

Commit Message

Sebastien Nov. 15, 2010, 11:43 a.m. UTC
Dear Andreas,

On 2010-11-15 12:09:58, Andreas Bießmann wrote:
> 
> arm920t/at91 is ongoing. I may need your help these days but first I
> need some time to get my last linker related issues fixed properly
> (segfault when linking empty weak symbol with -pie).

Can you please try the attached patch?  It fixed this problem for me.

Comments

Andreas Bießmann Nov. 16, 2010, 7:38 a.m. UTC | #1
Dear Sebastien,

Am 15.11.2010 um 12:43 schrieb Sebastien Carlier:

> Dear Andreas,
> 
> On 2010-11-15 12:09:58, Andreas Bießmann wrote:
>> 
>> arm920t/at91 is ongoing. I may need your help these days but first I
>> need some time to get my last linker related issues fixed properly
>> (segfault when linking empty weak symbol with -pie).
> 
> Can you please try the attached patch?  It fixed this problem for me.

yes it works, the ASSERT/SEGFAULT are gone. I've never tested to place these two sections that early in the ELF. I used to place them between .rel.dyn and .bss (after applying Albert's approach of overloading .rel.dyn with .bss). At that place I still had ASSERT/SEGFAULT failures in linker.

Thanks a lot, with this information I may get the arm920t elf relocation fixed.

regards

Andreas Bießmann
diff mbox

Patch

From f4007bb3d05768bbe5c0903f856809618a89e921 Mon Sep 17 00:00:00 2001
From: Sebastien Carlier <sebastien.carlier@gmail.com>
Date: Wed, 10 Nov 2010 14:41:44 +0100
Subject: [PATCH] arm920t: add .plt and .rel.plt to the linker script


Signed-off-by: Sebastien Carlier <sebastien.carlier@gmail.com>
---
 arch/arm/cpu/arm920t/u-boot.lds |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arm/cpu/arm920t/u-boot.lds b/arch/arm/cpu/arm920t/u-boot.lds
index d1babcc..dd62bdd 100644
--- a/arch/arm/cpu/arm920t/u-boot.lds
+++ b/arch/arm/cpu/arm920t/u-boot.lds
@@ -42,6 +42,8 @@  SECTIONS
 		arch/arm/cpu/arm920t/start.o	(.text)
 		*(.text)
 	}
+	.plt : { *(.plt) }
+	.rel.plt : { *(.rel.plt) }
 
 	. = ALIGN(4);
 	.rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
-- 
1.7.3.2.161.g3089c