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

feature: fake linker to capture link target #45

Open
qtcdxxyuc opened this issue Mar 3, 2021 · 7 comments
Open

feature: fake linker to capture link target #45

qtcdxxyuc opened this issue Mar 3, 2021 · 7 comments

Comments

@qtcdxxyuc
Copy link

qtcdxxyuc commented Mar 3, 2021

Is it possible to a fake linker(ln), then we capture this information.
In this way, we can select the target we need to extract from a list.
Instead of manually specifying the target

@qtcdxxyuc qtcdxxyuc changed the title feature: fake linker to feature: fake linker to capture link target Mar 3, 2021
@ianamason
Copy link
Member

Which linker are you talking about? The one that clang calls behind our backs? Or the llvm_link we use to link bitcode?

@qtcdxxyuc
Copy link
Author

I think this linker mean /usr/bin/ld . iIf we monitor his input, can know the real library or executable program produced by the project. Not specified by the user select which lib or exe. Then extract these together.

@ianamason
Copy link
Member

This information probably can be gleaned from the log.
Set the logging level and logging file and then look for 'linking'

Build systems rarely call ld directly. For example libtool.

@ianamason
Copy link
Member

Can I close this @qtcdxxyuc?

@woodruffw
Copy link
Collaborator

Not sure if it'll help, but one of the projects that I use gllvm on also uses blight for this kind of introspection of the linker and other generic build tools: https://github.com/trailofbits/blight

It won't work in all circumstances, but it'll get you pretty far and composes painfully with gllvm on builds.

@Luweicai
Copy link

Hi, I come accross the situation that the build system use the libtool directly. How can I deal with situation?

@ianamason
Copy link
Member

You would have to be more specific as the what the problem is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants