[PATCH] D142188: [ORC] Fix in-process lookup of symbols without GlobalPrefix

Jonas Hahnfeld via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 24 02:39:39 PST 2023


Hahnfeld added a comment.

In D142188#4074287 <https://reviews.llvm.org/D142188#4074287>, @lhames wrote:

> This change won't work for other platforms at the moment. E.g. On Darwin where the global prefix is `_` an ORC lookup (which uses mangled names) for `[ "foo", "_foo" ]` should return `[ nullptr, <addr of _foo> ]`, but with this patch it will return `[ <addr of foo>, <addr of foo> ]`.

Sure, but is this actually relevant? Passing `foo` is not properly mangled and an error on the client side. *If* it is required to make this robust against all possible edge cases, we have to make fairly intrusive changes as shown in the last update to pass `DataLayout::doNotMangleLeadingQuestionMark()` to `DynamicLibrarySearchGenerator` (or require a `DataLayout` in the first place, but that's a bigger restriction IMO).


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

https://reviews.llvm.org/D142188



More information about the llvm-commits mailing list