From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Sun, 18 Jul 2010 15:03:30 +0200 Subject: [U-Boot] [PATCH 1/5] Add basic errno support. In-Reply-To: <4C42F8DE.5040009@gmail.com> References: <1279395948-25864-1-git-send-email-wd@denx.de> <1279395948-25864-2-git-send-email-wd@denx.de> <201007171717.27154.vapier@gentoo.org> <4C42F8DE.5040009@gmail.com> Message-ID: <20100718130330.81193153A7F@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Jerry Van Baren, In message <4C42F8DE.5040009@gmail.com> you wrote: > > > drop the "= 0" so that errno ends up in the bss ? > > -mike > > Is this going to be a problem during early startup (pre-relocation) vs. > normal running? Pre-relocation, we only have a temporary stack and RAM > is not set up initially. > > I have not looked at when RAM gets initialized vs. when env. variables > get used. It is probably OK. Wolfgang? AFAICT the relevant code runs all only after relocation to RAM, i. e. the use of errno (whether in BSS or not) should be no problem. But you are right - using it before relocation will not work as is. We could make it a global data entry, if needed. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "Free markets select for winning solutions." - Eric S. Raymond