On Mon, Jun 30, 2008 at 11:04:43AM -0400, David Edelsohn wrote:
> >>>>> Andreas Jaeger writes:
>
> Andreas> So, it means that --relax is not the right solution for the problem.
>
> Andreas> I'll continue with the STAGE1_CFLAG flag but if anybody else wants
> me to
> Andreas> test something, please tell me,
>
> Maybe Alan will have some insight about --relax not working.
I'm definitely interested in trying to reproduce the problem as it
sounds like there might be a linker bug. Andreas, can you send me
your configure options?
> Otherwise, in the past Alan has had some suggestions for swapping
> around the crt file order or using linker scripts to place those sections
> more effectively.
These tricks would only help the particular case of reloc overflow in
branches to __do_global_{c,d}tors_aux. Something like the following
(untested!) in place of the .text output section description in
ld/scripttempl/elf.sc ought to work.
.text ${RELOCATING-0} :
{
${RELOCATING+${TEXT_START_SYMBOLS}}
*crtend.o(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*})
*crtend?.o(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*})
*(EXCLUDE_FILE (*crtbegin.o *crtbegin?.o) .text .stub${RELOCATING+ .text.*
.gnu.linkonce.t.*})
*crtbegin.o(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*})
*crtbegin?.o(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*})
/* .gnu.warning sections are handled specially by elf32.em. */
*(.gnu.warning)
${RELOCATING+${OTHER_TEXT_SECTIONS}}
} =${NOP-0}
--
Alan Modra
Australia Development Lab, IBM