diff options
| author | 2023-06-18 09:05:15 +0200 | |
|---|---|---|
| committer | 2023-06-18 09:05:15 +0200 | |
| commit | 04de327e9ac7c1502716336e9bbfecf544b31126 (patch) | |
| tree | 52c1644c5b10c492037d8853b07155c8d334329b /obj.c | |
| parent | 962ad175aee634274b408ead38b13e6bc90e2fe7 (diff) | |
ELF output static data
Diffstat (limited to 'obj.c')
| -rw-r--r-- | obj.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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; } |