On 2025-12-10 11:55, Andrew Cooper wrote:
On 09/12/2025 9:47 pm, Jason Andryuk wrote:. = ALIGN(4); __alt_instructions = .; - *(.altinstructions) + KEEP(*(.altinstructions)) __alt_instructions_end = .;Thinking about this, what we need is for there to be a reference tied to the source location, referencing the replacement metadata and replacement instructions. Looking at https://maskray.me/blog/2021-02-28-linker-garbage-collection might be able to do this with .reloc of type none. In fact, BFD_RELOC_NONE seems to have been invented for precisely this purpose. This means that if and only if the source function gets included, so does the metadata and replacement.
Yes. Thanks for the reference. I'll take a look. Regards, Jason
