From: Mike Frysinger Date: Tue, 11 Oct 2011 13:46:09 -0400 Subject: [U-Boot] [PATCH V3 05/13] i2c: Create common default i2c_set_bus_num() function In-Reply-To: <4E947D30.4020904@denx.de> References: <1318091769-30979-1-git-send-email-sbabic@denx.de> <201110101351.31460.vapier@gentoo.org> <4E947D30.4020904@denx.de> Message-ID: <201110111346.10832.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tuesday 11 October 2011 13:30:24 Stefano Babic wrote: > On 10/10/2011 07:51 PM, Mike Frysinger wrote: > > i'm not sure which gets used more, or if > > it's just a wash. i think it makes sense to have an accessible default > > func if it does something useful, but not if it's just a stub. > > > > in the __def/weak style above, unless people use --gc-sections when > > linking (i think we've got many people doing this now, but not all), you > > end up with dead code in the binary. in the code i proposed, the func > > gets discarded both when using --gc-sections and when not. > > You are right, but probably it makes no difference. I checked and it > seems that only a few architectute (m68k, sparc and microblaze) do not > set --gc-sections. i would think the microblaze missing would be an oversight as it's "newer" code. don't know (or honestly, care) how hard it would be to make m68k/sparc sane. but it would be nice to get everyone using gc-sections as we could move that into common code and all new arches would start out sane ... -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20111011/9ca332d2/attachment.pgp