Skip to content

Commit e1fca63

Browse files
committed
Fix ElfDynamicLinkingTable not updating size correctly
1 parent 1e985b2 commit e1fca63

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/LibObjectFile/Elf/Sections/ElfDynamicLinkingTable.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,15 @@ public ElfDynamicLinkingTable() : base(ElfSectionType.DynamicLinking)
3939
Entries = [];
4040
}
4141

42+
protected override void UpdateLayoutCore(ElfVisitorContext context)
43+
{
44+
base.UpdateLayoutCore(context);
45+
46+
var numberOfEntries = Entries.Count;
47+
48+
base.Size = (ulong)numberOfEntries * base.TableEntrySize;
49+
}
50+
4251
public override void Read(ElfReader reader)
4352
{
4453
reader.Position = Position;

0 commit comments

Comments
 (0)