This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Relaxation and Dwarf CIE/FDE
- From: Ian Lance Taylor <iant at google dot com>
- To: Michael Eager <eager at eagercon dot com>
- Cc: binutils at sourceware dot org
- Date: 30 May 2007 10:56:18 -0700
- Subject: Re: Relaxation and Dwarf CIE/FDE
- References: <465DB9D8.3050609@eagercon.com>
Michael Eager <eager@eagercon.com> writes:
> I'm working with a target which has a linker relaxation
> pass. The compiler is generating Dwarf. When the linker
> shrinks a branch, the CIE/FDEs are not modified, so they
> end up pointing to the wrong instructions.
>
> I looked through the code (binutils-2.16) but didn't
> see any code which addressed this. Can anyone suggest
> a pointer to where this is handled?
You have to arrange for the assembler to keep all relocations,
including PC-relative relocations which would otherwise be resolved by
the assembler. Then the linker has to adjust those PC-relative
relocations correctly during relaxation. The SH relaxation code does
this.
Ian