[Nestedvm] Problem with gcc 3.3.6

Andre Pietsch andre.pietsch at advicio-servdesk.de
Thu May 12 09:34:03 EDT 2011


Hi Brian,

I built the myArray.mips with the mips-unknown-elf-cpp that has been 
produced by making the cxxtest target (make cxxtest). "file" tells me 
that it is a "ASCII C program text".

Do I have to use the mips-unkown-elf-gcc to create a proper elf file? I 
get the following, big error. So I thought I had to use the 
mips-unknown-elf-cpp because it is a cpp file.

BTW: I have to be honest: the file is called morkArray.cpp and not 
myArray.cpp ;)

-----------------snip-------------------- (until snap)

/home/andrepietsch/software/nestedvm/upstream/install/lib/gcc-lib/mips-unknown-elf/3.3.6/../../../../mips-unknown-elf/lib/crt0.o(.text._start+0x68): 
In function `_start':
: undefined reference to `main'
/tmp/cctu7tfM.o(.text+0xcc): In function `morkArray::~morkArray 
[not-in-charge]()':
: undefined reference to `__gxx_personality_sj0'
/tmp/cctu7tfM.o(.text+0xd0): In function `morkArray::~morkArray 
[not-in-charge]()':
: undefined reference to `__gxx_personality_sj0'
/tmp/cctu7tfM.o(.text+0x138): In function `morkArray::~morkArray 
[not-in-charge]()':
: undefined reference to `mork_assertion_signal(char const*)'
/tmp/cctu7tfM.o(.text+0x164): In function `morkArray::~morkArray 
[not-in-charge]()':
: undefined reference to `mork_assertion_signal(char const*)'
/tmp/cctu7tfM.o(.text+0x19c): In function `morkArray::~morkArray 
[not-in-charge]()':
: undefined reference to `morkNode::~morkNode [not-in-charge]()'
/tmp/cctu7tfM.o(.text+0x1d0): In function `morkArray::~morkArray 
[not-in-charge]()':
: undefined reference to `morkNode::~morkNode [not-in-charge]()'
/tmp/cctu7tfM.o(.text+0x1f0): In function `morkArray::~morkArray 
[not-in-charge]()':
: undefined reference to `operator delete(void*)'
/tmp/cctu7tfM.o(.text+0x2c8): In function `morkArray::~morkArray 
[in-charge]()':
: undefined reference to `__gxx_personality_sj0'
/tmp/cctu7tfM.o(.text+0x2cc): In function `morkArray::~morkArray 
[in-charge]()':
: undefined reference to `__gxx_personality_sj0'
/tmp/cctu7tfM.o(.text+0x334): In function `morkArray::~morkArray 
[in-charge]()':
: undefined reference to `mork_assertion_signal(char const*)'
/tmp/cctu7tfM.o(.text+0x360): In function `morkArray::~morkArray 
[in-charge]()':
: undefined reference to `mork_assertion_signal(char const*)'
/tmp/cctu7tfM.o(.text+0x398): In function `morkArray::~morkArray 
[in-charge]()':
: undefined reference to `morkNode::~morkNode [not-in-charge]()'
/tmp/cctu7tfM.o(.text+0x3cc): In function `morkArray::~morkArray 
[in-charge]()':
: undefined reference to `morkNode::~morkNode [not-in-charge]()'
/tmp/cctu7tfM.o(.text+0x3ec): In function `morkArray::~morkArray 
[in-charge]()':
: undefined reference to `operator delete(void*)'
/tmp/cctu7tfM.o(.text+0x4c4): In function `morkArray::~morkArray 
[in-charge deleting]()':
: undefined reference to `__gxx_personality_sj0'
/tmp/cctu7tfM.o(.text+0x4c8): In function `morkArray::~morkArray 
[in-charge deleting]()':
: undefined reference to `__gxx_personality_sj0'
/tmp/cctu7tfM.o(.text+0x530): In function `morkArray::~morkArray 
[in-charge deleting]()':
: undefined reference to `mork_assertion_signal(char const*)'
/tmp/cctu7tfM.o(.text+0x55c): In function `morkArray::~morkArray 
[in-charge deleting]()':
: undefined reference to `mork_assertion_signal(char const*)'
/tmp/cctu7tfM.o(.text+0x594): In function `morkArray::~morkArray 
[in-charge deleting]()':
: undefined reference to `morkNode::~morkNode [not-in-charge]()'
/tmp/cctu7tfM.o(.text+0x5c8): In function `morkArray::~morkArray 
[in-charge deleting]()':
: undefined reference to `morkNode::~morkNode [not-in-charge]()'
/tmp/cctu7tfM.o(.text+0x5e8): In function `morkArray::~morkArray 
[in-charge deleting]()':
: undefined reference to `operator delete(void*)'
/tmp/cctu7tfM.o(.text+0x6cc): In function 
`morkArray::morkArray[not-in-charge](morkEnv*, morkUsage const&, 
nsIMdbHeap*, unsigned, nsIMdbHeap*)':
: undefined reference to `__gxx_personality_sj0'
/tmp/cctu7tfM.o(.text+0x6d0): In function 
`morkArray::morkArray[not-in-charge](morkEnv*, morkUsage const&, 
nsIMdbHeap*, unsigned, nsIMdbHeap*)':
: undefined reference to `__gxx_personality_sj0'
/tmp/cctu7tfM.o(.text+0x724): In function 
`morkArray::morkArray[not-in-charge](morkEnv*, morkUsage const&, 
nsIMdbHeap*, unsigned, nsIMdbHeap*)':
: undefined reference to `morkNode::morkNode[not-in-charge](morkEnv*, 
morkUsage const&, nsIMdbHeap*)'
/tmp/cctu7tfM.o(.text+0x7bc): In function 
`morkArray::morkArray[not-in-charge](morkEnv*, morkUsage const&, 
nsIMdbHeap*, unsigned, nsIMdbHeap*)':
: undefined reference to `nsIMdbHeap_SlotStrongHeap(nsIMdbHeap*, 
morkEnv*, nsIMdbHeap**)'
/tmp/cctu7tfM.o(.text+0x8d8): In function 
`morkArray::morkArray[not-in-charge](morkEnv*, morkUsage const&, 
nsIMdbHeap*, unsigned, nsIMdbHeap*)':
: undefined reference to `morkEnv::NilPointerError()'
/tmp/cctu7tfM.o(.text+0x910): In function 
`morkArray::morkArray[not-in-charge](morkEnv*, morkUsage const&, 
nsIMdbHeap*, unsigned, nsIMdbHeap*)':
: undefined reference to `morkNode::~morkNode [not-in-charge]()'
/tmp/cctu7tfM.o(.text+0xa18): In function 
`morkArray::morkArray[in-charge](morkEnv*, morkUsage const&, 
nsIMdbHeap*, unsigned, nsIMdbHeap*)':
: undefined reference to `__gxx_personality_sj0'
/tmp/cctu7tfM.o(.text+0xa1c): In function 
`morkArray::morkArray[in-charge](morkEnv*, morkUsage const&, 
nsIMdbHeap*, unsigned, nsIMdbHeap*)':
: undefined reference to `__gxx_personality_sj0'
/tmp/cctu7tfM.o(.text+0xa70): In function 
`morkArray::morkArray[in-charge](morkEnv*, morkUsage const&, 
nsIMdbHeap*, unsigned, nsIMdbHeap*)':
: undefined reference to `morkNode::morkNode[not-in-charge](morkEnv*, 
morkUsage const&, nsIMdbHeap*)'
/tmp/cctu7tfM.o(.text+0xb08): In function 
`morkArray::morkArray[in-charge](morkEnv*, morkUsage const&, 
nsIMdbHeap*, unsigned, nsIMdbHeap*)':
: undefined reference to `nsIMdbHeap_SlotStrongHeap(nsIMdbHeap*, 
morkEnv*, nsIMdbHeap**)'
/tmp/cctu7tfM.o(.text+0xc24): In function 
`morkArray::morkArray[in-charge](morkEnv*, morkUsage const&, 
nsIMdbHeap*, unsigned, nsIMdbHeap*)':
: undefined reference to `morkEnv::NilPointerError()'
/tmp/cctu7tfM.o(.text+0xc5c): In function 
`morkArray::morkArray[in-charge](morkEnv*, morkUsage const&, 
nsIMdbHeap*, unsigned, nsIMdbHeap*)':
: undefined reference to `morkNode::~morkNode [not-in-charge]()'
/tmp/cctu7tfM.o(.text+0xdfc): In function `morkArray::CloseArray(morkEnv*)':
: undefined reference to `nsIMdbHeap_SlotStrongHeap(nsIMdbHeap*, 
morkEnv*, nsIMdbHeap**)'
/tmp/cctu7tfM.o(.text+0xe20): In function `morkArray::CloseArray(morkEnv*)':
: undefined reference to `morkNode::NonNodeError(morkEnv*) const'
/tmp/cctu7tfM.o(.text+0xe34): In function `morkArray::CloseArray(morkEnv*)':
: undefined reference to `morkEnv::NilPointerError()'
/tmp/cctu7tfM.o(.text+0xe6c): In function 
`morkArray::NonArrayTypeError(morkEnv*)':
: undefined reference to `morkEnv::NewError(char const*)'
/tmp/cctu7tfM.o(.text+0xea4): In function 
`morkArray::IndexBeyondEndError(morkEnv*)':
: undefined reference to `morkEnv::NewError(char const*)'
/tmp/cctu7tfM.o(.text+0xedc): In function 
`morkArray::NilSlotsAddressError(morkEnv*)':
: undefined reference to `morkEnv::NewError(char const*)'
/tmp/cctu7tfM.o(.text+0xf14): In function 
`morkArray::FillBeyondSizeError(morkEnv*)':
: undefined reference to `morkEnv::NewError(char const*)'
/tmp/cctu7tfM.o(.gnu.linkonce.r._ZTV9morkArray+0x14): undefined 
reference to `morkNode::CloseMdbObject(nsIMdbEnv*)'
/tmp/cctu7tfM.o(.gnu.linkonce.r._ZTV9morkArray+0x18): undefined 
reference to `morkNode::AddStrongRef(morkEnv*)'
/tmp/cctu7tfM.o(.gnu.linkonce.r._ZTV9morkArray+0x1c): undefined 
reference to `morkNode::CutStrongRef(morkEnv*)'
/tmp/cctu7tfM.o(.gnu.linkonce.r._ZTI9morkArray+0x0): undefined reference 
to `vtable for __cxxabiv1::__si_class_type_info'
/tmp/cctu7tfM.o(.gnu.linkonce.r._ZTI9morkArray+0x8): undefined reference 
to `typeinfo for morkNode'
collect2: ld returned 1 exit status

--------------------snap---------------------------

I added a path to needed header files with -I and to a lib directory 
containing some libs with the -L parameter.

It looks as if there are some other libraries missing. But I dont know 
if they are missing in the mips-...-elf or in the cpp code I want to 
compile.

Regards


Andre

Am 11.05.2011 23:10, schrieb Brian Alliet:
> On Wed, May 11, 2011 at 06:21:06PM +0200, Andre Pietsch wrote:
>> java org.ibex.nestedvm.Compiler -outfile MyAlass.class MyArray myArray.mips
>>
>> I get the following error:
>>
>> Exception in thread "main" org.ibex.nestedvm.util.ELF$ELFException: Bad
>> Magic
>
> How did you build myArray.mips? Could you run "file myArray.mips"?
> (Which should identify what type of file it is.) It looks like it isn't
> a valid mips elf file. Are you sure you used mips-unkown-elf-{gcc,ld}
> to build it?
>
> -Brian



More information about the Nestedvm mailing list