[PATCH] D35509: Covnert .[cd]tors to .{init, fini}_array using synthetic section.

Joerg Sonnenberger via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 24 18:07:19 PDT 2017

On Mon, Jul 24, 2017 at 05:36:53PM -0700, Rui Ueyama via llvm-commits wrote:
> On Mon, Jul 24, 2017 at 5:34 PM, Joerg Sonnenberger <joerg at bec.de> wrote:
> > On Tue, Jul 25, 2017 at 12:29:56AM +0000, Ed Maste via Phabricator via
> > llvm-commits wrote:
> > > NetBSD has support, although I don't know if there are platform-specific
> > > differences.
> >
> > Effectively, only ARM is using them due to the associated ABI fun.
> >
> Even today? Why?

Because the pain of dealing with different DSOs doesn't justify the
gain. It is moving a bit code from crtbegin.* into the dynamic linker,
where it is actually a bit more problematic, and reordering things to
make them potentially more paging friendly. That's about it. ARM had an
ABI break with the move from OABI to EABI, so that changed at the time.
For other platforms, there was little reason. I'm still a bit puzzled
why .init_array/.fini_array is not using relative pointers to kill the
need for relocations completely. Now that would have been an argument to
support the move, but as is? Not worth the trouble, really.


More information about the llvm-commits mailing list