10-13-2009 02:33 PM
I've modified my crtinit.s file to copy some sections on startup and that is working beautifully. However, I'd like to make sure that any builds that i do for other projects aren't tainted by my modified crtinit.o file. So, I'm trying to use the -B<dir_name> argument with gcc but am having little luck. My software is still linking with the crtinit.o file found in $(EDK_ROOT)/gnu/microblaze/nt/microblaze-xilinx-elf/lib/m. If I change the name of that file, then it finds the crtinit.o file located in the directory that I specify with -B. Any thoughts on why the linker isn't first looking at my -B directory?
10-13-2009 06:53 PM
Are you using the -nostartfiles option when linking? I think using this option should force you to add the necessary start files to your project explicitly, instead of looking the the EDK directory. Then, add your modified startup files (I think there are two you need) to your project. Other projects, without the -nostartfiles option, should build normally, using the start files from the EDK directory. Check out this document: http://www.xilinx.com/support/documentation/sw_manuals/xilinx11/est_rm.pdf, especially pages 135-139.
10-14-2009 07:38 AM