X-Git-Url: http://git.megacz.com/?p=nestedvm.git;a=blobdiff_plain;f=src%2Forg%2Fibex%2Fnestedvm%2Futil%2FELF.java;h=36fc4ebbd6bf2865e0ac288b5448b49527396963;hp=9d4c86262c51b1128f2085a537cf9c933d4ab97a;hb=b4cee44bea4853f5c0f7cb3b331aecb84ef3aa3e;hpb=c2b2704764af1ade923ba8f15d517b87f9d16189 diff --git a/src/org/ibex/nestedvm/util/ELF.java b/src/org/ibex/nestedvm/util/ELF.java index 9d4c862..36fc4eb 100644 --- a/src/org/ibex/nestedvm/util/ELF.java +++ b/src/org/ibex/nestedvm/util/ELF.java @@ -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"); } - } + }*/ }