# glibc: Define \_IO_stdin_used in start code and reference it in stub asm\. · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/5dd2bb525d1f19969c450c2b99a71f866a4f01ff)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 5dd2bb525d1f19969c450c2b99a71f866a4f01ff

Requested commit: 5dd2bb525d1f19969c450c2b99a71f866a4f01ff

Commit: 5dd2bb525d1f19969c450c2b99a71f866a4f01ff

Tree: 3dac4b3d3d5facfdb2c8998ff50a45bfa0015da2

Author: Alex Rønne Petersen

Committer: Andrew Kelley

## Message

```
glibc: Define _IO_stdin_used in start code and reference it in stub asm.

This is necessary to inform the real, non-stub glibc that a program built with
Zig is using a modern `FILE` structure, i.e. glibc 2.1+. This is particularly
important on lesser-used architectures where the legacy code is poorly tested;
for example, glibc 2.40 introduced a regression for the legacy case in the
libio cleanup code, causing all Zig-compiled MIPS binaries to crash on exit.

```

## Parents

- [df6907f6019ec178735f06e1b55cef6a90234201](https://git.cafe/gitcafe/zig/commit/df6907f6019ec178735f06e1b55cef6a90234201?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/5dd2bb525d1f19969c450c2b99a71f866a4f01ff?format=markdown)
