lldProject
ActivePublic

Properties

Description

LLVM Linker

Recent Activity

Fri, Sep 22

ruiu added a comment to D38167: [ELF] Ensure that .init/.fini sections are padded with nops instead of traps.

Well, this is not a bug, so this patch is not a fix but a workaround for existing FreeBSD/MIPS kernel's issue.

Fri, Sep 22, 12:06 PM · lld
arichardson added a comment to D38167: [ELF] Ensure that .init/.fini sections are padded with nops instead of traps.
In D38167#879065, @ruiu wrote:

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?

Fri, Sep 22, 11:49 AM · lld
ruiu added a comment to D38167: [ELF] Ensure that .init/.fini sections are padded with nops instead of traps.

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?

Fri, Sep 22, 11:42 AM · lld
arichardson added a comment to D38167: [ELF] Ensure that .init/.fini sections are padded with nops instead of traps.
In D38167#879015, @ruiu wrote:

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?

Fri, Sep 22, 11:30 AM · lld
ruiu added a comment to D38167: [ELF] Ensure that .init/.fini sections are padded with nops instead of traps.

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?

Fri, Sep 22, 11:14 AM · lld
arichardson created D38167: [ELF] Ensure that .init/.fini sections are padded with nops instead of traps.
Fri, Sep 22, 2:03 AM · lld

Thu, Sep 21

ruiu accepted D38131: [ELF] [fix] Using statically linked lld leads to segmentation fault on linking ELF.

LGTM

Thu, Sep 21, 10:54 AM · lld
ikudrin added inline comments to D37626: [ELF] Scan .eh_frame sections precisely in order to eliminate unused LSDAs and personality routines..
Thu, Sep 21, 7:18 AM · lld
grimar added a comment to D37626: [ELF] Scan .eh_frame sections precisely in order to eliminate unused LSDAs and personality routines..

Added llvm-commits. to subscribers because otherwise notifications about this patch were never shown in mailing lists..

Thu, Sep 21, 7:07 AM · lld
grimar updated subscribers of D37626: [ELF] Scan .eh_frame sections precisely in order to eliminate unused LSDAs and personality routines..
Thu, Sep 21, 7:06 AM · lld
ikudrin updated the diff for D37626: [ELF] Scan .eh_frame sections precisely in order to eliminate unused LSDAs and personality routines..
  • Update to the current tip.
  • Address review comments.
Thu, Sep 21, 6:50 AM · lld
grimar added inline comments to D38131: [ELF] [fix] Using statically linked lld leads to segmentation fault on linking ELF.
Thu, Sep 21, 5:54 AM · lld
grimar added a reviewer for D38131: [ELF] [fix] Using statically linked lld leads to segmentation fault on linking ELF: rafael.
Thu, Sep 21, 5:54 AM · lld
emankov created D38131: [ELF] [fix] Using statically linked lld leads to segmentation fault on linking ELF.
Thu, Sep 21, 5:24 AM · lld

Tue, Sep 19

atanasyan updated the diff for D31528: [ELF][MIPS] Multi-GOT implementation.

Rebased against the trunk.

Tue, Sep 19, 10:03 PM · lld
atanasyan added inline comments to D37747: [MIPS] Fix PLT entries generation in case of linking regular and microMIPS code.
Tue, Sep 19, 9:59 PM · lld
ruiu added inline comments to D37747: [MIPS] Fix PLT entries generation in case of linking regular and microMIPS code.
Tue, Sep 19, 4:49 PM · lld

Mon, Sep 18

ruiu added inline comments to D37626: [ELF] Scan .eh_frame sections precisely in order to eliminate unused LSDAs and personality routines..
Mon, Sep 18, 2:20 PM · lld
ikudrin updated the diff for D37626: [ELF] Scan .eh_frame sections precisely in order to eliminate unused LSDAs and personality routines..

Formatted.

Mon, Sep 18, 8:44 AM · lld
ikudrin updated the diff for D37626: [ELF] Scan .eh_frame sections precisely in order to eliminate unused LSDAs and personality routines..

Refactored scanEhFrameSection.

Mon, Sep 18, 1:46 AM · lld

Fri, Sep 15

atanasyan updated the diff for D37747: [MIPS] Fix PLT entries generation in case of linking regular and microMIPS code.

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.
Fri, Sep 15, 10:55 PM · lld
arichardson added a comment to D31528: [ELF][MIPS] Multi-GOT implementation.

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.

Fri, Sep 15, 4:56 PM · lld
ruiu added inline comments to D37747: [MIPS] Fix PLT entries generation in case of linking regular and microMIPS code.
Fri, Sep 15, 4:48 PM · lld
ruiu added inline comments to D37626: [ELF] Scan .eh_frame sections precisely in order to eliminate unused LSDAs and personality routines..
Fri, Sep 15, 8:05 AM · lld
ikudrin updated the diff for D37626: [ELF] Scan .eh_frame sections precisely in order to eliminate unused LSDAs and personality routines..

Update the patch to incorporate the latest changes in the master branch.

Fri, Sep 15, 7:38 AM · lld

Tue, Sep 12

