Skip to contentSkip to conversation

compiling with -g changes symbol addresses

DISCUSSION devnetfs 1 participant 1 message Jul 3, 2003

lore
Share & tools
lore

devnetfs

author
#0 lore raw

Hello,

Sorry if this is NOT related to kernel per se. but...

Compiling a kernel module with and without "-g" gcc flag, (rest of the compiler flags remaining exactly the same/usual) changes the offsets/addresses of some (not all) symbols [saw using nm(1)].

Is this normal? I thought "-g" just adds debug info into the object file. and it should not change the offsets/addresses that symbols get assigned during compilation.

btw I am using gcc 2.96 (from RH).

Thanks
A.
[Pleas Cc: me the reply]

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com