Skip to content

Commit

Permalink
[ELF] Add --dy and --dn aliases
Browse files Browse the repository at this point in the history
GNU ld aliases these to -Bdynamic and -Bstatic respectively.

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
  • Loading branch information
Scrumplex committed Mar 8, 2022
1 parent c1af9c9 commit 82e8072
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions elf/cmdline.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ static const char helpmsg[] = R"(
-s, --strip-all Strip .symtab section
-u SYMBOL, --undefined SYMBOL
Force to resolve SYMBOL
--Bdynamic Link against shared libraries (default)
--Bstatic Do not link against shared libraries
--Bdynamic, --dy Link against shared libraries (default)
--Bstatic, --dn Do not link against shared libraries
--Bsymbolic Bind global symbols locally
--Bsymbolic-functions Bind global functions locally
--Bno-symbolic Cancel --Bsymbolic and --Bsymbolic-functions
Expand Down Expand Up @@ -505,10 +505,10 @@ void parse_nonpositional_args(Context<E> &ctx,
ctx.arg.print_dependencies = 2;
} else if (read_flag(args, "print-map") || read_flag(args, "M")) {
ctx.arg.print_map = true;
} else if (read_flag(args, "static") || read_flag(args, "Bstatic")) {
} else if (read_flag(args, "Bstatic") || read_flag(args, "dn") || read_flag(args, "static")) {
ctx.arg.is_static = true;
remaining.push_back("-Bstatic");
} else if (read_flag(args, "Bdynamic")) {
} else if (read_flag(args, "Bdynamic") || read_flag(args, "dy")) {
ctx.arg.is_static = false;
remaining.push_back("-Bdynamic");
} else if (read_flag(args, "shared") || read_flag(args, "Bshareable")) {
Expand Down

0 comments on commit 82e8072

Please sign in to comment.