Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Compile Driver] Proper Linker Usage #70

Open
5 tasks
edg-l opened this issue Jan 11, 2024 · 0 comments
Open
5 tasks

[Compile Driver] Proper Linker Usage #70

edg-l opened this issue Jan 11, 2024 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@edg-l
Copy link
Collaborator

edg-l commented Jan 11, 2024

Good related read: https://fabiensanglard.net/dc/driver.php

I looked into the Rust source code, they also call the linker as a command line program.

What we need to do is analyse properly the requirements of the program to be linked, such as dependencies and files to link together, and whether it is a shared, static library or a binary.

Things to analyse and pass to the linker cli:

  • Arch (x86_64, aarch64, etc)
  • On linux The crt (c runtime) which defines _start and proper exit. On macOS it looks like it's done automatically?.
  • On linux, the loader, i think for 64bit its always /lib64/ld-linux-x86-64.so.2. Used with the argument --dynamic-linker
  • Libraries / object files to link together

Optional:

  • Allow to specify the linker, such as ld, lld, mold

https://github.com/lambdaclass/concrete/blob/main/crates/concrete_codegen_mlir/src/linker.rs

@edg-l edg-l added the enhancement New feature or request label Jan 11, 2024
@igaray igaray added this to the 0.0.1 Chalk milestone Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants