[PATCH] D144653: [BOLT][AArch64] ST_Function symbols start a CODE interval
Sebastian Pop via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 9 17:52:19 PST 2023
sebpop updated this revision to Diff 503995.
sebpop retitled this revision from "do not collect CFI info on empty functions" to "[BOLT][AArch64] ST_Function symbols start a CODE interval".
sebpop added a comment.
Herald added subscribers: treapster, kristof.beyls.
Updated patch to mark the code of functions as executable on a new mapping symbol.
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
@@ -900,6 +900,22 @@
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.503995.patch
Type: text/x-patch
Size: 1258 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230310/560e393a/attachment.bin>
More information about the llvm-commits
mailing list