[llvm-commits] Fix constructor order on ARM/ELF
Anton Korobeynikov
anton at korobeynikov.info
Sun Dec 4 04:49:38 PST 2011
> Side note: instead of emitting all the stuff into the same section, we
> can emit the symbol into e.g. init_array.<priority> section and rely
> on linker to emit all the stuff in the proper order.
Ok, it seems we have to *always* emit stuff this way. Consider e.g.
the following situation:
File foo.o contains stuff with priorities of 100 & 200. We emit
everything into single init_array section.
File bar.o contains stuff with priorities of 150 & 250. We emit
everything into single init_array section.
Surely after linking the order of ctors will be wrong.
--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University
More information about the llvm-commits
mailing list