public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* tst-prelink fails when built with -fPIC
@ 2016-11-25 10:28 Aurelien Jarno
  2016-11-25 11:49 ` Florian Weimer
  2016-11-25 17:20 ` Joseph Myers
  0 siblings, 2 replies; 6+ messages in thread
From: Aurelien Jarno @ 2016-11-25 10:28 UTC (permalink / raw)
  To: libc-alpha

Hi all,

Debian builds gcc 6.2 with --enable-default-pie, which correspond to
always passing -pie -fPIE -fPIC. This causes the tst-prelink to fail on
many architectures (at least arm, aarch64, i386, mips*) due to the use
of -fPIC.

Would it make sense to build this test with -fno-PIC? In that case I'll
send a patch.

Thanks,
Aurelien

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien@aurel32.net                 http://www.aurel32.net

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: tst-prelink fails when built with -fPIC
  2016-11-25 10:28 tst-prelink fails when built with -fPIC Aurelien Jarno
@ 2016-11-25 11:49 ` Florian Weimer
  2016-11-25 14:12   ` Aurelien Jarno
  2016-11-25 17:20 ` Joseph Myers
  1 sibling, 1 reply; 6+ messages in thread
From: Florian Weimer @ 2016-11-25 11:49 UTC (permalink / raw)
  To: Aurelien Jarno; +Cc: libc-alpha

On 11/25/2016 11:28 AM, Aurelien Jarno wrote:
> Hi all,
>
> Debian builds gcc 6.2 with --enable-default-pie, which correspond to
> always passing -pie -fPIE -fPIC. This causes the tst-prelink to fail on
> many architectures (at least arm, aarch64, i386, mips*) due to the use
> of -fPIC.

What does the failure look like?

Thanks,
Florian

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: tst-prelink fails when built with -fPIC
  2016-11-25 11:49 ` Florian Weimer
@ 2016-11-25 14:12   ` Aurelien Jarno
  0 siblings, 0 replies; 6+ messages in thread
From: Aurelien Jarno @ 2016-11-25 14:12 UTC (permalink / raw)
  To: Florian Weimer; +Cc: libc-alpha

On 2016-11-25 12:49, Florian Weimer wrote:
> On 11/25/2016 11:28 AM, Aurelien Jarno wrote:
> >Hi all,
> >
> >Debian builds gcc 6.2 with --enable-default-pie, which correspond to
> >always passing -pie -fPIE -fPIC. This causes the tst-prelink to fail on
> >many architectures (at least arm, aarch64, i386, mips*) due to the use
> >of -fPIC.
> 
> What does the failure look like?

Running tst-prelink with LD_TRACE_PRELINKING=1 doesn't output the
following line for the stdout symbol:

  conflict 0xf7532000 0x00008598 -> 0x56559000 0x00003124 x 0xf7532000 0x001b3dfc /0 stdout

Aurelien

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien@aurel32.net                 http://www.aurel32.net

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: tst-prelink fails when built with -fPIC
  2016-11-25 10:28 tst-prelink fails when built with -fPIC Aurelien Jarno
  2016-11-25 11:49 ` Florian Weimer
@ 2016-11-25 17:20 ` Joseph Myers
  2016-11-25 18:15   ` Aurelien Jarno
  1 sibling, 1 reply; 6+ messages in thread
From: Joseph Myers @ 2016-11-25 17:20 UTC (permalink / raw)
  To: Aurelien Jarno; +Cc: libc-alpha

On Fri, 25 Nov 2016, Aurelien Jarno wrote:

> Hi all,
> 
> Debian builds gcc 6.2 with --enable-default-pie, which correspond to
> always passing -pie -fPIE -fPIC. This causes the tst-prelink to fail on

Why -fPIC?  It's documented as -fPIE -pie, *not* -fPIC.

Now, -fPIE ends up with glibc building with -DPIC, and in some cases that 
may break things if code isn't ready for PIC building outside shared 
libraries.  Those cases can be fixed individually.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: tst-prelink fails when built with -fPIC
  2016-11-25 17:20 ` Joseph Myers
@ 2016-11-25 18:15   ` Aurelien Jarno
  2017-06-21 14:42     ` Stefan Liebler
  0 siblings, 1 reply; 6+ messages in thread
From: Aurelien Jarno @ 2016-11-25 18:15 UTC (permalink / raw)
  To: Joseph Myers; +Cc: libc-alpha

On 2016-11-25 17:20, Joseph Myers wrote:
> On Fri, 25 Nov 2016, Aurelien Jarno wrote:
> 
> > Hi all,
> > 
> > Debian builds gcc 6.2 with --enable-default-pie, which correspond to
> > always passing -pie -fPIE -fPIC. This causes the tst-prelink to fail on
> 
> Why -fPIC?  It's documented as -fPIE -pie, *not* -fPIC.

You are correct it's only -fPIE. Now using either -fno-PIE or -fno-PIC
makes the tst-prelink to pass. But -fno-PIE is the correct option here.

> Now, -fPIE ends up with glibc building with -DPIC, and in some cases that 
> may break things if code isn't ready for PIC building outside shared 
> libraries.  Those cases can be fixed individually.

Indeed. I have already send a patch for x86-64, I am currently testing a
patch for s390.

Aurelien

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien@aurel32.net                 http://www.aurel32.net

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: tst-prelink fails when built with -fPIC
  2016-11-25 18:15   ` Aurelien Jarno
@ 2017-06-21 14:42     ` Stefan Liebler
  0 siblings, 0 replies; 6+ messages in thread
From: Stefan Liebler @ 2017-06-21 14:42 UTC (permalink / raw)
  To: libc-alpha

On 11/25/2016 07:15 PM, Aurelien Jarno wrote:
> On 2016-11-25 17:20, Joseph Myers wrote:
>> On Fri, 25 Nov 2016, Aurelien Jarno wrote:
>>
>>> Hi all,
>>>
>>> Debian builds gcc 6.2 with --enable-default-pie, which correspond to
>>> always passing -pie -fPIE -fPIC. This causes the tst-prelink to fail on
>>
>> Why -fPIC?  It's documented as -fPIE -pie, *not* -fPIC.
> 
> You are correct it's only -fPIE. Now using either -fno-PIE or -fno-PIC
> makes the tst-prelink to pass. But -fno-PIE is the correct option here.
> 
>> Now, -fPIE ends up with glibc building with -DPIC, and in some cases that
>> may break things if code isn't ready for PIC building outside shared
>> libraries.  Those cases can be fixed individually.
> 
> Indeed. I have already send a patch for x86-64, I am currently testing a
> patch for s390.
> 
> Aurelien
> 

Are there any news for this?

Bye.
Stefan

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-06-21 14:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-25 10:28 tst-prelink fails when built with -fPIC Aurelien Jarno
2016-11-25 11:49 ` Florian Weimer
2016-11-25 14:12   ` Aurelien Jarno
2016-11-25 17:20 ` Joseph Myers
2016-11-25 18:15   ` Aurelien Jarno
2017-06-21 14:42     ` Stefan Liebler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).