This is the mail archive of the
mailing list for the binutils project.
Re: [gold] arm: fix exidx in relocatable builds
- From: Doug Kwan (éæå) <dougkwan at google dot com>
- To: Yury Usishchev <y dot usishchev at samsung dot com>
- Cc: binutils <binutils at sourceware dot org>, Ian Lance Taylor <ian at airs dot com>
- Date: Thu, 28 Jan 2016 12:25:35 -0800
- Subject: Re: [gold] arm: fix exidx in relocatable builds
- Authentication-results: sourceware.org; auth=none
- References: <87powl4v9y dot fsf at samsung dot com>
There are a few questions :-) But I can answer 1) first. As is, we
do not want to do relaxation on a relocatable build. The reason is
that we generate branch stubs in relaxation and we can only do that
when we layout the code. Some stub like the cortex A8 workaround
needs to know that exact address of an instruction. This is no
possible with a relocatable build. If we want to reuse the existing
code, we need to suppress stub generation in with a relocatable build.
Since a relocatable build can be used as input for a subsequent
link, the existing EXIDX related code also need to be change to handle
inputs with EXIDX tables. It is not technically very difficult but it
will take some work and I think the existing code does not work in
On Thu, Jan 28, 2016 at 6:46 AM, Yury Usishchev <email@example.com> wrote:
> Hello all!
> I want to fix PR19524 (https://sourceware.org/bugzilla/show_bug.cgi?id=19524).
> In relocatable builds linker does not fix unwind info, leaving some gaps, this can cause problems in unwinder including
> segmentation faults.
> The same issue was fixed for BFD linker in PR17323 (https://sourceware.org/bugzilla/show_bug.cgi?id=17323).
> To fix the problem I suppose I need to add part of relaxation where exidx fixup is done to relocatable builds and
> generate correct relocation for new unwind info.
> For now I managed to generate required 'cantunwind' but not the relocation, and it is done in very hacky way (see
> Could some Gold hacker help me with advice on creating the fix? Here are the main issues I would like to discuss:
> 1) Where exidx fix should be called from in relocatable builds?(how wrong is it to run relaxation in such builds)
> 2) Is it possible to create a relocation in Gold? If so, how can I achieve this?
> 3) Where should this relocation be created and placed?
> Any help will be appreciated.
> Yury Usishchev