[PATCH] [ELF]: Initial implementation for ARM static linking
Shankar Kalpathi Easwaran
shankarke at gmail.com
Mon Dec 1 09:21:05 PST 2014
================
Comment at: lib/ReaderWriter/ELF/ARM/ARMExecutableWriter.h:33-34
@@ +32,4 @@
+ void addDefaultAtoms() override {
+ _armRuntimeFile->addAbsoluteAtom("__exidx_start");
+ _armRuntimeFile->addAbsoluteAtom("__exidx_end");
+
----------------
I couldnt find any place where this gets fixed up.
================
Comment at: lib/ReaderWriter/ELF/ARM/ARMLinkingContext.h:32-33
@@ +31,4 @@
+ uint64_t getBaseAddress() const override {
+ if (_baseAddress == 0)
+ return 0x400000;
+ return _baseAddress;
----------------
Is the base address correct for ARM ?
================
Comment at: lib/ReaderWriter/ELF/ARM/ARMRelocationHandler.cpp:420-421
@@ +419,4 @@
+ } else {
+ // The atom is not in any of the loadable segments
+ assert(false);
+ }
----------------
llvm::report_fatal_error (or) provide a reason with the assert.
================
Comment at: lib/ReaderWriter/ELF/ARM/ARMRelocationPass.cpp:145-147
@@ +144,5 @@
+ llvm::dbgs() << " Name of Atom: " << atom->name().str() << "\n";
+ } llvm::dbgs()
+ << "Shared Library Atoms"
+ << "\n";
+ for (const auto &atom
----------------
indentation is not right.
================
Comment at: lib/ReaderWriter/ELF/ARM/ARMRelocationPass.cpp:223
@@ +222,3 @@
+ /// @{
+ PLT0Atom *_PLT0;
+ GOTAtom *_got0;
----------------
I dont see any initialization to _PLT0. If you are not supporting dynamic linking with this patch, Please remove dynamic linking code from this patch as its difficult to follow.
================
Comment at: lib/ReaderWriter/ELF/ARM/ARMRelocationPass.cpp:241
@@ +240,3 @@
+
+ std::error_code handlePlain(const Reference &) { return std::error_code(); }
+
----------------
Why is this empty ?
http://reviews.llvm.org/D6446
More information about the llvm-commits
mailing list