Re: [parisc-linux] -pie is broken on hppa
On Fri, Jun 01, 2007 at 09:05:18AM -0400, John David Anglin wrote:
> > Hi,
> > I discovered that the breakage of portmap on hppa is related to the
> > -pie linkage.
> > Every program linked with the -pie option segfaults at start.
> > Unfortunately, portmap is unconditionnaly built with this option.
> > I suspect nscd is in the same case.
>
> This problem was fixed sometime ago. I don't see it with libc6
> 2.3.6.ds1-13. Also, nscd doesn't segfault on my system. Make sure
> the libc6 and binutils packages on your system are up to date.
Here is the relevant parts:
ii binutils 2.17cvs20070426-8
ii binutils-hppa64 2.17cvs20070426-8
ii gcc 4:4.1.2-2
ii gcc-4.1 4.1.2-8
ii gcc-4.1-base 4.1.2-8
ii gcc-4.1-doc 4.1.1.nf3-1
ii gcc-4.1-locales 4.1.2-10
ii gcc-4.2 4.2-20070528-1
ii gcc-4.2-base 4.2-20070528-1
ii gcc-doc-base 4.1.1.nf3-1
ii libc6 2.5-9
ii libc6-dbg 2.5-9
ii libc6-dev 2.5-9
ii libgcc1 1:3.3.6-15
ii libgcc4 4.2-20070528-1
This is unstable. A few days ago, the unstable switched to the 2.5 glibc.
Testcase is as follow:
seb$ cat hello.c
#include <stdio.h>
int main( void ) {
printf("hello world !\n");
return 0;
}
seb$ gcc -fpie hello.c -o hello
seb$ ./hello
hello world !
seb$ gcc -pie -fpie hello.c -o hello
seb$ ./hello
Segmentation fault
seb$
>
> If they are up to date and you still have the problem, provide testcase
> and details on libc6, gcc and binutils versions.
>
> The problem was in crt1.o and related to the handling of R_PARISC_PLABEL21L
> and R_PARISC_PLABEL14R relocations.
I'll check on the glibc details. Is there any relevant name for this patch and a date ?
It's not the unexpected reloc type 0x42 ?
If yes, it's a different problem.
>
> Dave
> --
> J. David Anglin dave.anglin@nrc-cnrc.gc.ca
> National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
Reply to: