0
0
mirror of https://github.com/netwide-assembler/nasm.git synced 2025-10-10 00:25:06 -04:00

output: add common file outlib.c for common functions; realsize()

Add a common file, outlib.c, for output formats.  Add the function
realsize() instead of open-coded variants in almost every backend.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
H. Peter Anvin
2008-10-27 22:19:59 -07:00
parent 67c637236a
commit 03c4f90afa
15 changed files with 67 additions and 76 deletions

View File

@@ -1068,8 +1068,7 @@ static void obj_out(int32_t segto, const void *data,
if (type == OUT_REL2ADR) {
ldata += (size - 2);
size = 2;
}
if (type == OUT_REL4ADR) {
} else if (type == OUT_REL4ADR) {
ldata += (size - 4);
size = 4;
}