Repository navigation
gk7206v100: no second .init.plt in the relinked modules - #307
Conversation
Every open_*.ko of gk7206v100 printed, on load,
sysfs: cannot create duplicate filename '/module/open_common/sections/.init.plt'
followed by a stack dump (sysfs_warn_dup from load_module), one per
module, about 30 a boot. The modules carried two .init.plt sections: the
XMedia SDK built its xm_*.ko with CONFIG_ARM_MODULE_PLTS, so each kept the
1-byte .plt / .init.plt placeholders of the kernel's module.lds, and
ko2obj.sh passed them through into kernel/obj/gk7206v100. Relinking adds
module.lds' own .init.plt (flags A) beside the blob's (WA); the two do not
merge. gk7206v100 is the only family whose blobs have them.
ko2obj.sh now removes .plt and .init.plt, as it removes .modinfo and
.note.Linux. The 52 blobs (log and nolog) are regenerated from the SDK's
multi/{log,nolog} xm_*.ko, from which the old script reproduces the
committed blobs byte for byte. .text, .data, .rodata, .init.text and
.exit.text are unchanged; only the two placeholders are gone (they hold
nothing but their section and $d symbols, and no relocation refers to
them). Linked against a module.lds with .plt / .init.plt, a blob now gives
one of each; before, two .init.plt.
Co-authored-by: OpenIPC AI team <ai@openipc.org>
PR Summary by QodoRemove duplicate ARM PLT placeholders from relinked modules
AI Description
Merge Risk
|
Code Review by Qodo
1.
|
… say so up top Review on #307: the removal applied to any module. Drop each only when it is what CONFIG_ARM_MODULE_PLTS' module.lds leaves -- at most 1 byte, with no relocation section of its own -- and stop with an error otherwise, so real PLT stubs are never discarded. The explanation moves to the header, beside the other sections the script drops. The 52 gk7206v100 blobs come out byte for byte the same; a .ko with a 16-byte .plt is refused. Co-authored-by: OpenIPC AI team <ai@openipc.org>
|
Qodo review, both addressed in 31a68de:
|
Every
open_*.koof gk7206v100 prints on loadsysfs: cannot create duplicate filename '/module/open_common/sections/.init.plt'plus a stack dump (sysfs_warn_dupfromload_module), one per module, ~30 per boot (seen on a GK7206V11A running nightly-20261116).Cause: the XMedia SDK built its
xm_*.kowithCONFIG_ARM_MODULE_PLTS, so each kept the 1-byte.plt/.init.pltplaceholders from the kernel's module.lds;ko2obj.shpassed them intokernel/obj/gk7206v100, and relinking adds module.lds' own.init.plt(flags A) beside the blob's (WA) — they don't merge. gk7206v100 is the only family whose blobs have them.scripts/ko2obj.sh: also--remove-section=.plt --remove-section=.init.plt.multi/{log,nolog}xm_*.ko(the old script reproduces the committed blobs from them byte for byte). Code and data sections unchanged; only the two placeholders removed (no relocation refers to them).Checked:
ld -r -Twith a module.lds holding.plt/.init.pltgives 2.init.pltfor the old blob, 1 for the new. Not yet boot-tested with a rebuilt firmware.