LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-21-2008, 02:04 AM   #1
siddharthaswaroop
LQ Newbie
 
Registered: Mar 2008
Posts: 1

Rep: Reputation: 0
i have some questions on symbol table


hello
i had inserted my module to the kernel.The symbol table of this is

0000000000000000 a hello.c [hello]
ffffffff88515000 t hello_exit [hello]
ffffffff8851500e t hello_init [hello]
ffffc2000013e0a0 ? __mod_license3 [hello]
0000000000000000 a hello.mod.c [hello]
ffffc2000013e0c0 ? __mod_srcversion30 [hello]
ffffc2000013e0e3 ? __module_depends [hello]
ffffffff88515060 r ____versions [hello]
ffffc2000013e100 ? __mod_vermagic5 [hello]
ffffffff88515480 d __this_module [hello]
ffffffff88515000 t cleanup_module [hello]
ffffffff8851500e t init_module [hello]
ffffffff80233e64 u printk [hello]
ffffffff884c3b5d t br_hello_timer_expired [bridge]
ffffffff884c4930 t show_hello_timer [bridge]
ffffffff884c4a43 t store_hello_time [bridge]
ffffffff884c4d86 t set_hello_time [bridge]
ffffffff884c4b57 t show_hello_time [bridge]
ffffffff884ccf40 d dev_attr_hello_time [bridge]
ffffffff884cd200 d dev_attr_hello_timer [bridge]

my questions are:
1>At first row why the hello.c file is mensioned in the symbol
table,similarly hello.mod.c file also.
2>why _mod_license3 is of type "?".
3>why printk is of type "u".
 
Old 03-21-2008, 02:25 AM   #2
digvijay.gahlot
Member
 
Registered: Mar 2008
Posts: 53

Rep: Reputation: 15
I 'm just guessing. There segments loaded while you load module in kernel. They are .bss, .data, .text. You can find them in /sys/modules/<module-name>/sections/.*
So the symbols with d before them belongs to data and t before them belong to text.
 
Old 03-21-2008, 06:38 AM   #3
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
The symbols listed as undefined are those that the kernel will supply, e.g. printk. It's pretty much the same as linking to a shared library to use a particular function such as printf.
ta0kira
 
Old 03-21-2008, 07:44 PM   #4
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 78
If you want to know exactly what those initials mean, look at
Code:
man nm
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to read the symbol table bahadur Programming 1 07-14-2006 02:05 AM
Symbol-table for debugging while using make? JZL240I-U Programming 2 04-27-2006 04:17 AM
symbol table Filipe Linux - Newbie 1 01-04-2006 01:15 PM
gdbserver problem: no symbol table whepin Linux - Laptop and Netbook 0 06-24-2005 09:48 PM
question about symbol table and nm command.. doublefailure Programming 1 01-15-2003 09:52 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration