Discussion:
unresolved symbols still in 2.4.30-rc2 (usbserial needs symbol tty_ldisc_ref and tty_ldisc_deref which are EXPORT_SYMBOL_GPL)
(too old to reply)
David Dyck
2005-03-26 18:54:21 UTC
Permalink
I've been noticing that I'm still getting some "unresolved symbols"
with the 2.4.30 pre and rc series.

# insmod /lib/modules/2.4.30-rc2/kernel/drivers/usb/serial/usbserial.o
/lib/modules/2.4.30-rc2/kernel/drivers/usb/serial/usbserial.o: unresolved
symbol tty_ldisc_ref
/lib/modules/2.4.30-rc2/kernel/drivers/usb/serial/usbserial.o: unresolved
symbol tty_ldisc_deref

I see that the symbols are defined in the system.map

grep -i ' T .*tty_ldisc_.*ref' System.map
c01daae8 T tty_ldisc_ref_wait
c01dab6c T tty_ldisc_ref
c01dab8c T tty_ldisc_deref

grep 'tty_ldisc_.*ref' /proc/ksyms
shows that the name changes in /proc/ksyms to:
c01daae8 tty_ldisc_ref_wait_R__ver_tty_ldisc_ref_wait
c01dab6c tty_ldisc_ref_R__ver_tty_ldisc_ref
c01dab8c tty_ldisc_deref_R__ver_tty_ldisc_deref

# nm -og /lib/modules/2.4.30-rc2/kernel/drivers/usb/serial/usbserial.o | grep
'tty_ldisc_.*ref'
/lib/modules/2.4.30-rc2/kernel/drivers/usb/serial/usbserial.o: U
tty_ldisc_deref
/lib/modules/2.4.30-rc2/kernel/drivers/usb/serial/usbserial.o: U
tty_ldisc_ref

If I just look at the symbol tty_ldisc_deref I find that
usbserial is the only module I am using that is referencing in.
find $PWD -name '*.o' | xargs nm -og | grep tty_ldisc_dere
/lib/modules/2.4.30-rc2/kernel/drivers/usb/serial/usbserial.o: U
tty_ldisc_deref

grepping around in the kernel tree I see it exported from tty_io.c as:
EXPORT_SYMBOL_GPL(tty_ldisc_deref);

Why are some of the tty_ symbols exported _GPL, and others not?

Shouldn't I be able to build the usbserial driver as a module?
CONFIG_USB_SERIAL=m

I just checked and ALL the modules I'm loading are GPL
find /lib/modules/2.4.30-rc2 -name '*.o' | xargs modinfo -f
'%{license}:%{filename}\n'

....
GPL:/lib/modules/2.4.30-rc2/kernel/drivers/usb/serial/usbserial.o
...

cat /proc/version
Linux version 2.4.30-rc2 (***@dd) (gcc version egcs-2.91.66.1 19990314/Linux
(egcs-1.1.2 release)) #1 Sat Mar 26 08:52:31 PST 2005

ver_linux reports:
Gnu C egcs-2.91.66.1
Gnu make 3.79.1
binutils 2.10
util-linux 2.10o
mount 2.10o
modutils 2.4.2
e2fsprogs 1.25
Linux C Library 5.4.44
ldd: version 1.9.9
Linux C++ Library 27.2.1
Linux C++ Library 27.2.1
Procps 1.01
Net-tools 1.51
Kbd 0.89
Sh-utils 2.0
Modules Loaded usb-uhci usbcore 3c59x

processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 5
model name : Pentium II (Deschutes)
stepping : 1
cpu MHz : 397.333
cache size : 512 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat
pse36 mmx fxsr
bogomips : 792.98

# grep = .config

