diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2017-09-27 14:22:16 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2017-09-27 14:22:16 -0700 |
commit | e800127a467f860bf413d1414ad2e1d9cdf55b2d (patch) | |
tree | c65b56f3e34b6c7e5c110b6b4f1592719c3e5718 | |
parent | 5e03c443e434b326907c0ebf1e5dc320661115a0 (diff) | |
download | nasm-e800127a467f860bf413d1414ad2e1d9cdf55b2d.tar.gz |
BR3392439: make sure to update globalbits if appropriate
For some output types, the bit size, globalbits, follow the section
(segment); make sure we actually update it!
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
-rw-r--r-- | asm/directiv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/asm/directiv.c b/asm/directiv.c index d6dfed85..354b591a 100644 --- a/asm/directiv.c +++ b/asm/directiv.c @@ -229,7 +229,7 @@ bool process_directives(char *directive) case D_SEGMENT: /* [SEGMENT n] */ case D_SECTION: { - int sb; + int sb = globalbits; int32_t seg = ofmt->section(value, pass2, &sb); if (seg == NO_SEG) { @@ -238,6 +238,7 @@ bool process_directives(char *directive) } else { in_absolute = false; location.segment = seg; + globalbits = sb; } break; } |