]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Make sure DRD does not complain on executables with empty .plt and/or .got.plt sections.
authorBart Van Assche <bvanassche@acm.org>
Wed, 2 Jul 2008 11:47:46 +0000 (11:47 +0000)
committerBart Van Assche <bvanassche@acm.org>
Wed, 2 Jul 2008 11:47:46 +0000 (11:47 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8334

exp-drd/drd_main.c

index 607331c8bc21149fbf87524e136ab4dd1ce813d8..d1fdd98fff4a8f1a583ecb399a3765162d439462 100644 (file)
@@ -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);