mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-20 22:21:41 +00:00
mpc85xx: workaround old binutils 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>
This commit is contained in:
parent
0bf202ec58
commit
c11528083e
7 changed files with 77 additions and 35 deletions
|
@ -26,6 +26,12 @@
|
||||||
OUTPUT_ARCH(powerpc)
|
OUTPUT_ARCH(powerpc)
|
||||||
/* Do we need any of these for elf?
|
/* Do we need any of these for elf?
|
||||||
__DYNAMIC = 0; */
|
__DYNAMIC = 0; */
|
||||||
|
PHDRS
|
||||||
|
{
|
||||||
|
text PT_LOAD;
|
||||||
|
bss PT_LOAD;
|
||||||
|
}
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
/* Read-only sections, merged into text segment: */
|
/* Read-only sections, merged into text segment: */
|
||||||
|
@ -57,7 +63,7 @@ SECTIONS
|
||||||
*(.text)
|
*(.text)
|
||||||
*(.fixup)
|
*(.fixup)
|
||||||
*(.got1)
|
*(.got1)
|
||||||
}
|
} :text
|
||||||
_etext = .;
|
_etext = .;
|
||||||
PROVIDE (etext = .);
|
PROVIDE (etext = .);
|
||||||
.rodata :
|
.rodata :
|
||||||
|
@ -66,7 +72,7 @@ SECTIONS
|
||||||
*(.rodata1)
|
*(.rodata1)
|
||||||
*(.rodata.str1.4)
|
*(.rodata.str1.4)
|
||||||
*(.eh_frame)
|
*(.eh_frame)
|
||||||
}
|
} :text
|
||||||
.fini : { *(.fini) } =0
|
.fini : { *(.fini) } =0
|
||||||
.ctors : { *(.ctors) }
|
.ctors : { *(.ctors) }
|
||||||
.dtors : { *(.dtors) }
|
.dtors : { *(.dtors) }
|
||||||
|
@ -118,12 +124,12 @@ SECTIONS
|
||||||
.bootpg ADDR(.text) + 0x7f000 :
|
.bootpg ADDR(.text) + 0x7f000 :
|
||||||
{
|
{
|
||||||
cpu/mpc85xx/start.o (.bootpg)
|
cpu/mpc85xx/start.o (.bootpg)
|
||||||
} = 0xffff
|
} :text = 0xffff
|
||||||
|
|
||||||
.resetvec ADDR(.text) + 0x7fffc :
|
.resetvec ADDR(.text) + 0x7fffc :
|
||||||
{
|
{
|
||||||
*(.resetvec)
|
*(.resetvec)
|
||||||
} = 0xffff
|
} :text = 0xffff
|
||||||
|
|
||||||
. = ADDR(.text) + 0x80000;
|
. = ADDR(.text) + 0x80000;
|
||||||
|
|
||||||
|
@ -134,7 +140,7 @@ SECTIONS
|
||||||
*(.dynbss)
|
*(.dynbss)
|
||||||
*(.bss)
|
*(.bss)
|
||||||
*(COMMON)
|
*(COMMON)
|
||||||
}
|
} :bss
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
_end = . ;
|
_end = . ;
|
||||||
|
|
|
@ -23,6 +23,12 @@
|
||||||
OUTPUT_ARCH(powerpc)
|
OUTPUT_ARCH(powerpc)
|
||||||
/* Do we need any of these for elf?
|
/* Do we need any of these for elf?
|
||||||
__DYNAMIC = 0; */
|
__DYNAMIC = 0; */
|
||||||
|
PHDRS
|
||||||
|
{
|
||||||
|
text PT_LOAD;
|
||||||
|
bss PT_LOAD;
|
||||||
|
}
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
/* Read-only sections, merged into text segment: */
|
/* Read-only sections, merged into text segment: */
|
||||||
|
@ -54,7 +60,7 @@ SECTIONS
|
||||||
*(.text)
|
*(.text)
|
||||||
*(.fixup)
|
*(.fixup)
|
||||||
*(.got1)
|
*(.got1)
|
||||||
}
|
} :text
|
||||||
_etext = .;
|
_etext = .;
|
||||||
PROVIDE (etext = .);
|
PROVIDE (etext = .);
|
||||||
.rodata :
|
.rodata :
|
||||||
|
@ -63,7 +69,7 @@ SECTIONS
|
||||||
*(.rodata1)
|
*(.rodata1)
|
||||||
*(.rodata.str1.4)
|
*(.rodata.str1.4)
|
||||||
*(.eh_frame)
|
*(.eh_frame)
|
||||||
}
|
} :text
|
||||||
.fini : { *(.fini) } =0
|
.fini : { *(.fini) } =0
|
||||||
.ctors : { *(.ctors) }
|
.ctors : { *(.ctors) }
|
||||||
.dtors : { *(.dtors) }
|
.dtors : { *(.dtors) }
|
||||||
|
@ -115,12 +121,12 @@ SECTIONS
|
||||||
.bootpg ADDR(.text) + 0x7f000 :
|
.bootpg ADDR(.text) + 0x7f000 :
|
||||||
{
|
{
|
||||||
cpu/mpc85xx/start.o (.bootpg)
|
cpu/mpc85xx/start.o (.bootpg)
|
||||||
} = 0xffff
|
} :text = 0xffff
|
||||||
|
|
||||||
.resetvec ADDR(.text) + 0x7fffc :
|
.resetvec ADDR(.text) + 0x7fffc :
|
||||||
{
|
{
|
||||||
*(.resetvec)
|
*(.resetvec)
|
||||||
} = 0xffff
|
} :text = 0xffff
|
||||||
|
|
||||||
. = ADDR(.text) + 0x80000;
|
. = ADDR(.text) + 0x80000;
|
||||||
|
|
||||||
|
@ -131,7 +137,7 @@ SECTIONS
|
||||||
*(.dynbss)
|
*(.dynbss)
|
||||||
*(.bss)
|
*(.bss)
|
||||||
*(COMMON)
|
*(COMMON)
|
||||||
}
|
} :bss
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
_end = . ;
|
_end = . ;
|
||||||
|
|
|
@ -23,6 +23,12 @@
|
||||||
OUTPUT_ARCH(powerpc)
|
OUTPUT_ARCH(powerpc)
|
||||||
/* Do we need any of these for elf?
|
/* Do we need any of these for elf?
|
||||||
__DYNAMIC = 0; */
|
__DYNAMIC = 0; */
|
||||||
|
PHDRS
|
||||||
|
{
|
||||||
|
text PT_LOAD;
|
||||||
|
bss PT_LOAD;
|
||||||
|
}
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
/* Read-only sections, merged into text segment: */
|
/* Read-only sections, merged into text segment: */
|
||||||
|
@ -54,7 +60,7 @@ SECTIONS
|
||||||
*(.text)
|
*(.text)
|
||||||
*(.fixup)
|
*(.fixup)
|
||||||
*(.got1)
|
*(.got1)
|
||||||
}
|
} :text
|
||||||
_etext = .;
|
_etext = .;
|
||||||
PROVIDE (etext = .);
|
PROVIDE (etext = .);
|
||||||
.rodata :
|
.rodata :
|
||||||
|
@ -63,7 +69,7 @@ SECTIONS
|
||||||
*(.rodata1)
|
*(.rodata1)
|
||||||
*(.rodata.str1.4)
|
*(.rodata.str1.4)
|
||||||
*(.eh_frame)
|
*(.eh_frame)
|
||||||
}
|
} :text
|
||||||
.fini : { *(.fini) } =0
|
.fini : { *(.fini) } =0
|
||||||
.ctors : { *(.ctors) }
|
.ctors : { *(.ctors) }
|
||||||
.dtors : { *(.dtors) }
|
.dtors : { *(.dtors) }
|
||||||
|
@ -115,12 +121,12 @@ SECTIONS
|
||||||
.bootpg ADDR(.text) + 0x7f000 :
|
.bootpg ADDR(.text) + 0x7f000 :
|
||||||
{
|
{
|
||||||
cpu/mpc85xx/start.o (.bootpg)
|
cpu/mpc85xx/start.o (.bootpg)
|
||||||
} = 0xffff
|
} :text = 0xffff
|
||||||
|
|
||||||
.resetvec ADDR(.text) + 0x7fffc :
|
.resetvec ADDR(.text) + 0x7fffc :
|
||||||
{
|
{
|
||||||
*(.resetvec)
|
*(.resetvec)
|
||||||
} = 0xffff
|
} :text = 0xffff
|
||||||
|
|
||||||
. = ADDR(.text) + 0x80000;
|
. = ADDR(.text) + 0x80000;
|
||||||
|
|
||||||
|
@ -131,7 +137,7 @@ SECTIONS
|
||||||
*(.dynbss)
|
*(.dynbss)
|
||||||
*(.bss)
|
*(.bss)
|
||||||
*(COMMON)
|
*(COMMON)
|
||||||
}
|
} :bss
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
_end = . ;
|
_end = . ;
|
||||||
|
|
|
@ -23,6 +23,12 @@
|
||||||
OUTPUT_ARCH(powerpc)
|
OUTPUT_ARCH(powerpc)
|
||||||
/* Do we need any of these for elf?
|
/* Do we need any of these for elf?
|
||||||
__DYNAMIC = 0; */
|
__DYNAMIC = 0; */
|
||||||
|
PHDRS
|
||||||
|
{
|
||||||
|
text PT_LOAD;
|
||||||
|
bss PT_LOAD;
|
||||||
|
}
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
/* Read-only sections, merged into text segment: */
|
/* Read-only sections, merged into text segment: */
|
||||||
|
@ -54,7 +60,7 @@ SECTIONS
|
||||||
*(.text)
|
*(.text)
|
||||||
*(.fixup)
|
*(.fixup)
|
||||||
*(.got1)
|
*(.got1)
|
||||||
}
|
} :text
|
||||||
_etext = .;
|
_etext = .;
|
||||||
PROVIDE (etext = .);
|
PROVIDE (etext = .);
|
||||||
.rodata :
|
.rodata :
|
||||||
|
@ -63,7 +69,7 @@ SECTIONS
|
||||||
*(.rodata1)
|
*(.rodata1)
|
||||||
*(.rodata.str1.4)
|
*(.rodata.str1.4)
|
||||||
*(.eh_frame)
|
*(.eh_frame)
|
||||||
}
|
} :text
|
||||||
.fini : { *(.fini) } =0
|
.fini : { *(.fini) } =0
|
||||||
.ctors : { *(.ctors) }
|
.ctors : { *(.ctors) }
|
||||||
.dtors : { *(.dtors) }
|
.dtors : { *(.dtors) }
|
||||||
|
@ -115,12 +121,12 @@ SECTIONS
|
||||||
.bootpg ADDR(.text) + 0x7f000 :
|
.bootpg ADDR(.text) + 0x7f000 :
|
||||||
{
|
{
|
||||||
cpu/mpc85xx/start.o (.bootpg)
|
cpu/mpc85xx/start.o (.bootpg)
|
||||||
} = 0xffff
|
} :text = 0xffff
|
||||||
|
|
||||||
.resetvec ADDR(.text) + 0x7fffc :
|
.resetvec ADDR(.text) + 0x7fffc :
|
||||||
{
|
{
|
||||||
*(.resetvec)
|
*(.resetvec)
|
||||||
} = 0xffff
|
} :text = 0xffff
|
||||||
|
|
||||||
. = ADDR(.text) + 0x80000;
|
. = ADDR(.text) + 0x80000;
|
||||||
|
|
||||||
|
@ -131,7 +137,7 @@ SECTIONS
|
||||||
*(.dynbss)
|
*(.dynbss)
|
||||||
*(.bss)
|
*(.bss)
|
||||||
*(COMMON)
|
*(COMMON)
|
||||||
}
|
} :bss
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
_end = . ;
|
_end = . ;
|
||||||
|
|
|
@ -23,6 +23,12 @@
|
||||||
OUTPUT_ARCH(powerpc)
|
OUTPUT_ARCH(powerpc)
|
||||||
/* Do we need any of these for elf?
|
/* Do we need any of these for elf?
|
||||||
__DYNAMIC = 0; */
|
__DYNAMIC = 0; */
|
||||||
|
PHDRS
|
||||||
|
{
|
||||||
|
text PT_LOAD;
|
||||||
|
bss PT_LOAD;
|
||||||
|
}
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
/* Read-only sections, merged into text segment: */
|
/* Read-only sections, merged into text segment: */
|
||||||
|
@ -54,7 +60,7 @@ SECTIONS
|
||||||
*(.text)
|
*(.text)
|
||||||
*(.fixup)
|
*(.fixup)
|
||||||
*(.got1)
|
*(.got1)
|
||||||
}
|
} :text
|
||||||
_etext = .;
|
_etext = .;
|
||||||
PROVIDE (etext = .);
|
PROVIDE (etext = .);
|
||||||
.rodata :
|
.rodata :
|
||||||
|
@ -63,7 +69,7 @@ SECTIONS
|
||||||
*(.rodata1)
|
*(.rodata1)
|
||||||
*(.rodata.str1.4)
|
*(.rodata.str1.4)
|
||||||
*(.eh_frame)
|
*(.eh_frame)
|
||||||
}
|
} :text
|
||||||
.fini : { *(.fini) } =0
|
.fini : { *(.fini) } =0
|
||||||
.ctors : { *(.ctors) }
|
.ctors : { *(.ctors) }
|
||||||
.dtors : { *(.dtors) }
|
.dtors : { *(.dtors) }
|
||||||
|
@ -115,12 +121,12 @@ SECTIONS
|
||||||
.bootpg ADDR(.text) + 0x7f000 :
|
.bootpg ADDR(.text) + 0x7f000 :
|
||||||
{
|
{
|
||||||
cpu/mpc85xx/start.o (.bootpg)
|
cpu/mpc85xx/start.o (.bootpg)
|
||||||
} = 0xffff
|
} :text = 0xffff
|
||||||
|
|
||||||
.resetvec ADDR(.text) + 0x7fffc :
|
.resetvec ADDR(.text) + 0x7fffc :
|
||||||
{
|
{
|
||||||
*(.resetvec)
|
*(.resetvec)
|
||||||
} = 0xffff
|
} :text = 0xffff
|
||||||
|
|
||||||
. = ADDR(.text) + 0x80000;
|
. = ADDR(.text) + 0x80000;
|
||||||
|
|
||||||
|
@ -131,7 +137,7 @@ SECTIONS
|
||||||
*(.dynbss)
|
*(.dynbss)
|
||||||
*(.bss)
|
*(.bss)
|
||||||
*(COMMON)
|
*(COMMON)
|
||||||
}
|
} :bss
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
_end = . ;
|
_end = . ;
|
||||||
|
|
|
@ -26,6 +26,12 @@
|
||||||
OUTPUT_ARCH(powerpc)
|
OUTPUT_ARCH(powerpc)
|
||||||
/* Do we need any of these for elf?
|
/* Do we need any of these for elf?
|
||||||
__DYNAMIC = 0; */
|
__DYNAMIC = 0; */
|
||||||
|
PHDRS
|
||||||
|
{
|
||||||
|
text PT_LOAD;
|
||||||
|
bss PT_LOAD;
|
||||||
|
}
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
/* Read-only sections, merged into text segment: */
|
/* Read-only sections, merged into text segment: */
|
||||||
|
@ -57,7 +63,7 @@ SECTIONS
|
||||||
*(.text)
|
*(.text)
|
||||||
*(.fixup)
|
*(.fixup)
|
||||||
*(.got1)
|
*(.got1)
|
||||||
}
|
} :text
|
||||||
_etext = .;
|
_etext = .;
|
||||||
PROVIDE (etext = .);
|
PROVIDE (etext = .);
|
||||||
.rodata :
|
.rodata :
|
||||||
|
@ -66,7 +72,7 @@ SECTIONS
|
||||||
*(.rodata1)
|
*(.rodata1)
|
||||||
*(.rodata.str1.4)
|
*(.rodata.str1.4)
|
||||||
*(.eh_frame)
|
*(.eh_frame)
|
||||||
}
|
} :text
|
||||||
.fini : { *(.fini) } =0
|
.fini : { *(.fini) } =0
|
||||||
.ctors : { *(.ctors) }
|
.ctors : { *(.ctors) }
|
||||||
.dtors : { *(.dtors) }
|
.dtors : { *(.dtors) }
|
||||||
|
@ -118,12 +124,12 @@ SECTIONS
|
||||||
.bootpg ADDR(.text) + 0x7f000 :
|
.bootpg ADDR(.text) + 0x7f000 :
|
||||||
{
|
{
|
||||||
cpu/mpc85xx/start.o (.bootpg)
|
cpu/mpc85xx/start.o (.bootpg)
|
||||||
} = 0xffff
|
} :text = 0xffff
|
||||||
|
|
||||||
.resetvec ADDR(.text) + 0x7fffc :
|
.resetvec ADDR(.text) + 0x7fffc :
|
||||||
{
|
{
|
||||||
*(.resetvec)
|
*(.resetvec)
|
||||||
} = 0xffff
|
} :text = 0xffff
|
||||||
|
|
||||||
. = ADDR(.text) + 0x80000;
|
. = ADDR(.text) + 0x80000;
|
||||||
|
|
||||||
|
@ -134,7 +140,7 @@ SECTIONS
|
||||||
*(.dynbss)
|
*(.dynbss)
|
||||||
*(.bss)
|
*(.bss)
|
||||||
*(COMMON)
|
*(COMMON)
|
||||||
}
|
} :bss
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
_end = . ;
|
_end = . ;
|
||||||
|
|
|
@ -23,6 +23,12 @@
|
||||||
OUTPUT_ARCH(powerpc)
|
OUTPUT_ARCH(powerpc)
|
||||||
/* Do we need any of these for elf?
|
/* Do we need any of these for elf?
|
||||||
__DYNAMIC = 0; */
|
__DYNAMIC = 0; */
|
||||||
|
PHDRS
|
||||||
|
{
|
||||||
|
text PT_LOAD;
|
||||||
|
bss PT_LOAD;
|
||||||
|
}
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
/* Read-only sections, merged into text segment: */
|
/* Read-only sections, merged into text segment: */
|
||||||
|
@ -54,7 +60,7 @@ SECTIONS
|
||||||
*(.text)
|
*(.text)
|
||||||
*(.fixup)
|
*(.fixup)
|
||||||
*(.got1)
|
*(.got1)
|
||||||
}
|
} :text
|
||||||
_etext = .;
|
_etext = .;
|
||||||
PROVIDE (etext = .);
|
PROVIDE (etext = .);
|
||||||
.rodata :
|
.rodata :
|
||||||
|
@ -63,7 +69,7 @@ SECTIONS
|
||||||
*(.rodata1)
|
*(.rodata1)
|
||||||
*(.rodata.str1.4)
|
*(.rodata.str1.4)
|
||||||
*(.eh_frame)
|
*(.eh_frame)
|
||||||
}
|
} :text
|
||||||
.fini : { *(.fini) } =0
|
.fini : { *(.fini) } =0
|
||||||
.ctors : { *(.ctors) }
|
.ctors : { *(.ctors) }
|
||||||
.dtors : { *(.dtors) }
|
.dtors : { *(.dtors) }
|
||||||
|
@ -115,12 +121,12 @@ SECTIONS
|
||||||
.bootpg ADDR(.text) + 0x7f000 :
|
.bootpg ADDR(.text) + 0x7f000 :
|
||||||
{
|
{
|
||||||
cpu/mpc85xx/start.o (.bootpg)
|
cpu/mpc85xx/start.o (.bootpg)
|
||||||
} = 0xffff
|
} :text = 0xffff
|
||||||
|
|
||||||
.resetvec ADDR(.text) + 0x7fffc :
|
.resetvec ADDR(.text) + 0x7fffc :
|
||||||
{
|
{
|
||||||
*(.resetvec)
|
*(.resetvec)
|
||||||
} = 0xffff
|
} :text = 0xffff
|
||||||
|
|
||||||
. = ADDR(.text) + 0x80000;
|
. = ADDR(.text) + 0x80000;
|
||||||
|
|
||||||
|
@ -131,7 +137,7 @@ SECTIONS
|
||||||
*(.dynbss)
|
*(.dynbss)
|
||||||
*(.bss)
|
*(.bss)
|
||||||
*(COMMON)
|
*(COMMON)
|
||||||
}
|
} :bss
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
_end = . ;
|
_end = . ;
|
||||||
|
|
Loading…
Add table
Reference in a new issue