[U-Boot] [PATCH] PowerPC: Change -fpic flag to -fPIC flag in the config.mk

Wolfgang Denk
2012-04-18T09:20:15Z

Dear Chunhe Lan,

In message <4F8E6E06.3060101@freescale.com> you wrote:
>
> > As you state yourself, your modification has the negative impact of
> > increasing the image size. What would be the benefits of it?
> >
> > Are you trying to fix any specific problem? Which one? I am not aware
> > of any related isses for any of the mainline PowerPC systems...
> Yes, I have fixed the booting issue of nand u-boot of
> P1010/P1022/P1023/P2020 with this patch.

What exactly is "the booting issue" you mention here? Are you
referring to any messages previously posted here? Which?

> But when use gcc 4.6 version, produce the size of u-boot-nand.bin to
> be different with -fpic or -fPIC.
> The some GOT entries of u-boot-nand.bin are lost with -fpic(because
> limit the size), so
> u-boot-nand.bin hangs when booting. But use -fPIC, the
> u-boot-nand.bin is OK.

What do you mean "GOT entries ... are lost"? Are there any error
messages?

If yes, what exactly are these?

If not, then this has to be considered a serious bug in either the
compiler and the linker, and it should be fixed there rather than
being papered over.

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
I think it's a new feature. Don't tell anyone it was an accident. :-)
-- Larry Wall on s/foo/bar/eieio in <10911@jpl-devvax.JPL.NASA.GOV>