From mboxrd@z Thu Jan 1 00:00:00 1970 From: Troy Kisky Date: Mon, 06 Feb 2012 11:48:13 -0700 Subject: [U-Boot] [PATCH 2/2] RFC: Let linker create phy array In-Reply-To: <201202042238.42038.vapier@gentoo.org> References: <1328410966-13946-1-git-send-email-troy.kisky@boundarydevices.com> <1328410966-13946-2-git-send-email-troy.kisky@boundarydevices.com> <201202042238.42038.vapier@gentoo.org> Message-ID: <4F30206D.3060702@boundarydevices.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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. > >> --- a/include/phy.h >> +++ b/include/phy.h >> >> +extern struct phy_driver __phy_entry_start, __phy_entry_end; > linker symbols should be declared like: > extern char __phy_entry_start[]; Why char ? > > >> + . = ALIGN(4); >> + __phy_entry_start = .; >> + .phy_entry : { >> + KEEP(*(.phy_entry)) >> + } >> + __phy_entry_end = .; > might have to introduce a helper macro like Linux's VMLINUX_SYMBOL() since > some targets have a symbol prefix (like an underscore) > -mike Hmmm. Your right, grep ___u_boot_cmd_start 0001-RFC-create-u-boot-common.lds.patch finds that arch/blackfin/cpu/u-boot.lds has an extra "_" Thanks for pointing it out. Troy