John David Anglin | 1 Jun 15:05
Picon

Re: -pie is broken on hppa

> 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.

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.

Dave
--

-- 
J. David Anglin                                  dave.anglin <at> nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)
seb | 1 Jun 15:25

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.
(Continue reading)

John David Anglin | 1 Jun 15:51
Picon

Re: [parisc-linux] -pie is broken on hppa

> seb$ gcc -pie -fpie hello.c -o hello
> seb$ ./hello
> Segmentation fault

Run hello under gdb.  Do a backtrace and disassembly at the point
of the fault.

> It's not the unexpected reloc type 0x42 ?
> If yes, it's a different problem.

That's the one I was thinking of.  It looks like this is a problem
related to PIE (PIC) support and TLS.  Possibly, this is the TLS PIC
bug that Aurelien fixed on May 5.  I backported that change to the
GCC 4.1 and 4.2 branches last night.  Have no idea as to the status
of this patch in debian, etc.

Dave
--

-- 
J. David Anglin                                  dave.anglin <at> nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

Aurelien Jarno | 1 Jun 16:17

Re: [parisc-linux] -pie is broken on hppa

John David Anglin a écrit :
>> seb$ gcc -pie -fpie hello.c -o hello
>> seb$ ./hello
>> Segmentation fault
> 
> Run hello under gdb.  Do a backtrace and disassembly at the point
> of the fault.
> 
>> It's not the unexpected reloc type 0x42 ?
>> If yes, it's a different problem.
> 
> That's the one I was thinking of.  It looks like this is a problem
> related to PIE (PIC) support and TLS.  Possibly, this is the TLS PIC
> bug that Aurelien fixed on May 5.  I backported that change to the
> GCC 4.1 and 4.2 branches last night.  Have no idea as to the status
> of this patch in debian, etc.
> 

If you are using the latest version in unstable, this patch should be
present for both gcc-4.1 and gcc-4.2.

-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   aurel32 <at> debian.org         | aurelien <at> aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net

--

-- 
To UNSUBSCRIBE, email to debian-hppa-REQUEST <at> lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster <at> lists.debian.org
(Continue reading)


Gmane