Understanding libc interaction

Consider the following rust code:

extern "C" {
    static stdout: *mut libc::FILE;
}

fn main() {
    unsafe { 
        libc::fprintf(
            stdout, 
            b"hello\n\0" as *const u8 as *const libc::c_char
        ) 
    };
}

The crate uses libc = "0.2" as a dependency.
This compiles and runs.

What I dont understand is how is that extern stdout resolved when using the libc crate as a dependency?

Not an expert, but I believe it's because every program using std is going to link to the platform's C runtime which is where stdout would be defined. Linkers generally don't care about where symbols come from, only that they can find them in the undifferentiated melange of code they get given.

Thank you for the reply. That makes sense.
I searched for the stdout name in a stripped libc.so using nm, which obviously wouldn't have worked. Using readelf to checkout the symbol table, I saw that it was there.