aboutsummaryrefslogtreecommitdiffhomepage
path: root/obj.h
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2023-06-17 23:26:45 +0200
committerlemon <lsof@mailbox.org>2023-06-17 23:26:45 +0200
commit962ad175aee634274b408ead38b13e6bc90e2fe7 (patch)
treecfda733adf56ed12e829f594e0b6d66f0a1a7a70 /obj.h
parentec28e9057e84b92acabb7ebf9122af59738917ad (diff)
basic ELF output
Diffstat (limited to 'obj.h')
-rw-r--r--obj.h9
1 files changed, 9 insertions, 0 deletions
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: */