]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gas: dw2gencfi: reset reloc to TC_PARSE_CONS_RETURN_NONE for [su]leb128
authorIndu Bhagat <indu.bhagat@oracle.com>
Sat, 20 Dec 2025 04:29:34 +0000 (20:29 -0800)
committerIndu Bhagat <indu.bhagat@oracle.com>
Mon, 5 Jan 2026 22:13:55 +0000 (14:13 -0800)
Some consumers, like SFrame generation logic in GAS, may want to check
reloc value (without qualifying by e->type) as a part of their
admissibility criteria.  Setting reloc to TC_PARSE_CONS_RETURN_NONE for
these CFI escape expr nodes for [su]leb128 keeps the admissibility
checks simple and generic.

Previous discussion here:
https://sourceware.org/pipermail/binutils/2025-December/146807.html

gas/
* gas/dw2gencfi.c (dot_cfi_escape): Set reloc to
TC_PARSE_CONS_RETURN_NONE.

gas/dw2gencfi.c

index b8a708c0da837a5528d67ed0aec82b9de1639f02..ee157636ef1e3b618cc89dfdaeaa35290148a287 100644 (file)
@@ -1006,6 +1006,7 @@ dot_cfi_escape (int ignored ATTRIBUTE_UNUSED)
          /* We're still at the opening parenthesis.  Leave it to expression()
             to parse it and find the matching closing one.  */
          expression (&e->exp);
+         e->reloc = TC_PARSE_CONS_RETURN_NONE;
        }
       else
        {