[U-Boot] [PATCH] examples/standalone: Remove relocation compile flags for PowerPC
Peter Tyser
ptyser at xes-inc.com
Fri Sep 10 22:07:29 CEST 2010
On Fri, 2010-09-10 at 14:53 -0500, Timur Tabi wrote:
> On Fri, Sep 10, 2010 at 2:49 PM, Wolfgang Denk <wd at denx.de> 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
More information about the U-Boot
mailing list