Re: /proc/1/maps

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





> the /proc/1/maps file contains the list of libraries,
> executables etc that form the text image of the init
> process.
> 
> also command "ldd /sbin/init" will show the list of
> shared libraries of the init. 
> 
> but both are not same.i.e the libraries in
> /proc/1/maps file and the libaries shown when "ldd
> /sbin/init" command is executed are not same.
> 
> why is that so.?? if anybody know the reason tell me.

  They are not different. They appear different because sometimes
what ldd displays is a symbolic link and what you see in /proc is 
the actual filename.

ldd looks for a specific name (what was used when linknig the
executable) and prints that name if it finds a corresponding
directory entry. It doesn't follow symbolic links to get to the
actual file name. /proc/*/maps does a lookup based on the inode,
so it finds the actual file rather than the symbolic link.

-Ravi.

__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux