Re: [kvm-unit-tests PATCH v1 1/3] s390x/Makefile: snippets: Add separate target for the ELF snippets

Marc Hartmayer
2024-06-05T07:32:19Z

On Wed, Jun 05, 2024 at 11:21 AM +1000, "Nicholas Piggin" <npiggin@gmail.com> wrote:
> On Tue Jun 4, 2024 at 9:59 PM AEST, Marc Hartmayer wrote:
>> It's unusual to create multiple files in one target rule, and it's even more
>> unusual to create an ELF file with a `.gbin` file extension first, and then
>> overwrite it in the next step. It might even lead to errors as the input file
>> path is also used as the output file path - but this depends on the objcopy
>> implementation. Therefore, create an extra target for the ELF files and list it
>> as a prerequisite for the *.gbin targets.
>
> I had some pain trying to figure out another ("pretty printing") patch
> that changed some s390x/Makefile because of this. As far as I can tell
> it looks good.

Hehe yes. Thomas sent me the following error message:

/usr/bin/s390x-linux-gnu-ld: warning: s390x/snippets/c/mvpg-snippet.gbin
has a LOAD segment with RWX permissions

…and at first this was totally confusing until I’ve looked at the code… :)

>
> Reviewed-by: Nicholas Piggin <npiggin@gmail.com>

Thanks.

[…snip]

--
Kind regards / Beste Grüße
Marc Hartmayer

IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Wolfgang Wendt
Geschäftsführung: David Faller
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294