[Nestedvm] constant pool full

David Ehrmann ehrmann at gmail.com
Fri Jun 18 12:31:14 EDT 2010


It worked!  That error is gone!


But I have a new error:

Exception in thread "main" java.lang.IllegalStateException: unresolved
phantom target
        at org.ibex.classgen.MethodGen.resolveTarget(MethodGen.java:555)
        at org.ibex.classgen.MethodGen._generateCode(MethodGen.java:664)
        at org.ibex.classgen.MethodGen.generateCode(MethodGen.java:618)
        at org.ibex.classgen.MethodGen.dump(MethodGen.java:888)
        at org.ibex.classgen.ClassFile._dump(ClassFile.java:193)
        at org.ibex.classgen.ClassFile.dump(ClassFile.java:160)
        at org.ibex.nestedvm.ClassFileCompiler.__go(ClassFileCompiler.java:380)
        at org.ibex.nestedvm.ClassFileCompiler._go(ClassFileCompiler.java:72)
        at org.ibex.nestedvm.Compiler.go(Compiler.java:259)
        at org.ibex.nestedvm.Compiler.main(Compiler.java:183)

This is with the 2009-08-09 version.  I googled for the error, and it
seems like it was fixed, but this was in 2007, so I'm guessing this is
an unrelated issue.


On Wed, Jun 16, 2010 at 11:47 PM, Bertram, Alexander
<alex at bedatadriven.com> wrote:
> It's actually an argument to the org.ibex.nestedvm.Compiler, not gcc.
> Here is the step from my Makefile:
> RBinary.class: $(R_binary)
>         java -Xmx512m \
>                 -cp
> "C:/Users/Owner/dev/p/nestedvm.ibex.org/build;C:/Users/Owner
> /dev/p/nestedvm.ibex.org/upstream/build/classgen/build;" \
>                  org.ibex.nestedvm.Compiler \
>                 -o lessConstants \
>                 -o printStats \
>                 -o maxInsnPerMethod=256 \
>                 -o runtimeClass=org.ibex.nestedvm.RRuntime \
>                 -outfile RBinary.class \
>                 com.bedatadriven.stat.r.RBinary \
>                 $(R_binary)
> HTH
> On Thu, Jun 17, 2010 at 1:21 AM, David Ehrmann <ehrmann at gmail.com> wrote:
>>
>> I couldn't find the -lessconstants flag, but there were a few others
>> that reduced symbol count.  I tried the -Os (optimize for size) flag
>> and got my binary down to 2858 symbols, but I still filled up the
>> constant pool.
>>
>> On Wed, Jun 16, 2010 at 12:07 PM, Bertram, Alexander
>> <alex at bedatadriven.com> wrote:
>> > I believe this error refers to something different than the 64k
>> > instruction
>> > limit, but rather some sort of internal constant (literal) pool.
>> > I received the same error on my build and was able to work around it
>> > with
>> > the
>> > the -lessconstants flag when executing the compiler.
>> > I confess that I actually don't know what this flag does other than
>> > produce
>> > less (fewer) constants :-)
>> > Alex
>> > On Wed, Jun 16, 2010 at 8:56 PM, David Ehrmann <ehrmann at gmail.com>
>> > wrote:
>> >>
>> >> I was able to get something non-trivial to cross compile, but when I
>> >> ran
>> >> NestedVM on it, I got this exception:
>> >>
>> >> java org.ibex.nestedvm.Compiler -outfile Test.class Test test.mips
>> >> org.ibex.classgen.ClassFile$Exn: constant pool full
>> >>   at org.ibex.classgen.ConstantPool.add(ConstantPool.java:247)
>> >>   at org.ibex.classgen.MethodGen.finish(MethodGen.java:604)
>> >>   at org.ibex.classgen.ClassFile._dump(ClassFile.java:169)
>> >>   at org.ibex.classgen.ClassFile.dump(ClassFile.java:160)
>> >>   at
>> >> org.ibex.nestedvm.ClassFileCompiler.__go(ClassFileCompiler.java:380)
>> >>   at
>> >> org.ibex.nestedvm.ClassFileCompiler._go(ClassFileCompiler.java:72)
>> >>   at org.ibex.nestedvm.Compiler.go(Compiler.java:259)
>> >>   at org.ibex.nestedvm.Compiler.main(Compiler.java:183)
>> >> Compiler Error: Class generation exception:
>> >> org.ibex.classgen.ClassFile$Exn:
>> >> constant pool full
>> >>
>> >> I googled a bit and found that it's been hit before, and there's not
>> >> really
>> >> a workaround.  The difference is that that code used several libraries,
>> >> mine
>> >> uses just the standard ones.  When I ran nm on it, it only had 4325
>> >> lines of output (I assume it's one line per symbol)--far from the 64k
>> >> limit.
>> >> I put a System.out.println at ClassFileCompiler.java:179, and symbols
>> >> only
>> >> has ~4325 elements.
>> >>
>> >> Any ideas?
>> >>
>> >> _______________________________________________
>> >> Nestedvm mailing list
>> >> Nestedvm at lists.hcoop.net
>> >> https://lists.hcoop.net/listinfo/nestedvm
>> >
>> >
>>
>> _______________________________________________
>> Nestedvm mailing list
>> Nestedvm at lists.hcoop.net
>> https://lists.hcoop.net/listinfo/nestedvm
>
>



More information about the Nestedvm mailing list