odin-lang / Odin

Odin Programming Language
https://odin-lang.org
BSD 3-Clause "New" or "Revised" License
6.1k stars 550 forks source link

Allow commas and spaces in the link section names #3798

Closed destroycomputers closed 1 week ago

destroycomputers commented 1 week ago

In the Mach-O object format, a segment can be specified in addition to the section.

The format for such declaration is "SEGMENT,SECTION" which LLVM understands. So, simply allowing commas and spaces we get support for these link section names. Spaces are not strictly required, but the underlying tooling supports it and that's what people would expect, I believe.

This is required, for example, to do symbol interposition, as it mandates placing the interposition table in the "DATA,interpose" section.

gingerBill commented 1 week ago

This is the third time someone has tried to bodge this the exact same way. This is not the correct solution.