and PowerPC 32-bit ELF Support
Branches on PowerPC processors are limited to a signed 26-bit displacement, which may result in
relocation truncated to fit
’ errors with very large programs. ‘
’ enables the generation of trampolines that can access the entire 32-bit address space. These trampolines are inserted at section boundaries, so may not themselves be reachable if an input section exceeds 33M in size. You may combine ‘
’ and ‘
’ to add trampolines in a partial link. In that case both branches to undefined symbols and inter-section branches are also considered potentially out of range,
and trampolines inserted.
Current PowerPC GCC accepts a ‘
’ option that generates code capable of using a newer PLT and GOT layout that has the security advantage of no executable section ever needing to be writable and no writable section ever being executable. PowerPC
will generate this layout, including stubs to access the PLT, if all input files (including startup and static libraries) were compiled with ‘
’ forces the old BSS PLT (and GOT layout) which can give slightly better performance.
will use the new PLT and GOT layout if it is linking new ‘
’ or ‘
’ code, but does not do so automatically when linking non-PIC code. This option requests the new PLT and GOT layout. A warning will be given if some object file requires the old style BSS PLT.
The new secure PLT and GOT are placed differently relative to other sections compared to older BSS PLT and GOT placement. The location of
must change because the new secure PLT is an initialized section while the old PLT is uninitialized. The reason for the
change is more subtle: The new placement allows
to be read-only in applications linked with ‘
-z relro -z now
’. However, this placement means that
cannot always be used in shared libraries, because the PowerPC ABI accesses
in shared libraries from the GOT pointer. ‘
’ forces the old GOT placement. PowerPC GCC doesn't use
in shared libraries, so this option is really only useful for other compilers that may do so.
This option causes
to label linker stubs with a local symbol that encodes the stub type and destination.
normally performs some optimization of code sequences used to access Thread-Local Storage. Use this option to disable the optimization.