Forum Discussion
Altera_Forum
Honored Contributor
19 years agoHi 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