Thanks to visit codestin.com
Credit goes to github.com

Skip to content

The order of the -ldl option is out of place at run-time #2

@aeurielesn

Description

@aeurielesn

I noticed that the command being executed has the -ldl out of place w.r.t. the source code.

[DEBUG] command: "/usr/bin/cc" "-Wl,-dynamic-linker,/lib64/ld-linux-x86-64.so.2" "-ldl" "-o" "/tmp/magicpak_resolver_14160520991579680778_3249826909874418912" "-xc" "/tmp/.tmpsNXfuc"

However, the following command succeeds:

$ "/usr/bin/cc" "-Wl,-dynamic-linker,/lib64/ld-linux-x86-64.so.2" "-o" "/tmp/magicpak_resolver_14160520991579680778_3249826909874418912" "-xc" "/tmp/.tmpsNXfuc" "-ldl"
$ echo $?
0

My current workaround is to create a wrapper script around GCC with a hardcoded -ldl as the last option and pass it to magicpack using --cc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions