size check
[nestedvm.git] / src / org / ibex / nestedvm / util / ELF.java
index 9d4c862..36fc4eb 100644 (file)
@@ -326,6 +326,7 @@ public class ELF {
         public byte type;
         public byte binding;
         public byte other;
+        public short shndx;
         public SHeader sheader;
         
         public final static int STT_FUNC = 2;
@@ -339,14 +340,13 @@ public class ELF {
             type = (byte)(info&0xf);
             binding = (byte)(info>>4);
             other = readByte();
-            // FEATURE: This should point to some other entry or something
-            readShort();
+            shndx = readShort();
         }
     }
     
     private static String toHex(int n) { return "0x" + Long.toString(n & 0xffffffffL, 16); }
     
-    public static void main(String[] args) throws IOException {
+    /*public static void main(String[] args) throws IOException {
         ELF elf = new ELF(new Seekable.InputStream(new FileInputStream(args[0])));
         System.out.println("Type: " + toHex(elf.header.type));
         System.out.println("Machine: " + toHex(elf.header.machine));
@@ -376,5 +376,5 @@ public class ELF {
         } else {
             System.out.println("Symbol table: None");
         }
-    }
+    }*/
 }