This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Linking very large programs with inadequate branch displacements
Dear Alan, H.J., Nick, and H-P,
Thanks for your prompt help:
> Please check out elfNN_ia64_relax_section in elfxx-ia64.c.
> H.J.
>
> Also have a look at bfd/elf32-
xstormy16.c:xstormy16_elf_check_relocs().
> Nick
>
> See elf32-hppa.c and elf64-ppc.c for one method of doing this, and
> elf32-ppc.c for another.
> Alan Modra
>
> Usually referred to as a "trampoline" or "stub". For yet
> another implementation, see bfd/elf64-mmix.c, handling of
> R_MMIX_PUSHJ_STUBBABLE. See also gas/config/tc-mmix.c for when
> these relocs are generated.
> brgds, H-P
I've looked at these examples, cooked an x86/Linux version of
binutils for --target=ppc-elf32-linux, and run a number of gcc 3.2
PPC-compiled files through the debuggable assembler and linker.
Alan, I can't figure out how to hit a breakpoint at
ppc_elf_relax_section:elf32-ppc.c. Is there a command line switch I
should throw, or would you have some C/ASM source that will trigger
this routine?
Bill
P.S. I appreciate the humor sprinkled in the sources:
"Oh dear, we can't reach a trampoline...", "If the branch and target
are in the same section, you've got one honking big section...", etc.