[Aboriginal] PIE

Rob Landley rob at landley.net
Mon May 18 22:29:31 PDT 2015


On Mon, May 18, 2015 at 3:35 PM, David Halls <dahalls at gmail.com> wrote:
> ~ # cat wup.c
> int main(int argc, char **argv) { return 0; }
> ~ # gcc -fPIE -pie wup.c
> ld: /usr/cc/lib/crtbegin.o: relocation R_X86_64_32 against
> `_Jv_RegisterClasses' can not be used when making a shared object; recompile
> with -fPIC
> /usr/cc/lib/crtbegin.o: could not read symbols: Bad value
>
> I tried -nostartfiles and speciying Scrtbegin.o but to no avail.
> Am I barking up the wrong tree?

Sounds like I need to updated ccwrap.c to understand -fPIE.

http://landley.net/hg/aboriginal/file/tip/sources/toys/ccwrap.c

(That said, I may have to hit the gcc build with a brick to shake
Scrtbegin.o out of it, not sure it's building/installing that yet.
There's a cc/lib/crtbeginS.o, I take it that's different?)

Rob



More information about the Aboriginal mailing list