This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [committed, PATCH] Properly convert objects between different ELF classes
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Andrew Stubbs <ams at codesourcery dot com>
- Cc: Alan Modra <amodra at gmail dot com>, Binutils <binutils at sourceware dot org>
- Date: Fri, 25 Sep 2015 05:57:35 -0700
- Subject: Re: [committed, PATCH] Properly convert objects between different ELF classes
- Authentication-results: sourceware.org; auth=none
- References: <20150710214315 dot GA17734 at intel dot com> <56041251 dot 6060203 at codesourcery dot com> <20150924234421 dot GA31493 at bubble dot grove dot modra dot org> <56053B8A dot 6010605 at codesourcery dot com> <CAMe9rOphME65qdhGC3wr6peV41hArLtd5_SkfkpSUeOxRWPFLw at mail dot gmail dot com>
On Fri, Sep 25, 2015 at 5:56 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Fri, Sep 25, 2015 at 5:18 AM, Andrew Stubbs <ams@codesourcery.com> wrote:
>> On 25/09/15 00:44, Alan Modra wrote:
>>>
>>> OK. The testsuite addition is OK too after building and testing a
>>> good selection of targets, and xfailing the inevitable breakage. I
>>> use these:
>>
>>
>> After double-checking, I've discovered that I've misunderstood the code, and
>> the input section's size is not updated by the conversion process (the
>> conversion appears to affect local data only), so the patch would be broken
>> for compressed data.
>>
>> This patch should solve my problem without creating a new one.
>>
>> As for the testcase, after tweaking the pad amount, it only fails on 6 of
>> the targets Alan listed, for which I've added xfails. I presume they're
>> doing some conversion on the input section size such that the data size
>> *should* be the output size (valgrind shows no issues).
>>
>> OK?
>
> I need to take a closer look at what I did before. In the meantime,
> a couple comments:
>
> 1.
>
> +# Section copies should copy more data than there is in the input
> ^^^^^^^^^ What do you mean by "should"?
> +# (i.e. read past end of buffer)
> +# We can't test this directly without valgrind, but --reverse-bytes
> +# ought to use the same value.
>
> 2, You added a new testcase. But you didn't check if the output
> from objcopy is correct.
>
Also you should add PR # in ChangeLog entries.
--
H.J.