Add a FIXME.
authorDaniel Dunbar <daniel@zuster.org>
Mon, 22 Mar 2010 23:16:43 +0000 (23:16 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Mon, 22 Mar 2010 23:16:43 +0000 (23:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99228 91177308-0d34-0410-b5e6-96231b3b80d8

lib/MC/MachObjectWriter.cpp

index 633197a67fdebdad7fdd3ec15dea1a985cf00d84..e6232acbf0de3f3d6785924aae672deb8cb1797e 100644 (file)
@@ -437,6 +437,20 @@ public:
       Write32(Address);
   }
 
+  // FIXME: We really need to improve the relocation validation. Basically, we
+  // want to implement a separate computation which evaluates the relocation
+  // entry as the linker would, and verifies that the resultant fixup value is
+  // exactly what the encoder wanted. This will catch several classes of
+  // problems:
+  //
+  //  - Relocation entry bugs, the two algorithms are unlikely to have the same
+  //    exact bug.
+  //
+  //  - Relaxation issues, where we forget to relax something.
+  //
+  //  - Input errors, where something cannot be correctly encoded. 'as' allows
+  //    these through in many cases.
+
   void RecordX86_64Relocation(const MCAssembler &Asm,
                               const MCFragment *Fragment,
                               const MCAsmFixup &Fixup, MCValue Target,