We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello, I am a student from germany and I am working on a project with KeilC an uVison. I have a strange problem. - I get some C-code for a 8051 compatible - this code has extern linker files - the current code compiles without errors - after compiling I see some size-values for DATA,XDATA,PDATA - if i want to shrink the code by deleting or uncommenting some lines the linker throws errors, because the size of data exceed the restrictions by the linker file.
I do not understand, why the code size increases if I shrink the code? Can some one explain me this issue?
Thank you for help, Regard Chris
that some functions are in precompiled libraries and if I am linking against them but only using a few of their functions it happens this what you describe
If so, that library is constructed incorrectly. It's one of the basic requirements of proper library design to have each independent functional unit in its own translation unit, so it can be left out of the final link if not needed. Basically, a library must have a separate source file for every single data object and function listed in its interface header(s), and another one for each internal functionality used by more than one other.