Skip to contentSkip to conversation

PowerPC / gcc / prelink

DISCUSSION Mark Hatle 2 participants 3 messages Oct 30, 2015

lore
Share & tools
lore

Mark Hatle

author
#0 lore raw

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

#1 lore raw
Quoted 10 lines · Mark Hatle

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

Quoted 7 lines

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.

Quoted 2 lines

--Mark

author
#2 lore raw
Quoted 15 lines · Khem Raj
Quoted 14 lines · Mark Hatle

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?

Quoted 5 lines
Quoted 3 lines

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

Quoted 3 lines
Quoted 3 lines

--Mark