<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in Makefile.postlink</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>ac4f0678 - kbuild: Create intermediate vmlinux build with relocations preserved</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/arch/s390/Makefile.postlink#ac4f0678</link>
        <description>kbuild: Create intermediate vmlinux build with relocations preservedThe imperative paradigm used to build vmlinux, extract some info from itor perform some checks on it, and subsequently modify it again goesagainst the declarative paradigm that is usually employed for definingmake rules.In particular, the Makefile.postlink files that consume their input viaan output rule result in some dodgy logic in the decompressor makefilesfor RISC-V and x86, given that the vmlinux.relocs input file needed togenerate the arch-specific relocation tables may not exist or be out ofdate, but cannot be constructed using the ordinary Make dependency basedrules, because the info needs to be extracted while vmlinux is in itsephemeral, non-stripped form.So instead, for architectures that require the static relocations thatare emitted into vmlinux when passing --emit-relocs to the linker, andare subsequently stripped out again, introduce an intermediate vmlinuxtarget called vmlinux.unstripped, and organize the reset of the buildlogic accordingly:- vmlinux.unstripped is created only once, and not updated again- build rules under arch/*/boot can depend on vmlinux.unstripped without  running the risk of the data disappearing or being out of date- the final vmlinux generated by the build is not bloated with static  relocations that are never needed again after the build completes.Signed-off-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;

            List of files:
            /linux-6.15/arch/s390/Makefile.postlink</description>
        <pubDate>Tue, 11 Mar 2025 11:06:20 +0000</pubDate>
        <dc:creator>Ard Biesheuvel &lt;ardb@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>71d815bf - kbuild: Strip runtime const RELA sections correctly</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/arch/s390/Makefile.postlink#71d815bf</link>
        <description>kbuild: Strip runtime const RELA sections correctlyDue to the fact that runtime const ELF sections are named without aleading period or double underscore, the RSTRIP logic that removes thestatic RELA sections from vmlinux fails to identify them. This resultsin a situation like below, where some sections that were supposed to getremoved are left behind.  [Nr] Name                              Type            Address          Off     Size   ES Flg Lk Inf Al  [58] runtime_shift_d_hash_shift        PROGBITS        ffffffff83500f50 2900f50 000014 00   A  0   0  1  [59] .relaruntime_shift_d_hash_shift   RELA            0000000000000000 55b6f00 000078 18   I 70  58  8  [60] runtime_ptr_dentry_hashtable      PROGBITS        ffffffff83500f68 2900f68 000014 00   A  0   0  1  [61] .relaruntime_ptr_dentry_hashtable RELA            0000000000000000 55b6f78 000078 18   I 70  60  8  [62] runtime_ptr_USER_PTR_MAX          PROGBITS        ffffffff83500f80 2900f80 000238 00   A  0   0  1  [63] .relaruntime_ptr_USER_PTR_MAX     RELA            0000000000000000 55b6ff0 000d50 18   I 70  62  8So tweak the match expression to strip all sections starting with .rel.While at it, consolidate the logic used by RISC-V, s390 and x86 into asingle shared Makefile library command.Link: https://lore.kernel.org/all/CAHk-=wjk3ynjomNvFN8jf9A1k=qSc=JFF591W00uXj-qqNUxPQ@mail.gmail.com/Signed-off-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;Reviewed-by: Charlie Jenkins &lt;charlie@rivosinc.com&gt;Tested-by: Charlie Jenkins &lt;charlie@rivosinc.com&gt;Tested-by: Alexander Gordeev &lt;agordeev@linux.ibm.com&gt;Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;

            List of files:
            /linux-6.15/arch/s390/Makefile.postlink</description>
        <pubDate>Mon, 13 Jan 2025 15:53:07 +0000</pubDate>
        <dc:creator>Ard Biesheuvel &lt;ardb@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>57216cc9 - s390/build: Avoid relocation information in final vmlinux</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/arch/s390/Makefile.postlink#57216cc9</link>
        <description>s390/build: Avoid relocation information in final vmlinuxSince commit 778666df60f0 (&quot;s390: compile relocatable kernel without-fPIE&quot;) the kernel vmlinux ELF file is linked with --emit-relocs topreserve all relocations, so that all absolute relocations can beextracted using the &apos;relocs&apos; tool to adjust them during boot.Port and adapt Petr Pavlu&apos;s x86 commit 9d9173e9ceb6 (&quot;x86/build: Avoidrelocation information in final vmlinux&quot;) to s390 to strip allrelocations from the final vmlinux ELF file to optimize its size.Following is his original commit message with minor adaptions for s390:The Linux build process on s390 roughly consists of compiling all inputfiles, statically linking them into a vmlinux ELF file, and then takingand turning this file into an actual bzImage bootable file.vmlinux has in this process two main purposes:1) It is an intermediate build target on the way to produce the final   bootable image.2) It is a file that is expected to be used by debuggers and standard   ELF tooling to work with the built kernel.For the second purpose, a vmlinux file is typically collected by variouspackage build recipes, such as distribution spec files, including thekernel&apos;s own tar-pkg target.When building the kernel vmlinux contains also relocation informationproduced by using the --emit-relocs linker option. This is utilized bysubsequent build steps to create relocs.S and produce a relocatableimage. However, the information is not needed by debuggers and otherstandard ELF tooling.The issue is then that the collected vmlinux file and hence distributionpackages end up unnecessarily large because of this extra data. Thefollowing is a size comparison of vmlinux v6.10 with and without therelocation information:  | Configuration      | With relocs | Stripped relocs |  | defconfig          |      696 MB |          320 MB |  | -CONFIG_DEBUG_INFO |       48 MB |           32 MB |Optimize a resulting vmlinux by adding a postlink step that splits therelocation information into relocs.S and then strips it from the vmlinuxbinary.Reviewed-by: Vasily Gorbik &lt;gor@linux.ibm.com&gt;Signed-off-by: Jens Remus &lt;jremus@linux.ibm.com&gt;Signed-off-by: Vasily Gorbik &lt;gor@linux.ibm.com&gt;

            List of files:
            /linux-6.15/arch/s390/Makefile.postlink</description>
        <pubDate>Thu, 22 Aug 2024 15:30:21 +0000</pubDate>
        <dc:creator>Jens Remus &lt;jremus@linux.ibm.com&gt;</dc:creator>
    </item>
</channel>
</rss>
