PATCH: Decompress section before applying simple relocations

Alan Modra amodra@gmail.com
Wed Dec 22 01:13:00 GMT 2010


On Wed, Dec 15, 2010 at 09:27:55AM -0800, H.J. Lu wrote:
> On Wed, Dec 15, 2010 at 6:28 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> > On Wed, Dec 15, 2010 at 2:54 AM, Alan Modra <amodra@gmail.com> wrote:
> >> On Tue, Dec 14, 2010 at 01:56:54PM -0800, H.J. Lu wrote:
> >>> Hi,
> >>>
> >>> Since bfd_get_full_section_contents caches the decompressed section
> >>> content, we have to decompress compressed section before applying
> >>> simple relocations if it doesn't use RELA relocations.  OK to install?
> >>
> >> Not OK.  This fix doesn't belong in simple.c.
> >>
> >
> > Any suggestions? We don't want to apply simple relocations
> > if real relocations will be applied later.
> >
> 
> I still think bfd_simple_get_relocated_section_contents should
> avoid touching uncompressed section content.  Here is the
> updated patch.

I continue to think this is wrong.  Please go back and rethink
bfd_get_full_section_contents.  Why do you need to cache anything in
that function?

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Binutils mailing list