summaryrefslogtreecommitdiff
path: root/asm/directiv.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2018-06-14 19:53:45 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2018-06-14 19:53:45 -0700
commitaf5f918a9235ec8a4ce72553141c06b9631fb550 (patch)
tree15ddc1c8ac4e559a2972747497f741a71c04b0e3 /asm/directiv.c
parent58ab877402f60c69cae5b482b65dec65501e82fa (diff)
downloadnasm-af5f918a9235ec8a4ce72553141c06b9631fb550.tar.gz
Don't keep assigning segment numbers to EXTERN or COMMON
If a symbol is EXTERN or COMMON, then we should not keep assigning it new segment numbers over and over. Instead, change the label code so that it assignes a new segment value if and only if one has not been assigned before. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'asm/directiv.c')
-rw-r--r--asm/directiv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/asm/directiv.c b/asm/directiv.c
index 53c1917c..68a74a12 100644
--- a/asm/directiv.c
+++ b/asm/directiv.c
@@ -369,7 +369,7 @@ bool process_directives(char *directive)
break;
if (type == LBL_COMMON || type == LBL_EXTERN)
- define_label(value, seg_alloc(), size, false);
+ define_label(value, 0, size, false);
break;
}