ld: PowerPC ELF32

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