HomeFreeBSD

icp: fix rodata being marked as text in x86 Asm code

Description

icp: fix rodata being marked as text in x86 Asm code

objtool properly complains that it can't decode some of the
instructions from ICP x86 Asm code. As mentioned in the Makefile,
where those object files were excluded from objtool check (but they
can still be visible under IBT and LTO), those are just constants,
not code.
In that case, they must be placed in .rodata, so they won't be
marked as "allocatable, executable" (ax) in EFL headers and this
effectively prevents objtool from trying to decode this data. That
reveals a whole bunch of other issues in ICP Asm code, as previously
objtool was bailing out after that warning message.

Reviewed-by: Attila Fülöp <attila@fueloep.org>
Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Lobakin <alobakin@pm.me>
Closes #14035

Conflicts:
module/Kbuild.in

Details

Provenance
Alexander Lobakin <alobakin@pm.me>Authored on Oct 16 2022, 9:23 PM
Tony Hutter <hutter2@llnl.gov>Committed on Nov 30 2022, 6:15 PM
Parents
rGee93cbc9d477: icp: properly fix all RETs in x86_64 Asm code
Branches
Unknown
Tags
Unknown

Event Timeline

Tony Hutter <hutter2@llnl.gov> committed rG33bc03dea7bc: icp: fix rodata being marked as text in x86 Asm code (authored by Alexander Lobakin <alobakin@pm.me>).Nov 30 2022, 6:15 PM