# wasm-linker: handle debug info during gc · gitcafe/zig

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

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

Visibility: public

Requested revision: 8447d4fb1f5b628b3c0c9f2b1254d8ddc7801ab1

Requested commit: 8447d4fb1f5b628b3c0c9f2b1254d8ddc7801ab1

Commit: 8447d4fb1f5b628b3c0c9f2b1254d8ddc7801ab1

Tree: 27215b80d31309497606aeb00a9ae5c0aa1ce2c9

Author: Luuk de Gram

Committer: Luuk de Gram

## Message

```
wasm-linker: handle debug info during gc

When we encounter a debug info symbol, we initially have to parse it
into an atom to find its relocations. We then go through its relocations
to find out if any of the target symbols are marked alive. When it
finds an alive symbol, we also mark the debug symbol as alive to ensure
this piece of debug info is emit to the binary. When it does not encounter
any alive symbols, the debug symbol remains dead and will be garbage-
collected during `allocateAtoms`.

```

## Parents

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

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