From 8f0efcd39ed33221af9f5631865cd5023b9e728a Mon Sep 17 00:00:00 2001 From: Sunil Nimmagadda Date: Wed, 4 Nov 2026 11:01:16 +0530 Subject: Annotate these as readonly. --- elf/constants.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'elf/constants.lua') diff --git a/elf/constants.lua b/elf/constants.lua index 444753e..917bc2d 100644 --- a/elf/constants.lua +++ b/elf/constants.lua @@ -1,7 +1,9 @@ local M = {} +---@readonly M.VERSION = 1 +---@readonly ---@enum Osabi M.Osabi = { sysv = 0x00, @@ -24,18 +26,21 @@ M.Osabi = { openvos = 0x12, } +---@readonly ---@enum Class M.Class = { bit32 = 0x1, bit64 = 0x2, } +---@readonly ---@enum Endian M.Endian = { little = 0x1, big = 0x2, } +---@readonly ---@enum Type M.Type = { none = 0x00, @@ -49,6 +54,7 @@ M.Type = { hiproc = 0xffff, } +---@readonly ---@enum Machine M.Machine = { none = 0x00, @@ -84,6 +90,7 @@ M.Machine = { -- TODO } +---@readonly ---@enum SegmentType M.SegmentType = { null = 0x00000000, @@ -100,6 +107,7 @@ M.SegmentType = { hiproc = 0x7FFFFFFF, } +---@readonly ---@enum SegmentFlags M.SegmentFlags = { x = 0x1, @@ -107,6 +115,7 @@ M.SegmentFlags = { r = 0x4, } +---@readonly ---@enum SectionType M.SectionType = { null = 0x0, @@ -136,6 +145,7 @@ M.SectionType = { -- TODO } +---@readonly ---@enum SectionFlags M.SectionFlags = { write = 0x1, -- cgit v1.3