- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear all,
As we known, system library project will create a library file *.a(which including the *.o containing alt_exception function) for your application project. But I'm confusing that, in application project, you never use alt_exception symbol, why it's linked into final elf file and how?? I think it should be a linker issue, hope someone help me.http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/happy.gif Thanks in advance, DavidLink Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
maybe the linkerscript?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
NiosII IDE will create linker script(generated.x) automatically, but I think it's only for system library project. Where can I find the linker script for application project? What's the meaning of KEEP in generated.x? Help me, David- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
???
The generated.x file is used when linking your application. The IDE compiles the source files of your application project to object files and finally links them all together with the syslib.a to create the executable elf file. You can enable the "Show command lines when running 'make'" option in the Nios II preferences of the IDE. This will give you more details about the entire build process.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi David_Cai,
you only need one linker script, because the application is only linked once. The system library is a, well a library. A library contains the (unlinked) object files of the library sources. (alt_avalon_uart.c becomes alt_avalon_uart.o. This .o is stuffed into the library.) In short a (static) library is only a archive of object files. The linking takes place after all your application files are compiled. Together with the system library these files are linked into the final executable. I think KEEP tells the linker to keep the section in question even if it is empty. For the linker script language look at the manual for the gnu linker ld. See using ld (http://www.gnu.org/software/binutils/manual/ld-2.9.1/html_mono/ld.html). Bye, Wolfgang- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks very much for all your help:)
David
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page