# fix linker code writing undefined memory to the output file · gitcafe/zig

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

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

Visibility: public

Requested revision: 877d6df8f75a7fcfacea572d38f74ac66d045f32

Requested commit: 877d6df8f75a7fcfacea572d38f74ac66d045f32

Commit: 877d6df8f75a7fcfacea572d38f74ac66d045f32

Tree: 8484e5762abab2be010f0921c9f08d4f380a7977

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
fix linker code writing undefined memory to the output file

missing `extern` on a struct.

but also all these instances that call pwriteAll with a `@ptrCast` are
endianness bugs.

this should be changed to use File.Writer and call writeSliceEndian
instead.

this commit fixes one immediate problem but does not fix everything.

```

## Parents

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

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