Re: [patch] Speed up find_pc_section

Daniel Jacobowitz
2009-08-20T21:06:37Z

On Thu, Aug 20, 2009 at 01:40:11PM -0700, Paul Pluzhnikov wrote:
> + if (lma != 0 && lma != bfd_section_vma (abfd, section))
> + /* This is an overlay section. */
> + return 0;

I see that you are using the same check as section_is_overlay, but
this really jumped out at me: I don't think this has anything to do
with overlay-ness. In a bare metal application, it's not uncommon to
have LMA != VMA for every section.

That may be good enough for what you need here... I suppose you could
define such an application as 'only overlays', but I think of overlays
as having more than one set of code for the same VMA.

--
Daniel Jacobowitz
CodeSourcery