|
From: Keith H. <kei...@ve...> - 2005-11-29 05:39:38
|
Tom,
Thanks for the note. After more research I was able to get it compiled. See
inline:
-----Original Message-----
From: val...@li...
[mailto:val...@li...]On Behalf Of Tom
Hughes
Sent: Monday, November 28, 2005 5:16 PM
To: val...@li...
Subject: Re: [Valgrind-users] Compiling Valgrind with Stack Protector
Enabled in LIBC
In message <IEE...@ve...>
<la...@ve...> wrote:
> Does valgrind work with stack guard protector enabled in LIBC? It would
seem
> as if they both are competing for the same job except one is for debugging
> and the other is for protection.
We don't use libc in valgrind so it shouldn't matter to valgrind. Without
knowing how it works I can't say if it will work in a program run under
valgrind but it probably will.
> make[4]: Leaving directory `/root/valgrind-3.1.0/VEX'
> gcc -m32 -mpreferred-stack-boundary=2 -O -g
> -Wmissing-prototypes -Winline -Wall -Wshadow -Wpointer-arith-Wstrict-proto
ty
>
pes -Wmissing-declarations -fno-stack-protector-all -Wno-long-long-Wdeclarat
> ion-after-statement -o
>
memcheck-x86-linux -static -Wl,-defsym,valt_load_address=0xb0000000 -nodefau
> ltlibs -nostartfiles -u
> _start -m32 -Wl,-T,../valt_load_address_x86_linux.lds
> memcheck_x86_linux-mac_leakcheck.o
> memcheck_x86_linux-mac_malloc_wrappers.o
> memcheck_x86_linux-mc_main.o memcheck_x86_linux-mac_shared.o
> memcheck_x86_linux-mc_translate.o
> ../coregrind/libcoregrind_x86_linux.a
> ../VEX/libvex_x86_linux.a -lgcc
> /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libgcc.a(_udivdi3.oS): In
> function `__udivdi3':
> ../../gcc-3.4.4/gcc/libgcc2.c:1127: undefined reference to
> `__guard'
> ../../gcc-3.4.4/gcc/libgcc2.c:1129: undefined reference to
> `__stack_smash_handler'
Your libgcc has references to __guard and __stack_smash_handler
which are not being satisfied - what library are those routines in?
__guard and __stack_smash_handler are defined in libc.so and libc.a.
GCC was also created with these two routines. Since Valgrind does not
use libc.so/a I had to provide a copy of libgcc.a without Stack Smashing
Protector support.
Things compiled ok from there.
Thanks again for your assistance.
-kh
If they are in glibc then you have a problem as we deliberately do
not link with that. The code in libgcc is compiler support code and
should not really be relying on glibc.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Valgrind-users mailing list
Val...@li...
https://lists.sourceforge.net/lists/listinfo/valgrind-users
|