atanasyan created D37747: [MIPS] Fix PLT entries generation in case of linking regular and microMIPS code.
Tue, Sep 12, 8:15 AM · lld
ikudrin added inline comments to D37626: [ELF] Scan .eh_frame sections precisely in order to eliminate unused LSDAs and personality routines..
Tue, Sep 12, 7:35 AM · lld
ikudrin updated the diff for D37626: [ELF] Scan .eh_frame sections precisely in order to eliminate unused LSDAs and personality routines..
  • Substituted a sorted vector for a DenseMap.
  • Improved (hopefully) comments.
Tue, Sep 12, 7:20 AM · lld
atanasyan closed D37335: [MIPS] Initial support of microMIPS code linking by committing rL313028: [MIPS] Initial support of microMIPS code linking.
Tue, Sep 12, 6:09 AM · lld

Mon, Sep 11

ruiu added inline comments to D37626: [ELF] Scan .eh_frame sections precisely in order to eliminate unused LSDAs and personality routines..
Mon, Sep 11, 5:17 PM · lld
ruiu accepted D37335: [MIPS] Initial support of microMIPS code linking.

LGTM

Mon, Sep 11, 4:19 PM · lld

Fri, Sep 8

Bigcheese updated the diff for D36351: [lld][ELF] Add profile guided section layout.

Address review comments.

Fri, Sep 8, 3:56 PM · lld
ikudrin created D37626: [ELF] Scan .eh_frame sections precisely in order to eliminate unused LSDAs and personality routines..
Fri, Sep 8, 8:01 AM · lld

Thu, Sep 7

ikudrin added inline comments to D37332: [lld] Avoid promoting an undefined weak entry symbol to global..
Thu, Sep 7, 9:29 PM · lld
pcc added a comment to D36351: [lld][ELF] Add profile guided section layout.
In D36351#864001, @pcc wrote:
In D36351#863966, @ruiu wrote:

I have a local patch to AutoFDO that I use to create profiles. I can upload it somewhere if you'd like.

Thanks. But the paper says that they used perf command to get profiling data. Why did you have to use AutoFDO?

As far as I know the missing piece is a tool that converts LBR data collected by perf into a weighted call graph. AutoFDO already has support for creating weighted call graphs from perf LBR data, so I just needed to teach it to output the graph in a different format.

Thu, Sep 7, 2:51 PM · lld
ruiu added a comment to D36351: [lld][ELF] Add profile guided section layout.

I'd think I want to make lld able to directly parse a perf command output so that users can try this feature easily.

Thu, Sep 7, 2:48 PM · lld
pcc added a comment to D36351: [lld][ELF] Add profile guided section layout.
In D36351#863966, @ruiu wrote:

I have a local patch to AutoFDO that I use to create profiles. I can upload it somewhere if you'd like.

Thanks. But the paper says that they used perf command to get profiling data. Why did you have to use AutoFDO?

Thu, Sep 7, 2:38 PM · lld
ruiu added a comment to D36351: [lld][ELF] Add profile guided section layout.

I have a local patch to AutoFDO that I use to create profiles. I can upload it somewhere if you'd like.

Thu, Sep 7, 2:25 PM · lld
pcc added a comment to D36351: [lld][ELF] Add profile guided section layout.
In D36351#863961, @ruiu wrote:

How can I test this? I wonder how to create profiling data to feed this feature.

Thu, Sep 7, 2:22 PM · lld
ruiu added a comment to D36351: [lld][ELF] Add profile guided section layout.

How can I test this? I wonder how to create profiling data to feed this feature.

Thu, Sep 7, 2:16 PM · lld
ruiu added inline comments to D37332: [lld] Avoid promoting an undefined weak entry symbol to global..
Thu, Sep 7, 11:31 AM · lld
ikudrin added inline comments to D37332: [lld] Avoid promoting an undefined weak entry symbol to global..
Thu, Sep 7, 6:09 AM · lld
ikudrin updated the diff for D37332: [lld] Avoid promoting an undefined weak entry symbol to global..

Use fetchIfLazy() instead of addEntrySymbol().

Thu, Sep 7, 5:52 AM · lld

Wed, Sep 6

ruiu added inline comments to D37332: [lld] Avoid promoting an undefined weak entry symbol to global..
Wed, Sep 6, 1:27 PM · lld
atanasyan updated the diff for D37335: [MIPS] Initial support of microMIPS code linking.

Address review comments: added blank lines, curly brackets, replaced LLVM_FALLTHROUGH by actual code.

Wed, Sep 6, 12:15 PM · lld
ruiu added inline comments to D37335: [MIPS] Initial support of microMIPS code linking.
Wed, Sep 6, 10:00 AM · lld
ikudrin updated the diff for D37332: [lld] Avoid promoting an undefined weak entry symbol to global..

Did you mean something like this?
I am inclined not to mix an entry symbol into Config->Undefined in order to preserve clarity.

Wed, Sep 6, 12:17 AM · lld

Tue, Sep 5

atanasyan updated the diff for D37335: [MIPS] Initial support of microMIPS code linking.
  • Added comments to explain memset calls
  • Fixed violating the strict aliasing rule.
Tue, Sep 5, 10:09 PM · lld
Bigcheese added a comment to D36351: [lld][ELF] Add profile guided section layout.

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.

Tue, Sep 5, 7:10 PM · lld
Bigcheese updated the diff for D36351: [lld][ELF] Add profile guided section layout.

Switch to adjacency lists and priority_queue to remove the E^2 behavior.

Tue, Sep 5, 7:04 PM · lld