[Nestedvm] constant pool full

David Ehrmann ehrmann at gmail.com
Wed Jun 16 19:21:33 EDT 2010

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

More information about the Nestedvm mailing list