[U-Boot] [PATCH 2/2] RFC: Let linker create phy array
Mike Frysinger
vapier at gentoo.org
Sun Feb 5 04:38:40 CET 2012
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.
> --- 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[];
> --- a/u-boot-common.lds
> +++ b/u-boot-common.lds
i'm not seeing this in the u-boot tree ...
> + . = 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
-------------- 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/20120204/ec278183/attachment.pgp>
More information about the U-Boot
mailing list