Hi. I use OVERLAY(PRINTF ! *) on my linker command line to prevent an L15. Now the L15 only exists in the following condition: #define A 1 #define B 1 If only 1 are active no problem. The proble comes in the scenario where: //#define A 1 //#define B 1 which is possible if I don't need features A and B. How can I only do the OVERLAY(PRINTF ! *) based on features selected in a header file. Is that possible? Thanks.
If you specifically tell the linker to manipulate a segment which is not included in your program, what should the linker do if the segment is not actually there? I think it should generate a warning. Imagine if you misspelled printf (as prinft) and the linker gave no warning. You would go along thinking that the linker did what you asked and would have all kinds of run-time errors that could not be explained without careful examination of the linker map file. It seems to me that the warning is there for a very good reason. Jon
I don't disagree that the warning is appropriate; however, I like to write error/warning free code (lint free too for that matter). So how can one cope with this issue other than changing the command line options to the linker manually? For example, is there a way to mark sections of code (read in this case where ever the printf library may be used) as NONOVERLAYABLE and therefore be able to remove the linker command line option yet still not produce a L15 multiple call to segment? -Rich