In the Mach-O writer, only warn on ignored flags if the new flags

are different from the old flags.

Fixes http://tortall.lighthouseapp.com/projects/78676-yasm/tickets/246
This commit is contained in:
Nico Weber 2012-03-06 17:40:41 -08:00
parent cc06a6a43d
commit 01ab853e68

View file

@ -1497,9 +1497,13 @@ macho_objfmt_section_switch(yasm_object *object, yasm_valparamhead *valparams,
msd->sectname = f_sectname;
msd->flags = flags;
yasm_section_set_align(retval, align, line);
} else if (flags_override)
yasm_warn_set(YASM_WARN_GENERAL,
N_("section flags ignored on section redeclaration"));
} else if (flags_override) {
// align is the only value used from overrides.
if (yasm_section_get_align(retval) != align) {
yasm_warn_set(YASM_WARN_GENERAL,
N_("section flags ignored on section redeclaration"));
}
}
return retval;
}