CONFIG_X86=y
CONFIG_UID16=y
CONFIG_EXPERIMENTAL=y
CONFIG_MODULES=y
CONFIG_MODVERSIONS=y
CONFIG_KMOD=y
CONFIG_M686=y
CONFIG_X86_WP_WORKS_OK=y
CONFIG_X86_INVLPG=y
CONFIG_X86_CMPXCHG=y
CONFIG_X86_XADD=y
CONFIG_X86_BSWAP=y
CONFIG_X86_POPAD_OK=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_X86_L1_CACHE_SHIFT=5
CONFIG_X86_HAS_TSC=y
CONFIG_X86_GOOD_APIC=y
CONFIG_X86_PGE=y
CONFIG_X86_USE_PPRO_CHECKSUM=y
CONFIG_X86_PPRO_FENCE=y
CONFIG_X86_F00F_WORKS_OK=y
CONFIG_X86_MCE=y
CONFIG_NOHIGHMEM=y
CONFIG_X86_TSC=y
CONFIG_NET=y
CONFIG_PCI=y
CONFIG_PCI_GOANY=y
CONFIG_PCI_BIOS=y
CONFIG_PCI_DIRECT=y
CONFIG_ISA=y
CONFIG_PCI_NAMES=y
CONFIG_SYSVIPC=y
CONFIG_SYSCTL=y
CONFIG_KCORE_ELF=y
CONFIG_BINFMT_AOUT=y
CONFIG_BINFMT_ELF=y
CONFIG_BINFMT_MISC=m
CONFIG_PM=y
CONFIG_PARPORT=m
CONFIG_PARPORT_PC=m
CONFIG_PARPORT_PC_CML1=m
CONFIG_PNP=m
CONFIG_ISAPNP=m
CONFIG_BLK_DEV_FD=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_RAM=m
CONFIG_BLK_DEV_RAM_SIZE=4096
CONFIG_BLK_STATS=y
CONFIG_PACKET=y
CONFIG_NETLINK_DEV=y
CONFIG_UNIX=y
CONFIG_INET=y
CONFIG_PHONE=m
CONFIG_IDE=y
CONFIG_BLK_DEV_IDE=y
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_BLK_DEV_IDECD=y
CONFIG_BLK_DEV_CMD640=y
CONFIG_BLK_DEV_CMD640_ENHANCED=y
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_IDEPCI_SHARE_IRQ=y
CONFIG_BLK_DEV_IDEDMA_PCI=y
CONFIG_BLK_DEV_IDEDMA=y
CONFIG_BLK_DEV_RZ1000=y
CONFIG_NETDEVICES=y
CONFIG_DUMMY=m
CONFIG_NET_ETHERNET=y
CONFIG_NET_VENDOR_3COM=y
CONFIG_EL3=y
CONFIG_VORTEX=m
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_SERIAL_NONSTANDARD=y
CONFIG_CYCLADES=m
CONFIG_UNIX98_PTYS=y
CONFIG_UNIX98_PTY_COUNT=256
CONFIG_MOUSE=y
CONFIG_PSMOUSE=y
CONFIG_NVRAM=m
CONFIG_RTC=m
CONFIG_VIDEO_DEV=m
CONFIG_AUTOFS_FS=y
CONFIG_REISERFS_FS=y
CONFIG_EXT3_FS=y
CONFIG_JBD=y
CONFIG_JBD_DEBUG=y
CONFIG_FAT_FS=m
CONFIG_MSDOS_FS=m
CONFIG_VFAT_FS=m
CONFIG_RAMFS=y
CONFIG_ISO9660_FS=m
CONFIG_JOLIET=y
CONFIG_ZISOFS=y
CONFIG_JFS_FS=y
CONFIG_JFS_DEBUG=y
CONFIG_JFS_STATISTICS=y
CONFIG_MINIX_FS=m
CONFIG_PROC_FS=y
CONFIG_DEVPTS_FS=y
CONFIG_EXT2_FS=y
CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
CONFIG_NFSD=y
CONFIG_NFSD_V3=y
CONFIG_SUNRPC=y
CONFIG_LOCKD=y
CONFIG_LOCKD_V4=y
CONFIG_SMB_FS=m
CONFIG_SMB_UNIX=y
CONFIG_ZISOFS_FS=m
CONFIG_MSDOS_PARTITION=y
CONFIG_SMB_NLS=y
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_ISO8859_1=y
CONFIG_VGA_CONSOLE=y
CONFIG_VIDEO_SELECT=y
CONFIG_SOUND=m
CONFIG_SOUND_OSS=m
CONFIG_SOUND_CS4232=m
CONFIG_SOUND_VMIDI=m
CONFIG_SOUND_SB=m
CONFIG_SOUND_YM3812=m
CONFIG_USB=m
CONFIG_USB_DEBUG=y
CONFIG_USB_DEVICEFS=y
CONFIG_USB_UHCI=m
CONFIG_USB_UHCI_ALT=m
CONFIG_USB_STV680=m
CONFIG_USB_SERIAL=m
CONFIG_USB_SERIAL_GENERIC=y
CONFIG_USB_SERIAL_BELKIN=m
CONFIG_USB_SERIAL_VISOR=m
CONFIG_USB_SERIAL_PL2303=m
CONFIG_DEBUG_KERNEL=y
CONFIG_DEBUG_STACKOVERFLOW=y
CONFIG_MAGIC_SYSRQ=y
CONFIG_LOG_BUF_SHIFT=0
CONFIG_ZLIB_INFLATE=m
CONFIG_ZLIB_DEFLATE=m
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



