Explain -nodynlink better

Including interactions with PIE.

Closes: #8867
master
Xavier Leroy 2020-10-16 09:55:22 +02:00
parent 8b7ff3532c
commit 0fac4b030b
1 changed files with 7 additions and 2 deletions

View File

@ -393,8 +393,13 @@ libraries and options on the command line.
\nat{%
\item["-nodynlink"]
Allow the compiler to use some optimizations that are valid only for code
that is never dynlinked.
Allow the compiler to use some optimizations that are valid only for
code that is statically linked to produce a non-relocatable
executable. The generated code cannot be linked to produce a shared
library nor a position-independent executable (PIE). Many Linux
systems produce PIEs by default, causing errors when linking code
compiled with "-nodynlink". Either do not use "-nodynlink" or pass
the option "-ccopt -no-pie" at link-time.
}%nat
\item["-nolabels"]