.eh_frame optimization question

Jie Zhang jzhang918@gmail.com
Wed Jan 3 08:21:00 GMT 2007
On 1/3/07, Alan Modra <amodra@bigpond.net.au> wrote:
> On Wed, Jan 03, 2007 at 03:31:17PM +0800, Jie Zhang wrote:
> > Alan Modra wrote:
> > >Other ports handle this situation by emitting an R_*_NONE reloc,
> > >typically reloc number 0.  Can you do the same?
> > >
> > >_bfd_elf_section_offset will return -1 or -2 to indicate that a
> > >dynamic reloc is not needed.
> > >
> > Thanks for your reply. Actually, bfin port handles this situation as
> > other ports.
>
> I see _bfd_elf_section_offset invoked in an expression passed to
> _bfinfdpic_add_dyn_reloc.  No special handling for the case where
> _bfd_elf_section_offset returns -1.  You need to fix this.
>
There are multiple places in bfin port where _bfinfdpic_add_dyn_reloc
is called. Only one place needs such handling for removed .eh_frame
entries. It has been fixed by one my previous patch. The currently
issue is that if the whole .eh_frame section is removed, it does not
get a chance to call _bfinfdpic_add_dyn_reloc for all of its
relocations. Thus its dynamic relocations are not changed to R_*_NONE
type.


Jie



More information about the Binutils mailing list