[lld] [MTE] [lld] Don't tag symbols in sections with implicit start/stop (PR #73531)

Jessica Clarke via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 5 22:55:32 PST 2023


jrtc27 wrote:

> > What about things like `__FOO_START__` and `__FOO_END__`?
> > We hit a similar issue with ELF's lack of expressiveness for CHERI and have to add more heuristics than just this case.
> 
> STT_OBJECT defined in custom section names (possibly non-C-identifier-name) with manually-defined encapsulation symbols. Interesting case. Do you have some examples? I haven't seen such code.

* GCC's crtstuff.c and FreeBSD's crtbegin.c use __CTOR_LIST__ to access all of .ctors (ditto .dtors), and that identifier comes from C entirely (by putting `__CTOR_LIST__[1] = { dummy value }` in crtbegin.o and skipping over it until you hit `__CTOR_END__[1] = { another dummy value }` from crtend.o)
* __(pre)init/fini_array_start are section start/stop symbols for sections whose names aren't valid C identifiers
* Ditto __rela_iplt_start

https://github.com/llvm/llvm-project/pull/73531


More information about the llvm-commits mailing list