From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tolunay Orkun Date: Mon, 06 Nov 2006 14:35:44 -0600 Subject: [U-Boot-Users] Why are some global vars part of the image, and some not? In-Reply-To: <454F9123.4050706@freescale.com> References: <20061104020417.69640352658@atlas.denx.de> <454F7440.5030709@freescale.com> <454F78D6.6020805@smiths-aerospace.com> <454F7A30.9030100@freescale.com> <454F8373.1000300@smiths-aerospace.com> <454F854B.9000402@freescale.com> <454F879E.9020803@smiths-aerospace.com> <454F9123.4050706@freescale.com> Message-ID: <454F9CA0.80407@orkun.us> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Scott Wood wrote: > The BSS is purely an optimization; besides increasing flash footprint > somewhat, removing it should not change anything except for code that > was already broken. But that increase in size can be important. Besides after relocation from ROM to RAM the area will not be used. I personally would rather not increase the size of image to handle a limited number of special cases where this initialization is needed prior to relocation to RAM. You can handle such special cases by instructing the variable to be placed on "data" section (like Timur did). Perhaps a macro could be defined to make it more readable and documentation/faq would take care of education. Tolunay