aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mkelf.lua2
-rw-r--r--sample_elf.lua10
2 files changed, 12 insertions, 0 deletions
diff --git a/mkelf.lua b/mkelf.lua
index d350a8d..5613a41 100644
--- a/mkelf.lua
+++ b/mkelf.lua
@@ -76,6 +76,8 @@ end
local function setup_env(state)
return setmetatable({}, {
__index = {
+ ipairs = ipairs,
+
Class = ec.Class,
Endian = ec.Endian,
Osabi = ec.Osabi,
diff --git a/sample_elf.lua b/sample_elf.lua
index 26f0a62..724a221 100644
--- a/sample_elf.lua
+++ b/sample_elf.lua
@@ -34,3 +34,13 @@ sections {
flags = SectionFlags.alloc,
},
}
+
+for _, s in ipairs({ ".note.netbsd.ident", ".note.netbsd.pax", }) do
+ sections {
+ {
+ name = s,
+ type = SectionType.note,
+ flags = SectionFlags.strings,
+ },
+ }
+end