From 576b063519f1b0ca8b60471314e376dea6fda73f Mon Sep 17 00:00:00 2001 From: Rangi Date: Wed, 31 Mar 2021 16:06:15 -0400 Subject: [PATCH] Fix unattainable alignments to address 0 Fixes #818 --- src/asm/section.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/asm/section.c b/src/asm/section.c index a7000486..f1d2fbb9 100644 --- a/src/asm/section.c +++ b/src/asm/section.c @@ -339,6 +339,8 @@ static struct Section *getSection(char const *name, enum SectionType type, uint3 } else if (startaddr[type] & mask) { error("Section \"%s\"'s alignment cannot be attained in %s\n", name, typeNames[type]); + alignment = 0; /* Ignore it if it's unattainable */ + org = 0; } else if (alignment == 16) { // Treat an alignment of 16 as being fixed at address 0 alignment = 0;