mirror of
https://github.com/torvalds/linux.git
synced 2026-10-22 23:01:49 +02:00
kbuild: Remove alignment on .modinfo section
Commitd50f210913("kbuild: align modinfo section for Secureboot Authenticode EDK2 compat") aligned .modinfo because it appeared in the x86_64 compressed kernel image after commit3e86e4d74c("kbuild: keep .modinfo section in vmlinux.unstripped"), breaking boot. Commit8678591b47("kbuild: Split .modinfo out from ELF_DETAILS") properly addresses .modinfo appearing in unexpected contexts like compressed images by moving it out of ELF_DETAILS and explicitly specifying its location in every architecture's vmlinux linker script or discarding it where it may appear elsewhere. Effectively revert commitd50f210913("kbuild: align modinfo section for Secureboot Authenticode EDK2 compat") and its follow up fix, commita26a6c93ed("kbuild: Strip trailing padding bytes from modules.builtin.modinfo"), as they are no longer necessary in the current tree. This simplifies future cleanups. Reviewed-by: Nicolas Schier <n.schier@fritz.com> Link: https://patch.msgid.link/20260918005142.GA1585590@ax162/ Signed-off-by: Nathan Chancellor <nathan@kernel.org>
This commit is contained in:
parent
c0a50a8604
commit
36d4a11b56
|
|
@ -855,7 +855,7 @@
|
|||
KLP_SYMID
|
||||
|
||||
#define MODINFO \
|
||||
.modinfo : { *(.modinfo) . = ALIGN(8); }
|
||||
.modinfo : { *(.modinfo) }
|
||||
|
||||
#ifdef CONFIG_GENERIC_BUG
|
||||
#define BUG_TABLE \
|
||||
|
|
|
|||
|
|
@ -102,18 +102,8 @@ vmlinux: vmlinux.unstripped FORCE
|
|||
# modules.builtin.modinfo
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
# .modinfo in vmlinux.unstripped is aligned to 8 bytes for compatibility with
|
||||
# tools that expect vmlinux to have sufficiently aligned sections but the
|
||||
# additional bytes used for padding .modinfo to satisfy this requirement break
|
||||
# certain versions of kmod with
|
||||
#
|
||||
# depmod: ERROR: kmod_builtin_iter_next: unexpected string without modname prefix
|
||||
#
|
||||
# Strip the trailing padding bytes after extracting .modinfo to comply with
|
||||
# what kmod expects to parse.
|
||||
quiet_cmd_modules_builtin_modinfo = GEN $@
|
||||
cmd_modules_builtin_modinfo = $(cmd_objcopy); \
|
||||
sed -i 's/\x00\+$$/\x00/g' $@; \
|
||||
chmod -x $@
|
||||
|
||||
OBJCOPYFLAGS_modules.builtin.modinfo := -j .modinfo -O binary
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user