[PATCH] kbuild: use objcopy to generate asm-offsets

Vegard Nossum vegard.nossum at oracle.com
Tue Sep 3 00:20:56 PDT 2024


On 03/09/2024 01:45, Michael Ellerman wrote:
> Vegard Nossum <vegard.nossum at oracle.com> writes:
>> Remove the sed script and compile the C source listing structs and
>> offsets to an object file (instead of assembly code) that embeds C source
>> directly. Then extract the C source using objcopy.
>>
> 
> I threw some builders at this and hit a few errors:

Thanks, I also got the ones from kernel test robot and figured something
was going a bit wrong.

There are several issues: clang wants - instead of /dev/stdout as an
argument to objcopy, and then gcc has some bugs that prevent the numbers
from appearing correctly on some architectures, also I had an extra # in
the COMMENT() macro which only resulted in an error on some
architectures. I've attached a tentative v2 that fixes these issues, but
I'm still trying to figure out why m68k is giving me slightly different
output for include/generated/asm-offsets.h and why the arc assembler
fails.

In the end I'm wondering if this patch is really worth it, given all the
failures and little workarounds :-| If I can sort out the last few
failures I'll submit it as an RFC.

> Full list here, but note there are some unrelated pre-existing failures:
>    http://kisskb.ellerman.id.au/kisskb/head/259bba3447faaf5e5b12ae41a26a62978d4c1965/

Thanks again,


Vegard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-kbuild-use-objcopy-to-generate-asm-offsets.patch
Type: text/x-patch
Size: 11240 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-um/attachments/20240903/82a023ca/attachment-0001.bin>


More information about the linux-um mailing list