With the /order option, you can give an order file. An order file
contains symbol names, one per line, and the linker places comdat
sections in that given order. The option is used often to optimize
an output binary for (in particular, startup) speed by improving
locality.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lld/COFF/Driver.cpp | ||
---|---|---|
781 ↗ | (On Diff #131644) | According to https://msdn.microsoft.com/en-us/library/00kh39zz.aspx it looks like the names need to be mangled on 32-bit platforms. |
Comment Actions
- add a comment about "_".
lld/COFF/Driver.cpp | ||
---|---|---|
781 ↗ | (On Diff #131644) | Actually that document is wrong. I added a comment about that. |
Comment Actions
As you pointed out, my last comment was wrong. The MSVC linker mangles symbols with "_" if it is on i386 and is not mangled yet.
I tried to add a warning message to warn on unused symbol names in symbol ordering file, but it seems a bit more complicated to do that than I originally thought, so I'll leave it for a follow-up patch.