Hi Adrian...

On Fri, Sep 11, 2009 at 8:39 PM, Adrian Cornish <[email protected]> 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 [email protected]
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to