aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2024-05-25 07:44:59 -0700
committerH.J. Lu <hjl.tools@gmail.com>2024-05-25 07:46:38 -0700
commit0daa17bf187cebd5b200f4fd5405cc55e75c391f (patch)
tree45dcf6b0371d0dc601c9a668ad9608dc045a4268
parent7870026f9748ac1d53efe73ae9cb7fe739478453 (diff)
downloadgdb-0daa17bf187cebd5b200f4fd5405cc55e75c391f.zip
gdb-0daa17bf187cebd5b200f4fd5405cc55e75c391f.tar.gz
gdb-0daa17bf187cebd5b200f4fd5405cc55e75c391f.tar.bz2
ld: Document -pie -Ttext-segment=ORG generates ET_EXEC
This is the v2 patch I am checking in. H.J.
-rw-r--r--ld/ld.texi5
1 files changed, 4 insertions, 1 deletions
diff --git a/ld/ld.texi b/ld/ld.texi
index dd0af8e..ef3706f 100644
--- a/ld/ld.texi
+++ b/ld/ld.texi
@@ -2694,7 +2694,10 @@ Same as @option{--section-start}, with @code{.bss}, @code{.data} or
@item -Ttext-segment=@var{org}
@cindex text segment origin, cmd line
When creating an ELF executable, it will set the address of the first
-byte of the text segment.
+byte of the text segment. Note that when @option{-pie} is used with
+@option{-Ttext-segment=@var{org}}, the output executable is marked
+ET_EXEC so that the address of the first byte of the text segment will
+be guaranteed to be @var{org} at run time.
@kindex -Trodata-segment=@var{org}
@item -Trodata-segment=@var{org}