[PATCH 8/8] gas: permit wider-than-byte operands for .cfi_escape

Indu Bhagat indu.bhagat@oracle.com
Thu Mar 6 16:47:57 GMT 2025


On 2/26/25 7:18 AM, Jan Beulich wrote:
> Some DW_CFA_* and DW_OP_* take wider than byte, but non-LEB128 operands.
> Having to hand-encode such when needing to resort to .cfi_escape isn't
> very helpful.
> ---
> I was wondering whether there's a need to distinguish signed and
> unsigned forms. .dc.<W> as well as .long et al don't normally do, with
> x86'es .slong being an exception (there it matters for picking the
> correct relocation type). The support for that special directive is a
> little bit of a hack, hence it doesn't easily lend itself to extending
> to .cfi_escape. Perhaps something to be sorted later, when an actual
> need arises.
> 
> I was further wondering whether endian-ness also needs to be encodable
> in the directive operands; I sincerely hope native endian-ness will
> suffice.
> 

FWIW, as far as I can reason, non-native endian-ness should not be 
necessary. (I mean why would one want to emit unwind information in 
non-native endianness of the target..)


More information about the Binutils mailing list