# elf: check symtab section headers size when writing globals · gitcafe/zig

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

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

Visibility: public

Requested revision: 4d77ef25f948cac32e4d5fd3f9df019e728fcb45

Requested commit: 4d77ef25f948cac32e4d5fd3f9df019e728fcb45

Commit: 4d77ef25f948cac32e4d5fd3f9df019e728fcb45

Tree: 919aef64f0588c0ab864ac07b51b27612948dd0e

Author: Jakub Konka

Committer: Jakub Konka

## Message

```
elf: check symtab section headers size when writing globals

Without this, it may happen we write the globals without extending
the symtab section header's size. This can potentially lead to
clobbering some data in the file, or simply omitting the globals
from the symtab when displaying with support tooling such as `readelf`.

```

## Parents

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

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