Ping Re: Text relocations in PIEs
Joseph S. Myers
joseph at codesourcery.com
Thu Nov 15 17:26:35 UTC 2007
On Thu, 15 Nov 2007, Steven J. Hill wrote:
> > Ping. This patch
> > <http://www.uclibc.org/lists/uclibc/2007-October/018617.html> is pending
> > review.
> >
> Do you have a test case to show how it fails and then it passes when
> the patch is applied? Thanks.
Compile "hello, world" to a .o file without -fpie/-fPIE/-fpic/-fPIC.
Link the resulting .o file into an executable with -pie.
The resulting executable crashes with either uClibc configuration without
the patch, and works or gives a runtime error after the patch depending on
the __FORCE_SHAREABLE_TEXT_SEGMENTS__ setting.
(Might not apply when objects are PIC by default as on MIPS; tested on
ARM.)
--
Joseph S. Myers
joseph at codesourcery.com
More information about the uClibc
mailing list