[PATCH] D94771: [Object, llvm-readelf] - Move the API for retrieving symbol versions to ELF.h
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 15 14:45:04 PST 2021
MaskRay accepted this revision.
MaskRay added a comment.
This revision is now accepted and ready to land.
Thanks for looking into llvm-nm -D😊
> We have the https://bugs.llvm.org/show_bug.cgi?id=48670 bug which suggests that llvm-nm also should print version names for symbols.
This helps implement https://bugs.llvm.org/show_bug.cgi?id=48670 (make llvm-nm -D print version names).😊
================
Comment at: llvm/include/llvm/Object/ELF.h:588
+ // The first two version indexes are reserved.
+ // Index 0 is LOCAL, index 1 is GLOBAL.
+ VersionMap.push_back(VersionEntry());
----------------
================
Comment at: llvm/tools/llvm-readobj/ELFDumper.cpp:382
+private:
+ mutable SmallVector<Optional<VersionEntry>, 16> VersionMap;
+};
----------------
sizeof(VersionEntry)=40.
Inline size 16 is too large... perhaps just 0 is fine. The malloc cost is affordable.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94771/new/
https://reviews.llvm.org/D94771
More information about the llvm-commits
mailing list