Moving to multiplatform caused that LOAD session
were wrongly generated for our images.
simpleImage is currently used by Qemu.
Wrong - before this patch:
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
LOAD 0x008000 0xc0008000 0xc0008000 0x4fffe8 0x507fe8 RWE 0x8000
LOAD 0x507fe8 0xc050ffe8 0xc050ffe8 0x8b130 0xb5a88 RWE 0x8000
NOTE 0x52c2ac 0xc05342ac 0xc05342ac 0x00024 0x00024 R E 0x4
GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RWE 0x4
Correct - after this patch:
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
LOAD 0x008000 0xc0008000 0x00008000 0x4fffe8 0x507fe8 RWE 0x8000
LOAD 0x507fe8 0xc050ffe8 0x0050ffe8 0x8b130 0xb5a88 RWE 0x8000
NOTE 0x52c2ac 0xc05342ac 0x005342ac 0x00024 0x00024 R E 0x4
GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RWE 0x4
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
#define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)
#define PAGE_MASK (~(PAGE_SIZE-1))
-#ifdef CONFIG_PHYS_OFFSET
-#define LOAD_OFFSET (CONFIG_PAGE_OFFSET - CONFIG_PHYS_OFFSET)
-#endif
-
#ifndef __ASSEMBLY__
#ifndef CONFIG_MMU
* Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>
*/
-#include <asm/page.h>
+#ifdef CONFIG_ARCH_ZYNQ
+# define LOAD_OFFSET CONFIG_PAGE_OFFSET
+#endif
+
#include <asm-generic/vmlinux.lds.h>
#include <asm/cache.h>
#include <asm/thread_info.h>
#include <asm/memory.h>
+#include <asm/page.h>
#define PROC_INFO \
. = ALIGN(4); \
arm_start = . ;
#else
. = PAGE_OFFSET + TEXT_OFFSET;
-#ifdef CONFIG_PHYS_OFFSET
- arm_start = CONFIG_PHYS_OFFSET + TEXT_OFFSET;
-#else
arm_start = TEXT_OFFSET;
-#endif
#endif
.head.text : AT(ADDR(.head.text) - LOAD_OFFSET) {
_text = .;