From: Bart Van Assche Date: Wed, 2 Jul 2008 11:47:46 +0000 (+0000) Subject: Make sure DRD does not complain on executables with empty .plt and/or .got.plt sections. X-Git-Tag: svn/VALGRIND_3_4_0~390 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=97dc9c504272a58f119b670030a33e728533de54;p=thirdparty%2Fvalgrind.git Make sure DRD does not complain on executables with empty .plt and/or .got.plt sections. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8334 --- diff --git a/exp-drd/drd_main.c b/exp-drd/drd_main.c index 607331c8bc..d1fdd98fff 100644 --- a/exp-drd/drd_main.c +++ b/exp-drd/drd_main.c @@ -524,7 +524,7 @@ static void suppress_relocation_conflicts(const Addr a, const SizeT len) avma = VG_(seginfo_get_plt_avma)(di); size = VG_(seginfo_get_plt_size)(di); - if (a <= avma && avma + size <= a + len) + if (size > 0 && a <= avma && avma + size <= a + len) { #if 0 VG_(printf)("Suppressing .plt @ 0x%lx size %ld\n", avma, size); @@ -535,7 +535,7 @@ static void suppress_relocation_conflicts(const Addr a, const SizeT len) avma = VG_(seginfo_get_gotplt_avma)(di); size = VG_(seginfo_get_gotplt_size)(di); - if (a <= avma && avma + size <= a + len) + if (size > 0 && a <= avma && avma + size <= a + len) { #if 0 VG_(printf)("Suppressing .got.plt @ 0x%lx size %ld\n", avma, size);