diff mbox

[U-Boot,[Patch,V2] mips: 12/16] modify u-boot.lds for mips64

Message ID 1345217476-32034-13-git-send-email-etou.zh@gmail.com
State Superseded
Delegated to: Daniel Schwierzeck
Headers show

Commit Message

Zhi-zhou Zhang Aug. 17, 2012, 3:30 p.m. UTC
Signed-off-by: Zhizhou Zhang <etou.zh@gmail.com>
---
 board/qemu-mips/u-boot.lds |    8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Andrew Dyer Aug. 17, 2012, 5:09 p.m. UTC | #1
Same issue here with OUTPUT_FORMAT as the other linker script.
On Aug 17, 2012 10:33 AM, "Zhizhou Zhang" <etou.zh@gmail.com> wrote:

> Signed-off-by: Zhizhou Zhang <etou.zh@gmail.com>
> ---
>  board/qemu-mips/u-boot.lds |    8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/board/qemu-mips/u-boot.lds b/board/qemu-mips/u-boot.lds
> index 9460b20..06db68d 100644
> --- a/board/qemu-mips/u-boot.lds
> +++ b/board/qemu-mips/u-boot.lds
> @@ -24,7 +24,11 @@
>  /*
>  OUTPUT_FORMAT("elf32-bigmips", "elf32-bigmips", "elf32-bigmips")
>  */
> +#if defined(CONFIG_64BIT)
> +OUTPUT_FORMAT("elf64-tradlittlemips", "elf64-tradlittlemips",
> "elf64-tradlittlemips")
> +#else
>  OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips",
> "elf32-tradlittlemips")
> +#endif
>  OUTPUT_ARCH(mips)
>  ENTRY(_start)
>  SECTIONS
> @@ -63,7 +67,11 @@ SECTIONS
>         }
>
>         uboot_end_data = .;
> +#if defined(CONFIG_64BIT)
> +       num_got_entries = (__got_end - __got_start) >> 3;
> +#else
>         num_got_entries = (__got_end - __got_start) >> 2;
> +#endif
>
>         . = ALIGN(4);
>         .sbss  : { *(.sbss*) }
> --
> 1.7.9.5
>
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
diff mbox

Patch

diff --git a/board/qemu-mips/u-boot.lds b/board/qemu-mips/u-boot.lds
index 9460b20..06db68d 100644
--- a/board/qemu-mips/u-boot.lds
+++ b/board/qemu-mips/u-boot.lds
@@ -24,7 +24,11 @@ 
 /*
 OUTPUT_FORMAT("elf32-bigmips", "elf32-bigmips", "elf32-bigmips")
 */
+#if defined(CONFIG_64BIT)
+OUTPUT_FORMAT("elf64-tradlittlemips", "elf64-tradlittlemips", "elf64-tradlittlemips")
+#else
 OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradlittlemips")
+#endif
 OUTPUT_ARCH(mips)
 ENTRY(_start)
 SECTIONS
@@ -63,7 +67,11 @@  SECTIONS
 	}
 
 	uboot_end_data = .;
+#if defined(CONFIG_64BIT)
+	num_got_entries = (__got_end - __got_start) >> 3;
+#else
 	num_got_entries = (__got_end - __got_start) >> 2;
+#endif
 
 	. = ALIGN(4);
 	.sbss  : { *(.sbss*) }