Skip to content

Commit

Permalink
ModuleWriter no longer ignores Cor20HeaderOptions.EntryPoint value
Browse files Browse the repository at this point in the history
  • Loading branch information
ElektroKill committed Nov 30, 2024
1 parent 1e0ec26 commit 4f47c5e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/DotNet/Writer/ModuleWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,10 @@ void InitializeChunkProperties() {
}

uint GetEntryPoint() {
var ep = Options.Cor20HeaderOptions.EntryPoint;
if (ep is not null)
return ep.Value;

if (module.ManagedEntryPoint is MethodDef methodEntryPoint)
return new MDToken(Table.Method, metadata.GetRid(methodEntryPoint)).Raw;

Expand Down

0 comments on commit 4f47c5e

Please sign in to comment.