[llvm-dev] Building an array in a section from multiple object files
Dean Michael Berris via llvm-dev
llvm-dev at lists.llvm.org
Mon Jun 27 17:03:00 PDT 2016
On Tue, Jun 28, 2016 at 3:52 AM Justin Bogner <mail at justinbogner.com> wrote:
> Dean Michael Berris via llvm-dev <llvm-dev at lists.llvm.org> writes:
> > Just to close this out, I've updated http://reviews.llvm.org/D19904 to
> > named ELF groups per-function, and have the runtime library use
> > __start_xray_instr_map and __stop_xray_instr_map as weak symbols from the
> > C++ side.
> In case you're not aware, the __start_/__stop_ trick isn't portable.
> You may want to look at compiler-rt/lib/profile/InstrProfilingPlatform*.c.
> There, we do the __start_ trick for linux and freebsd, a similar trick
> for darwin, and fall back to a static registration scheme elsewhere.
Thanks Justin -- I assumed it couldn't be portable. :)
I fully expect to play many different tricks on many different platforms
too to make this work.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev