Skip to contentSkip to conversation

85xx: Not enough room for program headers

U-Boot-Users Rafal Jaworowski 4 participants 9 messages Aug 4, 2008 – Aug 7, 2008

lore
Share & tools
lore
#0 lore raw

Hi,

With today's top of the tree U-Boot I'm getting this:

./MAKEALL MPC8555CDS
Configuring for MPC8555CDS board...
ppc_85xx-ld: u-boot: Not enough room for program headers (allocated 3, need 4)
ppc_85xx-ld: final link failed: Bad value
make: *** [u-boot] B??d 1
ppc_85xx-size: './u-boot': No such file

Is this known, anyone working on fixing this perhaps?

kind regards,
Rafal

#1 lore raw

Yes, I also happened it as you.

Please revert it and have a try.

Revert "mpc85xx: Update linker scripts for Freescale boards"

This reverts commit f0ff885ca64655bee6540eb8a25eed90b1152686.

Quoted 40 lines

-----Original Message-----
From: u-boot-users-bounces at lists.sourceforge.net [mailto:u-boot-users-bounces at lists.sourceforge.net] On Behalf Of Rafal Jaworowski
Sent: 2008?8?4? 5:09 PM
To: u-boot-users
Subject: [U-Boot-Users] 85xx: Not enough room for program headers

Hi,

With today's top of the tree U-Boot I'm getting this:

./MAKEALL MPC8555CDS
Configuring for MPC8555CDS board...
ppc_85xx-ld: u-boot: Not enough room for program headers (allocated 3, need 4)
ppc_85xx-ld: final link failed: Bad value
make: *** [u-boot] B??d 1
ppc_85xx-size: './u-boot': No such file

Is this known, anyone working on fixing this perhaps?

kind regards,
Rafal

--------------------------------------------------------------
-----------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

#2 lore raw
In reply to Rafal Jaworowski
Quoted 11 lines · In message <[email protected]> you wrote:

Hi,

With today's top of the tree U-Boot I'm getting this:

./MAKEALL MPC8555CDS
Configuring for MPC8555CDS board...
ppc_85xx-ld: u-boot: Not enough room for program headers (allocated 3, need=
4)
ppc_85xx-ld: final link failed: Bad value
make: *** [u-boot] B=B3=B1d 1
ppc_85xx-size: './u-boot': No such file

Hm... using ELDK 4.2 I get this:

-> ./MAKEALL MPC8555CDS
Configuring for MPC8555CDS board...
text data bss dec hex filename
196852 15284 26492 238628 3a424 ./u-boot

Quoted 1 line

Is this known, anyone working on fixing this perhaps?

Which toolchain did you use?

Best regards,

Wolfgang Denk

Signature · 5 lines
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
You don't have to stay up nights to succeed; you have to  stay  awake
days.
#3 lore raw
Quoted 12 lines · Wolfgang Denk
Quoted 9 lines

With today's top of the tree U-Boot I'm getting this:

./MAKEALL MPC8555CDS
Configuring for MPC8555CDS board...
ppc_85xx-ld: u-boot: Not enough room for program headers (allocated 3, need=
4)
ppc_85xx-ld: final link failed: Bad value
make: *** [u-boot] B=B3=B1d 1
ppc_85xx-size: './u-boot': No such file

Hm... using ELDK 4.2 I get this:

Quoted 8 lines

-> ./MAKEALL MPC8555CDS
Configuring for MPC8555CDS board...
text data bss dec hex filename
196852 15284 26492 238628 3a424 ./u-boot

Quoted 1 line

Is this known, anyone working on fixing this perhaps?

Which toolchain did you use?

Mine was ELDK 4.1; it seems the two gcc/linker versions lay out the binary differently then..

kind regards,
Rafal

#4 lore raw

Rafal,

Can you try the following patch and see if works for you (make sure the resulting image actually boots the board). If so I'll fixup all the .lds I changed to match.

board/freescale/mpc8555cds/u-boot.lds +10 -5
index a18b3a7..e7fbe5d 100644
@@ -23,6 +23,11 @@
 OUTPUT_ARCH(powerpc)
 /* Do we need any of these for elf?
    __DYNAMIC = 0;    */
