aboutsummaryrefslogtreecommitdiff
path: root/ld/ld.texi
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2024-06-13 15:10:15 +0100
committerNick Clifton <nickc@redhat.com>2024-06-13 15:10:15 +0100
commite8e10743f7b207b21a1efb0cc9e42487080db013 (patch)
treedaeed5b3fb3bdadce5bc0b6297cca0c96aee37a7 /ld/ld.texi
parent888ff82e77d9ab8f04893a68cd6b4f518d6b50d9 (diff)
downloadgdb-e8e10743f7b207b21a1efb0cc9e42487080db013.zip
gdb-e8e10743f7b207b21a1efb0cc9e42487080db013.tar.gz
gdb-e8e10743f7b207b21a1efb0cc9e42487080db013.tar.bz2
Add --rosegment option to BFD linker to stop the '-z separate-code' from generating two read-only segments.
PR 30907
Diffstat (limited to 'ld/ld.texi')
-rw-r--r--ld/ld.texi15
1 files changed, 15 insertions, 0 deletions
diff --git a/ld/ld.texi b/ld/ld.texi
index ef3706f..9f3fbbd 100644
--- a/ld/ld.texi
+++ b/ld/ld.texi
@@ -1121,6 +1121,21 @@ For compatibility with other ELF linkers, if the @option{-R} option is
followed by a directory name, rather than a file name, it is treated as
the @option{-rpath} option.
+@item --rosegment
+@itemx --no-rosegment
+Attempt to ensure that only a single read-only, non-code segment is
+created. Only useful when used in conjunction with the @option{-z
+separate-code} option. The resulting binaries should be smaller than
+if @option{-z separate-code} is used on its own. Without this option,
+or if @option{--no-rosegment} is specified, the @option{-z separate-code}
+option will create two read-only segments, one before the code segment
+and one after it.
+
+The name of the options are misleading, but they have been chosen in
+order for the linker to be compatible with the LLD and GOLD linkers.
+
+Thse options are only supported by ELF targets.
+
@kindex -s
@kindex --strip-all
@cindex strip all symbols