Commit e51c5d04 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] H8/300: ldscripts fix

From: Yoshinori Sato <ysato@users.sourceforge.jp>

- symbol prefix (use h8300 and v850) support
- include headers
parent dd2deeb9
#define VMLINUX_SYMBOL(_sym_) _##_sym_
#include <asm-generic/vmlinux.lds.h>
#include <asm/thread_info.h>
#include <linux/config.h> #include <linux/config.h>
#ifdef CONFIG_H8300H_GENERIC #ifdef CONFIG_H8300H_GENERIC
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
*/ */
#include <linux/config.h> #include <linux/config.h>
#define VMLINUX_SYMBOL(_sym_) _##_sym_
#include <asm-generic/vmlinux.lds.h> #include <asm-generic/vmlinux.lds.h>
/* For most platforms, this will define useful things like RAM addr/size. */ /* For most platforms, this will define useful things like RAM addr/size. */
......
...@@ -2,6 +2,10 @@ ...@@ -2,6 +2,10 @@
#define LOAD_OFFSET 0 #define LOAD_OFFSET 0
#endif #endif
#ifndef VMLINUX_SYMBOL
#define VMLINUX_SYMBOL(_sym_) _sym_
#endif
#define RODATA \ #define RODATA \
.rodata : AT(ADDR(.rodata) - LOAD_OFFSET) { \ .rodata : AT(ADDR(.rodata) - LOAD_OFFSET) { \
*(.rodata) *(.rodata.*) \ *(.rodata) *(.rodata.*) \
...@@ -14,30 +18,30 @@ ...@@ -14,30 +18,30 @@
\ \
/* Kernel symbol table: Normal symbols */ \ /* Kernel symbol table: Normal symbols */ \
__ksymtab : AT(ADDR(__ksymtab) - LOAD_OFFSET) { \ __ksymtab : AT(ADDR(__ksymtab) - LOAD_OFFSET) { \
__start___ksymtab = .; \ VMLINUX_SYMBOL(__start___ksymtab) = .; \
*(__ksymtab) \ *(__ksymtab) \
__stop___ksymtab = .; \ VMLINUX_SYMBOL(__stop___ksymtab) = .; \
} \ } \
\ \
/* Kernel symbol table: GPL-only symbols */ \ /* Kernel symbol table: GPL-only symbols */ \
__ksymtab_gpl : AT(ADDR(__ksymtab_gpl) - LOAD_OFFSET) { \ __ksymtab_gpl : AT(ADDR(__ksymtab_gpl) - LOAD_OFFSET) { \
__start___ksymtab_gpl = .; \ VMLINUX_SYMBOL(__start___ksymtab_gpl) = .; \
*(__ksymtab_gpl) \ *(__ksymtab_gpl) \
__stop___ksymtab_gpl = .; \ VMLINUX_SYMBOL(__stop___ksymtab_gpl) = .; \
} \ } \
\ \
/* Kernel symbol table: Normal symbols */ \ /* Kernel symbol table: Normal symbols */ \
__kcrctab : AT(ADDR(__kcrctab) - LOAD_OFFSET) { \ __kcrctab : AT(ADDR(__kcrctab) - LOAD_OFFSET) { \
__start___kcrctab = .; \ VMLINUX_SYMBOL(__start___kcrctab) = .; \
*(__kcrctab) \ *(__kcrctab) \
__stop___kcrctab = .; \ VMLINUX_SYMBOL(__stop___kcrctab) = .; \
} \ } \
\ \
/* Kernel symbol table: GPL-only symbols */ \ /* Kernel symbol table: GPL-only symbols */ \
__kcrctab_gpl : AT(ADDR(__kcrctab_gpl) - LOAD_OFFSET) { \ __kcrctab_gpl : AT(ADDR(__kcrctab_gpl) - LOAD_OFFSET) { \
__start___kcrctab_gpl = .; \ VMLINUX_SYMBOL(__start___kcrctab_gpl) = .; \
*(__kcrctab_gpl) \ *(__kcrctab_gpl) \
__stop___kcrctab_gpl = .; \ VMLINUX_SYMBOL(__stop___kcrctab_gpl) = .; \
} \ } \
\ \
/* Kernel symbol table: strings */ \ /* Kernel symbol table: strings */ \
...@@ -47,12 +51,12 @@ ...@@ -47,12 +51,12 @@
#define SECURITY_INIT \ #define SECURITY_INIT \
.security_initcall.init : { \ .security_initcall.init : { \
__security_initcall_start = .; \ VMLINUX_SYMBOL(__security_initcall_start) = .; \
*(.security_initcall.init) \ *(.security_initcall.init) \
__security_initcall_end = .; \ VMLINUX_SYMBOL(__security_initcall_end) = .; \
} }
#define SCHED_TEXT \ #define SCHED_TEXT \
__sched_text_start = .; \ VMLINUX_SYMBOL(__sched_text_start) = .; \
*(.sched.text) \ *(.sched.text) \
__sched_text_end = .; VMLINUX_SYMBOL(__sched_text_end) = .;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment