Modutils 2.5 change, start running this command now
In current modutils, a module that does not export symbols and does not say EXPORT_NO_SYMBOLS defaults to exporting all symbols. This is a hangover from kernel 2.0 and will be removed when modutils 2.5 appears, shortly after the kernel 2.5 branch is created.
Starting with modutils 2.5, modules must explicitly say what their intention is for symbols. That will break a lot of existing modules. The command below lists the modules on your system that will be affected. All code maintainers need to run this against their 2.4 modules and do one of two things. Either export the required symbols (remember to add the .o file to export-objs in the Makefile) or add EXPORT_NO_SYMBOLS; somewhere in the module (no change to Makefile).
objdump -h modprobe -l | \
awk '/file format/{file = $1}/__ksymtab/{file = ""}/\.comment/ && file != "" {print file}'
Quoted 4 lines · Keith Owens
In current modutils, a module that does not export symbols and does not say
EXPORT_NO_SYMBOLSdefaults to exporting all symbols. This is a hangover from kernel 2.0 and will be removed when modutils 2.5 appears, shortly after the kernel 2.5 branch is created.
This is an excellent move.
Quoted 7 lines
Starting with modutils 2.5, modules must explicitly say what their intention is for symbols. That will break a lot of existing modules. The command below lists the modules on your system that will be affected. All code maintainers need to run this against their 2.4 modules and do one of two things. Either export the required symbols (remember to add the .o file to export-objs in the
Makefile) or addEXPORT_NO_SYMBOLS; somewhere in the module (no change toMakefile).
Once 2.5 starts, I'll be happy to go over modules with this script and fix up stuff that is unmaintained.
Quoted 2 lines
objdump -h
modprobe -l| \
awk '/file format/{file = $1}/__ksymtab/{file = ""}/\.comment/ && file != "" {print file}'
Signature · 3 lines
Robert M. Love rml at ufl.edu rml at tech9.net
Quoted 6 lines · Keith Owens
Either export the required symbols
(remember to add the .o file to export-objs in theMakefile) or addEXPORT_NO_SYMBOLS; somewhere in the module (no change toMakefile).objdump -h
modprobe -l| \
awk '/file format/{file = $1}/__ksymtab/{file = ""}/\.comment/ && file != "" {print file}'
Sorry, your awk script is buggy - it doesn't take note of __ksymtab after .comment:
# objdump -h /lib/modules/2.4.9-ac17/kernel/drivers/acorn/scsi/acornscsi_mod.o
/lib/modules/2.4.9-ac17/kernel/drivers/acorn/scsi/acornscsi_mod.o: file format elf32-littlearm
Sections:
Idx Name Size VMA LMA File off Algn 0 .text 0000466c 00000000 00000000 00000034 2**2
CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
1 .rodata 00000de6 00000000 00000000 000046a0 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
2 .modinfo 00000028 00000000 00000000 00005488 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
3 .data 000000bc 00000000 00000000 000054b0 2**2
CONTENTS, ALLOC, LOAD, RELOC, DATA
4 .bss 0000008c 00000000 00000000 0000556c 2**2
ALLOC
5 .comment 00000026 00000000 00000000 0000556c 2**0
CONTENTS, READONLY
6 __ksymtab 00000000 00000000 00000000 00005592 2**0
CONTENTS, READONLY
--
Russell King ([email protected]) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html
Quoted 10 lines · Russell King
Quoted 6 lines · Keith Owens
Either export the required symbols
(remember to add the .o file to export-objs in theMakefile) or addEXPORT_NO_SYMBOLS; somewhere in the module (no change toMakefile).objdump -h
modprobe -l| \
awk '/file format/{file = $1}/__ksymtab/{file = ""}/\.comment/ && file != "" {print file}'Sorry, your awk script is buggy - it doesn't take note of
__ksymtabafter .comment:
Foo, I was assuming that .comment always came last. Oh well, do it the hard way.
objdump -h modprobe -l | sed -ne '/__ksym/h;$b1;\:^/:!d;:1;x;s/:.*//p;'
Gotta love those sed hieroglyphics :-)