On 22.04.2025 16:42, Andrew Cooper wrote:
> On 22/04/2025 1:13 pm, Jan Beulich wrote:
>> On 22.04.2025 13:32, Andrew Cooper wrote:
>>> --- a/xen/include/xen/xen.lds.h
>>> +++ b/xen/include/xen/xen.lds.h
>>> @@ -56,6 +56,7 @@
>>>    DECL_DEBUG2(.debug_info, .gnu.linkonce.wi.*, 1) \
>>>    DECL_DEBUG(.debug_types, 1)                     \
>>>    DECL_DEBUG(.debug_str, 1)                       \
>>> +  DECL_DEBUG(.debug_str_offsets, 1)               \
>> The alignment wants to be at least 4.
> 
> I checked before making this patch, and Clang uses alignment 1 on the
> section:
> 
>> [8134] .debug_str_offsets PROGBITS        0000000000000000 16fe11d
>> 21c868 00      0   0  1

Oh, I'm surprised. The table holding 4- (or 8-) byte values, it should
have better alignment already in object files, I would think. Feels like
a bug / oversight in Clang.

>> [8135] .rela.debug_str_offsets RELA       0000000000000000 2089e08
>> ca6b60 18   I 8136 8134  8
> 
> Is there an official spec on the matter?

I did look through the Dwarf5 spec, but could find any detail of this
kind there.

Jan

Reply via email to