[PATCH] D144653: [BOLT][AArch64] ST_Function symbols start a CODE interval
Sebastian Pop via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 20 12:00:25 PDT 2023
sebpop updated this revision to Diff 506675.
sebpop added a comment.
Updated patch to pass clang-format check.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144653/new/
https://reviews.llvm.org/D144653
Files:
bolt/lib/Rewrite/RewriteInstance.cpp
Index: bolt/lib/Rewrite/RewriteInstance.cpp
===================================================================
--- bolt/lib/Rewrite/RewriteInstance.cpp
+++ bolt/lib/Rewrite/RewriteInstance.cpp
@@ -901,6 +901,23 @@
if (LastAddr == Address) // don't repeat markers
continue;
+ // Following IHI0056B:
+ // > Each interval starts at the address defined by the mapping
+ // > symbol, and continues up to, but not including, the address
+ // > defined by the next (in address order) mapping symbol or the end
+ // > of the section or segment.
+ //
+ // If the current symbol is a ST_Function, reset the marker symbol
+ // type to executable CODE.
+ if (!BC->isMarker(*Sym)) {
+ auto SymType = cantFail(Sym->getType());
+ if (SymType == SymbolRef::ST_Function) {
+ SortedMarkerSymbols.push_back(
+ MarkerSym{Address, MarkerSymType::CODE});
+ LastAddr = Address;
+ IsData = false;
+ }
+ }
MarkerSymType MarkerType = BC->getMarkerType(*Sym);
if (MarkerType != MarkerSymType::NONE) {
SortedMarkerSymbols.push_back(MarkerSym{Address, MarkerType});
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144653.506675.patch
Type: text/x-patch
Size: 1278 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230320/823db7dc/attachment.bin>
More information about the llvm-commits
mailing list