[PATCH v1 1/5] ld: fix segfault caused by untagged stub sections
Matthieu Longo
matthieu.longo@arm.com
Mon Oct 13 15:24:09 GMT 2025
On 2025-09-26 22:39, H.J. Lu wrote:
> On Thu, Sep 18, 2025 at 11:07 PM Matthieu Longo <matthieu.longo@arm.com> wrote:
>>
>> diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
>> index 5e7c6ddf1ee..a4049fa0e98 100644
>> --- a/bfd/bfd-in2.h
>> +++ b/bfd/bfd-in2.h
>> @@ -834,6 +834,12 @@ typedef struct bfd_section
>> const char *linked_to_symbol_name;
>> } map_head, map_tail;
>>
>> + /* Indicate that the section contains branch veneers. This is used when
>> + support for non-contiguous memory regions is enabled. The veneers have
>> + to be allocated to the same memory region as the code they are refered
>> + by, i.e. they cannot be moved to a subsequent memory region. */
>> + bool veneer;
>> +
>> /* Points to the output section this section is already assigned to,
>> if any. This is used when support for non-contiguous memory
>> regions is enabled. */
>> diff --git a/bfd/section.c b/bfd/section.c
>> index 5f0cf6e71cb..33524762e7a 100644
>> --- a/bfd/section.c
>> +++ b/bfd/section.c
>> @@ -560,6 +560,12 @@ CODE_FRAGMENT
>> . const char *linked_to_symbol_name;
>> . } map_head, map_tail;
>> .
>> +. {* Indicate that the section contains branch veneers. This is used when
>> +. support for non-contiguous memory regions is enabled. The veneers have
>> +. to be allocated to the same memory region as the code they are refered
>> +. by, i.e. they cannot be moved to a subsequent memory region. *}
>> +. bool veneer;
>
> Why not a bitfield here?
Jan also suggested it. See my reply to his email.
Matthieu
More information about the Binutils
mailing list