Add more tests for unionized sections + fix bugs

Implementing those tests found a few bugs... oops
This commit is contained in:
ISSOtm
2020-03-22 01:46:10 +01:00
parent 275b8e15ff
commit 4877bb783c
28 changed files with 178 additions and 7 deletions

View File

@@ -38,6 +38,10 @@ void sect_ForEach(void (*callback)(struct Section *, void *), void *arg)
static void mergeSections(struct Section *target, struct Section *other)
{
if (target->type != other->type)
errx(1, "Section \"%s\" is defined with conflicting types %s and %s",
other->name,
typeNames[target->type], typeNames[other->type]);
if (other->isAddressFixed) {
if (target->isAddressFixed) {
if (target->org != other->org)