Unix Technical Forum

System.map

This is a discussion on System.map within the Gentoo Linux Support forums, part of the Unix Operating Systems category; --> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 newbie question: for wich purposes we use map=/boot/System.map in /etc/lilo.conf? System.map is a ...


Go Back   Unix Technical Forum > Unix Operating Systems > Gentoo Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-21-2008, 08:34 AM
Hekaton
 
Posts: n/a
Default System.map

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

newbie question: for wich purposes we use

map=/boot/System.map

in /etc/lilo.conf? System.map is a file containing all the object symbols
compiled in kernel? So when i experience "unresolved symbol bla_bla.o" on
loading a module from kernel tree - the possible solution is to include
this entry in lilo.conf?

But if i have several image=... entries in lilo.conf is it possible to use
map as a suboption for that image?

PS: i've tried to use map after image in that way...
image=/boot/kernel-blabla
map=/boot/System.map-blabla...
but lilo returns sintattic errors

regards
- --
remove mailto__ when mailing
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iQCVAwUBQNgZko2jA3cwNRl/AQKSnAQAj5rrpvkQy01cIlkb2kD+3I0kugwQli+J
yaSGG8uL6y3p0qNlEB2itjsqSnEXgLdSkmoUf+uAmrspJ4DGH2 nUHMidmv97UCOO
tGL85z7GKdkqzlkVz9T2GJ6lpqkku8z1BPJZSztSxMPuMWeioW VhO/Llz1Qd1qm/
sbPU1uS7uJk=
=IfDY
-----END PGP SIGNATURE-----
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-21-2008, 08:34 AM
walt
 
Posts: n/a
Default Re: System.map

Hekaton <mailto_hekatonkeires@hotmail.com> writes:

> newbie question: for wich purposes we use
>
> map=/boot/System.map
>
> in /etc/lilo.conf? System.map is a file containing all the object symbols
> compiled in kernel? So when i experience "unresolved symbol bla_bla.o" on
> loading a module from kernel tree - the possible solution is to include
> this entry in lilo.conf?
>
> But if i have several image=... entries in lilo.conf is it possible to use
> map as a suboption for that image?
>
> PS: i've tried to use map after image in that way...
> image=/boot/kernel-blabla
> map=/boot/System.map-blabla...
> but lilo returns sintattic errors


I think maybe nobody understood your question. I have not used
LILO for fifteen years or so, so maybe I'm very much out of date.

I never heard of the 'map' parameter for LILO -- but I am out of
touch with LILO.

If you have 'unresolved symbol' errors I would suspect that you
need to make sure that your /boot/vmlinux-xxx matches your
/lib/modules/xxx modules. When in doubt just recompile the
kernel and do a 'make modules_install' from the source directory
to re-install all the kernel modules.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-21-2008, 08:34 AM
Hekaton Keires
 
Posts: n/a
Default Re: System.map

walt wrote:

> If you have 'unresolved symbol' errors I would suspect that you
> need to make sure that your /boot/vmlinux-xxx matches your
> /lib/modules/xxx modules. When in doubt just recompile the
> kernel and do a 'make modules_install' from the source directory
> to re-install all the kernel modules.


i did it yet... my problem is: when i'm trying to compile some parts as
modules; even if i recompile, reboot, and check modules... i still cannot
do insmod modules.

this behaviour is actually constant with af_packet.o, unix.o, some modules
relating to ip_tables and ide-cd.o

ip_tables, gives me errors on insmod with 2.4.25-gentoo-r3 kernel even if
it's ok with 2.4.21 kernel.

the problem is the same:"unresolved symbols"... even if in System.map it is
clearly reported that the requested symbol is compiled in.

--
remove mailto__ on replying
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-21-2008, 08:35 AM
student
 
Posts: n/a
Default Re: System.map

Hekaton wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> newbie question: for wich purposes we use
>
> map=/boot/System.map
>
> in /etc/lilo.conf? System.map is a file containing all the object symbols
> compiled in kernel?


'System.map' has nothing to do with LILO and lilo.conf.

