Skip to content

pthread_create symbol not found when statically linking glibc. #98

@gaoqiangz

Description

@gaoqiangz

.cargo/config.toml

[target.x86_64-unknown-linux-gnu]
rustflags = ["-C", "target-feature=+crt-static"]

ptr will be null

const RTLD_NEXT: *mut c_void = -1isize as *mut c_void;
let ptr = libc::dlsym(RTLD_NEXT, c"pthread_create".as_ptr().cast());

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions