diff options
Diffstat (limited to 'libyasm/value.c')
-rw-r--r-- | libyasm/value.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libyasm/value.c b/libyasm/value.c index 3ab73c1c..47873cf7 100644 --- a/libyasm/value.c +++ b/libyasm/value.c @@ -459,9 +459,20 @@ yasm_value_finalize_expr(yasm_value *value, yasm_expr *e, int yasm_value_finalize(yasm_value *value, yasm_bytecode *precbc) { + yasm_object *object = NULL; if (!value->abs) return 0; + if (precbc != NULL) + object = yasm_section_get_object(precbc->section); + + if (object && object->overrides->value_finalize) { + int result; + result = object->overrides->value_finalize(value, precbc); + if (result != -1) + return result; + } + value->abs = yasm_expr__level_tree(value->abs, 1, 1, 0, 0, NULL, NULL); /* quit early if there was an issue in simplify() */ |