Page MenuHomePhabricator

markj (Mark Johnston)
User

Projects

User does not belong to any projects.

User Details

User Since
Aug 17 2018, 9:22 AM (56 w, 1 d)

Recent Activity

May 14 2019

markj updated the diff for D61613: [LLD][ELF] Add the -z ifunc-noplt option.

Remove a command line that snuck in by accident.

May 14 2019, 8:19 AM · Restricted Project

May 13 2019

markj updated the diff for D61613: [LLD][ELF] Add the -z ifunc-noplt option.

Address feedback:

  • Use --no-show-raw-insn.
  • Use a consistent triple.
May 13 2019, 8:56 AM · Restricted Project
markj added inline comments to D61613: [LLD][ELF] Add the -z ifunc-noplt option.
May 13 2019, 8:56 AM · Restricted Project

May 12 2019

markj updated the diff for D61613: [LLD][ELF] Add the -z ifunc-noplt option.

Address feedback:

  • Use consistent wording in the error message.
May 12 2019, 10:39 PM · Restricted Project
markj updated the diff for D61613: [LLD][ELF] Add the -z ifunc-noplt option.

Address feedback:

  • Move check to checkOptions().
  • Remove "the".
May 12 2019, 9:34 PM · Restricted Project
markj updated the summary of D61613: [LLD][ELF] Add the -z ifunc-noplt option.
May 12 2019, 9:20 PM · Restricted Project
markj added a comment to D61613: [LLD][ELF] Add the -z ifunc-noplt option.

Thanks for your explanation. I wanted to make sure the caveats of -z ifunc-noplt have been considered, the alternatives are compared before you decide to push forward these efforts :)

May 12 2019, 8:46 PM · Restricted Project
markj updated the diff for D61613: [LLD][ELF] Add the -z ifunc-noplt option.

Address review feedback:

  • Prohibit the combination of -ztext and -zifunc-noplt, add a regression test.
  • Use a non-Linux OS in the triple for ifunc-noplt tests.
May 12 2019, 8:46 PM · Restricted Project

May 8 2019

markj added a comment to D61613: [LLD][ELF] Add the -z ifunc-noplt option.

FreeBSD makes use of the option when linking x86 kernels, which now make heavy use of ifuncs in hot paths. Without the option, each ifunc results in the generation of a PLT entry, so calls needlessly incur the extra overhead of an indirect jump. With the option, ifunc calls have the same cost as ordinary function calls.

Oh I recall this one and find your efforts to push forward this.

I remember I asked if you got numbers of the improvement and you didn't have an answer then. I still hope you can share the benchmark to justify this is a useful feature.

May 8 2019, 8:51 AM · Restricted Project

May 7 2019

markj added inline comments to D61613: [LLD][ELF] Add the -z ifunc-noplt option.
May 7 2019, 1:46 PM · Restricted Project
markj updated the diff for D61613: [LLD][ELF] Add the -z ifunc-noplt option.

Address feedback:

  • Set DT_TEXTREL
  • Rename the config flag to match Capitalization Conventions
  • Clarify some text in the man page update
  • Fix test comments and indentation
May 7 2019, 1:45 PM · Restricted Project

May 6 2019

markj updated the summary of D61613: [LLD][ELF] Add the -z ifunc-noplt option.
May 6 2019, 2:50 PM · Restricted Project
markj created D61613: [LLD][ELF] Add the -z ifunc-noplt option.
May 6 2019, 2:50 PM · Restricted Project

Feb 10 2019

markj added a comment to D57371: ELF: Allow GOT relocs pointing to non-preemptable ifunc to resolve to an IRELATIVE where possible..
In D57371#1392265, @pcc wrote:

Note that the kernel doesn't have any non-preemptible ifuncs, though.

Isn't the FreeBSD kernel an ET_EXEC? That should mean that all of its symbols are non-preemptible, right?

Feb 10 2019, 8:47 PM · Restricted Project
markj added a comment to D57371: ELF: Allow GOT relocs pointing to non-preemptable ifunc to resolve to an IRELATIVE where possible..
In D57371#1389410, @pcc wrote:

I tested this patch by linking FreeBSD userspace with it and running their test suite [1], and there were no regressions. However, it appears that only a handful of userspace functions are using ifunc. The kernel uses more, but I couldn't test this on the kernel because they use a custom flag -z ifunc-noplt to link their kernel and this flag isn't implemented in upstream lld. In order to test this on the kernel the patch implementing the flag would need to be rebased on top of this change, and that's probably beyond the limit of what's reasonable to test here.

Feb 10 2019, 8:30 PM · Restricted Project

Feb 8 2019

markj added a comment to D57371: ELF: Allow GOT relocs pointing to non-preemptable ifunc to resolve to an IRELATIVE where possible..

Ed,

Did -z ifunc-noplt work well for FreeBSD kernel? If it works well, maybe we should merge it to the mainline lld tree?

Yes it works well for us - the plan was for @markj to rebase and upstream it but it got preempted by other work; we'll bump the priority in light of this patch. Mark do you think we could test with this patch + -z ifunc-noplt in the near future?

Feb 8 2019, 9:23 AM · Restricted Project

Sep 18 2018

markj added a comment to D50297: Align AArch64 and i386 image base to superpage.

Does FreeBsd use 4Kb granules for the page size or the LLD default of 64Kb. From what I can see from the MMU documentation when 64Kb pages are used the equivalent of the Super Page size is 512MiB and not 2 MiB? If I'm right then aligning to 2MiB is only going to be beneficial when 4Kb pages are used. On the assumption that it doesn't do much harm to people using 64Kb pages I don't have any objections in changing it though. Aligning to 512MiB for 64kb pages sounds a bit extreme though.

Sep 18 2018, 6:16 PM

Sep 14 2018

markj added a comment to D52096: lld: add -z nodump support.

dldump() was supposedly added to Solaris to support emacs: http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg01022.html

Sep 14 2018, 8:32 AM

Aug 29 2018

markj added a comment to D50297: Align AArch64 and i386 image base to superpage.

Oh, I didn't notice that you are trying to make a change for i386, not for x86-64. What is your motivation to use superpages for 32-bit applications? I believe that the applications you want to use superpages are large programs and naturally be 64-bit, so I wonder if this change is actually useful.

Aug 29 2018, 7:57 AM

Aug 17 2018

markj added a comment to D50297: Align AArch64 and i386 image base to superpage.

I'll just note that there is an identical default in X86_64.cpp. Also see the last comment by alc here: https://reviews.freebsd.org/D16385 .

Aug 17 2018, 9:30 AM