Re: Multiple symbols same address in vmlinux map file? huh?

Michael Driscoll
2003-08-06T21:09:14Z

On Wednesday 06 August 2003 08:32, Richard B. Johnson wrote:
> On Wed, 6 Aug 2003, Andy Winton wrote:
> > nm vmlinux-2.4.18-14 | awk 'BEGIN{oldval=01;} { if ($1==oldval) {
> > if(plast) { print "\n"; print oldrow;} print $0; plast=0} else plast=1;
> > oldrow=$0; oldval=$1}' - | more

[snip]

> c01fd9c0 D i8259A_lock
> c01fd9e0 d i8259A_irq_type
>
> These are (correctly) at different addresses, but the static
> structure is still visible, which must not happen! So, you
> have certainly discovered something that's not right. Perhaps
> the 'd' stuff is "really" not visible? If so, what 'th..???

In nm(1) output, uppercase symbol types means the name is externally
available, lowercase symbol means it is local.

Even if an object is local, the object file still knows its name (for ELF,
anyways). Finding local "static" variables would be very annoying otherwise,
for porting code to a threaded application :)

--
Michael Driscoll, fenris@ulfheim.net
"A noble spirit embiggens the smallest man" -- J. Springfield