From: ffmm rrcc Date: Fri, 8 May 2009 15:49:24 +0800 Subject: [U-Boot] How to change the entry point for standalone Applications same as the text section base address In-Reply-To: <20090507072238.2949E83420E8@gemini.denx.de> References: <20090507072238.2949E83420E8@gemini.denx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Wolfgang: 2009/5/7 Wolfgang Denk : > Dear ffmm rrcc, > > In message you wrote: >> Hi all: >> >> I have write a standalone application on U-Boot,it works well.but i >> have to get the entry point address follow this article: >> >> http://www.denx.de/wiki/view/DULG/MyStandaloneProgramDoesNotWork >> >> I use -Ttext option for ${CROSS_COMPILE}ld to set the text section >> base address,and -e option to set the entry point function,is there >> any way to let the compiler and linker put the entry point function on >> the text section base address? > > Change your code so that your entry point function is ?the ?first ?or > only ?function ?in ?a ?source ?file (and thus in the resulting object > file), and change the linker script so that this object ?gets ?linked > first, starting at the text section base address. > > 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 > The light at the end of the tunnel is usually a "No Exit" sign. > Thanks,follow your suggestion,my problem has been fixed. -- Best regards rrccffmm