[LLVMdev] [lld] Handling multiple -init/-fini command line options
Joerg Sonnenberger
joerg at britannica.bec.de
Mon Dec 8 12:20:43 PST 2014
On Mon, Dec 08, 2014 at 11:39:01AM -0600, Shankar Easwaran wrote:
> That said, all of the code is essentially under NO_LEGACY_INITFINI,
> is the linker responsible to convert DT_INIT to DT_INITARRAY's ?
No. It can't do that. There are some non-trivial differences in the
semantics of the two.
> If so, I think more than one init/fini option should be converted to
> DT_INIT_ARRAY (or) DT_FINI_ARRAY respectively ?
No, the GNU behavior is correct here. Only one DT_INIT and one DT_FINI
should be written and the last option should win. It is like the dynamic
linker path in this regard.
Joerg
More information about the llvm-dev
mailing list