From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerry Van Baren Date: Wed, 04 Feb 2009 09:48:09 -0500 Subject: [U-Boot] [PATCH 1/2] Allow board specific overwriting of library code In-Reply-To: <1233757799-1165-2-git-send-email-mroth@nessie.de> References: <1233757799-1165-1-git-send-email-mroth@nessie.de> <1233757799-1165-2-git-send-email-mroth@nessie.de> Message-ID: <4989AAA9.4030100@ge.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Michael Roth wrote: > Enables to overwrite any library code by defining EXTRABOARDOBJS > in the board specific config.mk. > Those listed object files get linked directly into the u-boot binary > right after the start objects and before any archives. > > Signed-off-by: Michael Roth Hi Michael, Sorry for not speaking up sooner, but the term "overwrite" had really bad connotations (implies you are smashing the library). "Override" is a much better term for what you are doing. FWIIW, I don't have experience with "weak" functions, but I've seen the struggles of others on this email list. My understanding is that you are getting gcc (the linker, actually) to behave much more as a developer expects when he needs to override a weak function. (Current gcc behavior makes sense to the gcc folks, but tends to surprise mere mortals. The principle of least astonishment[1] says this is a problem.) Thanks, gvb [1]