Common subdirectories: makedumpfile.org/dwarfinfo and makedumpfile/dwarfinfo
diff -puN makedumpfile.org/makedumpfile.c makedumpfile/makedumpfile.c
--- makedumpfile.org/makedumpfile.c	2006-09-21 21:11:48.000000000 +0900
+++ makedumpfile/makedumpfile.c	2006-09-21 21:17:07.000000000 +0900
@@ -2197,7 +2197,7 @@ write_pages(struct DumpInfo *info)
 	unsigned int flag_change_bitmap = 0;
 	unsigned long size_out;
 	struct page_desc pd;
-	off_t offset_data = 0;
+	off_t offset_data = 0, offset_memory = 0;
 	struct disk_dump_header *dh = info->dump_header;
 	unsigned char *buf = NULL, *buf_out = NULL;
 	struct cache_data bm2, pdesc, pdata;
@@ -2325,16 +2325,16 @@ write_pages(struct DumpInfo *info)
 		/*
 		 * Check the excluded page.
 		 */
-		if (!is_dumpable(&bitmap2, pfn)) {
-			if (lseek(info->fd_memory, info->page_size, SEEK_CUR)
-			    == failed) {
-				ERRMSG("Can't seek the dump memory(%s). %s\n",
-				    info->name_memory, strerror(errno));
-				goto out;
-			}
+		if (!is_dumpable(&bitmap2, pfn))
 			continue;
-		}
 
+		offset_memory = paddr_to_fileoffset(info, info->page_size*pfn);
+		if (lseek(info->fd_memory, offset_memory, SEEK_SET)
+		    == failed) {
+			ERRMSG("Can't seek the dump memory(%s). %s\n",
+			    info->name_memory, strerror(errno));
+			goto out;
+		}
 		if (read(info->fd_memory, buf, info->page_size)
 		    != info->page_size) {
 			ERRMSG("Can't read the dump memory(%s). %s\n",
