[U-Boot-Users] U-Boot-NG ?

Sascha Hauer
2007-07-02T19:26:57Z

On Mon, Jul 02, 2007 at 09:02:51PM +0200, Carsten Schlote wrote:
> Hi Sascha,
>
> Am Montag, den 02.07.2007, 18:47 +0200 schrieb Sascha Hauer:
> > git clone http://iocaste.extern.pengutronix.de/git/U-Boot-NG.git
>
> Ich checkout and tried to compile the 'linux' arch. Everything is fine,
> but ld 2.17 (debian etch) doesn't like your link script?

I'm too using ld-2.17:
GNU ld (GNU Binutils for Debian) 2.17.50.20070426

gcc version is 4.1.2.
The linker script is a nearly unmodified linker script version from a
x86-64 ld. You can output the linker script the linker normally uses
with 'ld --verbose'. Maybe a diff between yours and the one used in
U-Boot can give some light?

The 64 bit version of the linker script mainly increases some
alignments and changes the link address to 0x400000.

Here's the diff to the original linker script I used:

--- lds.orig 2007-07-02 21:16:41.000000000 +0200
+++ u-boot.lds.S 2007-07-02 17:44:25.000000000 +0200
@@ -1,16 +1,9 @@
-GNU ld (GNU Binutils for Debian) 2.17.50.20070426
- Supported emulations:
- elf_x86_64
- elf_i386
- i386linux
-using internal linker script:
-==================================================
-/* Script for -z combreloc: combine and sort reloc sections */
-OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64",
- "elf64-x86-64")
-OUTPUT_ARCH(i386:x86-64)
+#include <asm-generic/u-boot.lds.h>
+
+OUTPUT_FORMAT(ELF_FORMAT)
+OUTPUT_ARCH(ELF_ARCH)
ENTRY(_start)
-SEARCH_DIR("/usr/x86_64-linux-gnu/lib64"); SEARCH_DIR("/usr/local/lib64"); SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64"); SEARCH_DIR("/usr/x86_64-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");
+
SECTIONS
{
/* Read-only sections, merged into text segment: */
@@ -76,6 +69,16 @@
{
KEEP (*(.fini))
} =0x90909090
+
+ . = ALIGN(64);
+ __u_boot_initcalls_start = .;
+ __u_boot_initcalls : { INITCALLS }
+ __u_boot_initcalls_end = .;
+ . = ALIGN(64);
+ __u_boot_cmd_start = .;
+ __u_boot_cmd : { U_BOOT_CMDS }
+ __u_boot_cmd_end = .;
+
PROVIDE (__etext = .);
PROVIDE (_etext = .);
PROVIDE (etext = .);
@@ -224,5 +227,3 @@
/DISCARD/ : { *(.note.GNU-stack) }
}

-
-==================================================

>
> What version of GCC do you use?
>
> Regards
> Carsten
>
>

--
Pengutronix - Linux Solutions for Science and Industry
Entwicklungszentrum Nord http://www.pengutronix.de