aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Johnson <peter@tortall.net>2012-03-09 21:41:18 -0800
committerPeter Johnson <peter@tortall.net>2012-03-09 21:41:18 -0800
commit8770f6073ab373061f68d27b4492d2488ad3f206 (patch)
tree789ac7e11d35345baac2110a3ef1d0606f838f55
parentcc06a6a43dfbbb814c65512efb245c67b2400816 (diff)
parent01ab853e68ef8aeded716d6f5b34895200f66a51 (diff)
downloadyasm-8770f6073ab373061f68d27b4492d2488ad3f206.tar.gz
Merge pull request #62 from nico/ticket246
In the Mach-O writer, only warn on ignored flags if the new flags are different from the old flags. [#246 state:resolved]
-rw-r--r--modules/objfmts/macho/macho-objfmt.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/modules/objfmts/macho/macho-objfmt.c b/modules/objfmts/macho/macho-objfmt.c
index 76b80292..bef564a6 100644
--- a/modules/objfmts/macho/macho-objfmt.c
+++ b/modules/objfmts/macho/macho-objfmt.c
@@ -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;
}