From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Mon, 06 Feb 2012 21:56:08 +0100 Subject: [U-Boot] [PATCH 2/2] RFC: Let linker create phy array In-Reply-To: <4F30355C.7060908@boundarydevices.com> References: <1328410966-13946-1-git-send-email-troy.kisky@boundarydevices.com> <201202042238.42038.vapier@gentoo.org> <4F30206D.3060702@boundarydevices.com> <201202061407.41263.vapier@gentoo.org> <4F30355C.7060908@boundarydevices.com> Message-ID: <4F303E68.3050706@aribaud.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Le 06/02/2012 21:17, Troy Kisky a ?crit : > 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" >> -mike > The would give me compiler warnings for unused variables. How does that > help? > Is there a keep attribute like the linker has for sections? No, but indeed not keeping the 'static' keyword has this effect: the object file will keep the phy struct, in case it is referred to by another object file at link time. > Troy Amicalement, -- Albert.