ref: 1b169832c674cb39af811555866106673b6eb602
parent: 5ddbf1ff9ffe88530d56abb79950c71b3e209221
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Mon Nov 27 17:50:32 EST 2017
[as] Add fill,aligment and len to the section output
--- a/as/as.h
+++ b/as/as.h
@@ -95,6 +95,8 @@
String name;
char *mem;
unsigned char flags;
+ unsigned char fill;
+ unsigned char aligment;
TUINT base;
TUINT max;
TUINT curpc;
--- a/as/myro.c
+++ b/as/myro.c
@@ -56,10 +56,10 @@
for (sp = seclist; sp; sp = sp->next) {
sect.name = sp->name.offset;
sect.flags = 0;
- sect.fill = 0;
- sect.aligment = 0;
+ sect.fill = sp->fill;
+ sect.aligment = sp->aligment;
sect.offset = off;
- sect.len = 0;
+ sect.len = sp->max - sp->base;
off += wrmyrosec(fp, §);
}
--- a/as/symbol.c
+++ b/as/symbol.c
@@ -198,6 +198,8 @@
sec->base = sec->max = sec->pc = sec->curpc = 0;
sec->next = seclist;
sec->flags = SRELOC|SREAD|SWRITE|SFILE;
+ sec->fill = 0;
+ sec->aligment = 0;
}
return cursec = sec;
}