diff options
author | Chen Gang <xili_gchen_5257@hotmail.com> | 2015-08-06 00:34:53 +0200 |
---|---|---|
committer | Jesper Nilsson <jespern@axis.com> | 2015-11-02 20:03:04 +0100 |
commit | c33fe4444395a6972b30cb91676d04af2a3dc1a5 (patch) | |
tree | 6ad372d9dfb4a773ebbfdcd1fcb63103e8d3e5a4 /firmware | |
parent | 8f40dcebefd4a9e8fa24d2ac5e3fd5e410eea58d (diff) | |
download | linux-c33fe4444395a6972b30cb91676d04af2a3dc1a5.tar.bz2 |
cris: arch-v10: kgdb: Add '__used' for static variable is_dyn_brkp
Within one C file, current gcc can optimize the global static variables
according to the C code, but it will skip assembly code -- it will pass
them to gas directly.
if the static variable is used between C code and assembly code in one C
file (e.g. is_dyn_brkp in kgdb.c), it needs '__used' to let gcc know it
should be still used, or gcc may remove it for optimization.
The related error in this case:
LD init/built-in.o
arch/cris/arch-v10/kernel/built-in.o: In function `kgdb_handle_breakpoint':
(.text+0x2aca): undefined reference to `is_dyn_brkp'
arch/cris/arch-v10/kernel/built-in.o: In function `is_static':
kgdb.c:(.text+0x2ada): undefined reference to `is_dyn_brkp'
Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Signed-off-by: Jesper Nilsson <jespern@axis.com>
Diffstat (limited to 'firmware')
0 files changed, 0 insertions, 0 deletions