Skip to contentSkip to conversation

at91bootstrap: fix gcc-4.6.x overlap linker issue

PATCH New Grégory Hermant 2 participants 2 messages Oct 1, 2012 Arm/Microchip (AT91) SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 at91bootstrap: fix gcc-4.6.x overlap linker issue

---
  ...at91bootstrap-1.16-gcc-4.6.x-ldscript-fix.patch |   53 
++++++++++++++++++++
  1 file changed, 53 insertions(+)

create mode 100644
boot/at91bootstrap/at91bootstrap-1.16-gcc-4.6.x-ldscript-fix.patch

(quoted diff) +0 -0

a/boot/at91bootstrap/at91bootstrap-1.16-gcc-4.6.x-ldscript-fix.patch b/boot/at91bootstrap/at91bootstrap-1.16-gcc-4.6.x-ldscript-fix.patch new file mode 100644
index 0000000..56947c7

boot/at91bootstrap/at91bootstrap-1.16-gcc-4.6.x-ldscript-fix.patch new file +37 -0
@@ -0,0 +1,53 @@
+From 5a094e959cd216c1be148effc624eb12e2083de9 Mon Sep 17 00:00:00 2001
+From: Gregory Hermant <[email protected]>
+Date: Mon, 1 Oct 2012 16:54:43 +0200
+Subject: [PATCH] at91bootstrap-v1.16-ldscript-fix
+
+---
+ crt0_gnu.S          |    2 +-
+ elf32-littlearm.lds |   12 +++++++++++-
+ 2 files changed, 12 insertions(+), 2 deletions(-)
+
+diff --git a/crt0_gnu.S b/crt0_gnu.S
+index 002feef..ea6581f 100644
+--- a/crt0_gnu.S
++++ b/crt0_gnu.S
+@@ -191,7 +191,7 @@ _go:
+ + 	.align
+ _lp_data:
+-        .word _etext
++        .word _edummy
+         .word _sdata
+         .word _edata
+ +diff --git a/elf32-littlearm.lds b/elf32-littlearm.lds
+index a33952f..17b1646 100644
+--- a/elf32-littlearm.lds
++++ b/elf32-littlearm.lds
+@@ -10,11 +10,21 @@ SECTIONS
+ 		*(.rodata)                 /* read-only data (constants) */
+ 		*(.rodata*)
+ 		. = ALIGN(4);
++		*(.glue_7)
++		. = ALIGN(4);
++		*(.eh_frame)
++		. = ALIGN(4);
+  		_etext = . ;
+ 	}
+ + 	/* collect all initialized .data sections */
+-	.data : AT ( ADDR (.text) + SIZEOF (.text) ) { ++	/* .data : AT ( 

ADDR (.text) + SIZEOF (.text) ) { */
++ . = ALIGN(4);
++ .dummy : {
++ _edummy = .;
++ }
++ ++ .data : AT (LOADADDR(.dummy)) {
+ _sdata = .;
+ *(.vectors)
+ *(.data)
+-- +1.7.9.5
+

Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 at91bootstrap: fix gcc-4.6.x overlap linker issue

Dear Gr?gory Hermant,

Your patch is line-wrapped, so it won't apply. Can you resend it with 'git send-email' instead, or at least make sure your MUA is properly configured not to wrap lines (but using 'git send-email' is a much easier and reliable solution IMO).

Thomas

Quoted 63 lines · Gr?gory Hermant
---
  ...at91bootstrap-1.16-gcc-4.6.x-ldscript-fix.patch |   53 
++++++++++++++++++++
  1 file changed, 53 insertions(+)

create mode 100644
boot/at91bootstrap/at91bootstrap-1.16-gcc-4.6.x-ldscript-fix.patch

(quoted diff) +0 -0

a/boot/at91bootstrap/at91bootstrap-1.16-gcc-4.6.x-ldscript-fix.patch b/boot/at91bootstrap/at91bootstrap-1.16-gcc-4.6.x-ldscript-fix.patch new file mode 100644
index 0000000..56947c7

boot/at91bootstrap/at91bootstrap-1.16-gcc-4.6.x-ldscript-fix.patch new file +37 -0
@@ -0,0 +1,53 @@
+From 5a094e959cd216c1be148effc624eb12e2083de9 Mon Sep 17 00:00:00 2001
+From: Gregory Hermant <[email protected]>
+Date: Mon, 1 Oct 2012 16:54:43 +0200
+Subject: [PATCH] at91bootstrap-v1.16-ldscript-fix
+
+---
+ crt0_gnu.S          |    2 +-
+ elf32-littlearm.lds |   12 +++++++++++-
+ 2 files changed, 12 insertions(+), 2 deletions(-)
+
+diff --git a/crt0_gnu.S b/crt0_gnu.S
+index 002feef..ea6581f 100644
+--- a/crt0_gnu.S
++++ b/crt0_gnu.S
+@@ -191,7 +191,7 @@ _go:
+ + 	.align
+ _lp_data:
+-        .word _etext
++        .word _edummy
+         .word _sdata
+         .word _edata
+ +diff --git a/elf32-littlearm.lds b/elf32-littlearm.lds
+index a33952f..17b1646 100644
+--- a/elf32-littlearm.lds
++++ b/elf32-littlearm.lds
+@@ -10,11 +10,21 @@ SECTIONS
+ 		*(.rodata)                 /* read-only data (constants) */
+ 		*(.rodata*)
+ 		. = ALIGN(4);
++		*(.glue_7)
++		. = ALIGN(4);
++		*(.eh_frame)
++		. = ALIGN(4);
+  		_etext = . ;
+ 	}
+ + 	/* collect all initialized .data sections */
+-	.data : AT ( ADDR (.text) + SIZEOF (.text) ) { ++	/* .data : AT ( 

ADDR (.text) + SIZEOF (.text) ) { */
++ . = ALIGN(4);
++ .dummy : {
++ _edummy = .;
++ }
++ ++ .data : AT (LOADADDR(.dummy)) {

boot/at91bootstrap/at91bootstrap-1.16-gcc-4.6.x-ldscript-fix.patch new file +5 -0
+ 		_sdata = .;
+ 		*(.vectors)
+ 		*(.data)
+-- +1.7.9.5
+
Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com