From d6fce03fa3b89ff6efa09055c824e5d39162500f Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Tue, 3 May 2016 22:00:54 -0700 Subject: [PATCH] All: Fix instruction tables getting zeroed when linking sometimes --- CHANGES | 1 + CMakeLists.txt | 1 - src/arm/isa-arm.h | 2 +- src/arm/isa-thumb.h | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 25eaf0446..c3e7518a3 100644 --- a/CHANGES +++ b/CHANGES @@ -21,6 +21,7 @@ Bugfixes: - Util: Use closesocket on Windows - GBA Memory: Fix executing code from OBJ region of VRAM - Util: Fix socket bind addresses + - All: Fix instruction tables getting zeroed when linking sometimes Misc: - GBA: Slightly optimize GBAProcessEvents - Qt: Add preset for DualShock 4 diff --git a/CMakeLists.txt b/CMakeLists.txt index e1b2e6329..491be7068 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -178,7 +178,6 @@ list(APPEND OS_LIB ${M_LIBRARY}) if(APPLE OR CMAKE_C_COMPILER_ID STREQUAL "GNU" AND BUILD_LTO) set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -flto") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -flto") - set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/src/arm/isa-arm.c ${CMAKE_CURRENT_SOURCE_DIR}/src/arm/isa-thumb.c PROPERTIES COMPILE_FLAGS -fno-lto) endif() if(BUILD_BBB OR BUILD_RASPI OR BUILD_PANDORA) diff --git a/src/arm/isa-arm.h b/src/arm/isa-arm.h index 4058a1958..f4694bead 100644 --- a/src/arm/isa-arm.h +++ b/src/arm/isa-arm.h @@ -13,6 +13,6 @@ struct ARMCore; typedef void (*ARMInstruction)(struct ARMCore*, uint32_t opcode); -const ARMInstruction _armTable[0x1000]; +extern const ARMInstruction _armTable[0x1000]; #endif diff --git a/src/arm/isa-thumb.h b/src/arm/isa-thumb.h index e57a2ac99..dd018441e 100644 --- a/src/arm/isa-thumb.h +++ b/src/arm/isa-thumb.h @@ -11,6 +11,6 @@ struct ARMCore; typedef void (*ThumbInstruction)(struct ARMCore*, uint16_t opcode); -const ThumbInstruction _thumbTable[0x400]; +extern const ThumbInstruction _thumbTable[0x400]; #endif