-
Notifications
You must be signed in to change notification settings - Fork 20
Backend tool option #3
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
Conversation
|
example : Use scanelf./lddtree.sh $(which ps) Use readelf./lddtree.sh -b readelf $(which ps) |
|
I am not against this, but I'd like to move every # readelf variants
do_something_readelf() {
readelf --something $1 ....
}
foobar_readelf() {
readelf --foobar $@ ....
}
# scanelf variants
do_something_scanelf() {
scanelf --some-thing $1 ....
}
foobar_scanelf() {
scanelf --foo-bar $@ ....
}
BACKEND=scanelf
# abstraction wrapper functions
do_something() {
do_something_$BACKEND "$@"
}
foobar() {
foobar_$BACKEND "$@"
}
And then we replace: if [ "$BACKEND" = "scanelf" ]; then
scanelf --some-thing ....
elif [ "$BACKEND" = "readelf" ]; then
readelf --something ....
fiwith: do_something .... |
…er. Two fixes with ORIGIN in rpath and relative path of elf
|
Ok. Then, I made wrapper functions. And first I posted two fixes :
And second I added two more options :
And Last, I have a question
|
|
can you please split the commit with wrapper function and new options and rebase? |
|
Ok i will do a complete fresh pull request with 3 split commit... Is this ok for you ? Or do you want, 3 distincts PR ? |
|
one pr and 3 commits sounds good 👍 but you dont need create new PR, i think you can |
|
i pushed the feature in 2 logic steps:
Can you please verify that this works for you and the also provide the fixes in separate PR? Thanks! |
|
Oh man There is a lot. And as I was so in a hurry and not so well organized, my commits groups several different topic. In a word : it's a kind of mess. There is 4 new options : no recursive, no header, list only dependencies (-m), force a backend (-b) Actually I have integrated my forked version into a bigger tools (https://github.com/StudioEtrange/stella) and I use lddtree with another script I made (https://github.com/StudioEtrange/stella/blob/master/nix/common/lib-parse-bin.sh) But I will try my best, when I will have time, to push options and fixes upstream to your repo. |
This is main reason I didn't merge it. |
|
I know... Every PR have a limit number of commits and is dedicated to a specific topic |
Add option to choose a backend tool.
In some case, we dont have scanelf binary, but readelf
So we can choose to change the default one (scanelf)