From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Tyser Date: Fri, 10 Sep 2010 15:07:29 -0500 Subject: [U-Boot] [PATCH] examples/standalone: Remove relocation compile flags for PowerPC In-Reply-To: References: <1276572325-12642-1-git-send-email-ptyser@xes-inc.com> <4C17CE2F.9050208@freescale.com> <4C17CEEC.8000409@freescale.com> <1276630601.32134.1501.camel@petert> <4C17D851.4010307@freescale.com> <1276632905.32134.1535.camel@petert> <20100615202813.A1816153659@gemini.denx.de> <1276634341.32134.1541.camel@petert> <20100615205129.11EF7153659@gemini.denx.de> <1276659428.15340.7.camel@ptyser-laptop> <20100616145133.BBDE7D81C69@gemini.denx.de> <20100910194959.BD615153798@gemini.denx.de> Message-ID: <1284149249.26713.2926.camel@petert> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Fri, 2010-09-10 at 14:53 -0500, Timur Tabi wrote: > On Fri, Sep 10, 2010 at 2:49 PM, Wolfgang Denk wrote: > > > AFAICT you did not reply to this, and the problem is still unsolved. > > > > Do you still have this on your list? > > Sorry, I'm confused. What exactly do you want me to do? Since you > applied Peter's patch, the problem has gone away for me. Wolfgang applied the "examples/standalone: Remove relocation compile flags for PowerPC" patch. That patch should remove the few bytes of relocation cruft that bumped up the first function address by a few bytes in standalone images. However, I think there's still the issue that if there are multiple functions in a standalone application there's no guarantee the entry point function will be at the base of the image. eg if the app were: int helper_func() { code()... } int entry_point() { // application entry point } The entry point wouldn't be at the base of the image, it'd be offset by the size of helper_func(), and it would jump around depending on compiler version, flags, etc. My last question on the issue was: It looks like the -fno-toplevel-reorder flag is only available in gcc >= 4.2 (http://gcc.gnu.org/gcc-4.2/changes.html released May 2007). So, do we add support to U-Boot to conditionally check for the gcc version like Linux to know when to use -fno-toplevel-reorder? Or do we use a linker script that would support more versions of gcc at the cost of more complexity? I never heard back about the preferred method. I'd personally lean towards checking for compiler version and using the gcc version check + -fno-toplevel-reorder. Best, Peter