# GCC Splits String Constants Into Pieces, and Your Path Audits Miss Them

Original title: Paths in Pieces

> Hacker News story 50470762 · language: en · submitted 2026-11-12
> Web version: https://zeli.app/story/50470762
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 29 · by [acossta](<https://news.ycombinator.com/user?id=acossta>) · 💬 0
[original](<https://stoppels.ch/2026/11/12/paths-in-pieces.html>) · [HN discussion](<https://news.ycombinator.com/item?id=50470762>)

## Summary

Package managers like RPM, Arch, Homebrew, and Conda scan binaries for absolute build paths, but GCC silently defeats them. It splits string constants into overlapping 16-, 32-, or 64-byte chunks for vectorized copies, so a path copied into a std::string appears nowhere in the binary — and repeated padding gets deduplicated. Clang doesn't do this and generates nearly identical code. The author argues the optimization saves little and hurts binary interpretability, and has submitted a GCC patch to opt out.

## Key quote

> Wait, did GCC just turn /home/linuxbrew/.linuxbrew into an entirely different path /home/linuxbrew/xbrew/.linuxbrew with a made-up subdirectory xbrew? How?

---

## Cite

- Page: https://zeli.app/story/50470762
- Date: 2026-11-12
- Source: stoppels.ch (https://stoppels.ch/2026/11/12/paths-in-pieces.html)
- Hacker News: https://news.ycombinator.com/item?id=50470762

## Other languages

- zh: https://zeli.app/zh/story/50470762 · markdown: https://zeli.app/zh/story/50470762.md
- ja: https://zeli.app/ja/story/50470762 · markdown: https://zeli.app/ja/story/50470762.md
- ko: https://zeli.app/ko/story/50470762 · markdown: https://zeli.app/ko/story/50470762.md
- de: https://zeli.app/de/story/50470762 · markdown: https://zeli.app/de/story/50470762.md
- es: https://zeli.app/es/story/50470762 · markdown: https://zeli.app/es/story/50470762.md
- ru: https://zeli.app/ru/story/50470762 · markdown: https://zeli.app/ru/story/50470762.md
