Commit d5e60de3 authored by Ben Gamari's avatar Ben Gamari 🐢

user-guide: Fix :since: annotation of -pie and add documentation for -fPIE

[skip ci]
parent e462b657
......@@ -578,6 +578,16 @@ Options affecting code generation
Windows, position-independent code is never used so the flag is a
no-op on that platform.
.. ghc-flag:: -fPIE
:shortdesc: Generate code for a position-independent executable (where available)
:type: dynamic
:category: codegen
Generate code in such a way to be linkable into a position-independent
executable This currently works on Linux x86 and x86-64. On Windows,
position-independent code is never used so the flag is a no-op on that
platform. To link the final executable use :ghc-flag:`-pie`.
.. ghc-flag:: -dynamic
:shortdesc: Build dynamically-linked object files and executables
:type: dynamic
......@@ -1119,7 +1129,7 @@ for example).
:type: dynamic
:category: linking
:since: 8.2.1
:since: 8.2.2
This instructs the linker to produce a position-independent executable.
This flag is only valid while producing executables and all object code
......@@ -1136,4 +1146,4 @@ for example).
loaded into the address space of another Haskell process.
Also, you may need to use the :ghc-flags:`-rdynamic` flag to ensure that
that symbols are not dropped from your PIE object.
that symbols are not dropped from your PIE objects.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment