[PATCH] D17252: [ELF, Bug 26360] - allows undefines that are referenced from garbage collected sections.

Ed Schouten via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 29 05:33:26 PST 2016


ed added a subscriber: ed.
ed added a comment.

In http://reviews.llvm.org/D17252#353691, @ruiu wrote:

> I think that we don't want it until it is proved that this "feature" is really needed.


For what it's worth, the FreeBSD kernel also uses this feature in at least two places:

- To register SYSINITs: closures that are invoked when either the kernel boots or when a kernel module is loaded: https://www.freebsd.org/cgi/man.cgi?query=SYSINIT&sektion=9.
- More generalized: to implement linker sets. Linker sets are for example used to register all different console drivers, RAID-modules, etc.  Every driver/RAID module is placed in its own separate C file, but by placing them all in the same set, the generic frameworks can iterate over all of the drivers when probing/attaching.


http://reviews.llvm.org/D17252





More information about the llvm-commits mailing list