1 From 4aded085fa0057a9a1e1dcec631f950307360c1f Mon Sep 17 00:00:00 2001
2 From: Wu Zhangjin <wuzhangjin@gmail.com>
3 Date: Tue, 11 Jan 2011 13:46:19 +0000
4 Subject: MIPS: Fix compiling failure of relocate_kernel.S
6 The following errors is fixed with the help of <asm/asm_nosec.h>. for
7 this file need to put different symbols in the same section, the
8 original LEAF, NESTED and EXPORT (without explicit section indication)
9 must be used, <asm/asm_nosec.h> does it.
11 arch/mips/kernel/relocate_kernel.S: Assembler messages:
12 arch/mips/kernel/relocate_kernel.S:162: Error: operation combines symbols in different segments
14 Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
16 (limited to 'arch/mips/kernel')
18 --- a/arch/mips/kernel/relocate_kernel.S
19 +++ b/arch/mips/kernel/relocate_kernel.S
24 +#include <asm/asm_nosec.h>
25 #include <asm/asmmacro.h>
26 #include <asm/regdef.h>
29 +++ b/arch/mips/include/asm/asm_nosec.h
32 + * This file is subject to the terms and conditions of the GNU General Public
33 + * License. See the file "COPYING" in the main directory of this archive
36 + * Copyright (C) 1995, 1996, 1997, 1999, 2001 by Ralf Baechle
37 + * Copyright (C) 1999 by Silicon Graphics, Inc.
38 + * Copyright (C) 2001 MIPS Technologies, Inc.
39 + * Copyright (C) 2002 Maciej W. Rozycki
40 + * Copyright (C) 2010 Wu Zhangjin <wuzhangjin@gmail.com>
42 + * Derive from <asm/asm.h>
44 + * Override the macros without -ffunction-sections and -fdata-sections support.
45 + * If several functions or data must be put in the same section, please include
46 + * this header file after the <asm/asm.h> to override the generic definition.
49 +#ifndef __ASM_ASM_NOSEC_H
50 +#define __ASM_ASM_NOSEC_H
57 + * LEAF - declare leaf routine
59 +#define LEAF(symbol) \
62 + .type symbol, @function; \
64 +symbol: .frame sp, 0, ra
67 + * NESTED - declare nested routine entry point
69 +#define NESTED(symbol, framesize, rpc) \
72 + .type symbol, @function; \
74 +symbol: .frame sp, framesize, rpc
77 + * EXPORT - export definition of symbol
79 +#define EXPORT(symbol) \
83 +#endif /* __ASM_ASM_NOSEC_H */