[PATCH] D72215: [AArch64] Add function attribute "patchable-function-entry" to add NOPs at function entry

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 7 06:09:37 PST 2020


peter.smith added a comment.

In D72215#1807110 <https://reviews.llvm.org/D72215#1807110>, @MaskRay wrote:

> Address comments.
>
> The section __patchable_function_entries needs more thoughts so it is not
>  implemented. I'll probably use SHF_LINK_ORDER when -ffunction-sections, and add
>  SHF_WRITE (to prevent text relocations; apparently GCC does not consider these
>  issues).


It looks like we'll need to co-design this with GCC, binutils and the kernel to get something that works across the toolchains, it looks like this has already started https://www.mail-archive.com/gcc@gcc.gnu.org/msg90391.html. I think SHF_LINK_ORDER would work in LLD, but I'm not sure it would have the desired behaviour under garbage collection in ld.bfd. In any case I think that this could be implemented in a follow up patch.

I think N,M support could be potentially added in a later patch as well, given Mark's comment. I think that if the N, M support isn't initially implemented it will be worth giving a "not-supported error message".


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72215/new/

https://reviews.llvm.org/D72215





More information about the llvm-commits mailing list