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

Details

Provenance
Alexander Lobakin <alobakin@pm.me>Authored on Oct 16 2022, 9:23 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Nov 4 2022, 6:25 PM
Parents
rGb844489ec0e3: icp: properly fix all RETs in x86_64 Asm code
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG61cca6fa0506: icp: fix rodata being marked as text in x86 Asm code (authored by Alexander Lobakin <alobakin@pm.me>).Nov 4 2022, 6:25 PM