Change the check to f.endswith(".ko"), consistent with strip_execs() and
with the /lib/modules/ guard already present in is_elf() and
splitdebuginfo().
Fixes [YOCTO #2348]
Signed-off-by: Sam Kent <sam.john.kent@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
stripcmd = [strip]
skip_strip = False
- # kernel module
+ # kernel module: use --strip-debug and --preserve-dates (required for
+ # module signing to remain valid after stripping)
if elftype & 16:
if is_kernel_module_signed(file):
bb.debug(1, "Skip strip on signed module %s" % file)
or (s[stat.ST_MODE] & stat.S_IXOTH) \
or ((file.startswith(libdir) or file.startswith(baselibdir)) \
and (".so" in f or ".node" in f)) \
- or (f.startswith('vmlinux') or ".ko" in f):
+ or (f.startswith('vmlinux') or f.endswith(".ko")):
if cpath.islink(file):
checkelflinks[file] = ltarget