[PATCH] ARM: replace branches to undefined weak functions with NOP

Denis Protivensky dprotivensky at accesssoftek.com
Fri Apr 3 00:01:36 PDT 2015


REPOSITORY
  rL LLVM

================
Comment at: lib/ReaderWriter/ELF/ARM/ARMRelocationHandler.cpp:509
@@ +508,3 @@
+    // Thumb16 NOP
+    write16le(location, 0xBF00);
+    break;
----------------
The `NOP` instruction is supported by only limited number of ARM architectures.
You may at least add a TODO at the beginning of the function to indicate this.

================
Comment at: lib/ReaderWriter/ELF/ARM/ARMRelocationHandler.cpp:539
@@ +538,3 @@
+
+    DEBUG(llvm::dbgs() << "\t\tFixup undefined weak reference '";
+          llvm::dbgs() << ref.target()->name() << "'";
----------------
Maybe better to log only successive fixups? Don't think the information about unresolved weaks is really useful.

http://reviews.llvm.org/D8807

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list