Fix RVA field ordering and emission issue. (#375)
authorFadi Hanna <fadim@microsoft.com>
Mon, 2 Dec 2019 23:31:52 +0000 (15:31 -0800)
committerGitHub <noreply@github.com>
Mon, 2 Dec 2019 23:31:52 +0000 (15:31 -0800)
commit167e9f4d70e5754fce2a884461122b88f5cf4f7a
treee59c2eaeb16b2b3ae618a84ccf5637dc24cd6cd2
parentd4ef0d16186bbfba2fd078ba235f8759fd1128d3
Fix RVA field ordering and emission issue. (#375)

* Fix RVA field ordering and emission issue.

* CopiedFieldRvaNode have to be sorted by rva (Managed C++ binaries depend on it)
* Proper handling for overlapping fields, even with different sizes (updated test to cover this).

* Move field RVA overlap handling to CopiedFieldRvaNode
src/coreclr/src/tools/Common/TypeSystem/Ecma/EcmaField.cs
src/coreclr/src/tools/crossgen2/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/CopiedFieldRvaNode.cs
src/coreclr/src/tools/crossgen2/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRunCodegenNodeFactory.cs
src/coreclr/tests/src/JIT/Directed/rvastatics/RVAOrderingTest.il