[PATCH] x86: Keep __patchable_function_entries sections with --gc-sections

H.J. Lu hjl.tools@gmail.com
Sat Feb 1 17:19:00 GMT 2020


On Sat, Feb 1, 2020 at 8:26 AM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> After all text sections have been garbage collected, if a
> __patchable_function_entries section references a section which
> wasn't marked, mark it with SEC_EXCLUDE and return NULL.  Otherwise,
> keep it.
>
> Should it be handled in _bfd_elf_gc_mark_extra_sections?
>

It should be an error if a __patchable_function_entries section
references both kept and garbage collected sections.  Here
is the updated patch to do it.


-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-x86-Keep-__patchable_function_entries-sections-with-.patch
Type: text/x-patch
Size: 14226 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20200201/b485ccdf/attachment.bin>


More information about the Binutils mailing list