All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@kernel.org>
To: Masahiro Yamada <masahiroy@kernel.org>, Ard Biesheuvel <ardb@kernel.org>
Cc: linux-kbuild@vger.kernel.org, Michael Matz <matz@suse.de>,
	Kees Cook <keescook@chromium.org>,
	Sami Tolvanen <samitolvanen@google.com>,
	Fangrui Song <maskray@google.com>,
	Michal Marek <michal.lkml@markovi.net>,
	Nathan Chancellor <nathan@kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Tom Rix <trix@redhat.com>,
	linux-kernel@vger.kernel.org, llvm@lists.linux.dev
Subject: Re: [RFC PATCH] kbuild: pass objects instead of archives to linker
Date: Thu, 3 Nov 2022 08:22:44 +0100	[thread overview]
Message-ID: <9fe8615c-fe31-ebf7-09bd-453fae189666@kernel.org> (raw)
In-Reply-To: <CAK7LNASjBm=WWpkSaL1+QuLokhnepUucvhYyP3CCeZYx6nOTHA@mail.gmail.com>

On 02. 11. 22, 10:44, Masahiro Yamada wrote:
> Jiri Slaby reported that the (not-upstreamed) GCC-LTO tree got broken
> due to 321648455061 ("kbuild: use obj-y instead extra-y for objects
> placed at the head")
> 
> https://lore.kernel.org/linux-kbuild/ea468b86-abb7-bb2b-1e0a-4c8959d23f1c@kernel.org/
> 
> 
> I am not pretty sure because I did not check the downstream code.
> 
> 
> If I understood his report correctly, the reason for the breakage is
> because I put all objects into the thin archive, expecting
> the linker would preserve the object order in the archive.
> 
> By specifying the object order directly in the command line,
> GCC-LTO should get back working again.

...

> I think my patch is unneeded (hence RFC), but I just wanted to know
> if linkers (gnu ld and lld) see any difference.

Yes, including your patch (instead of vmlinux.S and /compressed/* 
changes) also fixes the issue. So the linker (gcc-ld) indeed respects 
command line, but not order of objects in .a.

thanks,
-- 
js
suse labs


  reply	other threads:[~2022-11-03  7:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-02  9:13 [RFC PATCH] kbuild: pass objects instead of archives to linker Masahiro Yamada
2022-11-02  9:21 ` Ard Biesheuvel
2022-11-02  9:44   ` Masahiro Yamada
2022-11-03  7:22     ` Jiri Slaby [this message]
2022-11-03 14:47       ` Masahiro Yamada
2022-11-07  6:12         ` Jiri Slaby
  -- strict thread matches above, loose matches on Subject: below --
2022-11-03  5:43 kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9fe8615c-fe31-ebf7-09bd-453fae189666@kernel.org \
    --to=jirislaby@kernel.org \
    --cc=ardb@kernel.org \
    --cc=keescook@chromium.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=masahiroy@kernel.org \
    --cc=maskray@google.com \
    --cc=matz@suse.de \
    --cc=michal.lkml@markovi.net \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=samitolvanen@google.com \
    --cc=trix@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.