aboutsummaryrefslogtreecommitdiff
path: root/gold/options.h
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2023-03-27 11:10:10 +0100
committerNick Clifton <nickc@redhat.com>2023-03-27 11:10:10 +0100
commiteb42b9d6f914b233d740da88d5e21c6690170b7d (patch)
tree3c3d3b8bdf2c5c32aad922421f098d42925ce58d /gold/options.h
parent1770eca698ad0018cd504b9744306fc9928d9a86 (diff)
downloadgdb-eb42b9d6f914b233d740da88d5e21c6690170b7d.zip
gdb-eb42b9d6f914b233d740da88d5e21c6690170b7d.tar.gz
gdb-eb42b9d6f914b233d740da88d5e21c6690170b7d.tar.bz2
Add an option to the gold linker to put its version string into the .comment section.
PR 30187 * options.h (class General_options): Add enable-linker-version. * layout.cc (Layout::create_gold_note): If linker-version is enabled put the version string into the .comment section.
Diffstat (limited to 'gold/options.h')
-rw-r--r--gold/options.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gold/options.h b/gold/options.h
index 1aa451c..46f658f 100644
--- a/gold/options.h
+++ b/gold/options.h
@@ -847,6 +847,10 @@ class General_options
N_("Enable use of DT_RUNPATH"),
N_("Disable use of DT_RUNPATH"));
+ DEFINE_enable(linker_version, options::EXACTLY_TWO_DASHES, '\0', false,
+ N_("Put the linker version string into the .comment section"),
+ N_("Put the linker version string into the .note.gnu.gold-version section"));
+
DEFINE_bool(enum_size_warning, options::TWO_DASHES, '\0', true, NULL,
N_("(ARM only) Do not warn about objects with incompatible "
"enum sizes"));