http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46770

--- Comment #101 from Ivan Godard <igodard at pacbell dot net> 2012-04-22 
19:35:08 UTC ---
Well, it's easy to say that it's the other guy's problem, but it isn't. You are
assuming that the linker is always gnu ld; for big shops with multi-platform
targets that's not necessarily true. We can't expect vendors of other linkers
to deal with gcc decisions.

Instead, may I suggest that the problem is in collect2, which is where gcc
generates an init_array; the linker just includes the table in the load module,
unchanged from what collect2 gives it. I there's another bug list separately
for collect2 then please give me the URL and I'll go away and bother them
instead.

You used to produce a section for each init; the linker knows about sections,
so we can use the linker to enforce order. You are no longer producing a
section for each init, but are instead jamming them together into an anonymous
opaque object that a linker cannot change (hacks in your own linker
notwithstanding). So long as you are going to do the jamming yourself, we mere
users need some scripting mechanism to control it.

Yes, there are options to preserve the "legacy" behavior. Until you get tired
of supporting two mechanisms, or bitrot creeps into the "legacy".

I have enough trouble preserving C++ as a language of choice here in this shop,
without gratuitous breakage of things that in truth are not part of the
standard but nevertheless are needed for a working tool.

Reply via email to