]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Make the request for space for the interpreter into a hint so that we
authorTom Hughes <tom@compton.nu>
Tue, 1 Nov 2005 19:46:07 +0000 (19:46 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 1 Nov 2005 19:46:07 +0000 (19:46 +0000)
can still proceed if the preferred load address is not available.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4980

coregrind/m_ume.c

index 3c63c9d78d90f58ecce2f3f4ff2f3a939b028964..d634cc4eaeb07cbc11a7de5db586058fd5db5dce 100644 (file)
@@ -438,6 +438,7 @@ static Int load_ELF(Int fd, const char *name, /*MOD*/struct exeinfo *info)
 
    if (interp != NULL) {
       /* reserve a chunk of address space for interpreter */
+      MapRequest mreq;
       Addr       advised;
       Bool       ok;
 
@@ -447,9 +448,10 @@ static Int load_ELF(Int fd, const char *name, /*MOD*/struct exeinfo *info)
          the specified address.  This is a bit of hack, but it should
          work because there should be no intervening transactions with
          aspacem which could cause those fixed maps to fail. */
-      advised = VG_(am_get_advisory_client_simple)( 
-                   (Addr)interp_addr, interp_size, &ok 
-                );
+      mreq.rkind = MHint;
+      mreq.start = interp_addr;
+      mreq.len = interp_size;
+      advised = VG_(am_get_advisory)( &mreq, True/*client*/, &ok );
       if (!ok) {
          /* bomb out */
          SysRes res = VG_(mk_SysRes_Error)(VKI_EINVAL);