This is the mail archive of the binutils@sourceware.org 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: PATCH: Decompress section before applying simple relocations


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.


-- 
H.J.
---
2010-12-15  H.J. Lu  <hongjiu.lu@intel.com>

	* simple.c (bfd_simple_get_relocated_section_contents): If a
	compressed section hasn't been decompressed, decompress it
	first before applying simple relocations.

Attachment: binutils-compress-rel-2.patch
Description: Text document


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