ld -r frustration

Richard Earnshaw rearnsha@gcc.gnu.org
Fri Jul 30 09:21:00 GMT 2004

On Thu, 2004-07-29 at 18:46, Zack Weinberg wrote:
> Richard Earnshaw <rearnsha@gcc.gnu.org> writes:
> > Ah!  OK, I think I understand.  So we only coalesce sections with the
> > same name, and that changes the order.  Sounds like another reason to me
> > why we shouldn't be doing section coalescing during ld -r.
> ... which will break things that expect ld -r to do exactly that (to
> repeat myself).

... and doing merging will break unused section elimination; and on ARM
potentially create sections that are then too large for proper
long-branch veneers to be inserted.

So I think what we really need here is another option (groan), that
controls whether ld -r merges sections.  In my opinion merging should be
off by default (it appears you already have to add other flags if you
want ld -r to do other additional things like allocate common data).


More information about the Binutils mailing list