aboutsummaryrefslogtreecommitdiffhomepage
path: root/obj.h
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2023-06-29 09:59:30 +0200
committerlemon <lsof@mailbox.org>2023-06-29 09:59:30 +0200
commitf453b313f62ba42d748f00628be7b3750c797c86 (patch)
treee654029d425dee2adf30c0fa2adba31d0266db1c /obj.h
parent3b96204593b9812674126bad8de14419009682c8 (diff)
add initializers (only static for initialier list rn)
and other fixes
Diffstat (limited to 'obj.h')
-rw-r--r--obj.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/obj.h b/obj.h
index a0d54da..2c4753d 100644
--- a/obj.h
+++ b/obj.h
@@ -4,10 +4,15 @@ extern struct objfile {
const char *file;
uchar *textbegin, *textend;
uchar *code;
+ uchar dataalign, rodataalign, bssalign;
+ uint nbss;
+ vec_of(uchar) data, rodata;
} objout;
enum relockind {
- REL_ABS,
+ REL_ABS64,
+ REL_ABS32,
+ REL_ABS32S,
REL_PCREL32,
NRELOCKIND,
};
@@ -15,6 +20,7 @@ enum section { Snone, Stext, Srodata, Sdata, Sbss };
void objini(const char *);
void objdeffunc(const char *nam, bool globl, uint off, uint siz);
+uint objnewdat(const char *name, enum section, bool globl, uint siz, uint align);
void objreloc(const char *sym, enum relockind, enum section, uint off, vlong addend);
void objfini(void);