Skip to content
This repository was archived by the owner on Nov 1, 2020. It is now read-only.

Emit IMAGE_REL_BASED_RELPTR32 reloc in interface dispatch cells#3435

Merged
jkotas merged 2 commits intodotnet:masterfrom
MichalStrehovsky:fix2542
Apr 27, 2017
Merged

Emit IMAGE_REL_BASED_RELPTR32 reloc in interface dispatch cells#3435
jkotas merged 2 commits intodotnet:masterfrom
MichalStrehovsky:fix2542

Conversation

@MichalStrehovsky
Copy link
Member

We have means to emit the reloc in the object writer now.

Also, fix a bug where CompilationGroup.ContainsType was used instead
of ISymbolNode.RepresentsIndirectionCell to determine if an
indirection is needed. The distinction doesn't matter for the UTC-based
compiler, but it does in the CoreRT compiler.

Fixes #2542.

We have means how to emit the reloc in the object writer now.

Also, fix a bug where `CompilationGroup.ContainsType` was used instead
of `ISymbolNode.RepresentsIndirectionCell` to determine if an
indirection is needed. The distinction doesn't matter for the UTC-based
compiler, but it does in the CoreRT compiler.

Fixes dotnet#2542.
@MichalStrehovsky
Copy link
Member Author

@nattress PTAL.

I needed to do something small to unwind from the metadata work...


if (factory.Target.Abi == TargetAbi.CoreRT)
IEETypeNode interfaceType = factory.NecessaryTypeSymbol(_targetMethod.OwningType);
if (!interfaceType.RepresentsIndirectionCell)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Reads easier to just do the positive case first

@jkotas jkotas merged commit 698ae2b into dotnet:master Apr 27, 2017
@MichalStrehovsky MichalStrehovsky deleted the fix2542 branch April 27, 2017 00:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable Indirect Pointer for Interface Dispatch Cell

4 participants