aboutsummaryrefslogtreecommitdiffhomepage
path: root/obj.c
diff options
context:
space:
mode:
Diffstat (limited to 'obj.c')
-rw-r--r--obj.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/obj.c b/obj.c
index 68d183f..f2b0623 100644
--- a/obj.c
+++ b/obj.c
@@ -8,6 +8,7 @@
void elfinit(void);
void elfaddsym(const char *, int info, enum section, uvlong value, uvlong size);
void elfreloc(const char *sym, enum relockind, enum section, uint off, vlong addend);
+void elfputdat(const struct irdat *);
void elffini(struct wbuf *);
struct objfile objout;
@@ -54,6 +55,10 @@ objfini(void)
struct wbuf out = FDBUF(buf, sizeof buf, open(objout.file, O_WRONLY | O_CREAT | O_TRUNC, 0666));
if (out.fd < 0) fatal(NULL, "could not open %'s for writing: %s", objout.file, strerror(errno));
+ for (int i = 0; i < dattab.n; ++i) {
+ elfputdat(&dattab.p[i]);
+ }
+
switch (mctarg->objkind) {
case OBJELF: elffini(&out); break;
}