summaryrefslogtreecommitdiff
path: root/output/outelf64.c
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2010-04-20 15:05:02 +0400
committerCyrill Gorcunov <gorcunov@gmail.com>2010-04-21 01:06:44 +0400
commitd807d911feadad61c8afb09d74e4239859eba993 (patch)
tree041240a9cc52f3e286553b3cb52a358345bec5b5 /output/outelf64.c
parent8d4d060104dc1ab4c7977a383a8f4af54e9302c9 (diff)
downloadnasm-d807d911feadad61c8afb09d74e4239859eba993.tar.gz
Elf: Rename SEG_ALIGN to SEC_FILEALIGN
It's Elf specifics. To not mess with segment alignment. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Diffstat (limited to 'output/outelf64.c')
-rw-r--r--output/outelf64.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/output/outelf64.c b/output/outelf64.c
index 15785a38..47eba5b9 100644
--- a/output/outelf64.c
+++ b/output/outelf64.c
@@ -1074,7 +1074,7 @@ static void elf_write(void)
*/
elf_foffs = 0x40 + sizeof(Elf64_Shdr) * nsections;
- align = ALIGN(elf_foffs, SEG_ALIGN) - elf_foffs;
+ align = ALIGN(elf_foffs, SEC_FILEALIGN) - elf_foffs;
elf_foffs += align;
elf_nsect = 0;
elf_sects = nasm_malloc(sizeof(*elf_sects) * nsections);
@@ -1371,7 +1371,7 @@ static void elf_section_header(int name, int type, uint64_t flags,
fwriteint64_t(type == 0 ? 0L : elf_foffs, ofile);
fwriteint64_t(datalen, ofile);
if (data)
- elf_foffs += ALIGN(datalen, SEG_ALIGN);
+ elf_foffs += ALIGN(datalen, SEC_FILEALIGN);
fwriteint32_t((int32_t)link, ofile);
fwriteint32_t((int32_t)info, ofile);
fwriteint64_t((int64_t)align, ofile);
@@ -1384,7 +1384,7 @@ static void elf_write_sections(void)
for (i = 0; i < elf_nsect; i++)
if (elf_sects[i].data) {
int32_t len = elf_sects[i].len;
- int32_t reallen = ALIGN(len, SEG_ALIGN);
+ int32_t reallen = ALIGN(len, SEC_FILEALIGN);
int32_t align = reallen - len;
if (elf_sects[i].is_saa)
saa_fpwrite(elf_sects[i].data, ofile);