summaryrefslogtreecommitdiff
path: root/output/outelf64.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-02-21 17:27:51 -0800
committerH. Peter Anvin <hpa@zytor.com>2009-02-21 17:27:51 -0800
commit577f57614a159e3c5ab10bf03d345846796de932 (patch)
tree8ce5f15f177b9b58a7f52a17118acca269b38876 /output/outelf64.c
parenta5c2455f8aacfc50863c4d3dfd9782c9c3b392e8 (diff)
downloadnasm-577f57614a159e3c5ab10bf03d345846796de932.tar.gz
nasm-577f57614a159e3c5ab10bf03d345846796de932.tar.bz2
nasm-577f57614a159e3c5ab10bf03d345846796de932.zip
outelf32/64: remove align_str in favor of fwritezero()
Drop the use of yet another local all-zero buffer, align_str, in favor of calling fwritezero().
Diffstat (limited to 'output/outelf64.c')
-rw-r--r--output/outelf64.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/output/outelf64.c b/output/outelf64.c
index 9960a39..24d0b81 100644
--- a/output/outelf64.c
+++ b/output/outelf64.c
@@ -215,8 +215,6 @@ extern struct ofmt of_elf64;
#define TY_DEBUGSYMLIN 0x40 /* internal call to debug_out */
-static const char align_str[SEG_ALIGN] = ""; /* ANSI will pad this with 0s */
-
static struct ELF_SECTDATA {
void *data;
int64_t len;
@@ -1349,7 +1347,7 @@ static void elf_write(void)
loclen, 0, 0, 1, 0);
}
- fwrite(align_str, align, 1, elffp);
+ fwritezero(align, elffp);
/*
* Now output the sections.
@@ -1550,7 +1548,7 @@ static void elf_write_sections(void)
saa_fpwrite(elf_sects[i].data, elffp);
else
fwrite(elf_sects[i].data, len, 1, elffp);
- fwrite(align_str, align, 1, elffp);
+ fwritezero(align, elffp);
}
}