summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2017-10-02 18:02:40 -0400
committerBen Gamari <ben@smart-cactus.org>2017-10-02 18:05:29 -0400
commitd5e60de307874432f42aa7fea2460e6901c057e1 (patch)
tree1c3f4ab8bb94f69f92346c775ee1c35e1096cd57 /docs
parente462b657daa003d365440afdad14c5756898b5e0 (diff)
downloadhaskell-d5e60de307874432f42aa7fea2460e6901c057e1.tar.gz
user-guide: Fix :since: annotation of -pie and add documentation for -fPIE
[skip ci]
Diffstat (limited to 'docs')
-rw-r--r--docs/users_guide/phases.rst14
1 files changed, 12 insertions, 2 deletions
diff --git a/docs/users_guide/phases.rst b/docs/users_guide/phases.rst
index 0b754621dd..d14a7fa5f1 100644
--- a/docs/users_guide/phases.rst
+++ b/docs/users_guide/phases.rst
@@ -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.