From e58a1de3ce8690cab0e3557a39ceaf6ef0e89280 Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Mon, 10 Dec 2018 15:30:33 -0600
Subject: [PATCH] qtscript: mark cti_vm_throw as REFERENCED_FROM_ASM

Change-Id: Ic1490dfa8395d4e649686e58b7794ec3932450c6
---
 .../javascriptcore/JavaScriptCore/jit/JITStubs.h       | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/qtscript/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.h b/qtscript/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.h
index da80133..40e63e6 100644
--- a/qtscript/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.h
+++ b/qtscript/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.h
@@ -211,6 +211,14 @@ namespace JSC {
     #endif
 #endif
 
+#ifndef REFERENCED_FROM_ASM
+#if COMPILER(GCC)
+#define REFERENCED_FROM_ASM __attribute__((used))
+#else
+#define REFERENCED_FROM_ASM
+#endif
+#endif
+
 #if CPU(X86_64)
     struct VoidPtrPair {
         void* first;
@@ -316,7 +324,7 @@ extern "C" {
     EncodedJSValue JIT_STUB cti_op_to_primitive(STUB_ARGS_DECLARATION);
     EncodedJSValue JIT_STUB cti_op_typeof(STUB_ARGS_DECLARATION);
     EncodedJSValue JIT_STUB cti_op_urshift(STUB_ARGS_DECLARATION);
-    EncodedJSValue JIT_STUB cti_vm_throw(STUB_ARGS_DECLARATION);
+    EncodedJSValue JIT_STUB cti_vm_throw(STUB_ARGS_DECLARATION) REFERENCED_FROM_ASM;
     EncodedJSValue JIT_STUB cti_to_object(STUB_ARGS_DECLARATION);
     JSObject* JIT_STUB cti_op_construct_JSConstruct(STUB_ARGS_DECLARATION);
     JSObject* JIT_STUB cti_op_new_array(STUB_ARGS_DECLARATION);
-- 
2.19.1

