A linker script passed to the gcc driver should override the one
which the driver would pass by default.

Yes, and if current GCC has some problems with that, those bugs should
be fixed. Sorry if I gave the impression that this would be "user error".

The linker script which is
specified must be, as you say, close enough to the standard script
that things will work correctly.

In the real world, linker scripts may be generated automatically
to describe the memory layout of a board or processor.  There is
no compelling reason to prohibit this *correct* linker script from
being passed to the gcc driver and from there to ld.

As long as those scripts are close enough to the "standard" scripts,
it might/should work fine.

In most cases (as far as I have seen) where people use non-standard
linking scripts though, all bets are off (for more or less obvious
reasons), and those people would be much better of calling ld directly.

I only tried to warn the original poster of the perils involved, I didn't
try to draw away the attention from the apparent GCC bug.  I guess
I miserably failed, sorry about that :-)


Segher

Reply via email to