coff: Better handling of section redefinitionnasm-2.10.xx
commit29227125f05302cc3e084f2e799411c78b0258e0
authorMarat Dukhan <maratek@gmail.com>
Thu, 19 Sep 2013 23:19:52 +0000 (19 19:19 -0400)
committerCyrill Gorcunov <gorcunov@gmail.com>
Thu, 3 Oct 2013 12:55:50 +0000 (3 16:55 +0400)
tree5a0f5f36c3bdb0d911b4dd3fee3fac734c25f078
parente81b2ee85ca0f06705181dca615f13b50fcb3c35
coff: Better handling of section redefinition

Currently, if we try to define an already defined section and specify
section flags, NASM will output "warning: section attributes ignored
on redeclaration of section %SECTIONNAME%".

The patch modifies this behaviour:

1. If the previous section definition differs only in alignment flags,
   no warning is generated

2. If the new definition implies larger alignment, it overrides the
   previous section alignment

3. If the new definition specifies any section alignment, the content of
   the section will be aligned on the new boundary (i.e. the effect is the
   same as if there was ALIGN macro)

Signed-off-by: Marat Dukhan <maratek@gmail.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
output/outcoff.c