From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Fri, 19 Nov 2010 09:03:54 +0100 Subject: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking In-Reply-To: <4CE61AD5.50900@free.fr> References: <1289253872-16891-1-git-send-email-sebastien.carlier@gmail.com> <201011100157.31202.vapier@gentoo.org> <20101110080708.GA8145@safe.home.local> <20101115075129.9C820134FEF@gemini.denx.de> <20101115080950.GA26767@safe.home.local> <20101115105407.2A24714EA7E@gemini.denx.de> <20101117133056.GB23875@safe.home.local> <20101118214448.B8DC014EA7E@gemini.denx.de> <4CE5A3F1.50304@free.fr> <20101118223319.ECB2814E647@gemini.denx.de> <4CE61AD5.50900@free.fr> Message-ID: <20101119080354.DF0DB14EA7E@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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