Skip to content

Empty iterator on OpenBSD. #45

Open
@vext01

Description

@vext01

Hi,

This is kind of expected (as you clearly say you only support Linux and Mac right now), but findshlibs doesn't work on OpenBSD:

extern crate findshlibs;
use findshlibs::{Segment, SharedLibrary, TargetSharedLibrary};

fn main() {
    println!("hello");
    TargetSharedLibrary::each(|shlib| {
        println!("{}", shlib.name().to_string_lossy());

        for seg in shlib.segments() {
            println!("    {}: segment {}",
                     seg.actual_virtual_memory_address(shlib),
                     seg.name());
        }
    });
    println!("/hello");
}

prints:

hello
/hello

It probably isn't difficult to get this working on OpenBSD. Before I heard of findshlibs I wrote a similar lib called phdrs which does work on OpenBSD. IIRC the callback struct is a little different, but the API is pretty much the same.

https://github.com/softdevteam/phdrs/

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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