[kernel/2.6.38] fix gcc-4.6 set but unused warnings
[openwrt.git] / target / linux / generic / patches-3.0 / 334-mips-fix-compiling-failure-of-relocate_kernel.patch
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
5
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.
10
11 arch/mips/kernel/relocate_kernel.S: Assembler messages:
12 arch/mips/kernel/relocate_kernel.S:162: Error: operation combines symbols in different segments
13
14 Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
15 ---
16 (limited to 'arch/mips/kernel')
17
18 --- a/arch/mips/kernel/relocate_kernel.S
19 +++ b/arch/mips/kernel/relocate_kernel.S
20 @@ -7,6 +7,7 @@
21 */
22
23 #include <asm/asm.h>
24 +#include <asm/asm_nosec.h>
25 #include <asm/asmmacro.h>
26 #include <asm/regdef.h>
27 #include <asm/page.h>
28 --- /dev/null
29 +++ b/arch/mips/include/asm/asm_nosec.h
30 @@ -0,0 +1,53 @@
31 +/*
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
34 + * for more details.
35 + *
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>
41 + *
42 + * Derive from <asm/asm.h>
43 + *
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.
47 + */
48 +
49 +#ifndef __ASM_ASM_NOSEC_H
50 +#define __ASM_ASM_NOSEC_H
51 +
52 +#undef LEAF
53 +#undef NESTED
54 +#undef EXPORT
55 +
56 +/*
57 + * LEAF - declare leaf routine
58 + */
59 +#define LEAF(symbol) \
60 + .globl symbol; \
61 + .align 2; \
62 + .type symbol, @function; \
63 + .ent symbol, 0; \
64 +symbol: .frame sp, 0, ra
65 +
66 +/*
67 + * NESTED - declare nested routine entry point
68 + */
69 +#define NESTED(symbol, framesize, rpc) \
70 + .globl symbol; \
71 + .align 2; \
72 + .type symbol, @function; \
73 + .ent symbol, 0; \
74 +symbol: .frame sp, framesize, rpc
75 +
76 +/*
77 + * EXPORT - export definition of symbol
78 + */
79 +#define EXPORT(symbol) \
80 + .globl symbol; \
81 +symbol:
82 +
83 +#endif /* __ASM_ASM_NOSEC_H */
This page took 0.044189 seconds and 5 git commands to generate.