[committed, PATCH] Properly convert objects between different ELF classes

H.J. Lu hjl.tools@gmail.com
Fri Sep 25 12:56:00 GMT 2015


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.

-- 
H.J.



More information about the Binutils mailing list