[PATCH] [Core] Add type and size to SharedLibraryAtom
Shankar Kalpathi Easwaran
shankarke at gmail.com
Wed Sep 25 18:49:30 PDT 2013
================
Comment at: include/lld/Core/SharedLibraryAtom.h:26
@@ +25,3 @@
+ enum Type {
+ Unknown,
+ Function,
----------------
I would prefer the Unknown to be removed and replaced by a llvm_unreachable when detecting the type.
================
Comment at: lib/ReaderWriter/ELF/Atoms.h:807
@@ +806,3 @@
+
+ virtual SectionChoice sectionChoice() const { return sectionCustomRequired; }
+
----------------
sectionBasedOnContent.
================
Comment at: lib/ReaderWriter/Native/NativeFileFormat.h:175-179
@@ -174,5 +174,7 @@
struct NativeSharedLibraryAtomIvarsV1 {
+ uint64_t size;
uint32_t nameOffset;
uint32_t loadNameOffset;
+ uint32_t type;
uint32_t flags;
};
----------------
was curious, if is this a coding convention of higher sizes ordered before low (uint64_t before uint32_t) ?
================
Comment at: lib/ReaderWriter/ELF/X86_64/X86_64LinkingContext.cpp:315
@@ +314,3 @@
+
+ ErrorOr<void> handle32S(const Reference &ref) {
+ // Do nothing.
----------------
This could produce a warning that ref is unused. Remove the name ref.
http://llvm-reviews.chandlerc.com/D1760
More information about the llvm-commits
mailing list