public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] RFC: Let linker create phy array
Date: Mon, 06 Feb 2012 21:53:17 +0100	[thread overview]
Message-ID: <4F303DBD.7050802@aribaud.net> (raw)
In-Reply-To: <201202051540.04502.vapier@gentoo.org>

Le 05/02/2012 21:40, Mike Frysinger a ?crit :
> On Sunday 05 February 2012 08:26:57 Albert ARIBAUD wrote:
>> Le 05/02/2012 04:38, Mike Frysinger a ?crit :
>>> On Saturday 04 February 2012 22:02:46 Troy Kisky wrote:
>>>> --- 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 should they?
>
> because that's what the GNU linker documentation says to, and that's how all
> existing symbols have been handled.  look at asm/sections.h in every Linux
> arch.

Does it? What I read from 
<http://sourceware.org/binutils/docs-2.22/ld/Source-Code-Reference.html#Source-Code-Reference> 
never says that linker-defined symbols should be declared in source code 
as char[]; actually, it gives examples where linker-defined symbols are 
defined with types int and char, not char[].

What the section says, OTOH, is that one must remember that the linker 
will not allocate space for a symbol unless explicitly instructed to, so 
such symbols my not have meaningful values, only addresses, and the code 
should access these symbols by address -- which is what is being done in 
the code of the RFC patch IIUC.

> -mike

Amicalement,
-- 
Albert.

  reply	other threads:[~2012-02-06 20:53 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-05  3:02 [U-Boot] [PATCH 1/2] RFC: create u-boot-common.lds Troy Kisky
2012-02-05  3:02 ` [U-Boot] [PATCH 2/2] RFC: Let linker create phy array Troy Kisky
2012-02-05  3:38   ` Mike Frysinger
2012-02-05  6:16     ` Dirk Behme
2012-02-05 13:26     ` Albert ARIBAUD
2012-02-05 20:40       ` Mike Frysinger
2012-02-06 20:53         ` Albert ARIBAUD [this message]
2012-02-06 18:48     ` Troy Kisky
2012-02-06 19:07       ` Mike Frysinger
2012-02-06 20:17         ` Troy Kisky
2012-02-06 20:56           ` Albert ARIBAUD
2012-02-06 20:57           ` Mike Frysinger
2012-02-06 21:01             ` Albert ARIBAUD
2012-02-07 15:20               ` Mike Frysinger
2012-02-10 19:39                 ` Albert ARIBAUD
2012-02-10 20:32                   ` Mike Frysinger
2012-02-10 20:57                     ` Albert ARIBAUD
2012-02-10 21:41                       ` Mike Frysinger
2012-02-12 14:45                         ` Albert ARIBAUD
2012-02-06 21:44             ` Troy Kisky
2012-02-07 15:21               ` Mike Frysinger
2012-02-05 21:01 ` [U-Boot] [PATCH 1/2] RFC: create u-boot-common.lds Mike Frysinger
2012-02-05 22:07   ` Graeme Russ
2012-02-06  3:24     ` Mike Frysinger
2012-02-06  3:43       ` Graeme Russ
2012-02-06  4:27         ` Mike Frysinger
2012-02-06  4:34           ` Graeme Russ
2012-02-06  5:48             ` Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F303DBD.7050802@aribaud.net \
    --to=albert.u.boot@aribaud.net \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox