This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gold] arm: fix exidx in relocatable builds

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
this case.

On Thu, Jan 28, 2016 at 6:46 AM, Yury Usishchev <> wrote:
> Hello all!
> I want to fix PR19524 (
> 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 (
> 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
> attached).
> 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.
> BR,
> Yury Usishchev

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]