Re: Question on compressed vmlinux .got and .bss sections

2011-04-20 Thread Nicolas Pitre
On Wed, 20 Apr 2011, Dave Martin wrote: > Hi, > > On Wed, Apr 20, 2011 at 1:42 PM, Nicolas Pitre > wrote: > > On Wed, 20 Apr 2011, Dave Martin wrote: > > > >> On Tue, Apr 19, 2011 at 01:33:12PM -0400, Nicolas Pitre wrote: > >> > You must not use static variable in the decompressor.  For one thi

Re: Question on compressed vmlinux .got and .bss sections

2011-04-20 Thread Dave Martin
Hi, On Wed, Apr 20, 2011 at 1:42 PM, Nicolas Pitre wrote: > On Wed, 20 Apr 2011, Dave Martin wrote: > >> On Tue, Apr 19, 2011 at 01:33:12PM -0400, Nicolas Pitre wrote: >> > You must not use static variable in the decompressor.  For one thing, >> > that breaks the ability to XIP the decompressor c

Re: Question on compressed vmlinux .got and .bss sections

2011-04-20 Thread Nicolas Pitre
On Wed, 20 Apr 2011, Dave Martin wrote: > On Tue, Apr 19, 2011 at 01:33:12PM -0400, Nicolas Pitre wrote: > > You must not use static variable in the decompressor. For one thing, > > that breaks the ability to XIP the decompressor code and move writable > > data elsewhere. > > > > So the fix is

Re: Question on compressed vmlinux .got and .bss sections

2011-04-20 Thread Dave Martin
On Tue, Apr 19, 2011 at 01:33:12PM -0400, Nicolas Pitre wrote: > On Wed, 20 Apr 2011, Shawn Guo wrote: > > > On Tue, Apr 19, 2011 at 04:23:09PM +0100, Dave Martin wrote: > > > Hopefully this explains what's going on, but what are you trying > > > to achieve exactly? > > > > > Thanks a ton, Dave.

Re: Question on compressed vmlinux .got and .bss sections

2011-04-19 Thread Nicolas Pitre
On Tue, 19 Apr 2011, Dave Martin wrote: > So, if I understand correctly, because .bss doesn't take space in > the zImage, when the dtb is appended, it effectively ends up on top of > the bss/stack area? Yes. However... > Since the compressed kernel loader knows how big bss and the stack > are, m

Re: Question on compressed vmlinux .got and .bss sections

2011-04-19 Thread Nicolas Pitre
On Wed, 20 Apr 2011, Shawn Guo wrote: > On Tue, Apr 19, 2011 at 04:23:09PM +0100, Dave Martin wrote: > > Hopefully this explains what's going on, but what are you trying > > to achieve exactly? > > > Thanks a ton, Dave. It does explain what I'm seeing, and your > explanation looks like a very go

Re: Question on compressed vmlinux .got and .bss sections

2011-04-19 Thread Dave Martin
On Wed, Apr 20, 2011 at 12:08:56AM +0800, Shawn Guo wrote: > On Tue, Apr 19, 2011 at 04:23:09PM +0100, Dave Martin wrote: > > Hopefully this explains what's going on, but what are you trying > > to achieve exactly? > > > Thanks a ton, Dave. It does explain what I'm seeing, and your > explanation

Re: Question on compressed vmlinux .got and .bss sections

2011-04-19 Thread Shawn Guo
On Tue, Apr 19, 2011 at 04:23:09PM +0100, Dave Martin wrote: > Hopefully this explains what's going on, but what are you trying > to achieve exactly? > Thanks a ton, Dave. It does explain what I'm seeing, and your explanation looks like a very good learning material. I'm running into a problem

Re: Question on compressed vmlinux .got and .bss sections

2011-04-19 Thread Dave Martin
On Tue, Apr 19, 2011 at 06:13:01PM +0800, Shawn Guo wrote: > Hi toolchain, kernel folks, > > I'm seeing an interesting thing on .got and .bss sections of > arch/arm/boot/compressed/vmlinux, and really need your expertise to > shed some lights. > > I have an uninitialized variable 'uart_base' defi

Question on compressed vmlinux .got and .bss sections

2011-04-19 Thread Shawn Guo
Hi toolchain, kernel folks, I'm seeing an interesting thing on .got and .bss sections of arch/arm/boot/compressed/vmlinux, and really need your expertise to shed some lights. I have an uninitialized variable 'uart_base' defined in misc.c. static unsigned long uart_base; $ arm-linux-gnueabi-objd