'System.map' gets created when you compile the kernel and is read by
'klogd'
during bootup (see /var/log/messages right after the line that says
'restart',
see also `man klogd').

The file '/boot/map' gets created (by lilo) when you execute the
'lilo' command.

I don't know what role '/boot/map' plays in the boot process but it is
not something
I have ever needed top know. It is is named '/boot/map' by default but
if for some reason
wanted it to be named something else, you could put

map=<filename>

in your lilo.conf.

> But if i have several image=... entries in lilo.conf is it possible to use
> map as a suboption for that image?
>


When you execute the command

/sbin/lilo

'lilo' reads your current /etc/lilo.conf and (among other things) creates
a corresponding /boot/map.

One input lilo.conf file makes one output /boot/map file.

> So when i experience "unresolved symbol bla_bla.o" on
> loading a module from kernel tree - the possible solution is to include
> this entry in lilo.conf?
>


This is a separate question. I suggest you come back to it after you
get your lilo setup
all straightened out.

bill
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-21-2008, 08:35 AM
Todd
 
Posts: n/a
Default Re: System.map

On Wed, 23 Jun 2004 11:35:53 +0200, Hekaton Keires wrote:

> walt wrote:
>
>> If you have 'unresolved symbol' errors I would suspect that you need to
>> make sure that your /boot/vmlinux-xxx matches your /lib/modules/xxx
>> modules. When in doubt just recompile the kernel and do a 'make
>> modules_install' from the source directory to re-install all the kernel
>> modules.

>
> i did it yet... my problem is: when i'm trying to compile some parts as
> modules; even if i recompile, reboot, and check modules... i still cannot
> do insmod modules.
>
> this behaviour is actually constant with af_packet.o, unix.o, some modules
> relating to ip_tables and ide-cd.o
>
> ip_tables, gives me errors on insmod with 2.4.25-gentoo-r3 kernel even if
> it's ok with 2.4.21 kernel.
>
> the problem is the same:"unresolved symbols"... even if in System.map it
> is clearly reported that the requested symbol is compiled in.


There is the more common case where you simply have a dependency problem,
a module requires some other module included first. Read the message and
if the thing its complaining about is in a module, make sure it is
included earlier.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-21-2008, 08:36 AM
walt
 
Posts: n/a
Default Re: System.map

Todd <no0ne@none.com> writes:

> On Wed, 23 Jun 2004 11:35:53 +0200, Hekaton Keires wrote:
>
> > walt wrote:
> >
> >> If you have 'unresolved symbol' errors I would suspect that you need to
> >> make sure that your /boot/vmlinux-xxx matches your /lib/modules/xxx
> >> modules. When in doubt just recompile the kernel and do a 'make
> >> modules_install' from the source directory to re-install all the kernel
> >> modules.

> >
> > i did it yet... my problem is: when i'm trying to compile some parts as
> > modules; even if i recompile, reboot, and check modules... i still cannot
> > do insmod modules.
> >
> > this behaviour is actually constant with af_packet.o, unix.o, some modules
> > relating to ip_tables and ide-cd.o
> >
> > ip_tables, gives me errors on insmod with 2.4.25-gentoo-r3 kernel even if
> > it's ok with 2.4.21 kernel.
> >
> > the problem is the same:"unresolved symbols"... even if in System.map it
> > is clearly reported that the requested symbol is compiled in.

>
> There is the more common case where you simply have a dependency problem,
> a module requires some other module included first. Read the message and
> if the thing its complaining about is in a module, make sure it is
> included earlier.


I've been out of touch for a few days, sorry.

Some of these problems are linux-distribution-specific, and some are not.

When discussing gentoo-linux specifically the most common problem I have
seen is caused by the separate /boot partition.

The common error is to compile and install a new kernel in the /boot
directory WITHOUT mounting the /boot partion on the /boot directory
FIRST.

The net result is that the new kernel is installed in the /boot directory
on the root partition which is NOT where is kernel is loaded from!

The/boot partition must be mounted on the /boot directory BEFORE the
new kernel is installed. Otherwise you will be booting an OLD kernel
instead of the new kernel you were expecting -- hence the 'unresolved
symbol' errors.

This is really very confusing. It takes experience and many mistakes
before you understand the real issues!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-21-2008, 08:36 AM
Hekaton Keires
 
Posts: n/a
Default Re: System.map

student wrote:

> 'System.map' has nothing to do with LILO and lilo.conf.


[cut]

in fact you're right, after brief reading i've seen that

map=/boot/map

is just for helping some old bioses managing lba32 geometry, and some other
stuff; anyway it has nothing to do with syms compiled in kernel.

meanwhile the /usr/src/linux/System.map is just a list of ksyms... you can
see it in Makefile on the root source tree:


588: $(NM) vmlinux | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\
\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map

thx for replying.

--
remove mailto__ on replying
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-21-2008, 08:36 AM
Hekaton Keires
 
Posts: n/a
Default Re: System.map

walt wrote:

> The common error is to compile and install a new kernel in the /boot
> directory WITHOUT mounting the /boot partion on the /boot directory
> FIRST.
>
> The net result is that the new kernel is installed in the /boot directory
> on the root partition which is NOT where is kernel is loaded from!
>
> The/boot partition must be mounted on the /boot directory BEFORE the
> new kernel is installed. Otherwise you will be booting an OLD kernel
> instead of the new kernel you were expecting -- hence the 'unresolved
> symbol' errors.
>
> This is really very confusing. It takes experience and many mistakes
> before you understand the real issues!


i had no problem in installing new kernel, even because i install it always
manually... so it was trivially mounting first of all /boot partition.
anyway the problem persists, unfortunately.

thx for replying

--
remove mailto__ on replying
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-21-2008, 08:36 AM
Hekaton Keires
 
Posts: n/a
Default Re: System.map

Todd wrote:

>
> There is the more common case where you simply have a dependency problem,
> a module requires some other module included first. Read the message and
> if the thing its complaining about is in a module, make sure it is
> included earlier.


and how should i verify the dependencies? the only thing i've done is just
looking for the error reported:

i.g. when i try to insmod ip_tables, i get a problem:

unresolved symbol nf_unregister_sockopt

so i try to see symbols exported from the kernel

# grep nf_unregister_sockopt /proc/ksyms
c029ecb0 nf_unregister_sockopt_R__ver_nf_unregister_sockopt

so, doesn't it mean that the required symbol is yet exported so i shouldn't
have problems in insmod? otherwise it doesn't seem that there is some other
dependency...

when i do
/usr/src/linux # grep EXPORT_SYMBOL(nf_unregister_sockopt)
net/netsyms.c:EXPORT_SYMBOL(nf_unregister_sockopt);

i think that this means that the only file ip_tables.o depends from is
netsyms.o which should be already compiled in kernel, otherwise we couldn't
even see nf_unregister_sockopt in ksyms... or should i see something else?

maybe netsyms requires gr_security option enabled on? even if with older
kernel i do not have this kinda probs.

thx for replying

--
remove mailto__ on replying
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 03:46 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com