[U-Boot] [PATCH v3] Switch from archive libraries to partial linking

Wolfgang Denk
2010-11-19T08:03:54Z

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

--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Worlds may change, galaxies disintegrate, but a woman always remains
a woman.
-- Kirk, "The Conscience of the King", stardate 2818.9