* [binutils-gdb] ld: Add --undefined-version
@ 2022-10-14 2:06 Fangrui Song
0 siblings, 0 replies; only message in thread
From: Fangrui Song @ 2022-10-14 2:06 UTC (permalink / raw)
To: bfd-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=27fb6a1a7fcd047e7d01bef8e3c12ed67bc7aed0
commit 27fb6a1a7fcd047e7d01bef8e3c12ed67bc7aed0
Author: Fangrui Song <i@maskray.me>
Date: Thu Oct 13 19:06:43 2022 -0700
ld: Add --undefined-version
This cancels a previous --no-undefined-version.
gold has had --undefined-version for a long time.
Diff:
---
ld/ldlex.h | 1 +
ld/lexsup.c | 5 +++++
2 files changed, 6 insertions(+)
diff --git a/ld/ldlex.h b/ld/ldlex.h
index 57ade1f754b..894582595c1 100644
--- a/ld/ldlex.h
+++ b/ld/ldlex.h
@@ -120,6 +120,7 @@ enum option_values
#if SUPPORT_ERROR_HANDLING_SCRIPT
OPTION_ERROR_HANDLING_SCRIPT,
#endif
+ OPTION_UNDEFINED_VERSION,
OPTION_NO_UNDEFINED_VERSION,
OPTION_DEFAULT_SYMVER,
OPTION_DEFAULT_IMPORTED_SYMVER,
diff --git a/ld/lexsup.c b/ld/lexsup.c
index 0c01c9966e0..0068ff59798 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
@@ -396,6 +396,8 @@ static const struct ld_option ld_options[] =
OPTION_ERROR_HANDLING_SCRIPT},
'\0', N_("SCRIPT"), N_("Provide a script to help with undefined symbol errors"), TWO_DASHES},
#endif
+ { {"undefined-version", no_argument, NULL, OPTION_UNDEFINED_VERSION},
+ '\0', NULL, N_("Allow undefined version"), EXACTLY_TWO_DASHES },
{ {"no-undefined-version", no_argument, NULL, OPTION_NO_UNDEFINED_VERSION},
'\0', NULL, N_("Disallow undefined version"), TWO_DASHES },
{ {"default-symver", no_argument, NULL, OPTION_DEFAULT_SYMVER},
@@ -1088,6 +1090,9 @@ parse_args (unsigned argc, char **argv)
break;
#endif
+ case OPTION_UNDEFINED_VERSION:
+ link_info.allow_undefined_version = true;
+ break;
case OPTION_NO_UNDEFINED_VERSION:
link_info.allow_undefined_version = false;
break;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-10-14 2:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-14 2:06 [binutils-gdb] ld: Add --undefined-version Fangrui Song
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).