-------------------------------------------------------------------------------
Achtung: diese Newsgruppe ist eine unidirektional gegatete Mailingliste.
Antworten nur per Mail an die im Reply-To-Header angegebene Adresse.
Fragen zum Gateway -> ***@inka.de.
-------------------------------------------------------------------------------
Adrian Bunk
2005-03-26 19:17:08 UTC
Permalink
Post by David Dyck
I've been noticing that I'm still getting some "unresolved symbols"
with the 2.4.30 pre and rc series.
...
...
modutils 2.4.2
...
A modutils upgrade should fix your problems.

cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



-------------------------------------------------------------------------------
Achtung: diese Newsgruppe ist eine unidirektional gegatete Mailingliste.
Antworten nur per Mail an die im Reply-To-Header angegebene Adresse.
Fragen zum Gateway -> ***@inka.de.
-------------------------------------------------------------------------------
David Dyck
2005-03-26 20:40:34 UTC
Permalink
Post by Adrian Bunk
Post by David Dyck
I've been noticing that I'm still getting some "unresolved symbols"
with the 2.4.30 pre and rc series.
...
...
modutils 2.4.2
...
A modutils upgrade should fix your problems.
Thanks for suggestion - I hadn't noticed that it had slipped out of date.
I took your advice and upgraded to 2.4.27 and rebuild (from clean)
the kernel and modules again.

$ bash scripts/ver_linux
...
Linux dd 2.4.30-rc2 #2 Sat Mar 26 11:37:17 PST 2005 i686
...
modutils 2.4.27
...

I'm still getting unresolved symbol tty_ldisc_ref and tty_ldisc_deref

dd:linux# insmod usbserial
Using /lib/modules/2.4.30-rc2/kernel/drivers/usb/serial/usbserial.o
...: unresolved symbol tty_ldisc_ref
...: unresolved symbol tty_ldisc_deref

After changing CONFIG_USB, CONFIG_USB_UHCI, and CONFIG_USB_SERIAL
from modules (=m) to built-in (=y) and another clean rebuild
I am able to boot cleanly and load modules that depend on usbserial

I would really like to get usbserial to be a module again
without getting the "unresolved symbols" for
tty_ldisc_ref and tty_ldisc_deref

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



