ASan build fix: resolve multiple definitions. submit/tizen_4.0_base/20170811.071500 submit/tizen_4.0_base/20170828.000000 submit/tizen_4.0_base/20170828.000001 submit/tizen_base/20170804.023302
authorSangmin Seo <sangmin7.seo@samsung.com>
Tue, 11 Jul 2017 10:45:45 +0000 (19:45 +0900)
committerDongkyun Son <dongkyun.s@samsung.com>
Wed, 2 Aug 2017 23:34:12 +0000 (23:34 +0000)
Put "extern" to multiply-defined variables in order to make
-fno-common work.

Change-Id: Ib5a882e3c536d868e8098e385823e50ac78f2d21

sim/arm/armemu.c
sim/arm/armsupp.c
sim/arm/maverick.c

index 5fde3fd..a42a039 100644 (file)
@@ -1142,7 +1142,7 @@ handle_VFP_move (ARMul_State * state, ARMword instr)
 
 /* The PC pipeline value depends on whether ARM
    or Thumb instructions are being executed.  */
-ARMword isize;
+extern ARMword isize;
 
 ARMword
 #ifdef MODE32
index 3ff4bf9..e39a4d7 100644 (file)
@@ -21,6 +21,8 @@
 
 /* Definitions for the support routines.  */
 
+ARMword isize;
+
 static ARMword ModeToBank (ARMword);
 static void    EnvokeList (ARMul_State *, unsigned long, unsigned long);
 
index 72c259f..77dffd5 100644 (file)
@@ -60,9 +60,9 @@ union maverick_acc_regs
   long double ld;              /* Acc registers are 72-bits.  */
 };
 
-struct maverick_regs DSPregs[16];
-union maverick_acc_regs DSPacc[4];
-ARMword DSPsc;
+extern struct maverick_regs DSPregs[16];
+extern union maverick_acc_regs DSPacc[4];
+extern ARMword DSPsc;
 
 #define DEST_REG       (BITS (12, 15))
 #define SRC1_REG       (BITS (16, 19))