From: Zigit Zo <zig@iorw.io>
To: stappers@stappers.nl
Cc: anton.ivanov@cambridgegreys.com, bjorn3_gh@protonmail.com,
gary@garyguo.net, johannes@sipsolutions.net,
linux-kernel@vger.kernel.org, linux-um@lists.infradead.org,
llvm@lists.linux.dev, mingo@redhat.com, nathan@kernel.org,
ndesaulniers@google.com, ojeda@kernel.org, richard@nod.at,
rust-for-linux@vger.kernel.org, tglx@linutronix.de,
x86@kernel.org, zig@iorw.io
Subject: Re: [PATCH 1/2] rust: arch/um: use 'static' relocation model for uml modules
Date: Wed, 4 Sep 2024 20:28:10 +0800 [thread overview]
Message-ID: <477D5EA32B25AA05+ZthOusZtXttQOf3B@evil> (raw)
In-Reply-To: <ZtgopAHp+I2+xCIz@gpm.stappers.nl>
On Wed, Sep 04, 2024 at 11:30:12AM +0200, Geert Stappers wrote:
> I failed to match the actual change with the commit message. Consider
> that ignorance on my side.
FYI, I'm using the master branch of the upstream, but yes it's in the
'rust-next' or other branches as well, so maybe not a big deal IMO.
Of what 'https://rust-for-linux.com/branches' says, maybe I'll use the
'rust-next' branch for the next time, thanks for pointing out!
> I see a problem in just renaming a variable, might be my problem. Thing
> is that removal of 'KBUILD_RUSTFLAG += ' feels wrong, hence this posting.
I think this is fine, the 'KBUILD_RUSTFLAG' controls the 'PIE' flag for
both the kernel itself and the loadable modules. And yes, that's the only
way I can make the 'PIE' flag out of the modules while keeping the UML
kernel itself works, and the 'scripts/Makefile.lib' I tought has placed
those flags correctly.
What about adding a 'static' flag to the 'arch/um/Makefile' explicitly,
---
KBUILD_RUSTFLAGS_KERNEL += -Crelocation-model=pie
KBUILD_RUSTFLAGS_MODULE += -Crelocation-model=static
---
but that's just a redundant of the already defined 'KBUILD_RUSTFLAGS'.
Have no more ideas what can this flag goes wrong :(
next prev parent reply other threads:[~2024-09-04 12:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240903130606.292935-1-zig@iorw.io>
2024-09-03 13:06 ` [PATCH 1/2] rust: arch/um: use 'static' relocation model for uml modules Zigit Zo
2024-09-04 9:30 ` Geert Stappers
2024-09-04 12:28 ` Zigit Zo [this message]
2024-09-03 13:06 ` [PATCH 2/2] rust: arch/um: use 'large' code model for uml Zigit Zo
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=477D5EA32B25AA05+ZthOusZtXttQOf3B@evil \
--to=zig@iorw.io \
--cc=anton.ivanov@cambridgegreys.com \
--cc=bjorn3_gh@protonmail.com \
--cc=gary@garyguo.net \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-um@lists.infradead.org \
--cc=llvm@lists.linux.dev \
--cc=mingo@redhat.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=ojeda@kernel.org \
--cc=richard@nod.at \
--cc=rust-for-linux@vger.kernel.org \
--cc=stappers@stappers.nl \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox