* [U-Boot] [PATCH V5 1/2] ARM: fix linker file for newer ld support
@ 2010-11-15 20:46 Albert Aribaud
2010-11-15 20:46 ` [U-Boot] [PATCH V5 2/2] tx25: " Albert Aribaud
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Albert Aribaud @ 2010-11-15 20:46 UTC (permalink / raw)
To: u-boot
older ld emitted all ELF relocations in input sections named
.rel.dyn, whereas newer ld uses names of the form .rel*. The
linker script only collected .rel.dyn input sections. Rewrite
to collect all .rel* input sections.
Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
---
V1 Initial submission
V2 arm926ejs: added ALIGN between bss and .rel.dyn sections
tx25: removed GOT and datarel output sections
tx25: fixed typo in config file commit message
V3 arm926ejs: overlaid .bss and .rel.dyn sections
tx25: overlaid .bss and .rel.dyn sections
V4 arm926ejs and tx25: fixed overlay
tx25: removed third patch as u-boot size remains small enough
V5 added u-boot.lds/start.S fix for arm1136, arm1176, pxa, armv7.
arch/arm/cpu/arm1136/start.S | 16 -------------
arch/arm/cpu/arm1136/u-boot.lds | 38 ++++++++++++++++--------------
arch/arm/cpu/arm1176/u-boot.lds | 37 ++++++++++++++---------------
arch/arm/cpu/arm926ejs/u-boot.lds | 30 ++++++++++++++---------
arch/arm/cpu/armv7/start.S | 24 -------------------
arch/arm/cpu/armv7/u-boot.lds | 46 ++++++++++++++++++++-----------------
arch/arm/cpu/pxa/u-boot.lds | 35 +++++++++++++++++++---------
7 files changed, 105 insertions(+), 121 deletions(-)
diff --git a/arch/arm/cpu/arm1136/start.S b/arch/arm/cpu/arm1136/start.S
index aecc943..eec8bee 100644
--- a/arch/arm/cpu/arm1136/start.S
+++ b/arch/arm/cpu/arm1136/start.S
@@ -104,22 +104,6 @@ _bss_start_ofs:
_bss_end_ofs:
.word _end - _start
-.globl _datarel_start_ofs
-_datarel_start_ofs:
- .word __datarel_start - _start
-
-.globl _datarelrolocal_start_ofs
-_datarelrolocal_start_ofs:
- .word __datarelrolocal_start - _start
-
-.globl _datarellocal_start_ofs
-_datarellocal_start_ofs:
- .word __datarellocal_start - _start
-
-.globl _datarelro_start_ofs
-_datarelro_start_ofs:
- .word __datarelro_start - _start
-
#ifdef CONFIG_USE_IRQ
/* IRQ stack memory (calculated at run-time) */
.globl IRQ_STACK_START
diff --git a/arch/arm/cpu/arm1136/u-boot.lds b/arch/arm/cpu/arm1136/u-boot.lds
index 31f43f0..253adbe 100644
--- a/arch/arm/cpu/arm1136/u-boot.lds
+++ b/arch/arm/cpu/arm1136/u-boot.lds
@@ -20,7 +20,8 @@
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
@@ -49,23 +50,9 @@ SECTIONS
. = ALIGN(4);
.data : {
*(.data)
- __datarel_start = .;
- *(.data.rel)
- __datarelrolocal_start = .;
- *(.data.rel.ro.local)
- __datarellocal_start = .;
- *(.data.rel.local)
- __datarelro_start = .;
- *(.data.rel.ro)
}
. = ALIGN(4);
- __rel_dyn_start = .;
- .rel.dyn : { *(.rel.dyn) }
- __rel_dyn_end = .;
-
- __dynsym_start = .;
- .dynsym : { *(.dynsym) }
. = .;
__u_boot_cmd_start = .;
@@ -73,9 +60,24 @@ SECTIONS
__u_boot_cmd_end = .;
. = ALIGN(4);
- __bss_start = .;
- .bss (NOLOAD) : { *(.bss) . = ALIGN(4); }
- _end = .;
+
+ .rel.dyn : {
+ __rel_dyn_start = .;
+ *(.rel*)
+ __rel_dyn_end = .;
+ }
+
+ .dynsym : {
+ __dynsym_start = .;
+ *(.dynsym)
+ }
+
+ .bss __rel_dyn_start (OVERLAY) : {
+ __bss_start = .;
+ *(.bss)
+ . = ALIGN(4);
+ _end = .;
+ }
/DISCARD/ : { *(.dynstr*) }
/DISCARD/ : { *(.dynamic*) }
diff --git a/arch/arm/cpu/arm1176/u-boot.lds b/arch/arm/cpu/arm1176/u-boot.lds
index d9ed954..fe31800 100644
--- a/arch/arm/cpu/arm1176/u-boot.lds
+++ b/arch/arm/cpu/arm1176/u-boot.lds
@@ -41,33 +41,32 @@ SECTIONS
. = ALIGN(4);
.data : {
*(.data)
- __datarel_start = .;
- *(.data.rel)
- __datarelrolocal_start = .;
- *(.data.rel.ro.local)
- __datarellocal_start = .;
- *(.data.rel.local)
- __datarelro_start = .;
- *(.data.rel.ro)
}
- . = ALIGN(4);
- __rel_dyn_start = .;
- .rel.dyn : { *(.rel.dyn) }
- __rel_dyn_end = .;
-
- __dynsym_start = .;
- .dynsym : { *(.dynsym) }
-
. = .;
__u_boot_cmd_start = .;
.u_boot_cmd : { *(.u_boot_cmd) }
__u_boot_cmd_end = .;
. = ALIGN(4);
- __bss_start = .;
- .bss (NOLOAD) : { *(.bss) . = ALIGN(4); }
- _end = .;
+
+ .rel.dyn : {
+ __rel_dyn_start = .;
+ *(.rel*)
+ __rel_dyn_end = .;
+ }
+
+ .dynsym : {
+ __dynsym_start = .;
+ *(.dynsym)
+ }
+
+ .bss __rel_dyn_start (OVERLAY) : {
+ __bss_start = .;
+ *(.bss)
+ . = ALIGN(4);
+ _end = .;
+ }
/DISCARD/ : { *(.dynstr*) }
/DISCARD/ : { *(.dynamic*) }
diff --git a/arch/arm/cpu/arm926ejs/u-boot.lds b/arch/arm/cpu/arm926ejs/u-boot.lds
index 72f45f8..28c91f9 100644
--- a/arch/arm/cpu/arm926ejs/u-boot.lds
+++ b/arch/arm/cpu/arm926ejs/u-boot.lds
@@ -45,24 +45,30 @@ SECTIONS
. = ALIGN(4);
- __rel_dyn_start = .;
- .rel.dyn : { *(.rel.dyn) }
- __rel_dyn_end = .;
-
- __dynsym_start = .;
- .dynsym : { *(.dynsym) }
-
- . = ALIGN(4);
-
. = .;
__u_boot_cmd_start = .;
.u_boot_cmd : { *(.u_boot_cmd) }
__u_boot_cmd_end = .;
. = ALIGN(4);
- __bss_start = .;
- .bss (NOLOAD) : { *(.bss) . = ALIGN(4); }
- _end = .;
+
+ .rel.dyn : {
+ __rel_dyn_start = .;
+ *(.rel*)
+ __rel_dyn_end = .;
+ }
+
+ .dynsym : {
+ __dynsym_start = .;
+ *(.dynsym)
+ }
+
+ .bss __rel_dyn_start (OVERLAY) : {
+ __bss_start = .;
+ *(.bss)
+ . = ALIGN(4);
+ _end = .;
+ }
/DISCARD/ : { *(.dynstr*) }
/DISCARD/ : { *(.dynamic*) }
diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S
index bb3948d..2dfdafe 100644
--- a/arch/arm/cpu/armv7/start.S
+++ b/arch/arm/cpu/armv7/start.S
@@ -98,30 +98,6 @@ FIQ_STACK_START:
IRQ_STACK_START_IN:
.word 0x0badc0de
-.globl _datarel_start_ofs
-_datarel_start_ofs:
- .word __datarel_start - _start
-
-.globl _datarelrolocal_start_ofs
-_datarelrolocal_start_ofs:
- .word __datarelrolocal_start - _start
-
-.globl _datarellocal_start_ofs
-_datarellocal_start_ofs:
- .word __datarellocal_start - _start
-
-.globl _datarelro_start_ofs
-_datarelro_start_ofs:
- .word __datarelro_start - _start
-
-.globl _got_start_ofs
-_got_start_ofs:
- .word __got_start - _start
-
-.globl _got_end_Ofs
-_got_end_ofs:
- .word __got_end - _start
-
/*
* the actual reset code
*/
diff --git a/arch/arm/cpu/armv7/u-boot.lds b/arch/arm/cpu/armv7/u-boot.lds
index 88a0fec..5725c30 100644
--- a/arch/arm/cpu/armv7/u-boot.lds
+++ b/arch/arm/cpu/armv7/u-boot.lds
@@ -44,34 +44,38 @@ SECTIONS
. = ALIGN(4);
.data : {
*(.data)
- __datarel_start = .;
- *(.data.rel)
- __datarelrolocal_start = .;
- *(.data.rel.ro.local)
- __datarellocal_start = .;
- *(.data.rel.local)
- __datarelro_start = .;
- *(.data.rel.ro)
}
- . = ALIGN(4);
- __rel_dyn_start = .;
- .rel.dyn : { *(.rel.dyn) }
- __rel_dyn_end = .;
-
- __dynsym_start = .;
- .dynsym : { *(.dynsym) }
- __got_start = .;
. = ALIGN(4);
- .got : { *(.got) }
- __got_end = .;
+ . = .;
__u_boot_cmd_start = .;
.u_boot_cmd : { *(.u_boot_cmd) }
__u_boot_cmd_end = .;
. = ALIGN(4);
- __bss_start = .;
- .bss : { *(.bss) }
- _end = .;
+
+ .rel.dyn : {
+ __rel_dyn_start = .;
+ *(.rel*)
+ __rel_dyn_end = .;
+ }
+
+ .dynsym : {
+ __dynsym_start = .;
+ *(.dynsym)
+ }
+
+ .bss __rel_dyn_start (OVERLAY) : {
+ __bss_start = .;
+ *(.bss)
+ . = ALIGN(4);
+ _end = .;
+ }
+
+ /DISCARD/ : { *(.dynstr*) }
+ /DISCARD/ : { *(.dynamic*) }
+ /DISCARD/ : { *(.plt*) }
+ /DISCARD/ : { *(.interp*) }
+ /DISCARD/ : { *(.gnu*) }
}
diff --git a/arch/arm/cpu/pxa/u-boot.lds b/arch/arm/cpu/pxa/u-boot.lds
index d6643f9..0818d0b 100644
--- a/arch/arm/cpu/pxa/u-boot.lds
+++ b/arch/arm/cpu/pxa/u-boot.lds
@@ -44,14 +44,6 @@ SECTIONS
}
. = ALIGN(4);
- __rel_dyn_start = .;
- .rel.dyn : { *(.rel.dyn) }
- __rel_dyn_end = .;
-
- __dynsym_start = .;
- .dynsym : { *(.dynsym) }
-
- . = ALIGN(4);
. = .;
__u_boot_cmd_start = .;
@@ -59,7 +51,28 @@ SECTIONS
__u_boot_cmd_end = .;
. = ALIGN(4);
- __bss_start = .;
- .bss (NOLOAD) : { *(.bss) . = ALIGN(4); }
- _end = .;
+
+ .rel.dyn : {
+ __rel_dyn_start = .;
+ *(.rel*)
+ __rel_dyn_end = .;
+ }
+
+ .dynsym : {
+ __dynsym_start = .;
+ *(.dynsym)
+ }
+
+ .bss __rel_dyn_start (OVERLAY) : {
+ __bss_start = .;
+ *(.bss)
+ . = ALIGN(4);
+ _end = .;
+ }
+
+ /DISCARD/ : { *(.dynstr*) }
+ /DISCARD/ : { *(.dynamic*) }
+ /DISCARD/ : { *(.plt*) }
+ /DISCARD/ : { *(.interp*) }
+ /DISCARD/ : { *(.gnu*) }
}
--
1.7.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* [U-Boot] [PATCH V5 2/2] tx25: fix linker file for newer ld support
2010-11-15 20:46 [U-Boot] [PATCH V5 1/2] ARM: fix linker file for newer ld support Albert Aribaud
@ 2010-11-15 20:46 ` Albert Aribaud
2010-11-17 19:46 ` Wolfgang Denk
2010-11-15 20:48 ` [U-Boot] [PATCH V5 1/2] ARM: " Albert ARIBAUD
2010-11-17 19:45 ` Wolfgang Denk
2 siblings, 1 reply; 6+ messages in thread
From: Albert Aribaud @ 2010-11-15 20:46 UTC (permalink / raw)
To: u-boot
older ld emitted all ELF relocations in input sections named
.rel.dyn, whereas newer ld uses names of the form .rel*. The
linker script only collected .rel.dyn input sections. Rewrite
to collect all .rel* input sections.
Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
---
nand_spl/board/karo/tx25/u-boot.lds | 40 ++++++++++++++++------------------
1 files changed, 19 insertions(+), 21 deletions(-)
diff --git a/nand_spl/board/karo/tx25/u-boot.lds b/nand_spl/board/karo/tx25/u-boot.lds
index 5f95c87..ff289fb 100644
--- a/nand_spl/board/karo/tx25/u-boot.lds
+++ b/nand_spl/board/karo/tx25/u-boot.lds
@@ -43,35 +43,33 @@ SECTIONS
. = ALIGN(4);
.data : {
*(.data)
- __datarel_start = .;
- *(.data.rel)
- __datarelrolocal_start = .;
- *(.data.rel.ro.local)
- __datarellocal_start = .;
- *(.data.rel.local)
- __datarelro_start = .;
- *(.data.rel.ro)
}
. = ALIGN(4);
- __rel_dyn_start = .;
- __rel_dyn_end = .;
- __dynsym_start = .;
-
- __got_start = .;
- . = ALIGN(4);
- .got : { *(.got) }
-
- __got_end = .;
- . = .;
__u_boot_cmd_start = .;
.u_boot_cmd : { *(.u_boot_cmd) }
__u_boot_cmd_end = .;
. = ALIGN(4);
- __bss_start = .;
- .bss : { *(.bss) }
- _end = .;
+
+ .rel.dyn : {
+ __rel_dyn_start = .;
+ *(.rel*)
+ __rel_dyn_end = .;
+ }
+
+ .dynsym : {
+ __dynsym_start = .;
+ *(.dynsym)
+ }
+
+ .bss __rel_dyn_start (OVERLAY) : {
+ __bss_start = .;
+ *(.bss)
+ . = ALIGN(4);
+ _end = .;
+ }
+
/DISCARD/ : { *(.bss*) }
/DISCARD/ : { *(.dynstr*) }
/DISCARD/ : { *(.dynsym*) }
--
1.7.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* [U-Boot] [PATCH V5 2/2] tx25: fix linker file for newer ld support
2010-11-15 20:46 ` [U-Boot] [PATCH V5 2/2] tx25: " Albert Aribaud
@ 2010-11-17 19:46 ` Wolfgang Denk
0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2010-11-17 19:46 UTC (permalink / raw)
To: u-boot
Dear Albert Aribaud,
In message <1289853964-6525-2-git-send-email-albert.aribaud@free.fr> you wrote:
> older ld emitted all ELF relocations in input sections named
> .rel.dyn, whereas newer ld uses names of the form .rel*. The
> linker script only collected .rel.dyn input sections. Rewrite
> to collect all .rel* input sections.
>
> Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
> ---
> nand_spl/board/karo/tx25/u-boot.lds | 40 ++++++++++++++++------------------
> 1 files changed, 19 insertions(+), 21 deletions(-)
Applied to u-boot-arm, thanks.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The number you have dialed is imaginary. Please divide by 0 and try
again.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH V5 1/2] ARM: fix linker file for newer ld support
2010-11-15 20:46 [U-Boot] [PATCH V5 1/2] ARM: fix linker file for newer ld support Albert Aribaud
2010-11-15 20:46 ` [U-Boot] [PATCH V5 2/2] tx25: " Albert Aribaud
@ 2010-11-15 20:48 ` Albert ARIBAUD
2010-11-17 19:45 ` Wolfgang Denk
2 siblings, 0 replies; 6+ messages in thread
From: Albert ARIBAUD @ 2010-11-15 20:48 UTC (permalink / raw)
To: u-boot
Le 15/11/2010 21:46, Albert Aribaud a ?crit :
> older ld emitted all ELF relocations in input sections named
> .rel.dyn, whereas newer ld uses names of the form .rel*. The
> linker script only collected .rel.dyn input sections. Rewrite
> to collect all .rel* input sections.
>
> Signed-off-by: Albert Aribaud<albert.aribaud@free.fr>
> ---
> V1 Initial submission
> V2 arm926ejs: added ALIGN between bss and .rel.dyn sections
> tx25: removed GOT and datarel output sections
> tx25: fixed typo in config file commit message
> V3 arm926ejs: overlaid .bss and .rel.dyn sections
> tx25: overlaid .bss and .rel.dyn sections
> V4 arm926ejs and tx25: fixed overlay
> tx25: removed third patch as u-boot size remains small enough
> V5 added u-boot.lds/start.S fix for arm1136, arm1176, pxa, armv7.
Builds for at least one board of each cpu, but otherwise untested except
for arm926 openrd_base.
Amicalement,
--
Albert.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH V5 1/2] ARM: fix linker file for newer ld support
2010-11-15 20:46 [U-Boot] [PATCH V5 1/2] ARM: fix linker file for newer ld support Albert Aribaud
2010-11-15 20:46 ` [U-Boot] [PATCH V5 2/2] tx25: " Albert Aribaud
2010-11-15 20:48 ` [U-Boot] [PATCH V5 1/2] ARM: " Albert ARIBAUD
@ 2010-11-17 19:45 ` Wolfgang Denk
2010-11-18 6:38 ` Albert ARIBAUD
2 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Denk @ 2010-11-17 19:45 UTC (permalink / raw)
To: u-boot
Dear Albert Aribaud,
In message <1289853964-6525-1-git-send-email-albert.aribaud@free.fr> you wrote:
> older ld emitted all ELF relocations in input sections named
> .rel.dyn, whereas newer ld uses names of the form .rel*. The
> linker script only collected .rel.dyn input sections. Rewrite
> to collect all .rel* input sections.
>
> Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
> ---
> V1 Initial submission
> V2 arm926ejs: added ALIGN between bss and .rel.dyn sections
> tx25: removed GOT and datarel output sections
> tx25: fixed typo in config file commit message
> V3 arm926ejs: overlaid .bss and .rel.dyn sections
> tx25: overlaid .bss and .rel.dyn sections
> V4 arm926ejs and tx25: fixed overlay
> tx25: removed third patch as u-boot size remains small enough
> V5 added u-boot.lds/start.S fix for arm1136, arm1176, pxa, armv7.
>
> arch/arm/cpu/arm1136/start.S | 16 -------------
> arch/arm/cpu/arm1136/u-boot.lds | 38 ++++++++++++++++--------------
> arch/arm/cpu/arm1176/u-boot.lds | 37 ++++++++++++++---------------
> arch/arm/cpu/arm926ejs/u-boot.lds | 30 ++++++++++++++---------
> arch/arm/cpu/armv7/start.S | 24 -------------------
> arch/arm/cpu/armv7/u-boot.lds | 46 ++++++++++++++++++++-----------------
> arch/arm/cpu/pxa/u-boot.lds | 35 +++++++++++++++++++---------
> 7 files changed, 105 insertions(+), 121 deletions(-)
Applied to u-boot-arm, thanks.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
There are very few personal problems that cannot be solved through a
suitable application of high explosives.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH V5 1/2] ARM: fix linker file for newer ld support
2010-11-17 19:45 ` Wolfgang Denk
@ 2010-11-18 6:38 ` Albert ARIBAUD
0 siblings, 0 replies; 6+ messages in thread
From: Albert ARIBAUD @ 2010-11-18 6:38 UTC (permalink / raw)
To: u-boot
Le 17/11/2010 20:45, Wolfgang Denk a ?crit :
>> older ld emitted all ELF relocations in input sections named
>> .rel.dyn, whereas newer ld uses names of the form .rel*. The
>> linker script only collected .rel.dyn input sections. Rewrite
>> to collect all .rel* input sections.
>>
>> Signed-off-by: Albert Aribaud<albert.aribaud@free.fr>
> Applied to u-boot-arm, thanks.
Thanks.
> Best regards,
>
> Wolfgang Denk
Amicalement,
--
Albert.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-11-18 6:38 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-15 20:46 [U-Boot] [PATCH V5 1/2] ARM: fix linker file for newer ld support Albert Aribaud
2010-11-15 20:46 ` [U-Boot] [PATCH V5 2/2] tx25: " Albert Aribaud
2010-11-17 19:46 ` Wolfgang Denk
2010-11-15 20:48 ` [U-Boot] [PATCH V5 1/2] ARM: " Albert ARIBAUD
2010-11-17 19:45 ` Wolfgang Denk
2010-11-18 6:38 ` Albert ARIBAUD
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox