Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lld/ELF/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ struct Config {
uint8_t zStartStopVisibility;
bool zText;
bool zRetpolineplt;
bool zWxneeded;
bool zWxneeded = false;
DiscardPolicy discard;
GnuStackKind zGnustack;
ICFLevel icf;
Expand Down
5 changes: 3 additions & 2 deletions lld/ELF/Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1503,7 +1503,6 @@ static void readConfigs(Ctx &ctx, opt::InputArgList &args) {
getZFlag(args, "start-stop-gc", "nostart-stop-gc", true);
ctx.arg.zStartStopVisibility = getZStartStopVisibility(ctx, args);
ctx.arg.zText = getZFlag(args, "text", "notext", true);
ctx.arg.zWxneeded = hasZOption(args, "wxneeded");
setUnresolvedSymbolPolicy(ctx, args);
ctx.arg.power10Stubs = args.getLastArgValue(OPT_power10_stubs_eq) != "no";

Expand Down Expand Up @@ -1898,8 +1897,10 @@ static void setConfigs(Ctx &ctx, opt::InputArgList &args) {
<< ": " << e.message();
}

if (ctx.arg.osabi == ELFOSABI_OPENBSD)
if (ctx.arg.osabi == ELFOSABI_OPENBSD) {
ctx.arg.zNoBtCfi = hasZOption(args, "nobtcfi");
ctx.arg.zWxneeded = hasZOption(args, "wxneeded");
}
}

static bool isFormatBinary(Ctx &ctx, StringRef s) {
Expand Down
Loading