And the fcntl command to the VG_(fcntl) error message.
Clean up a few comments.
* The other use is at startup in order to get the mapping for the
* tool itself. In this case we have a fairly big problem. There is
* a difference in the mapping used when the kernel loads an exe
- * and when the link loader ldrt (or Valgrind which does the same
- * job for the guest exe. In the case of ldrt, all ELF PT_LOAD
+ * and when the link loader rtld (or Valgrind which does the same
+ * job for the guest exe). In the case of rtld, all ELF PT_LOAD
* sections get mmap'd. The kernel, however, does _not_ mmap
* the RW PT_LOAD.
*
return 0;
/* If the file doesn't have a name, we're hosed. Give up. */
+ /*
+ * Maybe not. Since bug 280965 we may have the fd, and if we
+ * do have the fd we use that rather than the filename to
+ * get ELF info. The filename is used in several places but I think
+ * that it is not obligatory and when we have just the fd we could
+ * get by.
+ */
filename = VG_(am_get_filename)( seg );
if (!filename)
return 0;
}
if (VG_(resolved_exename) == NULL) {
- VG_(resolved_exename) = VG_(strdup)("initimg-freebsd.sre.1", resolved_name);
+ VG_(resolved_exename) = VG_(strdup)("initimg-freebsd.scs.1", resolved_name);
}
return client_SP;
# error "Unknown OS"
# endif
if (sr_isError(res)) {
- VG_(debugLog)(1, "VG_(fcntl)", "fcntl error %lu %s\n", sr_Err(res), VG_(strerror)(sr_Err(res)));
+ VG_(debugLog)(1, "VG_(fcntl)", "fcntl cmd %d error %lu %s\n", cmd, sr_Err(res), VG_(strerror)(sr_Err(res)));
return -1;
}
return (Int)sr_Res(res);