1

May be a childish question, but I am really confused...

I understand that for NON JIT compilation, the linker embeds / injects (for static linking) the library codes into the object codes and generate the out file. But for JIT Compilation how does the linking happen (Particularly the static linking) ? Does JIT Compiler itself do the work of the linker (I mean look for the required library / symbols and inject them within the intermediate code before generating the final machine code)?

It would be good if If someone can answer this in flavor of C# and MSIL

rici
  • 234,347
  • 28
  • 237
  • 341
Rakesh Mehta
  • 519
  • 2
  • 9
  • I'm not sure that "static linking" is meaningful in a JIT compiler, but anyway, the whole question depends on how (and when) name resolution is done, which in turn will depend on the language's module system or equivalent. A comprehensive answer to such an open-ended question is probably an unreasonable expectation for a SO question. You should investigate (and, if necessary, ask about) a specific language, and maybe even a specific JIT compiler, after which you could investigate other ones for comparison. – rici Sep 20 '22 at 17:30
  • Well @rici, let me update the question and lets talk about C# and MSIL – Rakesh Mehta Sep 20 '22 at 17:32
  • OK, retagged in the hopes of attracting someone who better understands those technologies. (That wouldn't be me.) – rici Sep 20 '22 at 17:35
  • https://stackoverflow.com/questions/6605956/what-happens-when-a-net-application-is-started So beautifully explained... – Rakesh Mehta Sep 20 '22 at 19:00

0 Answers0