# export \_mh_execute_header with weak linkage · gitcafe/zig

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

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

Visibility: public

Requested revision: 28bf768883d2411d4cd75582d396d465ab6a54b2

Requested commit: 28bf768883d2411d4cd75582d396d465ab6a54b2

Commit: 28bf768883d2411d4cd75582d396d465ab6a54b2

Tree: 542fb1bed1e22462938a62b5caf647c366dfc0c2

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
export _mh_execute_header with weak linkage

 * also fix extern variables with initialiaztion values to generate runtime code
 * remove the workaround in example/shared_library/mathtest.zig
 * introduce the ability for global variables to have Weak and LinkOnce
   linkage
 * fix `@export` to work for non-functions. this code needs to be
   audited though.
 * fix comptime ptrcast not keeping bigger alignment
 * fix linker warnings when targeting darwin

closes #1903

```

## Parents

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

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