aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2024-03-01 09:00:27 +1030
committerAlan Modra <amodra@gmail.com>2024-03-01 09:22:32 +1030
commitd5c5b27095e3ba5bf589ee3ecf1d22c7ba9212ab (patch)
treeafca800d3e4d0d8d1d638314ed524e16d6135f6a
parentf9771d0e80c3a98e865c7ee5139cadf9d73db436 (diff)
downloadgdb-d5c5b27095e3ba5bf589ee3ecf1d22c7ba9212ab.zip
gdb-d5c5b27095e3ba5bf589ee3ecf1d22c7ba9212ab.tar.gz
gdb-d5c5b27095e3ba5bf589ee3ecf1d22c7ba9212ab.tar.bz2
PR19871, description of --pie
Say why we even mention shared libraries here (ET_DYN), and clarify symbol resolution. There are of course many other ways that PIEs resemble PDEs more closely than shared libraries. PR 19871 * ld.texi (-pie): Clarify.
-rw-r--r--ld/ld.texi13
1 files changed, 7 insertions, 6 deletions
diff --git a/ld/ld.texi b/ld/ld.texi
index 3cba778..6f23475 100644
--- a/ld/ld.texi
+++ b/ld/ld.texi
@@ -2298,12 +2298,13 @@ the i386 PE and ELF targetted ports of the linker.
@item -pie
@itemx --pic-executable
@cindex position independent executables
-Create a position independent executable. This is currently only supported on
-ELF platforms. Position independent executables are similar to shared
-libraries in that they are relocated by the dynamic linker to the virtual
-address the OS chooses for them (which can vary between invocations). Like
-normal dynamically linked executables they can be executed and symbols
-defined in the executable cannot be overridden by shared libraries.
+Create a position independent executable. This is currently only
+supported on ELF platforms. Position independent executables are
+relocated by the dynamic linker to the virtual address the OS chooses
+for them, which can vary between invocations. They are marked ET_DYN
+in the ELF file header, but differ from shared libraries in a number
+of ways. In particular, defined symbols in a PIE by default can not
+be overridden by another object as they can be in a shared library.
@kindex -no-pie
@item -no-pie