mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] ARM pbl: move piggydata before bss
@ 2013-02-14  9:12 Sascha Hauer
  2013-02-14 10:06 ` Alexander Aring
  2013-02-14 13:33 ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 2 replies; 4+ messages in thread
From: Sascha Hauer @ 2013-02-14  9:12 UTC (permalink / raw)
  To: barebox

This decreases the pbl image size by the size of the bss segment.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/pbl/zbarebox.lds.S |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/pbl/zbarebox.lds.S b/arch/arm/pbl/zbarebox.lds.S
index 564b3c6..2914fdd 100644
--- a/arch/arm/pbl/zbarebox.lds.S
+++ b/arch/arm/pbl/zbarebox.lds.S
@@ -59,18 +59,18 @@ SECTIONS
 	.data : { *(.data*) }
 
 	. = ALIGN(4);
-	__bss_start = .;
-	.bss : { *(.bss*) }
-	__bss_stop = .;
-	_end = .;
-
-	. = ALIGN(4);
 	__piggydata_start = .;
 	.piggydata : {
 		*(.piggydata)
 	}
 	__piggydata_end = .;
 
+	. = ALIGN(4);
+	__bss_start = .;
+	.bss : { *(.bss*) }
+	__bss_stop = .;
+	_end = .;
+
 	_barebox_image_size = __piggydata_end - (TEXT_BASE - SZ_2M);
 	_barebox_pbl_size = __bss_start - (TEXT_BASE - SZ_2M);
 }
-- 
1.7.10.4


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ARM pbl: move piggydata before bss
  2013-02-14  9:12 [PATCH] ARM pbl: move piggydata before bss Sascha Hauer
@ 2013-02-14 10:06 ` Alexander Aring
  2013-02-14 11:27   ` Sascha Hauer
  2013-02-14 13:33 ` Jean-Christophe PLAGNIOL-VILLARD
  1 sibling, 1 reply; 4+ messages in thread
From: Alexander Aring @ 2013-02-14 10:06 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Hi Sascha,

i am a little bit confused. I add in commit

43afe67390697041d1d16d4e5c934d2bfa831399

the data section, but I forgot to change this linker script file.
Does it work now? It seems that pbl doesn't uses pointers from
asm-generic/sections.h or never includes this file.

Should I write a patch to add data section to this linker script file?

Regards
Alex

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ARM pbl: move piggydata before bss
  2013-02-14 10:06 ` Alexander Aring
@ 2013-02-14 11:27   ` Sascha Hauer
  0 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2013-02-14 11:27 UTC (permalink / raw)
  To: Alexander Aring; +Cc: barebox

On Thu, Feb 14, 2013 at 11:06:13AM +0100, Alexander Aring wrote:
> Hi Sascha,
> 
> i am a little bit confused. I add in commit
> 
> 43afe67390697041d1d16d4e5c934d2bfa831399
> 
> the data section, but I forgot to change this linker script file.
> Does it work now?

Yes, it works.

> It seems that pbl doesn't uses pointers from
> asm-generic/sections.h or never includes this file.

The linker generated pointers to the data sections are only used to
request the corresponding sdram regions. The pbl does not request
regions.

> 
> Should I write a patch to add data section to this linker script file?

Not necessary.

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ARM pbl: move piggydata before bss
  2013-02-14  9:12 [PATCH] ARM pbl: move piggydata before bss Sascha Hauer
  2013-02-14 10:06 ` Alexander Aring
@ 2013-02-14 13:33 ` Jean-Christophe PLAGNIOL-VILLARD
  1 sibling, 0 replies; 4+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-02-14 13:33 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

On 10:12 Thu 14 Feb     , Sascha Hauer wrote:
> This decreases the pbl image size by the size of the bss segment.
> 
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>  arch/arm/pbl/zbarebox.lds.S |   12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/arm/pbl/zbarebox.lds.S b/arch/arm/pbl/zbarebox.lds.S
> index 564b3c6..2914fdd 100644
> --- a/arch/arm/pbl/zbarebox.lds.S
> +++ b/arch/arm/pbl/zbarebox.lds.S
> @@ -59,18 +59,18 @@ SECTIONS
>  	.data : { *(.data*) }
>  
>  	. = ALIGN(4);
> -	__bss_start = .;
> -	.bss : { *(.bss*) }
> -	__bss_stop = .;
> -	_end = .;
> -
> -	. = ALIGN(4);
>  	__piggydata_start = .;
>  	.piggydata : {
>  		*(.piggydata)
>  	}
>  	__piggydata_end = .;
>  
> +	. = ALIGN(4);
> +	__bss_start = .;
> +	.bss : { *(.bss*) }
> +	__bss_stop = .;
> +	_end = .;

I did this on purpose

so we can load the pbl in sram without the piggydata

so do not change it

Best Regards,
J.
> +
>  	_barebox_image_size = __piggydata_end - (TEXT_BASE - SZ_2M);
>  	_barebox_pbl_size = __bss_start - (TEXT_BASE - SZ_2M);
>  }
> -- 
> 1.7.10.4
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-02-14 13:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-14  9:12 [PATCH] ARM pbl: move piggydata before bss Sascha Hauer
2013-02-14 10:06 ` Alexander Aring
2013-02-14 11:27   ` Sascha Hauer
2013-02-14 13:33 ` Jean-Christophe PLAGNIOL-VILLARD

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox