cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
6,374 Views
Registered: ‎04-29-2009

GCC microblaze fail

I'm try compiler the following for microblaze 

//*************************Begin*************************************// 

extern void (*__init_array_start [ ]) (void);
extern void (*__init_array_end [ ]) (void);
extern void (*__fini_array_start [ ]) (void);
extern void (*__fini_array_end [ ]) (void);

int main( int argc, char *argv[ ] )
{
  void *foo = *__preinit_array_start[0];
  foo = (void*)0;
  return 0;
}

extern void (*__preinit_array_start [ ]) (void);

//***************************End******************//

 but I obtain the following fails

glibc/csu/elf-init.c:95: undefined reference to `_init'
glibc/csu/elf-init.c:116: undefined reference to `_fini'

Please, help me!

0 Kudos
5 Replies
Highlighted
Xilinx Employee
Xilinx Employee
6,371 Views
Registered: ‎09-10-2008

Hi,

 

What tools are you trying to use for Microblaze?  The EDK GNU tools will not build Microblaze Linux applications.  

 

There is no released MicroBlaze Linux and associated tools from Xilinx.

 

Thanks,

John

0 Kudos
Highlighted
6,346 Views
Registered: ‎04-29-2009

Well, I compiled the project called mb_gnu.git in http://git.xilinx.com and installed this.
I try compile the code with the following command "mb-linux-gcc codigo.c -o codigo" but get mistake.
Well, I've been looked and the faild is the following archive "glibc/csu/elf-init.c" in functions 
"extern void _init (void); extern void _fini (void);"
These function symbols must to be provided for the .init/.fini section entry points automatically by the linker, but not!

Thanks, 
Jhosep
0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
6,343 Views
Registered: ‎09-10-2008

So what are you planning to run the application on since we don't have a Microblaze Linux released?

 

I have built apps with these tools but the build process is not real solid for the tools on Linux so you might be seeing some issues there.

 

We are working more on the tools to get them more solid as it's a very old version of glibc.

 

Sorry I'm not more help, but most of this work is still development

John

0 Kudos
Highlighted
5,162 Views
Registered: ‎05-04-2010

Have you resolved your issue?

I am seeing someting similar and looking for some help

 

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
5,160 Views
Registered: ‎09-10-2008

You should probably start a new thread with your specific problem.

 

Things have come a long ways since a then, but not sure about your specific application.

 

Thanks.

0 Kudos