* [Buildroot] [PATCH] at91bootstrap: fix gcc-4.6.x overlap linker issue
@ 2012-10-01 15:58 Grégory Hermant
2012-10-01 17:44 ` Thomas Petazzoni
0 siblings, 1 reply; 5+ messages in thread
From: Grégory Hermant @ 2012-10-01 15:58 UTC (permalink / raw)
To: buildroot
---
...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
diff --git
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
--- /dev/null
+++ b/boot/at91bootstrap/at91bootstrap-1.16-gcc-4.6.x-ldscript-fix.patch
@@ -0,0 +1,53 @@
+From 5a094e959cd216c1be148effc624eb12e2083de9 Mon Sep 17 00:00:00 2001
+From: Gregory Hermant <gregory.hermant@calao-systems.com>
+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
+
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread* [Buildroot] [PATCH] at91bootstrap: fix gcc-4.6.x overlap linker issue
2012-10-01 15:58 [Buildroot] [PATCH] at91bootstrap: fix gcc-4.6.x overlap linker issue Grégory Hermant
@ 2012-10-01 17:44 ` Thomas Petazzoni
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2012-10-01 17:44 UTC (permalink / raw)
To: buildroot
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
On Mon, 01 Oct 2012 17:58:10 +0200, Gr?gory Hermant wrote:
> ---
> ...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
>
> diff --git
> 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
> --- /dev/null
> +++ b/boot/at91bootstrap/at91bootstrap-1.16-gcc-4.6.x-ldscript-fix.patch
> @@ -0,0 +1,53 @@
> +From 5a094e959cd216c1be148effc624eb12e2083de9 Mon Sep 17 00:00:00 2001
> +From: Gregory Hermant <gregory.hermant@calao-systems.com>
> +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
> +
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH] at91bootstrap: fix gcc-4.6.x overlap linker issue
@ 2012-10-02 6:57 Grégory Hermant
2012-10-08 20:04 ` Peter Korsgaard
0 siblings, 1 reply; 5+ messages in thread
From: Grégory Hermant @ 2012-10-02 6:57 UTC (permalink / raw)
To: buildroot
---
...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
diff --git 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
--- /dev/null
+++ b/boot/at91bootstrap/at91bootstrap-1.16-gcc-4.6.x-ldscript-fix.patch
@@ -0,0 +1,53 @@
+From 5a094e959cd216c1be148effc624eb12e2083de9 Mon Sep 17 00:00:00 2001
+From: Gregory Hermant <gregory.hermant@calao-systems.com>
+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
+
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread* [Buildroot] [PATCH] at91bootstrap: fix gcc-4.6.x overlap linker issue
2012-10-02 6:57 Grégory Hermant
@ 2012-10-08 20:04 ` Peter Korsgaard
2012-10-09 16:37 ` Grégory Hermant
0 siblings, 1 reply; 5+ messages in thread
From: Peter Korsgaard @ 2012-10-08 20:04 UTC (permalink / raw)
To: buildroot
>>>>> "Gr?gory" == Gr?gory Hermant <gregory.hermant@calao-systems.com> writes:
Gr?gory> ---
Gr?gory> ...at91bootstrap-1.16-gcc-4.6.x-ldscript-fix.patch | 53 ++++++++++++++++++++
Gr?gory> 1 file changed, 53 insertions(+)
Gr?gory> create mode 100644 boot/at91bootstrap/at91bootstrap-1.16-gcc-4.6.x-ldscript-fix.patch
Gr?gory> diff --git 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
Gr?gory> new file mode 100644
Gr?gory> index 0000000..56947c7
Gr?gory> --- /dev/null
Gr?gory> +++ b/boot/at91bootstrap/at91bootstrap-1.16-gcc-4.6.x-ldscript-fix.patch
Gr?gory> @@ -0,0 +1,53 @@
Gr?gory> +From 5a094e959cd216c1be148effc624eb12e2083de9 Mon Sep 17 00:00:00 2001
Gr?gory> +From: Gregory Hermant <gregory.hermant@calao-systems.com>
Gr?gory> +Date: Mon, 1 Oct 2012 16:54:43 +0200
Gr?gory> +Subject: [PATCH] at91bootstrap-v1.16-ldscript-fix
Gr?gory> +
Gr?gory> +---
Gr?gory> + crt0_gnu.S | 2 +-
Gr?gory> + elf32-littlearm.lds | 12 +++++++++++-
Gr?gory> + 2 files changed, 12 insertions(+), 2 deletions(-)
Gr?gory> +
Gr?gory> +diff --git a/crt0_gnu.S b/crt0_gnu.S
Gr?gory> +index 002feef..ea6581f 100644
Gr?gory> +--- a/crt0_gnu.S
Gr?gory> ++++ b/crt0_gnu.S
Gr?gory> +@@ -191,7 +191,7 @@ _go:
Gr?gory> + + .align
Gr?gory> + _lp_data:
Gr?gory> +- .word _etext
Gr?gory> ++ .word _edummy
Gr?gory> + .word _sdata
Gr?gory> + .word _edata
Gr?gory> + +diff --git a/elf32-littlearm.lds b/elf32-littlearm.lds
Gr?gory> +index a33952f..17b1646 100644
Gr?gory> +--- a/elf32-littlearm.lds
Gr?gory> ++++ b/elf32-littlearm.lds
Gr?gory> +@@ -10,11 +10,21 @@ SECTIONS
Gr?gory> + *(.rodata) /* read-only data (constants) */
Gr?gory> + *(.rodata*)
Gr?gory> + . = ALIGN(4);
Gr?gory> ++ *(.glue_7)
Gr?gory> ++ . = ALIGN(4);
Gr?gory> ++ *(.eh_frame)
Gr?gory> ++ . = ALIGN(4);
Is all of that needed? Isn't it just that gcc 4.6+ adds a bunch of
.text.<blah> sections? I've fixed it up for an internal tree at work by
just doing:
diff --git a/elf32-littlearm.lds b/elf32-littlearm.lds
index a33952f..f50c30c 100644
--- a/elf32-littlearm.lds
+++ b/elf32-littlearm.lds
@@ -6,7 +6,7 @@ SECTIONS
. = ALIGN(4);
.text : {
_stext = .;
- *(.text)
+ *(.text*)
*(.rodata) /* read-only data (constants) */
*(.rodata*)
. = ALIGN(4);
--
Bye, Peter Korsgaard
^ permalink raw reply related [flat|nested] 5+ messages in thread* [Buildroot] [PATCH] at91bootstrap: fix gcc-4.6.x overlap linker issue
2012-10-08 20:04 ` Peter Korsgaard
@ 2012-10-09 16:37 ` Grégory Hermant
0 siblings, 0 replies; 5+ messages in thread
From: Grégory Hermant @ 2012-10-09 16:37 UTC (permalink / raw)
To: buildroot
Hello peter,
You are right there's no need to add the code below in the linker script to fix this issue.
Thanks for your time.
gregory
Le 08/10/2012 22:04, Peter Korsgaard a ?crit :
>>>>>> "Gr?gory" == Gr?gory Hermant <gregory.hermant@calao-systems.com> writes:
>
> Gr?gory> ---
> Gr?gory> ...at91bootstrap-1.16-gcc-4.6.x-ldscript-fix.patch | 53 ++++++++++++++++++++
> Gr?gory> 1 file changed, 53 insertions(+)
> Gr?gory> create mode 100644 boot/at91bootstrap/at91bootstrap-1.16-gcc-4.6.x-ldscript-fix.patch
>
> Gr?gory> diff --git 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
> Gr?gory> new file mode 100644
> Gr?gory> index 0000000..56947c7
> Gr?gory> --- /dev/null
> Gr?gory> +++ b/boot/at91bootstrap/at91bootstrap-1.16-gcc-4.6.x-ldscript-fix.patch
> Gr?gory> @@ -0,0 +1,53 @@
> Gr?gory> +From 5a094e959cd216c1be148effc624eb12e2083de9 Mon Sep 17 00:00:00 2001
> Gr?gory> +From: Gregory Hermant <gregory.hermant@calao-systems.com>
> Gr?gory> +Date: Mon, 1 Oct 2012 16:54:43 +0200
> Gr?gory> +Subject: [PATCH] at91bootstrap-v1.16-ldscript-fix
> Gr?gory> +
> Gr?gory> +---
> Gr?gory> + crt0_gnu.S | 2 +-
> Gr?gory> + elf32-littlearm.lds | 12 +++++++++++-
> Gr?gory> + 2 files changed, 12 insertions(+), 2 deletions(-)
> Gr?gory> +
> Gr?gory> +diff --git a/crt0_gnu.S b/crt0_gnu.S
> Gr?gory> +index 002feef..ea6581f 100644
> Gr?gory> +--- a/crt0_gnu.S
> Gr?gory> ++++ b/crt0_gnu.S
> Gr?gory> +@@ -191,7 +191,7 @@ _go:
> Gr?gory> + + .align
> Gr?gory> + _lp_data:
> Gr?gory> +- .word _etext
> Gr?gory> ++ .word _edummy
> Gr?gory> + .word _sdata
> Gr?gory> + .word _edata
> Gr?gory> + +diff --git a/elf32-littlearm.lds b/elf32-littlearm.lds
> Gr?gory> +index a33952f..17b1646 100644
> Gr?gory> +--- a/elf32-littlearm.lds
> Gr?gory> ++++ b/elf32-littlearm.lds
> Gr?gory> +@@ -10,11 +10,21 @@ SECTIONS
> Gr?gory> + *(.rodata) /* read-only data (constants) */
> Gr?gory> + *(.rodata*)
> Gr?gory> + . = ALIGN(4);
> Gr?gory> ++ *(.glue_7)
> Gr?gory> ++ . = ALIGN(4);
> Gr?gory> ++ *(.eh_frame)
> Gr?gory> ++ . = ALIGN(4);
>
> Is all of that needed? Isn't it just that gcc 4.6+ adds a bunch of
> .text.<blah> sections? I've fixed it up for an internal tree at work by
> just doing:
>
> diff --git a/elf32-littlearm.lds b/elf32-littlearm.lds
> index a33952f..f50c30c 100644
> --- a/elf32-littlearm.lds
> +++ b/elf32-littlearm.lds
> @@ -6,7 +6,7 @@ SECTIONS
> . = ALIGN(4);
> .text : {
> _stext = .;
> - *(.text)
> + *(.text*)
> *(.rodata) /* read-only data (constants) */
> *(.rodata*)
> . = ALIGN(4);
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-10-09 16:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-01 15:58 [Buildroot] [PATCH] at91bootstrap: fix gcc-4.6.x overlap linker issue Grégory Hermant
2012-10-01 17:44 ` Thomas Petazzoni
-- strict thread matches above, loose matches on Subject: below --
2012-10-02 6:57 Grégory Hermant
2012-10-08 20:04 ` Peter Korsgaard
2012-10-09 16:37 ` Grégory Hermant
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox