summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCHUNSEOK LEE <chunseok.lee@samsung.com>2017-09-12 15:37:08 +0900
committerCHUNSEOK LEE <chunseok.lee@samsung.com>2017-09-12 16:28:57 +0900
commit5ae60d53072f9980a3c21101020dfb6957513e5e (patch)
tree76a3d9edd7dfb4f5edb9a5cf92387125379b1a05
parenta27dfe2057fe9d294b784f5f5be279ed6c5d6c22 (diff)
downloadcoreclr-5ae60d53072f9980a3c21101020dfb6957513e5e.tar.gz
coreclr-5ae60d53072f9980a3c21101020dfb6957513e5e.tar.bz2
coreclr-5ae60d53072f9980a3c21101020dfb6957513e5e.zip
Change-Id: I361487df23b5b4ca73b99f50517b37bcfd7922d3 Signed-off-by: CHUNSEOK LEE <chunseok.lee@samsung.com>
-rw-r--r--packaging/0001-ARM-Linux-Support-unaligned-struct-read-write-11290.patch4
-rw-r--r--packaging/0002-x86-Linux-Thread-safe-UMThunkMarshInfo-RunTimeInit-1.patch4
-rw-r--r--packaging/0003-Enable-pow-for-arm-armel-in-tryrun-11703.patch4
-rw-r--r--packaging/0004-ARM-Linux-Validate-memory-using-ldrb-instead-of-ldr.patch4
-rw-r--r--packaging/0005-Add-skipped-testcase-on-TM1.patch4
-rw-r--r--packaging/0006-Set-local-variables-as-addr-exposed-if-it-appears-in.patch4
-rw-r--r--packaging/0007-Revert-unnecessary-changes.patch4
-rw-r--r--packaging/0008-Add-skipped-testcase-superpmi.patch4
-rw-r--r--packaging/0009-x86-Linux-Adjust-SP-in-throwing-helper-block-12504-1.patch4
-rw-r--r--packaging/0010-Use-udf-0xff-instead-of-bkpt-0xbe-as-a-poison-13.patch4
-rw-r--r--packaging/0011-Enable-sosplugin-on-ARM-14.patch4
-rw-r--r--packaging/0012-Add-pie-to-linker-option-16.patch4
-rw-r--r--packaging/0013-Revert-Add-pie-to-linker-option-16.patch4
-rw-r--r--packaging/0014-Fix-inconsistency-between-GetHasCode-and-Equals-1351.patch4
-rw-r--r--packaging/0015-Cherry-pick-13586.patch4
-rw-r--r--packaging/0016-callsignalhandlerwrapper-patch.patch4
-rw-r--r--packaging/0017-clear-cache-after-NI-reloc.patch4
-rw-r--r--packaging/0018-Support-FEATURE_GDBJIT_FRAME-including-NI-IL_Stub.patch4
-rw-r--r--packaging/0019-Add-profiling-support.patch4
-rw-r--r--packaging/0020-Enable-loading-directly-ni-file-for-dotnet-launcher.patch4
-rw-r--r--packaging/0021-Revert-Enable-loading-directly-ni-file-for-dotnet-la.patch4
-rw-r--r--packaging/0022-Enable-loading-directly-ni-file-for-corerun-temporar.patch4
-rw-r--r--packaging/0023-Add-Tizen-RuntimeID-case.patch4
-rw-r--r--packaging/0024-Add-pie-to-linker-option.patch26
-rw-r--r--packaging/0025-Fix-undefined-references-on-SOS-11701.patch81
-rw-r--r--packaging/0026-Port-DacUnwindStackFrame-11666.patch227
-rw-r--r--packaging/0027-Include-PAL-headers-instead-of-embedding-it-11705.patch194
-rw-r--r--packaging/0028-added-DWARF-exprloc-for-static-value-class-fields-11.patch81
-rw-r--r--packaging/0029-Fix-calculation-of-debuginfo-s-size.-13899.patch234
-rw-r--r--packaging/coreclr.spec15
30 files changed, 903 insertions, 47 deletions
diff --git a/packaging/0001-ARM-Linux-Support-unaligned-struct-read-write-11290.patch b/packaging/0001-ARM-Linux-Support-unaligned-struct-read-write-11290.patch
index 70f948b4eb..cfa21ebcb5 100644
--- a/packaging/0001-ARM-Linux-Support-unaligned-struct-read-write-11290.patch
+++ b/packaging/0001-ARM-Linux-Support-unaligned-struct-read-write-11290.patch
@@ -1,7 +1,7 @@
From 233bb0c8341079163acc12bea195e649f54ec5fb Mon Sep 17 00:00:00 2001
From: Jonghyun Park <parjong@gmail.com>
Date: Sat, 20 May 2017 06:26:27 +0900
-Subject: [PATCH 01/23] [ARM/Linux] Support unaligned struct read/write
+Subject: [PATCH 01/29] [ARM/Linux] Support unaligned struct read/write
(#11290)
* [ARM/Linux] Support unaligned struct read
@@ -80,5 +80,5 @@ index 9404469..27a1dae 100644
{
requiresCopyBlock = true;
--
-1.9.1
+2.7.4
diff --git a/packaging/0002-x86-Linux-Thread-safe-UMThunkMarshInfo-RunTimeInit-1.patch b/packaging/0002-x86-Linux-Thread-safe-UMThunkMarshInfo-RunTimeInit-1.patch
index 4081470380..d8e3ec409d 100644
--- a/packaging/0002-x86-Linux-Thread-safe-UMThunkMarshInfo-RunTimeInit-1.patch
+++ b/packaging/0002-x86-Linux-Thread-safe-UMThunkMarshInfo-RunTimeInit-1.patch
@@ -1,7 +1,7 @@
From 7cc0b213808a64978e520a91ead790da431c5c9b Mon Sep 17 00:00:00 2001
From: Jonghyun Park <parjong@gmail.com>
Date: Thu, 25 May 2017 02:34:59 +0900
-Subject: [PATCH 02/23] [x86/Linux] Thread-safe UMThunkMarshInfo::RunTimeInit
+Subject: [PATCH 02/29] [x86/Linux] Thread-safe UMThunkMarshInfo::RunTimeInit
(#11864)
---
@@ -37,5 +37,5 @@ index c70d52d..90c01a4 100644
PInvokeStaticSigInfo sigInfo;
--
-1.9.1
+2.7.4
diff --git a/packaging/0003-Enable-pow-for-arm-armel-in-tryrun-11703.patch b/packaging/0003-Enable-pow-for-arm-armel-in-tryrun-11703.patch
index c6c22a6602..725736d962 100644
--- a/packaging/0003-Enable-pow-for-arm-armel-in-tryrun-11703.patch
+++ b/packaging/0003-Enable-pow-for-arm-armel-in-tryrun-11703.patch
@@ -1,7 +1,7 @@
From 859fee1e493bfb32ab549bca9cf0dd0b977ce885 Mon Sep 17 00:00:00 2001
From: SaeHie Park <saehie.park@gmail.com>
Date: Fri, 19 May 2017 00:20:57 +0900
-Subject: [PATCH 03/23] Enable pow for arm/armel in tryrun (#11703)
+Subject: [PATCH 03/29] Enable pow for arm/armel in tryrun (#11703)
This will fix CoreFX System.Tests.MathFTests.Pow() failures
---
@@ -36,5 +36,5 @@ index 26a30e5..55265b4 100644
SET( HAVE_VALID_NEGATIVE_INF_POW_EXITCODE
--
-1.9.1
+2.7.4
diff --git a/packaging/0004-ARM-Linux-Validate-memory-using-ldrb-instead-of-ldr.patch b/packaging/0004-ARM-Linux-Validate-memory-using-ldrb-instead-of-ldr.patch
index b9756b24f8..7890bd6b23 100644
--- a/packaging/0004-ARM-Linux-Validate-memory-using-ldrb-instead-of-ldr.patch
+++ b/packaging/0004-ARM-Linux-Validate-memory-using-ldrb-instead-of-ldr.patch
@@ -1,7 +1,7 @@
From 5e90ac56425ac2e20eda55f3d40a0026eec8089b Mon Sep 17 00:00:00 2001
From: Jonghyun Park <parjong@gmail.com>
Date: Fri, 9 Jun 2017 09:52:53 +0900
-Subject: [PATCH 04/23] [ARM/Linux] Validate memory using ldrb instead of ldr
+Subject: [PATCH 04/29] [ARM/Linux] Validate memory using ldrb instead of ldr
---
src/vm/arm/memcpy.S | 4 ++--
@@ -23,5 +23,5 @@ index b978860..0c2c26e 100644
blx C_FUNC(memcpy)
--
-1.9.1
+2.7.4
diff --git a/packaging/0005-Add-skipped-testcase-on-TM1.patch b/packaging/0005-Add-skipped-testcase-on-TM1.patch
index 8e9542e966..e0485db6f3 100644
--- a/packaging/0005-Add-skipped-testcase-on-TM1.patch
+++ b/packaging/0005-Add-skipped-testcase-on-TM1.patch
@@ -1,7 +1,7 @@
From f64b4e3185745eecaa1e9b1a551b679f141ddaa2 Mon Sep 17 00:00:00 2001
From: Jiyoung Yun <jy910.yun@samsung.com>
Date: Tue, 20 Jun 2017 15:09:10 +0900
-Subject: [PATCH 05/23] Add skipped testcase on TM1
+Subject: [PATCH 05/29] Add skipped testcase on TM1
Lists:
JIT.jit64.opt.cse.hugeSimpleExpr1.hugeSimpleExpr1
@@ -29,5 +29,5 @@ index d889b57..82cc41d 100644
+JIT/jit64/opt/cse/HugeField2/HugeField2.sh
+JIT/jit64/opt/cse/hugeexpr1/hugeexpr1.sh
--
-1.9.1
+2.7.4
diff --git a/packaging/0006-Set-local-variables-as-addr-exposed-if-it-appears-in.patch b/packaging/0006-Set-local-variables-as-addr-exposed-if-it-appears-in.patch
index e8b06f412a..7518eb8876 100644
--- a/packaging/0006-Set-local-variables-as-addr-exposed-if-it-appears-in.patch
+++ b/packaging/0006-Set-local-variables-as-addr-exposed-if-it-appears-in.patch
@@ -1,7 +1,7 @@
From 49b89a063fc18e2000a978ed0e0e0e2aeab42f8a Mon Sep 17 00:00:00 2001
From: Jonghyun Park <parjong@gmail.com>
Date: Wed, 14 Jun 2017 07:05:12 +0900
-Subject: [PATCH 06/23] Set local variables as addr-exposed if it appears in
+Subject: [PATCH 06/29] Set local variables as addr-exposed if it appears in
ADDR expression
---
@@ -45,5 +45,5 @@ index 27a1dae..629dc83 100644
_AssignFields:
--
-1.9.1
+2.7.4
diff --git a/packaging/0007-Revert-unnecessary-changes.patch b/packaging/0007-Revert-unnecessary-changes.patch
index b279c2d216..a3533fadd8 100644
--- a/packaging/0007-Revert-unnecessary-changes.patch
+++ b/packaging/0007-Revert-unnecessary-changes.patch
@@ -3,7 +3,7 @@ From: =?UTF-8?q?=EC=98=A4=ED=98=95=EC=84=9D/Developer=20Experience=20Lab?=
=?UTF-8?q?=28S/W=EC=84=BC=ED=84=B0=29/Senior=20Engineer/=EC=82=BC?=
=?UTF-8?q?=EC=84=B1=EC=A0=84=EC=9E=90?= <hseok82.oh@samsung.com>
Date: Tue, 20 Jun 2017 12:20:44 +0900
-Subject: [PATCH 07/23] Revert unnecessary changes
+Subject: [PATCH 07/29] Revert unnecessary changes
---
src/jit/morph.cpp | 2 +-
@@ -30,5 +30,5 @@ index 629dc83..3475889 100644
#else // LEGACY_BACKEND
--
-1.9.1
+2.7.4
diff --git a/packaging/0008-Add-skipped-testcase-superpmi.patch b/packaging/0008-Add-skipped-testcase-superpmi.patch
index 7513a6e8e9..d04ff2c6b0 100644
--- a/packaging/0008-Add-skipped-testcase-superpmi.patch
+++ b/packaging/0008-Add-skipped-testcase-superpmi.patch
@@ -1,7 +1,7 @@
From c533925e0a6e1d3c6921abcf41ab99276443cd83 Mon Sep 17 00:00:00 2001
From: Hyeongseok Oh <hseok82.oh@samsung.com>
Date: Mon, 26 Jun 2017 16:12:08 +0900
-Subject: [PATCH 08/23] Add skipped testcase: superpmi
+Subject: [PATCH 08/29] Add skipped testcase: superpmi
Skip JIT/superpmi/superpmicollect/superpmicollect.sh
---
@@ -18,5 +18,5 @@ index 82cc41d..536db69 100644
JIT/jit64/opt/cse/hugeexpr1/hugeexpr1.sh
+JIT/superpmi/superpmicollect/superpmicollect.sh
--
-1.9.1
+2.7.4
diff --git a/packaging/0009-x86-Linux-Adjust-SP-in-throwing-helper-block-12504-1.patch b/packaging/0009-x86-Linux-Adjust-SP-in-throwing-helper-block-12504-1.patch
index fef96c9ceb..db20a70b38 100644
--- a/packaging/0009-x86-Linux-Adjust-SP-in-throwing-helper-block-12504-1.patch
+++ b/packaging/0009-x86-Linux-Adjust-SP-in-throwing-helper-block-12504-1.patch
@@ -3,7 +3,7 @@ From: =?UTF-8?q?=EB=B0=95=EC=A2=85=ED=98=84/Developer=20Experience=20Lab?=
=?UTF-8?q?=28S/W=EC=84=BC=ED=84=B0=29/Senior=20Engineer/=EC=82=BC?=
=?UTF-8?q?=EC=84=B1=EC=A0=84=EC=9E=90?= <jh1302.park@samsung.com>
Date: Thu, 10 Aug 2017 17:25:46 +0900
-Subject: [PATCH 09/23] [x86/Linux] Adjust SP in throwing helper block (#12504)
+Subject: [PATCH 09/29] [x86/Linux] Adjust SP in throwing helper block (#12504)
(#12)
* [x86/Linux] Adjust SP in throwing helper block
@@ -61,5 +61,5 @@ index 94cc9b9..719299e 100644
/* For non-debuggable code, find and use the helper block for
raising the exception. The block may be shared by other trees too. */
--
-1.9.1
+2.7.4
diff --git a/packaging/0010-Use-udf-0xff-instead-of-bkpt-0xbe-as-a-poison-13.patch b/packaging/0010-Use-udf-0xff-instead-of-bkpt-0xbe-as-a-poison-13.patch
index dad9f300d3..c6a211db4e 100644
--- a/packaging/0010-Use-udf-0xff-instead-of-bkpt-0xbe-as-a-poison-13.patch
+++ b/packaging/0010-Use-udf-0xff-instead-of-bkpt-0xbe-as-a-poison-13.patch
@@ -3,7 +3,7 @@ From: =?UTF-8?q?=EC=9D=B4=EC=B6=98=EC=84=9D/Developer=20Experience=20Lab?=
=?UTF-8?q?=28S/W=EC=84=BC=ED=84=B0=29/Senior=20Engineer/=EC=82=BC?=
=?UTF-8?q?=EC=84=B1=EC=A0=84=EC=9E=90?= <chunseok.lee@samsung.com>
Date: Thu, 24 Aug 2017 07:27:23 +0900
-Subject: [PATCH 10/23] Use 'udf 0xff' instead of 'bkpt 0xbe' as a poison (#13)
+Subject: [PATCH 10/29] Use 'udf 0xff' instead of 'bkpt 0xbe' as a poison (#13)
* Fill freed loader heap chunk with non-zero value (#12731)
@@ -421,5 +421,5 @@ index 70c8cab..5a3f8f5 100644
}
--
-1.9.1
+2.7.4
diff --git a/packaging/0011-Enable-sosplugin-on-ARM-14.patch b/packaging/0011-Enable-sosplugin-on-ARM-14.patch
index 4a4c4f8417..84a7c4b44c 100644
--- a/packaging/0011-Enable-sosplugin-on-ARM-14.patch
+++ b/packaging/0011-Enable-sosplugin-on-ARM-14.patch
@@ -3,7 +3,7 @@ From: =?UTF-8?q?=EC=9D=B4=EC=B6=98=EC=84=9D/Developer=20Experience=20Lab?=
=?UTF-8?q?=28S/W=EC=84=BC=ED=84=B0=29/Senior=20Engineer/=EC=82=BC?=
=?UTF-8?q?=EC=84=B1=EC=A0=84=EC=9E=90?= <chunseok.lee@samsung.com>
Date: Thu, 24 Aug 2017 07:27:41 +0900
-Subject: [PATCH 11/23] Enable sosplugin on ARM (#14)
+Subject: [PATCH 11/29] Enable sosplugin on ARM (#14)
* Fix CreateDump-related undefined reference on non-AMD64/Linux platforms (#11635)
@@ -130,5 +130,5 @@ index 6b1f686..6228b01 100644
EstablisherFrame,
&handlerRoutine,
--
-1.9.1
+2.7.4
diff --git a/packaging/0012-Add-pie-to-linker-option-16.patch b/packaging/0012-Add-pie-to-linker-option-16.patch
index 90ff8f9a84..288ab1d43d 100644
--- a/packaging/0012-Add-pie-to-linker-option-16.patch
+++ b/packaging/0012-Add-pie-to-linker-option-16.patch
@@ -3,7 +3,7 @@ From: =?UTF-8?q?=EC=9D=B4=EC=B6=98=EC=84=9D/Developer=20Experience=20Lab?=
=?UTF-8?q?=28S/W=EC=84=BC=ED=84=B0=29/Senior=20Engineer/=EC=82=BC?=
=?UTF-8?q?=EC=84=B1=EC=A0=84=EC=9E=90?= <chunseok.lee@samsung.com>
Date: Thu, 24 Aug 2017 07:28:09 +0900
-Subject: [PATCH 12/23] Add -pie to linker option (#16)
+Subject: [PATCH 12/29] Add -pie to linker option (#16)
There have been no -pie linker option.
This patch adds -pie linker option into crossgen, ildasm, ilasm, and
@@ -76,5 +76,5 @@ index 3b9c5ba..b8e9cf7 100644
target_link_libraries(crossgen
advapi32
--
-1.9.1
+2.7.4
diff --git a/packaging/0013-Revert-Add-pie-to-linker-option-16.patch b/packaging/0013-Revert-Add-pie-to-linker-option-16.patch
index ad21916140..07fb9fc6f5 100644
--- a/packaging/0013-Revert-Add-pie-to-linker-option-16.patch
+++ b/packaging/0013-Revert-Add-pie-to-linker-option-16.patch
@@ -3,7 +3,7 @@ From: =?UTF-8?q?=EC=9D=B4=EC=B6=98=EC=84=9D/Developer=20Experience=20Lab?=
=?UTF-8?q?=28S/W=EC=84=BC=ED=84=B0=29/Senior=20Engineer/=EC=82=BC?=
=?UTF-8?q?=EC=84=B1=EC=A0=84=EC=9E=90?= <chunseok.lee@samsung.com>
Date: Thu, 24 Aug 2017 08:55:26 +0900
-Subject: [PATCH 13/23] Revert "Add -pie to linker option (#16)"
+Subject: [PATCH 13/29] Revert "Add -pie to linker option (#16)"
This reverts commit c220f1608407a74c6c0f4e7145953453b0573fcb.
---
@@ -74,5 +74,5 @@ index b8e9cf7..3b9c5ba 100644
target_link_libraries(crossgen
advapi32
--
-1.9.1
+2.7.4
diff --git a/packaging/0014-Fix-inconsistency-between-GetHasCode-and-Equals-1351.patch b/packaging/0014-Fix-inconsistency-between-GetHasCode-and-Equals-1351.patch
index 0de7bc3f50..a03edf78db 100644
--- a/packaging/0014-Fix-inconsistency-between-GetHasCode-and-Equals-1351.patch
+++ b/packaging/0014-Fix-inconsistency-between-GetHasCode-and-Equals-1351.patch
@@ -1,7 +1,7 @@
From 6b2a3ed5103ca11bb928ccf94b6b50bfdbb3d115 Mon Sep 17 00:00:00 2001
From: Jonghyun Park <parjong@gmail.com>
Date: Wed, 23 Aug 2017 05:56:01 +0900
-Subject: [PATCH 14/23] Fix inconsistency between GetHasCode and Equals
+Subject: [PATCH 14/29] Fix inconsistency between GetHasCode and Equals
(#13513)
---
@@ -31,5 +31,5 @@ index 988bf2b..1d701f0 100644
if (invocationList == null)
{
--
-1.9.1
+2.7.4
diff --git a/packaging/0015-Cherry-pick-13586.patch b/packaging/0015-Cherry-pick-13586.patch
index c9fb518fe6..96d5f42070 100644
--- a/packaging/0015-Cherry-pick-13586.patch
+++ b/packaging/0015-Cherry-pick-13586.patch
@@ -1,7 +1,7 @@
From 275abfda0a2ba0bf70ca6d16a1fc13b9453c2b49 Mon Sep 17 00:00:00 2001
From: Jonghyun Park <parjong@gmail.com>
Date: Tue, 29 Aug 2017 10:11:24 +0900
-Subject: [PATCH 15/23] Cherry-pick #13586
+Subject: [PATCH 15/29] Cherry-pick #13586
---
src/ToolBox/SOS/Strike/strike.cpp | 31 ++++++++++++++++++-------------
@@ -166,5 +166,5 @@ index 6d0e796..bbf97b9 100644
// On ARM this mask is or'ed with the address of code to get an instruction pointer
--
-1.9.1
+2.7.4
diff --git a/packaging/0016-callsignalhandlerwrapper-patch.patch b/packaging/0016-callsignalhandlerwrapper-patch.patch
index 8fb92abda4..cb223da971 100644
--- a/packaging/0016-callsignalhandlerwrapper-patch.patch
+++ b/packaging/0016-callsignalhandlerwrapper-patch.patch
@@ -1,7 +1,7 @@
From 8e38cfbaf45147c4361123a306d5b50c667a899e Mon Sep 17 00:00:00 2001
From: CHUNSEOK LEE <chunseok.lee@samsung.com>
Date: Wed, 2 Aug 2017 09:02:14 +0900
-Subject: [PATCH 16/23] callsignalhandlerwrapper patch
+Subject: [PATCH 16/29] callsignalhandlerwrapper patch
Change-Id: I38630f9d02733aab5890b46afda39fd6e45461db
---
@@ -47,5 +47,5 @@ index e1ad460..3936204 100644
// Switch the current context to the signal_handler_worker and the original stack
--
-1.9.1
+2.7.4
diff --git a/packaging/0017-clear-cache-after-NI-reloc.patch b/packaging/0017-clear-cache-after-NI-reloc.patch
index 6bb74f5791..3a3c4b31a6 100644
--- a/packaging/0017-clear-cache-after-NI-reloc.patch
+++ b/packaging/0017-clear-cache-after-NI-reloc.patch
@@ -1,7 +1,7 @@
From 2427902ddfff7dd868b79d95865afee5c3a257c4 Mon Sep 17 00:00:00 2001
From: CHUNSEOK LEE <chunseok.lee@samsung.com>
Date: Fri, 25 Aug 2017 09:50:17 +0900
-Subject: [PATCH 17/23] clear cache after NI reloc
+Subject: [PATCH 17/29] clear cache after NI reloc
---
src/vm/peimagelayout.cpp | 2 ++
@@ -21,5 +21,5 @@ index 34ba4d8..5dc0e64 100644
#endif
--
-1.9.1
+2.7.4
diff --git a/packaging/0018-Support-FEATURE_GDBJIT_FRAME-including-NI-IL_Stub.patch b/packaging/0018-Support-FEATURE_GDBJIT_FRAME-including-NI-IL_Stub.patch
index 2b03965319..629adccf04 100644
--- a/packaging/0018-Support-FEATURE_GDBJIT_FRAME-including-NI-IL_Stub.patch
+++ b/packaging/0018-Support-FEATURE_GDBJIT_FRAME-including-NI-IL_Stub.patch
@@ -1,7 +1,7 @@
From d88953cc229dcbf5d93aa04711ee599b3d073094 Mon Sep 17 00:00:00 2001
From: Jonghyun Park <parjong@gmail.com>
Date: Tue, 8 Aug 2017 01:27:16 +0900
-Subject: [PATCH 18/23] Support FEATURE_GDBJIT_FRAME (including NI & IL_Stub)
+Subject: [PATCH 18/29] Support FEATURE_GDBJIT_FRAME (including NI & IL_Stub)
---
src/vm/CMakeLists.txt | 3 +
@@ -1435,5 +1435,5 @@ index da7d18c..9d9800b 100644
DACNotifyExceptionHelper(Args, 2);
}
--
-1.9.1
+2.7.4
diff --git a/packaging/0019-Add-profiling-support.patch b/packaging/0019-Add-profiling-support.patch
index 1e39d21a8e..a0fcd75af1 100644
--- a/packaging/0019-Add-profiling-support.patch
+++ b/packaging/0019-Add-profiling-support.patch
@@ -1,7 +1,7 @@
From eef4ae4f508fa9d1f4acb3ee533a3b8a756693e1 Mon Sep 17 00:00:00 2001
From: CHUNSEOK LEE <chunseok.lee@samsung.com>
Date: Fri, 18 Aug 2017 14:05:03 +0900
-Subject: [PATCH 19/23] Add profiling support
+Subject: [PATCH 19/29] Add profiling support
Signed-off-by: CHUNSEOK LEE <chunseok.lee@samsung.com>
---
@@ -769,5 +769,5 @@ index 76d3cf1..83764e0 100644
{
DWORD eax;
--
-1.9.1
+2.7.4
diff --git a/packaging/0020-Enable-loading-directly-ni-file-for-dotnet-launcher.patch b/packaging/0020-Enable-loading-directly-ni-file-for-dotnet-launcher.patch
index fd7a8ec6d9..2947bbae32 100644
--- a/packaging/0020-Enable-loading-directly-ni-file-for-dotnet-launcher.patch
+++ b/packaging/0020-Enable-loading-directly-ni-file-for-dotnet-launcher.patch
@@ -1,7 +1,7 @@
From 3ead73093ab67643a6f313f2148812c3ad668d7c Mon Sep 17 00:00:00 2001
From: Yongseop Kim <yons.kim@samsung.com>
Date: Mon, 4 Sep 2017 15:41:57 +0900
-Subject: [PATCH 20/23] Enable loading directly ni file for dotnet-launcher
+Subject: [PATCH 20/29] Enable loading directly ni file for dotnet-launcher
---
src/vm/appdomain.cpp | 3 ++-
@@ -36,5 +36,5 @@ index 1d3567e..2c3fba5 100644
hr = CreateAssemblyNameObject(&pName, assemblyDisplayName, CANOF_PARSE_DISPLAY_NAME, NULL);
if (SUCCEEDED(hr))
--
-1.9.1
+2.7.4
diff --git a/packaging/0021-Revert-Enable-loading-directly-ni-file-for-dotnet-la.patch b/packaging/0021-Revert-Enable-loading-directly-ni-file-for-dotnet-la.patch
index 26ec8ff990..a7345be781 100644
--- a/packaging/0021-Revert-Enable-loading-directly-ni-file-for-dotnet-la.patch
+++ b/packaging/0021-Revert-Enable-loading-directly-ni-file-for-dotnet-la.patch
@@ -1,7 +1,7 @@
From dd38848702a4d5b9aed45f4b6ff77b16141a764e Mon Sep 17 00:00:00 2001
From: Yongseop Kim <yons.kim@samsung.com>
Date: Tue, 5 Sep 2017 18:00:39 +0900
-Subject: [PATCH 21/23] Revert "Enable loading directly ni file for
+Subject: [PATCH 21/29] Revert "Enable loading directly ni file for
dotnet-launcher"
This reverts commit 3ead73093ab67643a6f313f2148812c3ad668d7c.
@@ -38,5 +38,5 @@ index 2c3fba5..1d3567e 100644
hr = CreateAssemblyNameObject(&pName, assemblyDisplayName, CANOF_PARSE_DISPLAY_NAME, NULL);
if (SUCCEEDED(hr))
--
-1.9.1
+2.7.4
diff --git a/packaging/0022-Enable-loading-directly-ni-file-for-corerun-temporar.patch b/packaging/0022-Enable-loading-directly-ni-file-for-corerun-temporar.patch
index 077650bbba..17c8d70808 100644
--- a/packaging/0022-Enable-loading-directly-ni-file-for-corerun-temporar.patch
+++ b/packaging/0022-Enable-loading-directly-ni-file-for-corerun-temporar.patch
@@ -1,7 +1,7 @@
From 327402c5c08bdbb3903735b20b76fe1d73819eb9 Mon Sep 17 00:00:00 2001
From: Yongseop Kim <yons.kim@samsung.com>
Date: Tue, 5 Sep 2017 18:03:34 +0900
-Subject: [PATCH 22/23] Enable loading directly ni file for corerun temporarily
+Subject: [PATCH 22/29] Enable loading directly ni file for corerun temporarily
---
src/coreclr/hosts/unixcoreruncommon/coreruncommon.cpp | 2 ++
@@ -28,5 +28,5 @@ index f97f262..a1db5c1 100644
// Construct native search directory paths
std::string nativeDllSearchDirs(appPath);
--
-1.9.1
+2.7.4
diff --git a/packaging/0023-Add-Tizen-RuntimeID-case.patch b/packaging/0023-Add-Tizen-RuntimeID-case.patch
index 44ccf3a8ec..e402b8a617 100644
--- a/packaging/0023-Add-Tizen-RuntimeID-case.patch
+++ b/packaging/0023-Add-Tizen-RuntimeID-case.patch
@@ -1,7 +1,7 @@
From 1ef080f2e3b158042ce162876e4f781834993c0e Mon Sep 17 00:00:00 2001
From: Jiyoung Yun <jy910.yun@samsung.com>
Date: Wed, 14 Jun 2017 16:36:56 +0900
-Subject: [PATCH 23/23] Add Tizen RuntimeID case
+Subject: [PATCH 23/29] Add Tizen RuntimeID case
Change-Id: I8c52d2993dd1414ede6ff1e40e949af58bca9d40
---
@@ -52,5 +52,5 @@ index 6590e83..3467387 100755
exit 1
fi
--
-1.9.1
+2.7.4
diff --git a/packaging/0024-Add-pie-to-linker-option.patch b/packaging/0024-Add-pie-to-linker-option.patch
new file mode 100644
index 0000000000..3af8f4b79c
--- /dev/null
+++ b/packaging/0024-Add-pie-to-linker-option.patch
@@ -0,0 +1,26 @@
+From 773427899f0711c53193a5c1d9271fd510f1591c Mon Sep 17 00:00:00 2001
+From: CHUNSEOK LEE <chunseok.lee@samsung.com>
+Date: Wed, 23 Aug 2017 16:42:31 +0900
+Subject: [PATCH 24/29] Add -pie to linker option
+
+There have been no -pie linker option.
+This patch adds -pie linker option into crossgen(for tizen)
+---
+ src/tools/crossgen/CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/tools/crossgen/CMakeLists.txt b/src/tools/crossgen/CMakeLists.txt
+index 3b9c5ba..b8e9cf7 100644
+--- a/src/tools/crossgen/CMakeLists.txt
++++ b/src/tools/crossgen/CMakeLists.txt
+@@ -50,6 +50,7 @@ if(CLR_CMAKE_PLATFORM_UNIX)
+ coreclrpal
+ palrt
+ )
++ set_target_properties(crossgen PROPERTIES LINK_FLAGS -pie)
+ else()
+ target_link_libraries(crossgen
+ advapi32
+--
+2.7.4
+
diff --git a/packaging/0025-Fix-undefined-references-on-SOS-11701.patch b/packaging/0025-Fix-undefined-references-on-SOS-11701.patch
new file mode 100644
index 0000000000..cad1e7678f
--- /dev/null
+++ b/packaging/0025-Fix-undefined-references-on-SOS-11701.patch
@@ -0,0 +1,81 @@
+From ef8f88537cf8264ea1b7f079b7cf93f2fda2bbcb Mon Sep 17 00:00:00 2001
+From: Jonghyun Park <parjong@gmail.com>
+Date: Thu, 18 May 2017 12:30:52 +0900
+Subject: [PATCH 25/29] Fix undefined references on SOS (#11701)
+
+---
+ src/vm/i386/excepx86.cpp | 21 +++++++++------------
+ src/vm/virtualcallstub.cpp | 14 +++++++-------
+ 2 files changed, 16 insertions(+), 19 deletions(-)
+
+diff --git a/src/vm/i386/excepx86.cpp b/src/vm/i386/excepx86.cpp
+index cf01147..9f19d47 100644
+--- a/src/vm/i386/excepx86.cpp
++++ b/src/vm/i386/excepx86.cpp
+@@ -1953,18 +1953,6 @@ LPVOID STDCALL COMPlusEndCatch(LPVOID ebp, DWORD ebx, DWORD edi, DWORD esi, LPVO
+ return esp;
+ }
+
+-#endif // !DACCESS_COMPILE
+-
+-PTR_CONTEXT GetCONTEXTFromRedirectedStubStackFrame(CONTEXT * pContext)
+-{
+- LIMITED_METHOD_DAC_CONTRACT;
+-
+- UINT_PTR stackSlot = pContext->Ebp + REDIRECTSTUB_EBP_OFFSET_CONTEXT;
+- PTR_PTR_CONTEXT ppContext = dac_cast<PTR_PTR_CONTEXT>((TADDR)stackSlot);
+- return *ppContext;
+-}
+-
+-#if !defined(DACCESS_COMPILE)
+ PEXCEPTION_REGISTRATION_RECORD GetCurrentSEHRecord()
+ {
+ WRAPPER_NO_CONTRACT;
+@@ -3618,6 +3606,15 @@ EXCEPTION_HANDLER_IMPL(COMPlusFrameHandlerRevCom)
+ #endif // !DACCESS_COMPILE
+ #endif // !WIN64EXCEPTIONS
+
++PTR_CONTEXT GetCONTEXTFromRedirectedStubStackFrame(CONTEXT * pContext)
++{
++ LIMITED_METHOD_DAC_CONTRACT;
++
++ UINT_PTR stackSlot = pContext->Ebp + REDIRECTSTUB_EBP_OFFSET_CONTEXT;
++ PTR_PTR_CONTEXT ppContext = dac_cast<PTR_PTR_CONTEXT>((TADDR)stackSlot);
++ return *ppContext;
++}
++
+ #ifndef DACCESS_COMPILE
+ LONG CLRNoCatchHandler(EXCEPTION_POINTERS* pExceptionInfo, PVOID pv)
+ {
+diff --git a/src/vm/virtualcallstub.cpp b/src/vm/virtualcallstub.cpp
+index 01b15c6..e753860 100644
+--- a/src/vm/virtualcallstub.cpp
++++ b/src/vm/virtualcallstub.cpp
+@@ -1640,6 +1640,13 @@ void VirtualCallStubManager::BackPatchWorkerStatic(PCODE returnAddress, TADDR si
+ END_ENTRYPOINT_VOIDRET;
+ }
+
++#if defined(_TARGET_X86_) && defined(FEATURE_PAL)
++void BackPatchWorkerStaticStub(PCODE returnAddr, TADDR siteAddrForRegisterIndirect)
++{
++ VirtualCallStubManager::BackPatchWorkerStatic(returnAddr, siteAddrForRegisterIndirect);
++}
++#endif
++
+ PCODE VirtualCallStubManager::ResolveWorker(StubCallSite* pCallSite,
+ OBJECTREF *protectedObj,
+ DispatchToken token,
+@@ -4047,10 +4054,3 @@ BOOL VirtualCallStubManagerManager::TraceManager(
+ // Forward the call to the appropriate manager.
+ return pMgr->TraceManager(thread, trace, pContext, pRetAddr);
+ }
+-
+-#if defined(_TARGET_X86_) && defined(FEATURE_PAL)
+-void BackPatchWorkerStaticStub(PCODE returnAddr, TADDR siteAddrForRegisterIndirect)
+-{
+- VirtualCallStubManager::BackPatchWorkerStatic(returnAddr, siteAddrForRegisterIndirect);
+-}
+-#endif
+--
+2.7.4
+
diff --git a/packaging/0026-Port-DacUnwindStackFrame-11666.patch b/packaging/0026-Port-DacUnwindStackFrame-11666.patch
new file mode 100644
index 0000000000..f2747f9d26
--- /dev/null
+++ b/packaging/0026-Port-DacUnwindStackFrame-11666.patch
@@ -0,0 +1,227 @@
+From 29d32d571bfb8ed844de4a2549baa8ae65aa3155 Mon Sep 17 00:00:00 2001
+From: Jonghyun Park <parjong@gmail.com>
+Date: Thu, 18 May 2017 12:34:05 +0900
+Subject: [PATCH 26/29] Port 'DacUnwindStackFrame' (#11666)
+
+* [x86/Linux] Implement 'DacUnwindStackFrame'
+
+* Update ContextPointers using ContextRecord
+
+* An attempt to fix x86/Windows build error
+---
+ src/inc/regdisp.h | 56 +++++++++++++----------
+ src/unwinder/i386/unwinder_i386.cpp | 88 ++++++++++++++++++++++++-------------
+ src/unwinder/i386/unwinder_i386.h | 2 +
+ 3 files changed, 91 insertions(+), 55 deletions(-)
+
+diff --git a/src/inc/regdisp.h b/src/inc/regdisp.h
+index a361dca..eb84fdf 100644
+--- a/src/inc/regdisp.h
++++ b/src/inc/regdisp.h
+@@ -323,6 +323,35 @@ inline void SyncRegDisplayToCurrentContext(REGDISPLAY* pRD)
+
+ typedef REGDISPLAY *PREGDISPLAY;
+
++#ifdef WIN64EXCEPTIONS
++inline void FillContextPointers(PT_KNONVOLATILE_CONTEXT_POINTERS pCtxPtrs, PT_CONTEXT pCtx)
++{
++#ifdef _TARGET_AMD64_
++ for (int i = 0; i < 16; i++)
++ {
++ *(&pCtxPtrs->Rax + i) = (&pCtx->Rax + i);
++ }
++#elif defined(_TARGET_ARM64_) // _TARGET_AMD64_
++ for (int i = 0; i < 12; i++)
++ {
++ *(&pCtxPtrs->X19 + i) = (&pCtx->X19 + i);
++ }
++#elif defined(_TARGET_ARM_) // _TARGET_ARM64_
++ // Copy over the nonvolatile integer registers (R4-R11)
++ for (int i = 0; i < 8; i++)
++ {
++ *(&pCtxPtrs->R4 + i) = (&pCtx->R4 + i);
++ }
++#elif defined(_TARGET_X86_) // _TARGET_ARM_
++ for (int i = 0; i < 7; i++)
++ {
++ *(&pCtxPtrs->Edi + i) = (&pCtx->Edi + i);
++ }
++#else // _TARGET_X86_
++ PORTABILITY_ASSERT("FillContextPointers");
++#endif // _TARGET_???_ (ELSE)
++}
++#endif // WIN64EXCEPTIONS
+
+ inline void FillRegDisplay(const PREGDISPLAY pRD, PT_CONTEXT pctx, PT_CONTEXT pCallerCtx = NULL)
+ {
+@@ -374,33 +403,12 @@ inline void FillRegDisplay(const PREGDISPLAY pRD, PT_CONTEXT pctx, PT_CONTEXT pC
+ pRD->IsCallerSPValid = TRUE; // Don't add usage of this field. This is only temporary.
+ }
+
+-#ifdef _TARGET_AMD64_
+- for (int i = 0; i < 16; i++)
+- {
+- *(&pRD->ctxPtrsOne.Rax + i) = (&pctx->Rax + i);
+- }
+-#elif defined(_TARGET_ARM64_) // _TARGET_AMD64_
+- for (int i = 0; i < 12; i++)
+- {
+- *(&pRD->ctxPtrsOne.X19 + i) = (&pctx->X19 + i);
+- }
+-#elif defined(_TARGET_ARM_) // _TARGET_ARM64_
+- // Copy over the nonvolatile integer registers (R4-R11)
+- for (int i = 0; i < 8; i++)
+- {
+- *(&pRD->ctxPtrsOne.R4 + i) = (&pctx->R4 + i);
+- }
++ FillContextPointers(&pRD->ctxPtrsOne, pctx);
+
++#if defined(_TARGET_ARM_)
+ pRD->ctxPtrsOne.Lr = &pctx->Lr;
+ pRD->pPC = &pRD->pCurrentContext->Pc;
+-#elif defined(_TARGET_X86_) // _TARGET_ARM_
+- for (int i = 0; i < 7; i++)
+- {
+- *(&pRD->ctxPtrsOne.Edi + i) = (&pctx->Edi + i);
+- }
+-#else // _TARGET_X86_
+- PORTABILITY_ASSERT("FillRegDisplay");
+-#endif // _TARGET_???_ (ELSE)
++#endif // _TARGET_ARM_
+
+ #ifdef DEBUG_REGDISPLAY
+ pRD->_pThread = NULL;
+diff --git a/src/unwinder/i386/unwinder_i386.cpp b/src/unwinder/i386/unwinder_i386.cpp
+index f221020..42c19cb 100644
+--- a/src/unwinder/i386/unwinder_i386.cpp
++++ b/src/unwinder/i386/unwinder_i386.cpp
+@@ -8,6 +8,49 @@
+ #include "unwinder_i386.h"
+
+ #ifdef WIN64EXCEPTIONS
++BOOL OOPStackUnwinderX86::Unwind(T_CONTEXT* pContextRecord, T_KNONVOLATILE_CONTEXT_POINTERS* pContextPointers)
++{
++ REGDISPLAY rd;
++
++ FillRegDisplay(&rd, pContextRecord);
++
++ rd.SP = pContextRecord->Esp;
++ rd.PCTAddr = (UINT_PTR)&(pContextRecord->Eip);
++
++ if (pContextPointers)
++ {
++ rd.pCurrentContextPointers = pContextPointers;
++ }
++
++ CodeManState codeManState;
++ codeManState.dwIsSet = 0;
++
++ DWORD ControlPc = pContextRecord->Eip;
++
++ EECodeInfo codeInfo;
++ codeInfo.Init((PCODE) ControlPc);
++
++ if (!UnwindStackFrame(&rd, &codeInfo, UpdateAllRegs, &codeManState, NULL))
++ {
++ return FALSE;
++ }
++
++ pContextRecord->ContextFlags |= CONTEXT_UNWOUND_TO_CALL;
++
++#define ARGUMENT_AND_SCRATCH_REGISTER(reg) if (rd.pCurrentContextPointers->reg) pContextRecord->reg = *rd.pCurrentContextPointers->reg;
++ ENUM_ARGUMENT_AND_SCRATCH_REGISTERS();
++#undef ARGUMENT_AND_SCRATCH_REGISTER
++
++#define CALLEE_SAVED_REGISTER(reg) if (rd.pCurrentContextPointers->reg) pContextRecord->reg = *rd.pCurrentContextPointers->reg;
++ ENUM_CALLEE_SAVED_REGISTERS();
++#undef CALLEE_SAVED_REGISTER
++
++ pContextRecord->Esp = rd.SP - codeInfo.GetCodeManager()->GetStackParameterSize(&codeInfo);
++ pContextRecord->Eip = rd.ControlPC;
++
++ return TRUE;
++}
++
+ /*++
+
+ Routine Description:
+@@ -72,42 +115,13 @@ OOPStackUnwinderX86::VirtualUnwind(
+ *HandlerRoutine = NULL;
+ }
+
+- REGDISPLAY rd;
+-
+- FillRegDisplay(&rd, ContextRecord);
+-
+- rd.SP = ContextRecord->Esp;
+- rd.PCTAddr = (UINT_PTR)&(ContextRecord->Eip);
+-
+- if (ContextPointers)
+- {
+- rd.pCurrentContextPointers = ContextPointers;
+- }
+-
+- CodeManState codeManState;
+- codeManState.dwIsSet = 0;
++ _ASSERTE(ContextRecord->Eip == ControlPc);
+
+- EECodeInfo codeInfo;
+- codeInfo.Init((PCODE) ControlPc);
+-
+- if (!UnwindStackFrame(&rd, &codeInfo, UpdateAllRegs, &codeManState, NULL))
++ if (!OOPStackUnwinderX86::Unwind(ContextRecord, ContextPointers))
+ {
+ return HRESULT_FROM_WIN32(ERROR_READ_FAULT);
+ }
+
+- ContextRecord->ContextFlags |= CONTEXT_UNWOUND_TO_CALL;
+-
+-#define ARGUMENT_AND_SCRATCH_REGISTER(reg) if (rd.pCurrentContextPointers->reg) ContextRecord->reg = *rd.pCurrentContextPointers->reg;
+- ENUM_ARGUMENT_AND_SCRATCH_REGISTERS();
+-#undef ARGUMENT_AND_SCRATCH_REGISTER
+-
+-#define CALLEE_SAVED_REGISTER(reg) if (rd.pCurrentContextPointers->reg) ContextRecord->reg = *rd.pCurrentContextPointers->reg;
+- ENUM_CALLEE_SAVED_REGISTERS();
+-#undef CALLEE_SAVED_REGISTER
+-
+- ContextRecord->Esp = rd.SP - codeInfo.GetCodeManager()->GetStackParameterSize(&codeInfo);
+- ContextRecord->Eip = rd.ControlPC;
+-
+ // For x86, the value of Establisher Frame Pointer is Caller SP
+ //
+ // (Please refers to CLR ABI for details)
+@@ -115,6 +129,18 @@ OOPStackUnwinderX86::VirtualUnwind(
+ return S_OK;
+ }
+
++BOOL DacUnwindStackFrame(T_CONTEXT* pContextRecord, T_KNONVOLATILE_CONTEXT_POINTERS* pContextPointers)
++{
++ BOOL res = OOPStackUnwinderX86::Unwind(pContextRecord, NULL);
++
++ if (res && pContextPointers)
++ {
++ FillContextPointers(pContextPointers, pContextRecord);
++ }
++
++ return res;
++}
++
+ //---------------------------------------------------------------------------------------
+ //
+ // This function behaves like the RtlVirtualUnwind in Windows.
+diff --git a/src/unwinder/i386/unwinder_i386.h b/src/unwinder/i386/unwinder_i386.h
+index bed30bf..f29248f 100644
+--- a/src/unwinder/i386/unwinder_i386.h
++++ b/src/unwinder/i386/unwinder_i386.h
+@@ -18,6 +18,8 @@
+ class OOPStackUnwinderX86 : public OOPStackUnwinder
+ {
+ public:
++ static BOOL Unwind(T_CONTEXT* pContextRecord, T_KNONVOLATILE_CONTEXT_POINTERS* pContextPointers);
++
+ static HRESULT VirtualUnwind(__in DWORD HandlerType,
+ __in DWORD ImageBase,
+ __in DWORD ControlPc,
+--
+2.7.4
+
diff --git a/packaging/0027-Include-PAL-headers-instead-of-embedding-it-11705.patch b/packaging/0027-Include-PAL-headers-instead-of-embedding-it-11705.patch
new file mode 100644
index 0000000000..4137b50d60
--- /dev/null
+++ b/packaging/0027-Include-PAL-headers-instead-of-embedding-it-11705.patch
@@ -0,0 +1,194 @@
+From 8112e9c4410dccbd2db212c6e2e3d979f7bb058d Mon Sep 17 00:00:00 2001
+From: Jonghyun Park <parjong@gmail.com>
+Date: Sat, 20 May 2017 00:17:27 +0900
+Subject: [PATCH 27/29] Include PAL headers instead of embedding it (#11705)
+
+---
+ src/ToolBox/SOS/lldbplugin/CMakeLists.txt | 2 +
+ src/ToolBox/SOS/lldbplugin/inc/lldbservices.h | 21 +------
+ src/ToolBox/SOS/lldbplugin/mstypes.h | 81 +--------------------------
+ src/ToolBox/SOS/lldbplugin/services.h | 6 +-
+ src/pal/inc/rt/x86intrin.h | 1 +
+ 5 files changed, 9 insertions(+), 102 deletions(-)
+ create mode 100644 src/pal/inc/rt/x86intrin.h
+
+diff --git a/src/ToolBox/SOS/lldbplugin/CMakeLists.txt b/src/ToolBox/SOS/lldbplugin/CMakeLists.txt
+index fe816ab..004abfe 100644
+--- a/src/ToolBox/SOS/lldbplugin/CMakeLists.txt
++++ b/src/ToolBox/SOS/lldbplugin/CMakeLists.txt
+@@ -99,6 +99,8 @@ include_directories(inc)
+ include_directories("${LLDB_H}")
+ include_directories(${CLR_DIR}/src/debug/inc)
+ include_directories(${CLR_DIR}/src/inc)
++include_directories(${CLR_DIR}/src/pal/inc)
++include_directories(${CLR_DIR}/src/pal/inc/rt)
+ include_directories(${CLR_DIR}/src/coreclr/hosts/inc)
+ include_directories(${CLR_DIR}/src/coreclr/hosts/unixcoreruncommon)
+
+diff --git a/src/ToolBox/SOS/lldbplugin/inc/lldbservices.h b/src/ToolBox/SOS/lldbplugin/inc/lldbservices.h
+index 4817e81..ffb2224 100644
+--- a/src/ToolBox/SOS/lldbplugin/inc/lldbservices.h
++++ b/src/ToolBox/SOS/lldbplugin/inc/lldbservices.h
+@@ -12,6 +12,8 @@
+ #define __LLDBSERVICES_H__
+
+ #include <stdarg.h>
++#include <palrt.h>
++#include <unknwn.h>
+
+ #ifdef __cplusplus
+ extern "C" {
+@@ -109,25 +111,6 @@ extern "C" {
+
+ #define DEBUG_EVENT_EXCEPTION 0x00000002
+
+-#ifdef DEFINE_EXCEPTION_RECORD
+-
+-#define EXCEPTION_MAXIMUM_PARAMETERS 15
+-
+-// This copy of the "64" bit record has been modified
+-// by removing the alignment field to make it the same
+-// as the _EXCEPTION_RECORD used in the pal defined in
+-// pal.h.
+-typedef struct _EXCEPTION_RECORD64 {
+- DWORD ExceptionCode;
+- DWORD ExceptionFlags;
+- DWORD64 ExceptionRecord;
+- DWORD64 ExceptionAddress;
+- DWORD NumberParameters;
+- DWORD64 ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS];
+-} EXCEPTION_RECORD64, *PEXCEPTION_RECORD64;
+-
+-#endif // DEFINE_EXCEPTION_RECORD
+-
+ typedef struct _DEBUG_LAST_EVENT_INFO_EXCEPTION
+ {
+ EXCEPTION_RECORD64 ExceptionRecord;
+diff --git a/src/ToolBox/SOS/lldbplugin/mstypes.h b/src/ToolBox/SOS/lldbplugin/mstypes.h
+index b5eee92..9b6f261 100644
+--- a/src/ToolBox/SOS/lldbplugin/mstypes.h
++++ b/src/ToolBox/SOS/lldbplugin/mstypes.h
+@@ -6,14 +6,7 @@
+ // etc. because they have various conflicits with the linux standard
+ // runtime h files like wchar_t, memcpy, etc.
+
+-#include <../../../pal/inc/pal_mstypes.h>
+-
+-#define S_OK (HRESULT)0x00000000
+-#define S_FALSE (HRESULT)0x00000001
+-#define E_NOTIMPL (HRESULT)0x80004001
+-#define E_FAIL (HRESULT)0x80004005
+-#define E_INVALIDARG (HRESULT)0x80070057
+-#define E_NOINTERFACE (HRESULT)0x80004002
++#include <pal_mstypes.h>
+
+ #define MAX_PATH 260
+
+@@ -32,75 +25,3 @@
+ #define MAKEDLLNAME_W(name) u"lib" name u".so"
+ #define MAKEDLLNAME_A(name) "lib" name ".so"
+ #endif
+-
+-#if defined(_MSC_VER) || defined(__llvm__)
+-#define DECLSPEC_ALIGN(x) __declspec(align(x))
+-#else
+-#define DECLSPEC_ALIGN(x)
+-#endif
+-
+-#define interface struct
+-#define DECLSPEC_UUID(x) __declspec(uuid(x))
+-#define DECLSPEC_NOVTABLE
+-#define MIDL_INTERFACE(x) struct DECLSPEC_UUID(x) DECLSPEC_NOVTABLE
+-
+-#ifdef __cplusplus
+-#define REFGUID const GUID &
+-#else
+-#define REFGUID const GUID *
+-#endif
+-
+-#ifdef __cplusplus
+-extern "C++" {
+-#include "string.h"
+-#if !defined _SYS_GUID_OPERATOR_EQ_ && !defined _NO_SYS_GUID_OPERATOR_EQ_
+-#define _SYS_GUID_OPERATOR_EQ_
+-inline int IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
+- { return !memcmp(&rguid1, &rguid2, sizeof(GUID)); }
+-inline int operator==(REFGUID guidOne, REFGUID guidOther)
+- { return IsEqualGUID(guidOne,guidOther); }
+-inline int operator!=(REFGUID guidOne, REFGUID guidOther)
+- { return !IsEqualGUID(guidOne,guidOther); }
+-#endif
+-};
+-#endif // __cplusplus
+-
+-typedef GUID IID;
+-#ifdef __cplusplus
+-#define REFIID const IID &
+-#else
+-#define REFIID const IID *
+-#endif
+-#define IID_NULL GUID_NULL
+-#define IsEqualIID(riid1, riid2) IsEqualGUID(riid1, riid2)
+-
+-MIDL_INTERFACE("00000000-0000-0000-C000-000000000046")
+-IUnknown
+-{
+-public:
+- virtual HRESULT QueryInterface(
+- REFIID riid,
+- void **ppvObject) = 0;
+-
+- virtual ULONG AddRef( void) = 0;
+-
+- virtual ULONG Release( void) = 0;
+-};
+-
+-EXTERN_C
+-inline
+-LONG
+-InterlockedIncrement(
+- LONG volatile *lpAddend)
+-{
+- return __sync_add_and_fetch(lpAddend, (LONG)1);
+-}
+-
+-EXTERN_C
+-inline
+-LONG
+-InterlockedDecrement(
+- LONG volatile *lpAddend)
+-{
+- return __sync_sub_and_fetch(lpAddend, (LONG)1);
+-}
+\ No newline at end of file
+diff --git a/src/ToolBox/SOS/lldbplugin/services.h b/src/ToolBox/SOS/lldbplugin/services.h
+index 3c384c9..6509040 100644
+--- a/src/ToolBox/SOS/lldbplugin/services.h
++++ b/src/ToolBox/SOS/lldbplugin/services.h
+@@ -32,13 +32,13 @@ public:
+ // IUnknown
+ //----------------------------------------------------------------------------
+
+- HRESULT QueryInterface(
++ HRESULT STDMETHODCALLTYPE QueryInterface(
+ REFIID InterfaceId,
+ PVOID* Interface);
+
+- ULONG AddRef();
++ ULONG STDMETHODCALLTYPE AddRef();
+
+- ULONG Release();
++ ULONG STDMETHODCALLTYPE Release();
+
+ //----------------------------------------------------------------------------
+ // ILLDBServices
+diff --git a/src/pal/inc/rt/x86intrin.h b/src/pal/inc/rt/x86intrin.h
+new file mode 100644
+index 0000000..c88e9fc
+--- /dev/null
++++ b/src/pal/inc/rt/x86intrin.h
+@@ -0,0 +1 @@
++#include "xmmintrin.h"
+--
+2.7.4
+
diff --git a/packaging/0028-added-DWARF-exprloc-for-static-value-class-fields-11.patch b/packaging/0028-added-DWARF-exprloc-for-static-value-class-fields-11.patch
new file mode 100644
index 0000000000..8865e4b467
--- /dev/null
+++ b/packaging/0028-added-DWARF-exprloc-for-static-value-class-fields-11.patch
@@ -0,0 +1,81 @@
+From 30757da1fd337ff40013311551715a4d0bf13fe7 Mon Sep 17 00:00:00 2001
+From: Buyduck <ivan.vagin@partner.samsung.com>
+Date: Mon, 29 May 2017 14:26:41 +0300
+Subject: [PATCH 28/29] added DWARF exprloc for static value class fields
+ (#11911)
+
+---
+ src/vm/gdbjit.cpp | 45 +++++++++++++++++++++++++++++++++++++--------
+ 1 file changed, 37 insertions(+), 8 deletions(-)
+
+diff --git a/src/vm/gdbjit.cpp b/src/vm/gdbjit.cpp
+index 5a3f074..d21b4da 100644
+--- a/src/vm/gdbjit.cpp
++++ b/src/vm/gdbjit.cpp
+@@ -1106,6 +1106,7 @@ void TypeMember::DumpDebugInfo(char* ptr, int& offset)
+ void TypeMember::DumpStaticDebugInfo(char* ptr, int& offset)
+ {
+ const int ptrSize = sizeof(TADDR);
++ int bufSize = 0;
+ if (ptr != nullptr)
+ {
+ DebugInfoStaticMember memberEntry;
+@@ -1114,19 +1115,47 @@ void TypeMember::DumpStaticDebugInfo(char* ptr, int& offset)
+ memberEntry.m_member_specification = m_member_offset;
+ memcpy(ptr + offset, &memberEntry, sizeof(DebugInfoStaticMember));
+
+- char buf[ptrSize + 2] = {0};
+- buf[0] = ptrSize + 1;
+- buf[1] = DW_OP_addr;
+-
+- for (int i = 0; i < ptrSize; i++)
++ // for value type static fields compute address as:
++ // addr = (*addr+sizeof(OBJECTREF))
++ if (m_member_type->GetTypeHandle().GetSignatureCorElementType() ==
++ ELEMENT_TYPE_VALUETYPE)
+ {
+- buf[i + 2] = m_static_member_address >> (i * 8);
++ bufSize = ptrSize + 6;
++
++ char buf[ptrSize + 6] = {0};
++ buf[0] = ptrSize + 5;
++ buf[1] = DW_OP_addr;
++
++ for (int i = 0; i < ptrSize; i++)
++ {
++ buf[i + 2] = m_static_member_address >> (i * 8);
++ }
++
++ buf[ptrSize + 2] = DW_OP_deref;
++ buf[ptrSize + 3] = DW_OP_const1u;
++ buf[ptrSize + 4] = sizeof(OBJECTREF);
++ buf[ptrSize + 5] = DW_OP_plus;
++
++ memcpy(ptr + offset + sizeof(DebugInfoStaticMember), &buf, bufSize);
+ }
++ else
++ {
++ bufSize = ptrSize + 2;
+
+- memcpy(ptr + offset + sizeof(DebugInfoStaticMember), &buf, ptrSize + 2);
++ char buf[ptrSize + 2] = {0};
++ buf[0] = ptrSize + 1;
++ buf[1] = DW_OP_addr;
++
++ for (int i = 0; i < ptrSize; i++)
++ {
++ buf[i + 2] = m_static_member_address >> (i * 8);
++ }
++
++ memcpy(ptr + offset + sizeof(DebugInfoStaticMember), &buf, bufSize);
++ }
+ }
+ offset += sizeof(DebugInfoStaticMember);
+- offset += ptrSize + 2;
++ offset += bufSize;
+ }
+
+ void FunctionMember::MangleName(char *buf, int &buf_offset, const char *name)
+--
+2.7.4
+
diff --git a/packaging/0029-Fix-calculation-of-debuginfo-s-size.-13899.patch b/packaging/0029-Fix-calculation-of-debuginfo-s-size.-13899.patch
new file mode 100644
index 0000000000..2261feb20e
--- /dev/null
+++ b/packaging/0029-Fix-calculation-of-debuginfo-s-size.-13899.patch
@@ -0,0 +1,234 @@
+From 35f92b0ad6deeefde5db5928b4b7b05e8d3cbae3 Mon Sep 17 00:00:00 2001
+From: Konstantin Baladurin <k.baladurin@partner.samsung.com>
+Date: Mon, 11 Sep 2017 20:23:16 +0300
+Subject: [PATCH 29/29] Fix calculation of debuginfo's size. (#13899)
+
+Information about each type is dumped once but during debuginfo's
+size calculation it was taken into account several time. Due to it
+size of debuginfo section could be in several times bigger than
+needed that in some cases leaded to OOM.
+---
+ src/vm/gdbjit.cpp | 86 ++++++++++++++++++++++++++++++++++---------------------
+ src/vm/gdbjit.h | 9 ++++++
+ 2 files changed, 62 insertions(+), 33 deletions(-)
+
+diff --git a/src/vm/gdbjit.cpp b/src/vm/gdbjit.cpp
+index d21b4da..50f1bb2 100644
+--- a/src/vm/gdbjit.cpp
++++ b/src/vm/gdbjit.cpp
+@@ -939,11 +939,14 @@ void TypeDefInfo::DumpStrings(char *ptr, int &offset)
+
+ void TypeDefInfo::DumpDebugInfo(char *ptr, int &offset)
+ {
+- if (m_typedef_type_offset != 0)
++ if (m_is_visited && m_base_ptr == ptr)
+ {
+ return;
+ }
+
++ m_base_ptr = ptr;
++ m_is_visited = true;
++
+ if (ptr != nullptr)
+ {
+ DebugInfoTypeDef buf;
+@@ -1014,10 +1017,14 @@ void PrimitiveTypeInfo::DumpStrings(char* ptr, int& offset)
+
+ void PrimitiveTypeInfo::DumpDebugInfo(char *ptr, int &offset)
+ {
+- if (m_type_offset != 0)
++ if (m_is_visited && m_base_ptr == ptr)
+ {
+ return;
+ }
++
++ m_base_ptr = ptr;
++ m_is_visited = true;
++
+ m_typedef_info->DumpDebugInfo(ptr, offset);
+
+ if (ptr != nullptr)
+@@ -1031,13 +1038,12 @@ void PrimitiveTypeInfo::DumpDebugInfo(char *ptr, int &offset)
+ memcpy(ptr + offset,
+ &bufType,
+ sizeof(DebugInfoType));
+- m_type_offset = offset;
++
++ // Replace offset from real type to typedef
++ m_type_offset = m_typedef_info->m_typedef_type_offset;
+ }
+
+ offset += sizeof(DebugInfoType);
+- // Replace offset from real type to typedef
+- if (ptr != nullptr)
+- m_type_offset = m_typedef_info->m_typedef_type_offset;
+ }
+
+ ClassTypeInfo::ClassTypeInfo(TypeHandle typeHandle, int num_members, FunctionMemberPtrArrayHolder &method)
+@@ -1106,7 +1112,21 @@ void TypeMember::DumpDebugInfo(char* ptr, int& offset)
+ void TypeMember::DumpStaticDebugInfo(char* ptr, int& offset)
+ {
+ const int ptrSize = sizeof(TADDR);
+- int bufSize = 0;
++ const int valueTypeBufSize = ptrSize + 6;
++ const int refTypeBufSize = ptrSize + 2;
++
++ bool isValueType = m_member_type->GetTypeHandle().GetSignatureCorElementType() ==
++ ELEMENT_TYPE_VALUETYPE;
++ int bufSize;
++ if (isValueType)
++ {
++ bufSize = valueTypeBufSize;
++ }
++ else
++ {
++ bufSize = refTypeBufSize;
++ }
++
+ if (ptr != nullptr)
+ {
+ DebugInfoStaticMember memberEntry;
+@@ -1117,12 +1137,9 @@ void TypeMember::DumpStaticDebugInfo(char* ptr, int& offset)
+
+ // for value type static fields compute address as:
+ // addr = (*addr+sizeof(OBJECTREF))
+- if (m_member_type->GetTypeHandle().GetSignatureCorElementType() ==
+- ELEMENT_TYPE_VALUETYPE)
++ if (isValueType)
+ {
+- bufSize = ptrSize + 6;
+-
+- char buf[ptrSize + 6] = {0};
++ char buf[valueTypeBufSize] = {0};
+ buf[0] = ptrSize + 5;
+ buf[1] = DW_OP_addr;
+
+@@ -1140,9 +1157,7 @@ void TypeMember::DumpStaticDebugInfo(char* ptr, int& offset)
+ }
+ else
+ {
+- bufSize = ptrSize + 2;
+-
+- char buf[ptrSize + 2] = {0};
++ char buf[refTypeBufSize] = {0};
+ buf[0] = ptrSize + 1;
+ buf[1] = DW_OP_addr;
+
+@@ -1500,10 +1515,14 @@ void RefTypeInfo::DumpStrings(char* ptr, int& offset)
+
+ void RefTypeInfo::DumpDebugInfo(char* ptr, int& offset)
+ {
+- if (m_type_offset != 0)
++ if (m_is_visited && m_base_ptr == ptr)
+ {
+ return;
+ }
++
++ m_base_ptr = ptr;
++ m_is_visited = true;
++
+ m_type_offset = offset;
+ offset += sizeof(DebugInfoRefType);
+ m_value_type->DumpDebugInfo(ptr, offset);
+@@ -1523,10 +1542,14 @@ void RefTypeInfo::DumpDebugInfo(char* ptr, int& offset)
+
+ void NamedRefTypeInfo::DumpDebugInfo(char* ptr, int& offset)
+ {
+- if (m_type_offset != 0)
++ if (m_is_visited && m_base_ptr == ptr)
+ {
+ return;
+ }
++
++ m_base_ptr = ptr;
++ m_is_visited = true;
++
+ m_type_offset = offset;
+ offset += sizeof(DebugInfoRefType) + sizeof(DebugInfoTypeDef);
+ m_value_type->DumpDebugInfo(ptr, offset);
+@@ -1553,28 +1576,23 @@ void NamedRefTypeInfo::DumpDebugInfo(char* ptr, int& offset)
+
+ void ClassTypeInfo::DumpDebugInfo(char* ptr, int& offset)
+ {
+- if (m_type_offset != 0)
++ if (m_is_visited && m_base_ptr == ptr)
+ {
+ return;
+ }
+
++ m_base_ptr = ptr;
++ m_is_visited = true;
++
+ if (m_parent != nullptr)
+ {
+- if (m_parent->m_type_offset == 0)
+- {
+- m_parent->DumpDebugInfo(ptr, offset);
+- }
+- else if (RefTypeInfo* m_p = dynamic_cast<RefTypeInfo*>(m_parent))
+- {
+- if (m_p->m_value_type->m_type_offset == 0)
+- m_p->m_value_type->DumpDebugInfo(ptr, offset);
+- }
++ m_parent->DumpDebugInfo(ptr, offset);
+ }
+
+ // make sure that types of all members are dumped
+ for (int i = 0; i < m_num_members; ++i)
+ {
+- if (members[i].m_member_type->m_type_offset == 0 && members[i].m_member_type != this)
++ if (members[i].m_member_type != this)
+ {
+ members[i].m_member_type->DumpDebugInfo(ptr, offset);
+ }
+@@ -1638,14 +1656,16 @@ void ClassTypeInfo::DumpDebugInfo(char* ptr, int& offset)
+
+ void ArrayTypeInfo::DumpDebugInfo(char* ptr, int& offset)
+ {
+- if (m_type_offset != 0)
++ if (m_is_visited && m_base_ptr == ptr)
+ {
+ return;
+ }
+- if (m_elem_type->m_type_offset == 0)
+- {
+- m_elem_type->DumpDebugInfo(ptr, offset);
+- }
++
++ m_base_ptr = ptr;
++ m_is_visited = true;
++
++ m_elem_type->DumpDebugInfo(ptr, offset);
++
+ if (ptr != nullptr)
+ {
+ DebugInfoArrayType arrType;
+diff --git a/src/vm/gdbjit.h b/src/vm/gdbjit.h
+index ebd5a7a..d2843bb 100644
+--- a/src/vm/gdbjit.h
++++ b/src/vm/gdbjit.h
+@@ -119,12 +119,21 @@ struct SymbolsInfo
+ class DwarfDumpable
+ {
+ public:
++ DwarfDumpable() :
++ m_base_ptr(nullptr),
++ m_is_visited(false)
++ {
++ }
++
+ // writes all string literals this type needs to ptr
+ virtual void DumpStrings(char* ptr, int& offset) = 0;
+
+ virtual void DumpDebugInfo(char* ptr, int& offset) = 0;
+
+ virtual ~DwarfDumpable() {}
++
++ char *m_base_ptr;
++ bool m_is_visited;
+ };
+
+ class LocalsInfo
+--
+2.7.4
+
diff --git a/packaging/coreclr.spec b/packaging/coreclr.spec
index 771216b804..8448b4b44e 100644
--- a/packaging/coreclr.spec
+++ b/packaging/coreclr.spec
@@ -23,7 +23,7 @@ Source1000: downloaded_files.tar.gz
Source1001: %{name}.manifest
Source1002: libicu.tar.gz
Source1003: dep_libs.tar.gz
-# Gbp-Ignore-Patches: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
+# Gbp-Ignore-Patches: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
Patch0: 0001-Add-project.assets.json-files.patch
Patch1: 0001-ARM-Linux-Support-unaligned-struct-read-write-11290.patch
Patch2: 0002-x86-Linux-Thread-safe-UMThunkMarshInfo-RunTimeInit-1.patch
@@ -49,6 +49,13 @@ Patch21: 0021-Revert-Enable-loading-directly-ni-file-for-dotnet-la.patch
Patch22: 0022-Enable-loading-directly-ni-file-for-corerun-temporar.patch
Patch23: 0023-Add-Tizen-RuntimeID-case.patch
Patch24: tizen-toolchain-support.patch
+Patch25: 0024-Add-pie-to-linker-option.patch
+Patch26: 0025-Fix-undefined-references-on-SOS-11701.patch
+Patch27: 0026-Port-DacUnwindStackFrame-11666.patch
+Patch28: 0027-Include-PAL-headers-instead-of-embedding-it-11705.patch
+Patch29: 0028-added-DWARF-exprloc-for-static-value-class-fields-11.patch
+Patch30: 0029-Fix-calculation-of-debuginfo-s-size.-13899.patch
+
ExcludeArch: aarch64
@@ -172,6 +179,12 @@ cp %{SOURCE1001} .
%patch22 -p1
%patch23 -p1
%patch24 -p1
+%patch25 -p1
+%patch26 -p1
+%patch27 -p1
+%patch28 -p1
+%patch29 -p1
+%patch30 -p1
%if 0%{skipmscorlib}
%else