[PATCH] D91533: [lib/Object] - Generalize the RelocationResolver API.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 19 01:10:34 PST 2020


jhenderson added inline comments.


================
Comment at: llvm/lib/Object/RelocationResolver.cpp:754
+  // relocations and assumes that all of them have the same computation (S + A).
+  // The relocation R have no owner object in this case and we don't need to
+  // provide Type and Offset fields. It is also assumed the DataRefImpl.p
----------------



================
Comment at: llvm/lib/Object/RelocationResolver.cpp:757
+  // contains the addend, provided by the caller.
+  return Resolver(/*Type=*/0, /*Offset=*/0, S, LocData,
+                  R.getRawDataRefImpl().p);
----------------
Is it simply not possible to provide Type and Offset information here? Otherwise, this code seems a little fragile to LLD deciding to try to use those fields for something.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91533/new/

https://reviews.llvm.org/D91533



More information about the llvm-commits mailing list