113 lines
4.1 KiB
Diff
113 lines
4.1 KiB
Diff
diff -up a/ELF/Config.h b/ELF/Config.h
|
|
--- a/ELF/Config.h 2023-07-28 09:10:13.000000000 +0200
|
|
+++ b/ELF/Config.h 2023-07-28 13:07:56.967731331 +0200
|
|
@@ -210,7 +210,7 @@ struct Config {
|
|
bool armHasMovtMovw = false;
|
|
bool armJ1J2BranchEncoding = false;
|
|
bool armCMSESupport = false;
|
|
- bool asNeeded = false;
|
|
+ bool asNeeded = true;
|
|
bool armBe8 = false;
|
|
BsymbolicKind bsymbolic = BsymbolicKind::None;
|
|
bool callGraphProfileSort;
|
|
@@ -226,16 +226,16 @@ struct Config {
|
|
bool ehFrameHdr;
|
|
bool emitLLVM;
|
|
bool emitRelocs;
|
|
- bool enableNewDtags;
|
|
+ bool enableNewDtags = true;
|
|
bool executeOnly;
|
|
bool exportDynamic;
|
|
bool fixCortexA53Errata843419;
|
|
bool fixCortexA8;
|
|
bool formatBinary = false;
|
|
bool fortranCommon;
|
|
- bool gcSections;
|
|
+ bool gcSections = true;
|
|
bool gdbIndex;
|
|
- bool gnuHash = false;
|
|
+ bool gnuHash = true;
|
|
bool gnuUnique;
|
|
bool hasDynSymTab;
|
|
bool ignoreDataAddressEquality;
|
|
@@ -289,7 +289,7 @@ struct Config {
|
|
bool useAndroidRelrTags = false;
|
|
bool warnBackrefs;
|
|
llvm::SmallVector<llvm::GlobPattern, 0> warnBackrefsExclude;
|
|
- bool warnCommon;
|
|
+ bool warnCommon = true;
|
|
bool warnMissingEntry;
|
|
bool warnSymbolOrdering;
|
|
bool writeAddends;
|
|
@@ -319,7 +319,7 @@ struct Config {
|
|
bool zWxneeded;
|
|
DiscardPolicy discard;
|
|
GnuStackKind zGnustack;
|
|
- ICFLevel icf;
|
|
+ ICFLevel icf = ICFLevel::Safe;
|
|
OrphanHandlingPolicy orphanHandling;
|
|
SortSectionPolicy sortSection;
|
|
StripPolicy strip;
|
|
@@ -328,7 +328,7 @@ struct Config {
|
|
Target2Policy target2;
|
|
bool power10Stubs;
|
|
ARMVFPArgKind armVFPArgs = ARMVFPArgKind::Default;
|
|
- BuildIdKind buildId = BuildIdKind::None;
|
|
+ BuildIdKind buildId = BuildIdKind::Sha1;
|
|
SeparateSegmentKind zSeparate;
|
|
ELFKind ekind = ELFNoneKind;
|
|
uint16_t emachine = llvm::ELF::EM_NONE;
|
|
@@ -340,7 +340,7 @@ struct Config {
|
|
unsigned ltoPartitions;
|
|
unsigned ltoo;
|
|
llvm::CodeGenOpt::Level ltoCgo;
|
|
- unsigned optimize;
|
|
+ unsigned optimize = 1;
|
|
StringRef thinLTOJobs;
|
|
unsigned timeTraceGranularity;
|
|
int32_t splitStackAdjustSize;
|
|
diff -up a/ELF/Driver.cpp b/ELF/Driver.cpp
|
|
--- a/ELF/Driver.cpp 2023-07-28 13:02:17.703516879 +0200
|
|
+++ b/ELF/Driver.cpp 2023-07-28 13:02:17.992519613 +0200
|
|
@@ -807,10 +807,10 @@ static int getMemtagMode(opt::InputArgLi
|
|
|
|
static ICFLevel getICF(opt::InputArgList &args) {
|
|
auto *arg = args.getLastArg(OPT_icf_none, OPT_icf_safe, OPT_icf_all);
|
|
- if (!arg || arg->getOption().getID() == OPT_icf_none)
|
|
- return ICFLevel::None;
|
|
- if (arg->getOption().getID() == OPT_icf_safe)
|
|
+ if (!arg || arg->getOption().getID() == OPT_icf_safe)
|
|
return ICFLevel::Safe;
|
|
+ if (arg->getOption().getID() == OPT_icf_none)
|
|
+ return ICFLevel::None;
|
|
return ICFLevel::All;
|
|
}
|
|
|
|
@@ -1199,7 +1199,7 @@ static void readConfigs(opt::InputArgLis
|
|
args.hasArg(OPT_fix_cortex_a8) && !args.hasArg(OPT_relocatable);
|
|
config->fortranCommon =
|
|
args.hasFlag(OPT_fortran_common, OPT_no_fortran_common, false);
|
|
- config->gcSections = args.hasFlag(OPT_gc_sections, OPT_no_gc_sections, false);
|
|
+ config->gcSections = args.hasFlag(OPT_gc_sections, OPT_no_gc_sections, true);
|
|
config->gnuUnique = args.hasFlag(OPT_gnu_unique, OPT_no_gnu_unique, true);
|
|
config->gdbIndex = args.hasFlag(OPT_gdb_index, OPT_no_gdb_index, false);
|
|
config->icf = getICF(args);
|
|
@@ -1349,7 +1349,7 @@ static void readConfigs(opt::InputArgLis
|
|
OPT_use_android_relr_tags, OPT_no_use_android_relr_tags, false);
|
|
config->warnBackrefs =
|
|
args.hasFlag(OPT_warn_backrefs, OPT_no_warn_backrefs, false);
|
|
- config->warnCommon = args.hasFlag(OPT_warn_common, OPT_no_warn_common, false);
|
|
+ config->warnCommon = args.hasFlag(OPT_warn_common, OPT_no_warn_common, true);
|
|
config->warnSymbolOrdering =
|
|
args.hasFlag(OPT_warn_symbol_ordering, OPT_no_warn_symbol_ordering, true);
|
|
config->whyExtract = args.getLastArgValue(OPT_why_extract);
|
|
@@ -2623,7 +2623,7 @@ void LinkerDriver::link(opt::InputArgLis
|
|
if (config->emachine == EM_MIPS)
|
|
config->sysvHash = true;
|
|
else
|
|
- config->sysvHash = config->gnuHash = true;
|
|
+ {config->sysvHash = false; config->gnuHash = true;}
|
|
}
|
|
|
|
// Default output filename is "a.out" by the Unix tradition.
|