ASan build fix: resolve multiple definitions.
authorSangmin Seo <sangmin7.seo@samsung.com>
Tue, 11 Jul 2017 10:45:45 +0000 (19:45 +0900)
committerSlava Barinov <v.barinov@samsung.com>
Mon, 16 Dec 2019 12:28:16 +0000 (15:28 +0300)
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 76f398b..e7ba966 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 11bb53c..a07b162 100644 (file)
@@ -22,6 +22,8 @@
 
 /* Definitions for the support routines.  */
 
+ARMword isize;
+
 static ARMword ModeToBank (ARMword);
 static void    EnvokeList (ARMul_State *, unsigned long, unsigned long);
 
index c112692..c00908c 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))