[PATCH] D139092: [RFC][LLD][ELF] Cortex-M Security Extensions (CMSE) Support

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 17 21:14:24 PST 2022


MaskRay added a comment.

Neither `arc patch D139092` nor `curl -L 'https://reviews.llvm.org/D139092?download=1' | patch -p1` applies this patch cleanly. Can you rebase and check that this works?



================
Comment at: lld/ELF/Arch/ARM.cpp:926
 
-  if (in.armCmseSGSection->getSize() == 0)
-    return;
-
-  if (config->out_implib.empty())
-    return;
-
-  SmallVector<SyntheticSection *, 0> inputSections;
-  SmallVector<OutputSection *, 0> outputSections;
+  StringTableSection *IsShStrTab =
+      make<StringTableSection>(".shstrtab", /*dynamic=*/false);
----------------
variable case


================
Comment at: lld/ELF/Arch/ARM.cpp:932
 
-  StringTableSection *shStrTab = make<StringTableSection>(".shstrtab", false);
-  StringTableSection *strTab = make<StringTableSection>(".strtab", false);
-  SymbolTableBaseSection *symTab = make<SymbolTableSection<ELFT>>(*strTab);
-  SymtabShndxSection *symTabShndx = make<SymtabShndxSection>();
+  SmallVector<std::pair<OutputSection *, SyntheticSection *>, 0> OsIsPairs;
+  OsIsPairs.push_back(
----------------



================
Comment at: lld/ELF/Driver.cpp:346
 
-    if (!config->in_implib.empty())
       error("--in-implib is only supported on ARM targets");
----------------
This piece of code doesn't exist in upstream. Please ensure the patch is against the upstream. If you have multiple commits locally, fold them.


================
Comment at: lld/ELF/InputFiles.cpp:534
 
-  if (toString(this) == config->in_implib) {
+  if (toString(this) == config->cmseInputLib) {
     initializeJustSymbols();
----------------
As mentioned, `toString(this)` is costly and should be used here.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139092/new/

https://reviews.llvm.org/D139092



More information about the llvm-commits mailing list