2004/01/14 01:44:21
[org.ibex.core.git] / src / org / xwt / mips / ELF.java
index 12821f0..5de3a0b 100644 (file)
@@ -143,8 +143,11 @@ public class ELF {
     }
     
     public ELF(Object img) throws IOException, ELFException {
-        if (img instanceof String) image = new MyRandomAccessFile((String)img,"r");
-        image = img;
+        if (img instanceof String) {
+            image = fd = new MyRandomAccessFile((String)img, "r");
+        } else {
+            image = img;
+        }
         seek(0);
         header = new ELFHeader();
         pheaders = new PHeader[header.phnum];
@@ -185,7 +188,7 @@ public class ELF {
     public class ELFException extends IOException { ELFException(String s) { super(s); } }
     
     private class MyRandomAccessFile extends RandomAccessFile  {
-        MyRandomAccessFile(String f,String m) throws FileNotFoundException { super(f,m); }
+        MyRandomAccessFile(String f,String m) throws IOException { super(f,m); }
     }
     
     private class SectionInputStream extends InputStream {