-------------------------------------------------------------------------------
Achtung: diese Newsgruppe ist eine unidirektional gegatete Mailingliste.
Antworten nur per Mail an die im Reply-To-Header angegebene Adresse.
Fragen zum Gateway -> ***@inka.de.
-------------------------------------------------------------------------------
David Dyck
2005-03-27 00:33:10 UTC
Permalink
Post by David Dyck
Post by Adrian Bunk
Post by David Dyck
I've been noticing that I'm still getting some "unresolved symbols"
with the 2.4.30 pre and rc series.
modutils 2.4.2
A modutils upgrade should fix your problems.
I took your advice and upgraded to 2.4.27 and rebuild (from clean)
the kernel and modules again.
$ bash scripts/ver_linux
modutils 2.4.27
I'm still getting unresolved symbol tty_ldisc_ref and tty_ldisc_deref
dd:linux# insmod usbserial
Using /lib/modules/2.4.30-rc2/kernel/drivers/usb/serial/usbserial.o
...: unresolved symbol tty_ldisc_ref
...: unresolved symbol tty_ldisc_deref
I tried again with 2.4.30-rc3, but this time I changed my .config
file to disable 2 other modules that I didn't need, and wasn't loading.

< CONFIG_USB_UHCI_ALT=m
< CONFIG_USB_STV680=m

and build rc3. It seems to work, so either my earlier
rc2 test with make clean wasn't clean-enough, or CONFIG_USB_UHCI_ALT
interferes - testing with CONFIG_USB_UHCI_ALT as a module (not loaded)
also works, so since interdiff didn't seem to highlite any difference
between rc2 and rc3, I'll suspect that my test make clean didn't
clean things up good enough, and the entire problem was as
Adrian Bunk suggest (upgrade modutils, thanks Adrian)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



-------------------------------------------------------------------------------
Achtung: diese Newsgruppe ist eine unidirektional gegatete Mailingliste.
Antworten nur per Mail an die im Reply-To-Header angegebene Adresse.
Fragen zum Gateway -> ***@inka.de.
-------------------------------------------------------------------------------
Jan Engelhardt
2005-03-27 08:36:17 UTC
Permalink
Post by David Dyck
I tried again with 2.4.30-rc3, but this time I changed my .config
file to disable 2 other modules that I didn't need, and wasn't loading.
< CONFIG_USB_UHCI_ALT=m
< CONFIG_USB_STV680=m
and build rc3. It seems to work, so either my earlier
[...]
As for the subject, it constantly happens to me that I get unresolved symbols
if I try to build a kernel with _*all*_ the bell's and whistles. There's
always something that is not updated.

Jan Engelhardt
--
No TOFU for me, please.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



-------------------------------------------------------------------------------
Achtung: diese Newsgruppe ist eine unidirektional gegatete Mailingliste.
Antworten nur per Mail an die im Reply-To-Header angegebene Adresse.
Fragen zum Gateway -> ***@inka.de.
-------------------------------------------------------------------------------
Willy Tarreau
2005-03-28 04:27:34 UTC
Permalink
Post by David Dyck
Post by David Dyck
dd:linux# insmod usbserial
Using /lib/modules/2.4.30-rc2/kernel/drivers/usb/serial/usbserial.o
...: unresolved symbol tty_ldisc_ref
...: unresolved symbol tty_ldisc_deref
I tried again with 2.4.30-rc3, but this time I changed my .config
file to disable 2 other modules that I didn't need, and wasn't loading.
< CONFIG_USB_UHCI_ALT=m
< CONFIG_USB_STV680=m
and build rc3. It seems to work, so either my earlier
rc2 test with make clean wasn't clean-enough, or CONFIG_USB_UHCI_ALT
interferes - testing with CONFIG_USB_UHCI_ALT as a module (not loaded)
also works, so since interdiff didn't seem to highlite any difference
between rc2 and rc3, I'll suspect that my test make clean didn't
clean things up good enough, and the entire problem was as
Adrian Bunk suggest (upgrade modutils, thanks Adrian)
I believe it's because of genksyms during the build process, I had the
exact same problem a few weeks ago on a machine with old modutils. So
you should have cleaned everything and rebuilt from scratch after
installing your new modutils. BTW, the required modutils in
Documentation/Changes is still marked as 2.4.10, I hope it is still
enough.

Regards,
Willy

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



