The 05/20/2020 09:02, Florian Weimer via Gcc wrote: > * Richard Henderson: > > On 5/19/20 3:38 AM, Florian Weimer via Gcc wrote: > >> One minor improvement would be to document __aarch64_have_lse_atomics as > >> interposable on the GCC side and define that directly in glibc, so that > >> lse-init.o is not linked in anymore and __aarch64_have_lse_atomics can > >> be initialized as soon as ld.so has the hwcap information. > > > > The __aarch64_have_lse_atomics symbol is not interposable. > > We use a direct pc-relative reference to it from each lse thunk. > > What I meant that users are allowed to supply their own definition in a > static link. Sorry, not sure what the correct terminology is here. I > don't think any code changes would be needed for that, it's just a > matter of documentation (and being careful about future evolution of the > code).
are you proposing to put it in libc_nonshared.a/crt1.o? (and then ld.so would treat it specially when loading a module to initialize it early) or only dealing with it in libc.so, and let other modules still initialize it late (in case there are higher prio ctors or ifunc resolvers using atomics)?