# glibc: restore compatibility with glibc\<=2.33 for global initializers · gitcafe/zig

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

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

Visibility: public

Requested revision: f1b14b91f1f0c381c0d2c8c7ba3fd8df8a937227

Requested commit: f1b14b91f1f0c381c0d2c8c7ba3fd8df8a937227

Commit: f1b14b91f1f0c381c0d2c8c7ba3fd8df8a937227

Tree: 0a06f856c8483c4908d1baf68b6630769ed967b1

Author: xavier

Committer: Andrew Kelley

## Message

```
glibc: restore compatibility with glibc<=2.33 for global initializers

__libc_start_main() from glibc.2.33.so or older needs to have a __libc_csu_init function callback parameter.

glibc-2.34 on the other hand has a different __libc_start_main() that does not use it,
and the start.S file from glibc-2.34 no longer construct the init function and pass null when calling __libc_start_main.

So, When targetting an older glibc, use the start.s files as they were in glibc-2.33 and construct the __libc_csu_init function.

fixes #10386 #10512

```

## Parents

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

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