mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Alexander Aring <a.aring@phytec.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 3/5] barebox-data: add barebox-data sections
Date: Fri, 31 Aug 2012 09:51:11 +0200	[thread overview]
Message-ID: <20120831075111.GP26594@pengutronix.de> (raw)
In-Reply-To: <1346322594-21167-4-git-send-email-a.aring@phytec.de>

On Thu, Aug 30, 2012 at 12:29:52PM +0200, Alexander Aring wrote:
> Add barebox-data section in arm branch to get complete
> barebox regions in sdram regions tree.
> 
> Signed-off-by: Alexander Aring <a.aring@phytec.de>
> ---
>  arch/arm/lib/barebox.lds.S                       |    6 +++++-
>  arch/blackfin/boards/ipe337/barebox.lds.S        |    6 +++++-
>  arch/mips/lib/barebox.lds.S                      |    5 ++++-
>  arch/nios2/cpu/barebox.lds.S                     |    5 +++--
>  arch/ppc/boards/freescale-p2020rdb/barebox.lds.S |    6 ++++--
>  arch/ppc/boards/pcm030/barebox.lds.S             |    5 +++--
>  arch/x86/lib/barebox.lds.S                       |    5 ++++-
>  common/memory.c                                  |    4 ++++
>  include/asm-generic/sections.h                   |    1 +
>  9 files changed, 33 insertions(+), 10 deletions(-)
> 
> diff --git a/arch/arm/lib/barebox.lds.S b/arch/arm/lib/barebox.lds.S
> index e0bae70..ae0b760 100644
> --- a/arch/arm/lib/barebox.lds.S
> +++ b/arch/arm/lib/barebox.lds.S
> @@ -70,7 +70,9 @@ SECTIONS
>  		__stop_unwind_tab = .;
>  	}
>  #endif
> -	_etext = .;			/* End of text and rodata section */
> +	_etext = . - 1;			/* End of text and rodata section */

I am not sure this is a good idea. Looking at it this indeed seems to be
correct. Anyway, at least in the Linux kernel I can find things like:

	codesize = (unsigned long)_etext - (unsigned long)_text;

If we have _etext = . the above results in the correct codesize, but if
we change this to _etext = . - 1 we would have to do

	codesize = (unsigned long)_etext - (unsigned long)_text + 1;

instead.

Everyone else including the kernel and the standard linker scripts from
ld have _etext = .; so I vote for keeping it that way.


> @@ -83,6 +85,8 @@ SECTIONS
>  	__usymtab : { BAREBOX_SYMS }
>  	___usymtab_end = .;
>  
> +	_edata - . -1;

s/-/=/

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

       reply	other threads:[~2012-08-31  7:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1346322594-21167-1-git-send-email-a.aring@phytec.de>
     [not found] ` <1346322594-21167-4-git-send-email-a.aring@phytec.de>
2012-08-31  7:51   ` Sascha Hauer [this message]
2012-08-31  7:55 ` [PATCH v3 0/5] rewritten memtest command Sascha Hauer

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=20120831075111.GP26594@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=a.aring@phytec.de \
    --cc=barebox@lists.infradead.org \
    /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