Dear All,
I created a serial.lib file with four functions, and added to new project . in main i called only 2 function which is present in lib file. so its giving me an warning "*** WARNING L16: UNCALLED FUNCTION, IGNORED FOR OVERLAY PROCESS" this is because of other 2 function which is not called in main.
how to clear this warning...
Thanks & regards Kiran Kumar D
Did you put all 4 functions into a single source file?
For the Linker to be able to pick individual functions from a Library, I think they have to be loaded into the library as separate objects...?
yes all functions in a single file and seperate objects
all functions in a single file and seperate objects one file generates one object.
The linker can not include 1/4 of an object file and thus if one function in an object in a library is needed all functions in that object get linked in.
Instead of making your library from one file with 4 functions make it from 4 files with one function each .
Erik
uvision do not have a smart linker :( and best as every function in seporate file
uvision do not have a smart linker :(
One of the linkers (I do not rely on tools, I write stuff that works - and, thus, do not recall which one) can remove unused functions.
It's smart enough - but you have to structure your project appropriately.
Motto for today: Know your tools!
http://www.keil.com/support/man/docs/lx51/lx51_removeunused.htm
View all questions in Keil forum