-------------------------------------------------------------------------------
Achtung: diese Newsgruppe ist eine unidirektional gegatete Mailingliste.
Antworten nur per Mail an die im Reply-To-Header angegebene Adresse.
Fragen zum Gateway -> ***@inka.de.
-------------------------------------------------------------------------------
Keith Owens
2005-03-28 11:03:11 UTC
Permalink
On Mon, 28 Mar 2005 06:20:01 +0200,
Post by Willy Tarreau
I believe it's because of genksyms during the build process, I had the
exact same problem a few weeks ago on a machine with old modutils. So
you should have cleaned everything and rebuilt from scratch after
installing your new modutils. BTW, the required modutils in
Documentation/Changes is still marked as 2.4.10, I hope it is still
enough.
You need modutils >= 2.4.14 to use the combination of
CONFIG_MODVERSIONS with EXPORT_SYMBOL_GPL() on 2.4 kernels.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



-------------------------------------------------------------------------------
Achtung: diese Newsgruppe ist eine unidirektional gegatete Mailingliste.
Antworten nur per Mail an die im Reply-To-Header angegebene Adresse.
Fragen zum Gateway -> ***@inka.de.
-------------------------------------------------------------------------------
Willy TARREAU
2005-03-28 11:44:16 UTC
Permalink
Post by Keith Owens
On Mon, 28 Mar 2005 06:20:01 +0200,
Post by Willy Tarreau
I believe it's because of genksyms during the build process, I had the
exact same problem a few weeks ago on a machine with old modutils. So
you should have cleaned everything and rebuilt from scratch after
installing your new modutils. BTW, the required modutils in
Documentation/Changes is still marked as 2.4.10, I hope it is still
enough.
You need modutils >= 2.4.14 to use the combination of
CONFIG_MODVERSIONS with EXPORT_SYMBOL_GPL() on 2.4 kernels.
Thanks for the precision Keith.

So the following seems appropriate ?

--- ./Documentation/Changes.old Sat Mar 26 07:42:46 2005
+++ ./Documentation/Changes Mon Mar 28 13:35:06 2005
@@ -52,7 +52,7 @@
o Gnu make 3.77 # make --version
o binutils 2.9.1.0.25 # ld -v
o util-linux 2.10o # fdformat --version
-o modutils 2.4.10 # insmod -V
+o modutils 2.4.14 # insmod -V
o e2fsprogs 1.25 # tune2fs
o jfsutils 1.0.12 # fsck.jfs -V
o reiserfsprogs 3.6.3 # reiserfsck -V 2>&1|grep reiserfsprogs

Regards,
Willy

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



-------------------------------------------------------------------------------
Achtung: diese Newsgruppe ist eine unidirektional gegatete Mailingliste.
Antworten nur per Mail an die im Reply-To-Header angegebene Adresse.
Fragen zum Gateway -> ***@inka.de.
-------------------------------------------------------------------------------
Keith Owens
2005-03-28 14:58:02 UTC
Permalink
On Mon, 28 Mar 2005 13:37:31 +0200,
Post by Willy TARREAU
Post by Keith Owens
You need modutils >= 2.4.14 to use the combination of
CONFIG_MODVERSIONS with EXPORT_SYMBOL_GPL() on 2.4 kernels.
Thanks for the precision Keith.
So the following seems appropriate ?
--- ./Documentation/Changes.old Sat Mar 26 07:42:46 2005
+++ ./Documentation/Changes Mon Mar 28 13:35:06 2005
@@ -52,7 +52,7 @@
o Gnu make 3.77 # make --version
o binutils 2.9.1.0.25 # ld -v
o util-linux 2.10o # fdformat --version
-o modutils 2.4.10 # insmod -V
+o modutils 2.4.14 # insmod -V
o e2fsprogs 1.25 # tune2fs
o jfsutils 1.0.12 # fsck.jfs -V
o reiserfsprogs 3.6.3 # reiserfsck -V 2>&1|grep reiserfsprogs
Ack.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



-------------------------------------------------------------------------------
Achtung: diese Newsgruppe ist eine unidirektional gegatete Mailingliste.
Antworten nur per Mail an die im Reply-To-Header angegebene Adresse.
Fragen zum Gateway -> ***@inka.de.
-------------------------------------------------------------------------------
Loading...