
Dear Albert ARIBAUD,
In message 4CE61AD5.50900@free.fr you wrote:
Most probably 2); mentioning a file in the linker script either with or without mentioning it on the command line has certainly been done for some time, so I doubt the feature is new; and certainly the doc is about files, not symbols in different files.
There seems to be a (here significant) difference between object files on the command line and libraries (which appear to be handled like a mere collection of object files).
And, to get back to possible solutions, I don't know that the linker can map selected symbols onto specific regions; it can only place whole object files.
There must be a way ;-)
The simplest, though not cleanest, way I can think of is to put conditionals to not compile vsprintf() in lib/generic, and set those conditions from the board config file -- and same for anything else. Ugly, but it will work.
A second solution, a bit more intrusive, would be to split lib/generic in two files; a "small" one which could be mapped in the small area, and the rest, which would map with the rest of the image.
That doesn't scale - the set is sifferent on a per-board base, which would result in a terrible mess.
Best regards,
Wolfgang Denk