fix #498 by specifying section references using a named label by conradludgate · Pull Request #499 · oxidecomputer/usdt
See the linked issue for more details.
By specifying this "o" flag, we are telling linkers such as lld, gold, and mold to consider the .note section when performing --gc-sections on a sec...
The only limitation at the moment is in rustc/llvm/linker. Unfortunately the only workaround I've found forces us to marginally bloat the binary size. It has no runtime impact but it's still annoying. My attempt to modify rustc caused crazy link errors so I gave up 😅