Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not indiscriminately create text section (dotnet#312)
If we ended up with nothing in the text section, this line would error LLVM out in: https://github.com/dotnet/llvm-project/blob/3db8d68195c17386557f1a258312bbae4051dc05/llvm/lib/MC/ELFObjectWriter.cpp#L1458-L1459 Because we generate a reference to the empty text section in the `aranges` section. I double checked and debugging on Linux still works fine without this. `SetCodeSectionAttribute` is an objwriter API and we have access to it from the managed side. We should be calling it from there if it's needed for something that I didn't realize (we do call it from the managed side for the `.managed` section, but that one actually has debug information generated, unlike `.text`).
- Loading branch information