From: Mike Frysinger Date: Tue, 7 Feb 2012 10:21:53 -0500 Subject: [U-Boot] [PATCH 2/2] RFC: Let linker create phy array In-Reply-To: <4F3049C4.5000600@boundarydevices.com> References: <1328410966-13946-1-git-send-email-troy.kisky@boundarydevices.com> <201202061557.49237.vapier@gentoo.org> <4F3049C4.5000600@boundarydevices.com> Message-ID: <201202071021.55302.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 Monday 06 February 2012 16:44:36 Troy Kisky wrote: > On 2/6/2012 1:57 PM, Mike Frysinger wrote: > > On Monday 06 February 2012 15:17:32 Troy Kisky wrote: > >> On 2/6/2012 12:07 PM, Mike Frysinger wrote: > >>> On Monday 06 February 2012 13:48:13 Troy Kisky wrote: > >>>> On 2/4/2012 8:38 PM, Mike Frysinger wrote: > >>>>> On Saturday 04 February 2012 22:02:46 Troy Kisky wrote: > >>>>>> --- a/drivers/net/phy/broadcom.c > >>>>>> +++ b/drivers/net/phy/broadcom.c > >>>>>> > >>>>>> -static struct phy_driver BCM5461S_driver = { > >>>>>> +struct phy_driver BCM5461S_driver __phy_entry = { > >>>>> > >>>>> why do you have to remove the static ? that shouldn't affect the > >>>>> section name that it gets placed into. > >>>> > >>>> I had static to start. But the compiler ate all of the code. No > >>>> references to any of the static symbols. > >>> > >>> sounds like you should change the __phy_entry define from "unused" to > >>> "used" > >> > >> The would give me compiler warnings for unused variables. How does that > >> help? > > > > does gcc issue warnings ? doesn't seem to do so for me. > > > >> Is there a keep attribute like the linker has for sections? > > > > yes, __attribute__((used)) > > Thanks, since the gcc manual I was using didn't list used, I thought you > merely meant to > remove unused. > > Seems the gcc version 4.1.2 does not list this option while 4.2.4 does. > > What level of compiler is required ? in looking at how Linux does things, you should include linux/compiler.h and then utilize __maybe_unused rather than specifying the attribute yourself -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: