This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Don't relax undefined symbols on ppc.
- From: Alan Modra <amodra at gmail dot com>
- To: Douglas B Rupp <rupp at adacore dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Tue, 10 Jul 2018 10:57:28 +0930
- Subject: Re: Don't relax undefined symbols on ppc.
- References: <7ec3b35f-aeb9-d610-86f1-93d370f0660b@adacore.com>
On Mon, Jul 09, 2018 at 01:58:33PM -0700, Douglas B Rupp wrote:
> There is a problem with --relax in the partial link trying to relax the
> undefined symbols, leading to the RTP failing at startup with signal 11.
Please describe the problem in detail. ld -r --relax non-pic is
supposed to work for ppc32, with a branch to an undefined symbol being
resolved to a trampoline which has relocations to the symbol. Are the
emitted relocations wrong?
> I solicit comments on the attached patch, which causes undefined symbols to
> be ignored during the relax process. Leaving them to be relaxed and
> resolved during the final link.
If ld -r mashes together sections such that the resulting output
section size exceeds the reach of a branch, then it may not be
possible to for branches to reach trampolines placed at the end of the
section. That's the problem ld -r --relax is trying to solve, by
placing trampolines at the end of each input section.
--
Alan Modra
Australia Development Lab, IBM