JITLinkContext is notified (using notifyResolved) of the final
symbol addresses after allocating memory and running the post-allocation
passes. However, linker relaxation, which can cause symbol addresses to
change, was run during the pre-fixup passes. This causes users of
JITLink (e.g., ORC) to pick-up wrong symbol addresses when linker
relaxation was enabled.
This patch fixes this by running relaxation during the post-allocation
passes.
Fixes #63671
@lhames: afaict, llvm-jitlink gathers symbol values during a custom
post-fixup pass [1]. Therefore, it isn't affected by this bug and I'm
not quite sure how to add a test for it. Any suggestions?