[PATCH v4 5/7] Write SEH records to pdata/xdata
Jan Beulich
jbeulich@suse.com
Fri Oct 17 10:43:45 GMT 2025
On 15.08.2025 00:50, Evgeny Karpov wrote:
> @@ -1352,6 +1431,213 @@ seh_x64_write_function_xdata (seh_context *c)
> }
> #endif
>
> +#if defined (COFFAARCH64)
> +/* Write out the xdata information for one function (aarch64). */
> +static void
> +seh_aarch64_write_function_xdata (seh_context *seh_ctx)
> +{
> + if (!seh_ctx->aarch64_ctx.unwind_codes_byte_count)
> + return;
> +
> + /* Set 4-byte alignment. */
> + frag_align (2, 0, 0);
> +
> + fragS *start_frag, *end_frag;
> + addressT start_value, end_value;
> + start_frag = symbol_get_frag_and_value (seh_ctx->start_addr, &start_value);
> + end_frag = symbol_get_frag_and_value (seh_ctx->end_addr, &end_value);
> + offsetT offset;
> + frag_offset_ignore_align_p (end_frag, start_frag, &offset);
Now that I looked at patch 6: Why is it correct to ignore alignment frags
here? Doesn't .xdata need to hold data matching the final generated code,
including any alignment padding that would need inserting?
Jan
More information about the Binutils
mailing list