This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Use .init_arrat/.fini_array if available


Daniel Jacobowitz wrote:

If the ARM port put entries in .ctors and ran them from the beginning
of .init_array, that would fix the problem.  I'm trying to figure out
whether there is a need to do that.  Currently constructors go in
.init_array directly.  I don't see any benefit except for these
artificial test cases.

I can't see any benefit to using .ctors. That's just an extra level of indirection.


I think that the fix probably lies in the form of a modification to the GLIBC test case to accept the order of initialization given by the ARM toolchain, absent something in the ELF spec that requires an ordering. Also, we should consider the case that part of the program is built with GCC, and part with some other compiler, and some arbitrary non-GNU linker is used to build the final application.

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]