Hi John,
Turning off vdso(*echo 0 > /proc/sys/vm/vdso_enabled)* in the kernel helped
to load the executable at the desired fixed location.
However valgrind is failing to load the debuginfo.
==22096== Memcheck, a memory error detector
==22096== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==22096== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==22096== Command: myapp
==22096==
--22096-- Valgrind options:
--22096-- -v
--22096-- Contents of /proc/version:
--22096-- Linux version 2.6.35-22-generic (buildd@rothera) (gcc version
4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu4) ) #33-Ubuntu SMP Sun Sep 19 20:34:50
UTC 2010
--22096-- Arch and hwcaps: X86, x86-sse1-sse2
--22096-- Page sizes: currently 4096, max supported 4096
--22096-- Valgrind library directory:
/home/vijay/Downloads/valgrind/lib/valgrind
--22096-- Reading syms from /home/vijay/Downloads/myapp (0x48000)
==22096== warning: mmap failed on /home/vijay/Downloads/myapp
==22096== no symbols or debug info loaded
Any workaround for this ? Is it advisable to turn off VDSO ?
Btw app type is EXEC
vijay:/home/vijay/Downloads/valgrind/bin]$ readelf --file-header myapp |
grep Type
Type: EXEC (Executable file)
Vijay Nag
On Fri, Sep 28, 2012 at 6:14 PM, John Reiser <[email protected]> wrote:
> > Valgrind's VDSO collides with my executables load section. Is it
> possible to relocate load VDSO ?
>
> [vdso] was put there by the kernel during the execve() which created
> the current address-space layout, before valgrind itself executes any
> instruction.
> If you don't like [vdso] there, then you should adjust
> /proc/sys/vm/legacy_va_layout .
> (Still, valgrind's address-space manager should handle the collision
> better.)
>
> >
> > Below are my executables phdr details.
>
> You left out the most important part, which is whether the file is ET_EXEC
> or ET_DYN:
> $ readelf --file-header ./my_app | grep Type:
>
> > Program Headers:
>
> > * LOAD 0x000000 0x00048000 0x00048000 0xe6aff14 0xe6aff14 R E
> 0x1000*
>
> The VirtAddr of PT_LOAD for an ET_DYN module is relocatable by sliding
> the whole module.
> The VirtAddr of PT_LOAD for an ET_EXEC module must not be changed.
>
> --
>
>
>
> ------------------------------------------------------------------------------
> Got visibility?
> Most devs has no idea what their production app looks like.
> Find out how fast your code is with AppDynamics Lite.
> http://ad.doubleclick.net/clk;262219671;13503038;y?
> http://info.appdynamics.com/FreeJavaPerformanceDownload.html
> _______________________________________________
> Valgrind-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/valgrind-users
>
------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users