* [U-Boot-Users] [PATCH v2][for 1.3.4] mpc85xx: workaround old binutils bug
@ 2008-08-07 14:28 Kumar Gala
2008-08-07 14:40 ` [U-Boot-Users] [PATCH v2][for 1.3.4] mpc85xx: workaround oldbinutils bug Zang Roy
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Kumar Gala @ 2008-08-07 14:28 UTC (permalink / raw)
To: u-boot
The recent change to move the .bss outside of the image gives older
binutils (ld from eldk4.1/binutils-2.16) some headache:
ppc_85xx-ld: u-boot: Not enough room for program headers (allocated 3, need 4)
ppc_85xx-ld: final link failed: Bad value
We workaround it by being explicit about the program headers and not
assigning the .bss to a program header.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
Fixes warning with older binutils
board/freescale/mpc8540ads/u-boot.lds | 16 +++++++++++-----
board/freescale/mpc8541cds/u-boot.lds | 16 +++++++++++-----
board/freescale/mpc8544ds/u-boot.lds | 16 +++++++++++-----
board/freescale/mpc8548cds/u-boot.lds | 16 +++++++++++-----
board/freescale/mpc8555cds/u-boot.lds | 16 +++++++++++-----
board/freescale/mpc8560ads/u-boot.lds | 16 +++++++++++-----
board/freescale/mpc8568mds/u-boot.lds | 16 +++++++++++-----
7 files changed, 77 insertions(+), 35 deletions(-)
diff --git a/board/freescale/mpc8540ads/u-boot.lds b/board/freescale/mpc8540ads/u-boot.lds
index 0e4f5a2..515d320 100644
--- a/board/freescale/mpc8540ads/u-boot.lds
+++ b/board/freescale/mpc8540ads/u-boot.lds
@@ -26,6 +26,12 @@
OUTPUT_ARCH(powerpc)
/* Do we need any of these for elf?
__DYNAMIC = 0; */
+PHDRS
+{
+ text PT_LOAD;
+ bss PT_LOAD;
+}
+
SECTIONS
{
/* Read-only sections, merged into text segment: */
@@ -57,7 +63,7 @@ SECTIONS
*(.text)
*(.fixup)
*(.got1)
- }
+ } :text
_etext = .;
PROVIDE (etext = .);
.rodata :
@@ -66,7 +72,7 @@ SECTIONS
*(.rodata1)
*(.rodata.str1.4)
*(.eh_frame)
- }
+ } :text
.fini : { *(.fini) } =0
.ctors : { *(.ctors) }
.dtors : { *(.dtors) }
@@ -118,12 +124,12 @@ SECTIONS
.bootpg ADDR(.text) + 0x7f000 :
{
cpu/mpc85xx/start.o (.bootpg)
- } = 0xffff
+ } :text = 0xffff
.resetvec ADDR(.text) + 0x7fffc :
{
*(.resetvec)
- } = 0xffff
+ } :text = 0xffff
. = ADDR(.text) + 0x80000;
@@ -134,7 +140,7 @@ SECTIONS
*(.dynbss)
*(.bss)
*(COMMON)
- }
+ } :bss
. = ALIGN(4);
_end = . ;
diff --git a/board/freescale/mpc8541cds/u-boot.lds b/board/freescale/mpc8541cds/u-boot.lds
index 1c583de..d728d8b 100644
--- a/board/freescale/mpc8541cds/u-boot.lds
+++ b/board/freescale/mpc8541cds/u-boot.lds
@@ -23,6 +23,12 @@
OUTPUT_ARCH(powerpc)
/* Do we need any of these for elf?
__DYNAMIC = 0; */
+PHDRS
+{
+ text PT_LOAD;
+ bss PT_LOAD;
+}
+
SECTIONS
{
/* Read-only sections, merged into text segment: */
@@ -54,7 +60,7 @@ SECTIONS
*(.text)
*(.fixup)
*(.got1)
- }
+ } :text
_etext = .;
PROVIDE (etext = .);
.rodata :
@@ -63,7 +69,7 @@ SECTIONS
*(.rodata1)
*(.rodata.str1.4)
*(.eh_frame)
- }
+ } :text
.fini : { *(.fini) } =0
.ctors : { *(.ctors) }
.dtors : { *(.dtors) }
@@ -115,12 +121,12 @@ SECTIONS
.bootpg ADDR(.text) + 0x7f000 :
{
cpu/mpc85xx/start.o (.bootpg)
- } = 0xffff
+ } :text = 0xffff
.resetvec ADDR(.text) + 0x7fffc :
{
*(.resetvec)
- } = 0xffff
+ } :text = 0xffff
. = ADDR(.text) + 0x80000;
@@ -131,7 +137,7 @@ SECTIONS
*(.dynbss)
*(.bss)
*(COMMON)
- }
+ } :bss
. = ALIGN(4);
_end = . ;
diff --git a/board/freescale/mpc8544ds/u-boot.lds b/board/freescale/mpc8544ds/u-boot.lds
index 500e647..a05ece5 100644
--- a/board/freescale/mpc8544ds/u-boot.lds
+++ b/board/freescale/mpc8544ds/u-boot.lds
@@ -23,6 +23,12 @@
OUTPUT_ARCH(powerpc)
/* Do we need any of these for elf?
__DYNAMIC = 0; */
+PHDRS
+{
+ text PT_LOAD;
+ bss PT_LOAD;
+}
+
SECTIONS
{
/* Read-only sections, merged into text segment: */
@@ -54,7 +60,7 @@ SECTIONS
*(.text)
*(.fixup)
*(.got1)
- }
+ } :text
_etext = .;
PROVIDE (etext = .);
.rodata :
@@ -63,7 +69,7 @@ SECTIONS
*(.rodata1)
*(.rodata.str1.4)
*(.eh_frame)
- }
+ } :text
.fini : { *(.fini) } =0
.ctors : { *(.ctors) }
.dtors : { *(.dtors) }
@@ -115,12 +121,12 @@ SECTIONS
.bootpg ADDR(.text) + 0x7f000 :
{
cpu/mpc85xx/start.o (.bootpg)
- } = 0xffff
+ } :text = 0xffff
.resetvec ADDR(.text) + 0x7fffc :
{
*(.resetvec)
- } = 0xffff
+ } :text = 0xffff
. = ADDR(.text) + 0x80000;
@@ -131,7 +137,7 @@ SECTIONS
*(.dynbss)
*(.bss)
*(COMMON)
- }
+ } :bss
. = ALIGN(4);
_end = . ;
diff --git a/board/freescale/mpc8548cds/u-boot.lds b/board/freescale/mpc8548cds/u-boot.lds
index 6b93395..d4a2f72 100644
--- a/board/freescale/mpc8548cds/u-boot.lds
+++ b/board/freescale/mpc8548cds/u-boot.lds
@@ -23,6 +23,12 @@
OUTPUT_ARCH(powerpc)
/* Do we need any of these for elf?
__DYNAMIC = 0; */
+PHDRS
+{
+ text PT_LOAD;
+ bss PT_LOAD;
+}
+
SECTIONS
{
/* Read-only sections, merged into text segment: */
@@ -54,7 +60,7 @@ SECTIONS
*(.text)
*(.fixup)
*(.got1)
- }
+ } :text
_etext = .;
PROVIDE (etext = .);
.rodata :
@@ -63,7 +69,7 @@ SECTIONS
*(.rodata1)
*(.rodata.str1.4)
*(.eh_frame)
- }
+ } :text
.fini : { *(.fini) } =0
.ctors : { *(.ctors) }
.dtors : { *(.dtors) }
@@ -115,12 +121,12 @@ SECTIONS
.bootpg ADDR(.text) + 0x7f000 :
{
cpu/mpc85xx/start.o (.bootpg)
- } = 0xffff
+ } :text = 0xffff
.resetvec ADDR(.text) + 0x7fffc :
{
*(.resetvec)
- } = 0xffff
+ } :text = 0xffff
. = ADDR(.text) + 0x80000;
@@ -131,7 +137,7 @@ SECTIONS
*(.dynbss)
*(.bss)
*(COMMON)
- }
+ } :bss
. = ALIGN(4);
_end = . ;
diff --git a/board/freescale/mpc8555cds/u-boot.lds b/board/freescale/mpc8555cds/u-boot.lds
index a18b3a7..11885e8 100644
--- a/board/freescale/mpc8555cds/u-boot.lds
+++ b/board/freescale/mpc8555cds/u-boot.lds
@@ -23,6 +23,12 @@
OUTPUT_ARCH(powerpc)
/* Do we need any of these for elf?
__DYNAMIC = 0; */
+PHDRS
+{
+ text PT_LOAD;
+ bss PT_LOAD;
+}
+
SECTIONS
{
/* Read-only sections, merged into text segment: */
@@ -54,7 +60,7 @@ SECTIONS
*(.text)
*(.fixup)
*(.got1)
- }
+ } :text
_etext = .;
PROVIDE (etext = .);
.rodata :
@@ -63,7 +69,7 @@ SECTIONS
*(.rodata1)
*(.rodata.str1.4)
*(.eh_frame)
- }
+ } :text
.fini : { *(.fini) } =0
.ctors : { *(.ctors) }
.dtors : { *(.dtors) }
@@ -115,12 +121,12 @@ SECTIONS
.bootpg ADDR(.text) + 0x7f000 :
{
cpu/mpc85xx/start.o (.bootpg)
- } = 0xffff
+ } :text = 0xffff
.resetvec ADDR(.text) + 0x7fffc :
{
*(.resetvec)
- } = 0xffff
+ } :text = 0xffff
. = ADDR(.text) + 0x80000;
@@ -131,7 +137,7 @@ SECTIONS
*(.dynbss)
*(.bss)
*(COMMON)
- }
+ } :bss
. = ALIGN(4);
_end = . ;
diff --git a/board/freescale/mpc8560ads/u-boot.lds b/board/freescale/mpc8560ads/u-boot.lds
index 0e4f5a2..515d320 100644
--- a/board/freescale/mpc8560ads/u-boot.lds
+++ b/board/freescale/mpc8560ads/u-boot.lds
@@ -26,6 +26,12 @@
OUTPUT_ARCH(powerpc)
/* Do we need any of these for elf?
__DYNAMIC = 0; */
+PHDRS
+{
+ text PT_LOAD;
+ bss PT_LOAD;
+}
+
SECTIONS
{
/* Read-only sections, merged into text segment: */
@@ -57,7 +63,7 @@ SECTIONS
*(.text)
*(.fixup)
*(.got1)
- }
+ } :text
_etext = .;
PROVIDE (etext = .);
.rodata :
@@ -66,7 +72,7 @@ SECTIONS
*(.rodata1)
*(.rodata.str1.4)
*(.eh_frame)
- }
+ } :text
.fini : { *(.fini) } =0
.ctors : { *(.ctors) }
.dtors : { *(.dtors) }
@@ -118,12 +124,12 @@ SECTIONS
.bootpg ADDR(.text) + 0x7f000 :
{
cpu/mpc85xx/start.o (.bootpg)
- } = 0xffff
+ } :text = 0xffff
.resetvec ADDR(.text) + 0x7fffc :
{
*(.resetvec)
- } = 0xffff
+ } :text = 0xffff
. = ADDR(.text) + 0x80000;
@@ -134,7 +140,7 @@ SECTIONS
*(.dynbss)
*(.bss)
*(COMMON)
- }
+ } :bss
. = ALIGN(4);
_end = . ;
diff --git a/board/freescale/mpc8568mds/u-boot.lds b/board/freescale/mpc8568mds/u-boot.lds
index 9d245e4..ad96410 100644
--- a/board/freescale/mpc8568mds/u-boot.lds
+++ b/board/freescale/mpc8568mds/u-boot.lds
@@ -23,6 +23,12 @@
OUTPUT_ARCH(powerpc)
/* Do we need any of these for elf?
__DYNAMIC = 0; */
+PHDRS
+{
+ text PT_LOAD;
+ bss PT_LOAD;
+}
+
SECTIONS
{
/* Read-only sections, merged into text segment: */
@@ -54,7 +60,7 @@ SECTIONS
*(.text)
*(.fixup)
*(.got1)
- }
+ } :text
_etext = .;
PROVIDE (etext = .);
.rodata :
@@ -63,7 +69,7 @@ SECTIONS
*(.rodata1)
*(.rodata.str1.4)
*(.eh_frame)
- }
+ } :text
.fini : { *(.fini) } =0
.ctors : { *(.ctors) }
.dtors : { *(.dtors) }
@@ -115,12 +121,12 @@ SECTIONS
.bootpg ADDR(.text) + 0x7f000 :
{
cpu/mpc85xx/start.o (.bootpg)
- } = 0xffff
+ } :text = 0xffff
.resetvec ADDR(.text) + 0x7fffc :
{
*(.resetvec)
- } = 0xffff
+ } :text = 0xffff
. = ADDR(.text) + 0x80000;
@@ -131,7 +137,7 @@ SECTIONS
*(.dynbss)
*(.bss)
*(COMMON)
- }
+ } :bss
. = ALIGN(4);
_end = . ;
--
1.5.5.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot-Users] [PATCH v2][for 1.3.4] mpc85xx: workaround oldbinutils bug
2008-08-07 14:28 [U-Boot-Users] [PATCH v2][for 1.3.4] mpc85xx: workaround old binutils bug Kumar Gala
@ 2008-08-07 14:40 ` Zang Roy
2008-08-07 15:00 ` [U-Boot-Users] [PATCH v2][for 1.3.4] mpc85xx: workaround old binutils bug Rafal Jaworowski
2008-08-10 20:41 ` Wolfgang Denk
2 siblings, 0 replies; 4+ messages in thread
From: Zang Roy @ 2008-08-07 14:40 UTC (permalink / raw)
To: u-boot
> -----Original Message-----
> From: u-boot-users-bounces at lists.sourceforge.net
> [mailto:u-boot-users-bounces at lists.sourceforge.net] On Behalf
> Of Kumar Gala
> Sent: Thursday, August 07, 2008 10:28 PM
> To: Wolfgang Denk
> Cc: u-boot-users at lists.sourceforge.net
> Subject: [U-Boot-Users] [PATCH v2][for 1.3.4] mpc85xx:
> workaround oldbinutils bug
>
> The recent change to move the .bss outside of the image gives older
> binutils (ld from eldk4.1/binutils-2.16) some headache:
>
> ppc_85xx-ld: u-boot: Not enough room for program headers
> (allocated 3, need 4)
> ppc_85xx-ld: final link failed: Bad value
>
> We workaround it by being explicit about the program headers and not
> assigning the .bss to a program header.
>
> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
> ---
Tested on CDS board.
The workaround is OK.
Roy
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot-Users] [PATCH v2][for 1.3.4] mpc85xx: workaround old binutils bug
2008-08-07 14:28 [U-Boot-Users] [PATCH v2][for 1.3.4] mpc85xx: workaround old binutils bug Kumar Gala
2008-08-07 14:40 ` [U-Boot-Users] [PATCH v2][for 1.3.4] mpc85xx: workaround oldbinutils bug Zang Roy
@ 2008-08-07 15:00 ` Rafal Jaworowski
2008-08-10 20:41 ` Wolfgang Denk
2 siblings, 0 replies; 4+ messages in thread
From: Rafal Jaworowski @ 2008-08-07 15:00 UTC (permalink / raw)
To: u-boot
Kumar Gala wrote:
> The recent change to move the .bss outside of the image gives older
> binutils (ld from eldk4.1/binutils-2.16) some headache:
>
> ppc_85xx-ld: u-boot: Not enough room for program headers (allocated 3, need 4)
> ppc_85xx-ld: final link failed: Bad value
>
> We workaround it by being explicit about the program headers and not
> assigning the .bss to a program header.
>
> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
> ---
>
> Fixes warning with older binutils
Looks fine now, thanks a lot!
Rafal
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot-Users] [PATCH v2][for 1.3.4] mpc85xx: workaround old binutils bug
2008-08-07 14:28 [U-Boot-Users] [PATCH v2][for 1.3.4] mpc85xx: workaround old binutils bug Kumar Gala
2008-08-07 14:40 ` [U-Boot-Users] [PATCH v2][for 1.3.4] mpc85xx: workaround oldbinutils bug Zang Roy
2008-08-07 15:00 ` [U-Boot-Users] [PATCH v2][for 1.3.4] mpc85xx: workaround old binutils bug Rafal Jaworowski
@ 2008-08-10 20:41 ` Wolfgang Denk
2 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2008-08-10 20:41 UTC (permalink / raw)
To: u-boot
Dear Kumar Gala,
In message <Pine.LNX.4.64.0808070927530.26243@blarg.am.freescale.net> you wrote:
> The recent change to move the .bss outside of the image gives older
> binutils (ld from eldk4.1/binutils-2.16) some headache:
>
> ppc_85xx-ld: u-boot: Not enough room for program headers (allocated 3, need 4)
> ppc_85xx-ld: final link failed: Bad value
>
> We workaround it by being explicit about the program headers and not
> assigning the .bss to a program header.
>
> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
> ---
>
> Fixes warning with older binutils
>
> board/freescale/mpc8540ads/u-boot.lds | 16 +++++++++++-----
> board/freescale/mpc8541cds/u-boot.lds | 16 +++++++++++-----
> board/freescale/mpc8544ds/u-boot.lds | 16 +++++++++++-----
> board/freescale/mpc8548cds/u-boot.lds | 16 +++++++++++-----
> board/freescale/mpc8555cds/u-boot.lds | 16 +++++++++++-----
> board/freescale/mpc8560ads/u-boot.lds | 16 +++++++++++-----
> board/freescale/mpc8568mds/u-boot.lds | 16 +++++++++++-----
> 7 files changed, 77 insertions(+), 35 deletions(-)
Applied, 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
I can't understand it. I can't even understand the people who can
understand it. - Queen Juliana of the Netherlands.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-08-10 20:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-07 14:28 [U-Boot-Users] [PATCH v2][for 1.3.4] mpc85xx: workaround old binutils bug Kumar Gala
2008-08-07 14:40 ` [U-Boot-Users] [PATCH v2][for 1.3.4] mpc85xx: workaround oldbinutils bug Zang Roy
2008-08-07 15:00 ` [U-Boot-Users] [PATCH v2][for 1.3.4] mpc85xx: workaround old binutils bug Rafal Jaworowski
2008-08-10 20:41 ` Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox