mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-17 01:04:19 +08:00
sh64: fix up memory offset calculation.
The linker script offsets were broken by the recent 29/32-bit integration, so this fixes it up for sh64. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
parent
b0f3ae03ac
commit
19f6b8b44e
@ -14,4 +14,12 @@
|
|||||||
#define DWARF_EH_FRAME
|
#define DWARF_EH_FRAME
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_SUPERH64
|
||||||
|
#define EXTRA_TEXT \
|
||||||
|
*(.text64) \
|
||||||
|
*(.text..SHmedia32)
|
||||||
|
#else
|
||||||
|
#define EXTRA_TEXT
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* __ASM_SH_VMLINUX_LDS_H */
|
#endif /* __ASM_SH_VMLINUX_LDS_H */
|
||||||
|
@ -3,10 +3,12 @@
|
|||||||
* Written by Niibe Yutaka and Paul Mundt
|
* Written by Niibe Yutaka and Paul Mundt
|
||||||
*/
|
*/
|
||||||
#ifdef CONFIG_SUPERH64
|
#ifdef CONFIG_SUPERH64
|
||||||
#define LOAD_OFFSET CONFIG_PAGE_OFFSET
|
#define LOAD_OFFSET PAGE_OFFSET
|
||||||
|
#define MEMORY_OFFSET __MEMORY_START
|
||||||
OUTPUT_ARCH(sh:sh5)
|
OUTPUT_ARCH(sh:sh5)
|
||||||
#else
|
#else
|
||||||
#define LOAD_OFFSET 0
|
#define LOAD_OFFSET 0
|
||||||
|
#define MEMORY_OFFSET 0
|
||||||
OUTPUT_ARCH(sh)
|
OUTPUT_ARCH(sh)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -14,16 +16,10 @@ OUTPUT_ARCH(sh)
|
|||||||
#include <asm/cache.h>
|
#include <asm/cache.h>
|
||||||
#include <asm/vmlinux.lds.h>
|
#include <asm/vmlinux.lds.h>
|
||||||
|
|
||||||
#if defined(CONFIG_32BIT) && !defined(CONFIG_PMB_LEGACY)
|
|
||||||
#define MEMORY_OFFSET 0
|
|
||||||
#else
|
|
||||||
#define MEMORY_OFFSET (CONFIG_MEMORY_START & 0x1fffffff)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ENTRY(_start)
|
ENTRY(_start)
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
. = CONFIG_PAGE_OFFSET + MEMORY_OFFSET + CONFIG_ZERO_PAGE_OFFSET;
|
. = PAGE_OFFSET + MEMORY_OFFSET + CONFIG_ZERO_PAGE_OFFSET;
|
||||||
|
|
||||||
_text = .; /* Text and read-only data */
|
_text = .; /* Text and read-only data */
|
||||||
|
|
||||||
@ -34,12 +30,7 @@ SECTIONS
|
|||||||
.text : AT(ADDR(.text) - LOAD_OFFSET) {
|
.text : AT(ADDR(.text) - LOAD_OFFSET) {
|
||||||
HEAD_TEXT
|
HEAD_TEXT
|
||||||
TEXT_TEXT
|
TEXT_TEXT
|
||||||
|
EXTRA_TEXT
|
||||||
#ifdef CONFIG_SUPERH64
|
|
||||||
*(.text64)
|
|
||||||
*(.text..SHmedia32)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
SCHED_TEXT
|
SCHED_TEXT
|
||||||
LOCK_TEXT
|
LOCK_TEXT
|
||||||
KPROBES_TEXT
|
KPROBES_TEXT
|
||||||
|
Loading…
Reference in New Issue
Block a user