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

Amilendra Kodithuwakku via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 3 04:11:53 PDT 2023


amilendra updated this revision to Diff 536716.
amilendra added a comment.

Address Sanitizer Failure Fix

ArmCmseSGVeneer being a synthetic section resulted in `SectionBase::getOutputSection()` falling  through to `return cast<OutputSection>(this)` and returning an unaligned  pointer value when called by `SectionBase::getVA(unsigned long)` in  `ArmCmseSGVeneer::writeTo()`.

Fix this by modelling ArmCmseSGVeneer as an independent class with an offset within the ArmCmseSGSection (similar to Thunks), eliminating the need of the getVA() call.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D139092

Files:
  lld/ELF/Arch/ARM.cpp
  lld/ELF/Config.h
  lld/ELF/Driver.cpp
  lld/ELF/InputFiles.cpp
  lld/ELF/InputFiles.h
  lld/ELF/LinkerScript.cpp
  lld/ELF/LinkerScript.h
  lld/ELF/MarkLive.cpp
  lld/ELF/Options.td
  lld/ELF/SymbolTable.h
  lld/ELF/SyntheticSections.cpp
  lld/ELF/SyntheticSections.h
  lld/ELF/Target.h
  lld/ELF/Writer.cpp
  lld/test/ELF/Inputs/arm-cmse-macros.s
  lld/test/ELF/aarch64-cmse.s
  lld/test/ELF/arm-cmse-diagnostics.s
  lld/test/ELF/arm-cmse-implib.s
  lld/test/ELF/arm-cmse-keep-sections.s
  lld/test/ELF/arm-cmse-noveneers.s
  lld/test/ELF/arm-cmse-secure.s
  lld/test/ELF/arm-cmse-veneers.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139092.536716.patch
Type: text/x-patch
Size: 63419 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230703/04af5da2/attachment.bin>


More information about the llvm-commits mailing list