gas: introduce .errif and .warnif

Rather than having people resort to indirect means to issue a certain
kind of diagnostic conditionally upon an expression which can (or
should) only be evaluated when all sections were sized and all symbols
had their final values established, provide directives to directly
achieve this.
This commit is contained in:
Jan Beulich
2025-07-04 10:42:18 +02:00
parent 7b40f4c658
commit 42c97689a5
8 changed files with 112 additions and 0 deletions

View File

@@ -2321,6 +2321,8 @@ write_object_file (void)
resolve_local_symbol_values ();
resolve_reloc_expr_symbols ();
evaluate_deferred_diags ();
#ifdef OBJ_ELF
if (IS_ELF)
maybe_generate_build_notes ();