Re: Stripped v Debug

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

 



Hi Adrian...

On Fri, Sep 11, 2009 at 8:39 PM, Adrian Cornish <adrianc@xxxxxxx> wrote:
> Hi All,
>
> Please excuse me if this is incorrect list.
>
> How/where should I look in kernel source to see how Linux loads binaries
> and whether debug symbols are using physical RAM if they are included in
> executable.
>
> Or is kernel smart enough to skip all debug symbols and only load needed
> Text page into ram.
>
> This is for x84_64 and i686 type kernels with gcc/gdb
>

Try to check fs/binfmt_elf.c, especially the load_elf_binary() function.

Also, remember that file blocks are read on-demand, that means if they
are not needed, then it won't be loaded to RAM. So, even if your
binary has debug symbols, it won't occupy RAM unless they are read
(e.g when gdb need to correlate address with symbols)

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer
blog: the-hydra.blogspot.com

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at 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