Fri, Sep 22
Well, this is not a bug, so this patch is not a fix but a workaround for existing FreeBSD/MIPS kernel's issue.
At least for x86, null bytes are not nop instructions, so it feels like it just happened to work for MIPS but it wasn't really guaranteed. How did you get a gap in .fini section?
I wonder whether this is a new issue or not. lld used to leave the gap in .init/.fini (or any other sections) as null bytes, so unless your processor handles null bytes as nop instructions, it didn't work before. So, this issue existed before lld started filling gaps with trap instructions. Is my understanding correct?
Thu, Sep 21
Added llvm-commits. to subscribers because otherwise notifications about this patch were never shown in mailing lists..
- Update to the current tip.
- Address review comments.
Tue, Sep 19
Rebased against the trunk.
Mon, Sep 18
Fri, Sep 15
Address review comments:
- Removed a temporary variable in the isMicroMips function.
- Moved MipsEFlags global variable to the Config. Calculation of its value requires iterating over all input object files so doing that each time when we call getMipsEFlags() is expensive.
We have been using this patch successfully for building CheriBSD (FreeBSD running on the CHERI CPU) for the last few months. Without it we can't build the base system even if we use -mxgot for every object.
The same problem happens when building upstream FreeBSD for MIPS64 so it would be great if this patch could be merged before the next LLD release.
Update the patch to incorporate the latest changes in the master branch.
Tue, Sep 12
- Substituted a sorted vector for a DenseMap.
- Improved (hopefully) comments.
Mon, Sep 11
Fri, Sep 8
Address review comments.
Thu, Sep 7
I'd think I want to make lld able to directly parse a perf command output so that users can try this feature easily.
I have a local patch to AutoFDO that I use to create profiles. I can upload it somewhere if you'd like.
How can I test this? I wonder how to create profiling data to feed this feature.
Use fetchIfLazy() instead of addEntrySymbol().
Wed, Sep 6
Address review comments: added blank lines, curly brackets, replaced LLVM_FALLTHROUGH by actual code.
Did you mean something like this?
I am inclined not to mix an entry symbol into Config->Undefined in order to preserve clarity.
Tue, Sep 5
- Added comments to explain memset calls
- Fixed violating the strict aliasing rule.
As for benchmark numbers, I'm still getting up to speed on setting up chromium for PGO and perf testing, but @pcc has done some over at crbug.com/759259 and gotten interesting results.
Switch to adjacency lists and priority_queue to remove the E^2 behavior.