[PATCH] [lld] Correct forming of ARM/Thumb atoms
Shankar Easwaran
shankar.kalpathi.easwaran at gmail.com
Sat Jan 24 05:17:15 PST 2015
================
Comment at: lib/ReaderWriter/ELF/ARM/ARMELFFile.h:56
@@ +55,3 @@
+ this->_symbol->st_shndx == llvm::ELF::SHN_COMMON) {
+ return DefinedAtom::Alignment(llvm::Log2_64(st_value));
+ } else if (this->_section->sh_addralign == 0) {
----------------
You are duplicating a lot of base class functionality
================
Comment at: lib/ReaderWriter/ELF/ARM/ARMELFFile.h:86
@@ +85,3 @@
+
+ static bool isThumbFunc(const Elf_Sym *symbol) {
+ return symbol->getType() == llvm::ELF::STT_FUNC &&
----------------
Why static?
================
Comment at: lib/ReaderWriter/ELF/ARM/ARMELFFile.h:141
@@ +140,3 @@
+ auto symContent = correctContentAddress(content, &symbol);
+ const auto symValue = correctSymbolStValue(&symbol);
+ for (const auto &rel : rels) {
----------------
Once you have the base function for getSymbolValue this function can be removed.
================
Comment at: lib/ReaderWriter/ELF/ARM/ARMELFFile.h:157
@@ +156,3 @@
+ auto symContent = correctContentAddress(content, &symbol);
+ const auto symValue = correctSymbolStValue(&symbol);
+ for (const auto &rel : rels) {
----------------
Add a base class function getSymbolValue and you can override that in ARM.
http://reviews.llvm.org/D7161
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list