From d7520a75f01194a22f433c682e99b4482808f443 Mon Sep 17 00:00:00 2001 From: Sunil Nimmagadda Date: Fri, 30 Oct 2026 12:37:38 +0530 Subject: Don't take a detour to reach constants. --- mkelf.lua | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'mkelf.lua') diff --git a/mkelf.lua b/mkelf.lua index 97530b4..0ff68b9 100644 --- a/mkelf.lua +++ b/mkelf.lua @@ -19,15 +19,16 @@ local function loadconfig(fn) local section_mt = { __index = elf.section } local env = setmetatable({}, { __index = { - -- Keep in sync with types/elf.d.lua - Class = elf.Class, - Endian = elf.Endian, - Osabi = elf.Osabi, - Type = elf.Type, - Machine = elf.Machine, - SegmentType = elf.SegmentType, - SegmentFlags = elf.SegmentFlags, - ELFVERSION = elf.VERSION, + Class = ec.Class, + Endian = ec.Endian, + Osabi = ec.Osabi, + Type = ec.Type, + Machine = ec.Machine, + SegmentType = ec.SegmentType, + SegmentFlags = ec.SegmentFlags, + SectionType = ec.SectionType, + SectionFlags = ec.SectionFlags, + ELFVERSION = ec.VERSION, header = function(t) if type(t) ~= "table" then -- cgit v1.3