Openembedded Core Discussions
 help / color / mirror / Atom feed
* PowerPC / gcc / prelink
@ 2015-10-30 21:42 Mark Hatle
  2015-10-30 21:59 ` Khem Raj
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Hatle @ 2015-10-30 21:42 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer, Khem Raj

I finally chased down the PowerPC prelink problem.  It appears to be within GCC.

On most systems GCC (for PPC) is configured with --enable-secureplt.  However,
the OE-Core version is not.  The prelinker assumes that for certain types of
relocations that the PPC_GOT table will exist, otherwise it gives up.  (It
doesn't know how to do the relocations in the old style .bss-got table.)

I'm wondering if there is a reason that PPC is defaulting to the old style
.bss-got (other then the secureplt was not enabled by default).

Is this something we should do in all cases, or should this become a
DISTRO_FEATURE like the mips 'mplt' setting?


I'm still building systems and running tests, but adding --enable-secureplt to
both the gcc-cross-initial, and gcc-cross appear to have resolved the prelinking
issues.

--Mark


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

* Re: PowerPC / gcc / prelink
  2015-10-30 21:42 PowerPC / gcc / prelink Mark Hatle
@ 2015-10-30 21:59 ` Khem Raj
  2015-10-30 22:44   ` Mark Hatle
  0 siblings, 1 reply; 3+ messages in thread
From: Khem Raj @ 2015-10-30 21:59 UTC (permalink / raw)
  To: Mark Hatle; +Cc: Patches and discussions about the oe-core layer

On Fri, Oct 30, 2015 at 2:42 PM, Mark Hatle <mark.hatle@windriver.com> wrote:
> I finally chased down the PowerPC prelink problem.  It appears to be within GCC.
>
> On most systems GCC (for PPC) is configured with --enable-secureplt.  However,
> the OE-Core version is not.  The prelinker assumes that for certain types of
> relocations that the PPC_GOT table will exist, otherwise it gives up.  (It
> doesn't know how to do the relocations in the old style .bss-got table.)
>
> I'm wondering if there is a reason that PPC is defaulting to the old style
> .bss-got (other then the secureplt was not enabled by default).
>
> Is this something we should do in all cases, or should this become a
> DISTRO_FEATURE like the mips 'mplt' setting?
>
>
> I'm still building systems and running tests, but adding --enable-secureplt to
> both the gcc-cross-initial, and gcc-cross appear to have resolved the prelinking
> issues.

enabling secureplt is ok, ensure that binutils is configured correctly as well.


>
> --Mark


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

* Re: PowerPC / gcc / prelink
  2015-10-30 21:59 ` Khem Raj
@ 2015-10-30 22:44   ` Mark Hatle
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Hatle @ 2015-10-30 22:44 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches and discussions about the oe-core layer

On 10/30/15 4:59 PM, Khem Raj wrote:
> On Fri, Oct 30, 2015 at 2:42 PM, Mark Hatle <mark.hatle@windriver.com> wrote:
>> I finally chased down the PowerPC prelink problem.  It appears to be within GCC.
>>
>> On most systems GCC (for PPC) is configured with --enable-secureplt.  However,
>> the OE-Core version is not.  The prelinker assumes that for certain types of
>> relocations that the PPC_GOT table will exist, otherwise it gives up.  (It
>> doesn't know how to do the relocations in the old style .bss-got table.)
>>
>> I'm wondering if there is a reason that PPC is defaulting to the old style
>> .bss-got (other then the secureplt was not enabled by default).
>>
>> Is this something we should do in all cases, or should this become a
>> DISTRO_FEATURE like the mips 'mplt' setting?
>>
>>
>> I'm still building systems and running tests, but adding --enable-secureplt to
>> both the gcc-cross-initial, and gcc-cross appear to have resolved the prelinking
>> issues.
> 
> enabling secureplt is ok, ensure that binutils is configured correctly as well.

binutils 2.25.1 has all of the support needed for secure-plt.  So I don't
believe there are any issues there.

I'll prepare a patch that changes the default configuration.

--Mark

> 
>>
>> --Mark



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

end of thread, other threads:[~2015-10-30 22:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-30 21:42 PowerPC / gcc / prelink Mark Hatle
2015-10-30 21:59 ` Khem Raj
2015-10-30 22:44   ` Mark Hatle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox