From: Dirk Behme <dirk.behme@de.bosch.com>
To: Alice Ryhl <aliceryhl@google.com>,
Yury Norov <yury.norov@gmail.com>, Burak Emir <bqe@google.com>,
Andreas Hindborg <a.hindborg@kernel.org>
Cc: "Miguel Ojeda" <ojeda@kernel.org>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Trevor Gross" <tmgross@umich.edu>,
"Danilo Krummrich" <dakr@kernel.org>,
rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH v2] rust: bitops: fix missing _find_* functions on 32-bit ARM
Date: Tue, 6 Jan 2026 09:48:25 +0100 [thread overview]
Message-ID: <d4fc5d93-d147-4263-a672-4b6016957327@de.bosch.com> (raw)
In-Reply-To: <20260105-bitops-find-helper-v2-1-ae70b4fc9ecc@google.com>
Am 1/5/2026 um 11:44 AM schrieb Alice Ryhl:
> On 32-bit ARM, you may encounter linker errors such as this one:
>
> ld.lld: error: undefined symbol: _find_next_zero_bit
> >>> referenced by rust_binder_main.43196037ba7bcee1-cgu.0
> >>> drivers/android/binder/rust_binder_main.o:(<rust_binder_main::process::Process>::insert_or_update_handle) in archive vmlinux.a
> >>> referenced by rust_binder_main.43196037ba7bcee1-cgu.0
> >>> drivers/android/binder/rust_binder_main.o:(<rust_binder_main::process::Process>::insert_or_update_handle) in archive vmlinux.a
>
> This error occurs because even though the functions are declared by
> include/linux/find.h, the definition is #ifdef'd out on 32-bit ARM. This
> is because arch/arm/include/asm/bitops.h contains:
>
> #define find_first_zero_bit(p,sz) _find_first_zero_bit_le(p,sz)
> #define find_next_zero_bit(p,sz,off) _find_next_zero_bit_le(p,sz,off)
> #define find_first_bit(p,sz) _find_first_bit_le(p,sz)
> #define find_next_bit(p,sz,off) _find_next_bit_le(p,sz,off)
>
> And the underscore-prefixed function is conditional on #ifndef of the
> non-underscore-prefixed name, but the declaration in find.h is *not*
> conditional on that #ifndef.
>
> To fix the linker error, we ensure that the symbols in question exist
> when compiling Rust code. We do this by definining them in rust/helpers/
Just a quite minor nit: typo: definining -> defining
Dirk
next prev parent reply other threads:[~2026-01-06 8:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-05 10:44 Alice Ryhl
2026-01-05 17:03 ` Yury Norov
2026-01-05 17:08 ` Miguel Ojeda
2026-01-06 9:03 ` Alice Ryhl
2026-01-06 17:38 ` Yury Norov
2026-01-07 5:31 ` Dirk Behme
2026-01-06 8:48 ` Dirk Behme [this message]
2026-01-06 10:47 ` Andreas Hindborg
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=d4fc5d93-d147-4263-a672-4b6016957327@de.bosch.com \
--to=dirk.behme@de.bosch.com \
--cc=a.hindborg@kernel.org \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=bqe@google.com \
--cc=dakr@kernel.org \
--cc=gary@garyguo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=tmgross@umich.edu \
--cc=yury.norov@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®