+PHDRS
+{
+	text PT_LOAD ;
+}
+
 SECTIONS
 {
   /* Read-only sections, merged into text segment: */
@@ -54,7 +59,7 @@ SECTIONS
     *(.text)
     *(.fixup)
     *(.got1)
-   }
+   } :text
     _etext = .;
     PROVIDE (etext = .);
     .rodata    :
@@ -63,7 +68,7 @@ SECTIONS
     *(.rodata1)
     *(.rodata.str1.4)
     *(.eh_frame)
-  }
+  } :text
   .fini      : { *(.fini)    } =0
   .ctors     : { *(.ctors)   }
   .dtors     : { *(.dtors)   }
@@ -115,12 +120,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 +136,7 @@ SECTIONS
    *(.dynbss)
    *(.bss)
    *(COMMON)
-  }
+  } :NONE
 
   . = ALIGN(4);
   _end = . ;
#5 lore raw
Quoted 3 lines · Kumar Gala

Can you try the following patch and see if works for you (make sure the resulting image actually boots the board). If so I'll fixup all the .lds I changed to match.

Hi Kumar,

Thanks, the code works, although during compilation the following warning appears:

./MAKEALL MPC8555CDS
Configuring for MPC8555CDS board...
ppc_85xx-ld: u-boot: warning: allocated section `.bss' not in segment
text data bss dec hex filename
194515 16028 26488 237031 39de7 ./u-boot

Rafal

#6 lore raw
Quoted 9 lines · Rafal Jaworowski
Quoted 5 lines · Kumar Gala

Can you try the following patch and see if works for you (make sure the
resulting image actually boots the board). If so I'll fixup all the .lds
I changed to match.

Hi Kumar,

Quoted 8 lines

Thanks, the code works, although during compilation the following warning appears:

./MAKEALL MPC8555CDS
Configuring for MPC8555CDS board...
ppc_85xx-ld: u-boot: warning: allocated section `.bss' not in segment
text data bss dec hex filename
194515 16028 26488 237031 39de7 ./u-boot

Yeah it was the best I could do.. older binutils have some issue and figured a warning was better than it not functioning at all.

- k

#7 lore raw
Quoted 9 lines · In message <[email protected]> you wrote:
Quoted 6 lines

./MAKEALL MPC8555CDS
Configuring for MPC8555CDS board...
ppc_85xx-ld: u-boot: warning: allocated section `.bss' not in segment
text data bss dec hex filename
194515 16028 26488 237031 39de7 ./u-boot

Yeah it was the best I could do.. older binutils have some issue and figured a warning was better than it not functioning at all.

Hm... previous experience with ld has made me extremely suspicious about ld warnings. They all turn into subtle, but nasty errors sooner or later.

I think we should find a solution that does without such warnings.

If this is impossible in the remaining time (given the late state in the release cycle) I think it is better to back out the patch that causes the problem, and try to solve this wil less pressure in the next release.

Best regards,

Wolfgang Denk

Signature · 4 lines
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
Boykottiert Microsoft - Kauft Eure Fenster bei OBI!
#8 lore raw
Quoted 17 lines · Wolfgang Denk

In message

Quoted 10 lines · <[email protected]> you wrote:
Quoted 7 lines

./MAKEALL MPC8555CDS
Configuring for MPC8555CDS board...
ppc_85xx-ld: u-boot: warning: allocated section `.bss' not in segment
text data bss dec hex filename
194515 16028 26488 237031 39de7 ./u-boot

Yeah it was the best I could do.. older binutils have some issue and figured a warning was better than it not functioning at all.

Hm... previous experience with ld has made me extremely suspicious about ld warnings. They all turn into subtle, but nasty errors sooner or later.

Quoted 6 lines

I think we should find a solution that does without such warnings.

If this is impossible in the remaining time (given the late state in the release cycle) I think it is better to back out the patch that causes the problem, and try to solve this wil less pressure in the next release.

sent a v2 that addresses the warning. hopefully that will put this to rest.

- k