summaryrefslogtreecommitdiff
path: root/6/blob.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-11-17 22:54:08 -0800
committerOri Bernstein <ori@eigenstate.org>2015-11-17 22:54:08 -0800
commit82ffa8d68b897200ae2fedc863aa7ac064660d1d (patch)
tree46fe896aae3256cfaa4948b9eebacbd1615a23ce /6/blob.c
parent8531896f8d21ba1e727262aaf5cd96043590b480 (diff)
downloadmc-82ffa8d68b897200ae2fedc863aa7ac064660d1d.tar.gz
Put empty symbols in bss, and use .fill directives.
We don't need to put zero bytes into the binary, and we don't need to generate thousands of .byte directives.
Diffstat (limited to '6/blob.c')
-rw-r--r--6/blob.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/6/blob.c b/6/blob.c
index df48b7e..bb3ab0c 100644
--- a/6/blob.c
+++ b/6/blob.c
@@ -27,6 +27,16 @@ Blob *mkblobi(Blobtype type, uint64_t ival)
return b;
}
+Blob *mkblobzero(size_t sz)
+{
+ Blob *b;
+
+ b = zalloc(sizeof(Blob));
+ b->type = Btzero;
+ b->npad = sz;
+ return b;
+}
+
Blob *mkblobpad(size_t sz)
{
Blob *b;