MaskRay added a comment.

When -mfentry is specified, why should frame pointers be disabled? Is that 
because the Linux kernel has assumption about the exact code sequence? `call 
__fentry__` is the first instruction. Isn't that sufficient?

(There is another difference. GCC emits `call *__fentry__@GOTPCREL(%rip)` in 
-fpie/-fpic mode. At first glance, this looks suboptimal to me. I don't expect 
`__fentry__` to be interposed.)
(This may be another example demonstrating that piggybacking an option 
(-mfentry) on top of an existing one (-pg) can turn out to be a bad idea...)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74698



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to