From 962ad175aee634274b408ead38b13e6bc90e2fe7 Mon Sep 17 00:00:00 2001 From: lemon Date: Sat, 17 Jun 2023 23:26:45 +0200 Subject: basic ELF output --- obj.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'obj.h') diff --git a/obj.h b/obj.h index 0258119..a0d54da 100644 --- a/obj.h +++ b/obj.h @@ -6,7 +6,16 @@ extern struct objfile { uchar *code; } objout; +enum relockind { + REL_ABS, + REL_PCREL32, + NRELOCKIND, +}; +enum section { Snone, Stext, Srodata, Sdata, Sbss }; + void objini(const char *); +void objdeffunc(const char *nam, bool globl, uint off, uint siz); +void objreloc(const char *sym, enum relockind, enum section, uint off, vlong addend); void objfini(void); /* vim:set ts=3 sw=3 expandtab: */ -- cgit v1.2.3