[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 3 17:39:52 PST 2022
MaskRay added inline comments.
================
Comment at: lld/ELF/SyntheticSections.cpp:2277
+ ArmCmseFixedAddressSGVeneer *s = dyn_cast<ArmCmseFixedAddressSGVeneer>(ss);
+ ss->outSecOff = (s->getAddr() & ~1);
+ Defined(ss->file, StringRef(), ss->sym->binding, ss->sym->stOther,
----------------
delete parentheses
================
Comment at: lld/ELF/SyntheticSections.cpp:2282
+ }
+ size_t off = (impLibMaxAddr < getVA() ? getVA() : impLibMaxAddr);
+ off += (newEntries * entsize);
----------------
`const size_t off = (impLibMaxAddr < getVA() ? getVA() : impLibMaxAddr) + newEntries * entsize;`
Prefer computing the initial value in one step instead of two.
================
Comment at: lld/ELF/SyntheticSections.cpp:2287
+ break;
+ ArmCmseVariableAddressSGVeneer *s =
+ dyn_cast<ArmCmseVariableAddressSGVeneer>(ss);
----------------
================
Comment at: lld/ELF/SyntheticSections.cpp:2290
+ off -= s->entsize;
+ ss->outSecOff = (off & ~1);
+ Defined(ss->file, StringRef(), ss->sym->binding, ss->sym->stOther,
----------------
delete parentheses
================
Comment at: lld/ELF/SyntheticSections.h:1371
std::unique_ptr<SymtabShndxSection> symTabShndx;
+ std::unique_ptr<ArmCmseSGSection> armCmseSGSection;
----------------
move before ppc64LongBranchTarget
================
Comment at: lld/test/ELF/arm-cmse-error.s:17
+ .global absolute_sym
+absolute_sym=0x1001
+
----------------
There should be another test where the absolute addresses are different.
================
Comment at: lld/test/ELF/arm-cmse-veneers.s:99
+// CHECK: 20018: e97f e97f
+// CHECK: 2001c: f7e7 bff6 b.w 0x800c <__acle_se_weak_qux>
----------------
`-NEXT` if applicable
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