Page MenuHomePhabricator

PkmX (Chih-Mao Chen)
User

Projects

User does not belong to any projects.

User Details

User Since
Aug 7 2017, 11:26 PM (110 w, 3 d)

Recent Activity

Tue, Aug 27

PkmX added a comment to D66798: [ELF][RISCV] Assign st_shndx of __global_pointer$ to 1 if .sdata does not exist.

This should be fine since lld doesn't support linker relaxation, so we just need to fabricate a dummy value for __global_pointer$ that allows it to link.

Tue, Aug 27, 12:08 PM · Restricted Project

Apr 17 2019

PkmX added inline comments to D32530: [SVE][IR] Scalable Vector IR Type.
Apr 17 2019, 9:01 PM · Restricted Project

Apr 16 2019

PkmX updated the diff for D60250: [llvm-objdump] Allow -dynamic-reloc on ET_EXEC files.
  • Use ET_NONE as e_type in tests.
  • Drop the unnecessary dyn suffix in test name.
Apr 16 2019, 3:03 AM · Restricted Project
PkmX added inline comments to D60250: [llvm-objdump] Allow -dynamic-reloc on ET_EXEC files.
Apr 16 2019, 2:38 AM · Restricted Project

Apr 15 2019

PkmX updated the diff for D60250: [llvm-objdump] Allow -dynamic-reloc on ET_EXEC files.
  • -R now only checks for the presence of SHT_DYNAMIC section.
  • Reduce dynamic test case: remove unnecessary fields and use R_X86_64_RELATIVE so we don't even need a symbol table.
  • Clarify the test for no SHT_DYNAMIC section case.
  • Use llvm::any_of as suggested by @grimar.
Apr 15 2019, 11:30 PM · Restricted Project

Apr 10 2019

PkmX added a comment to D60250: [llvm-objdump] Allow -dynamic-reloc on ET_EXEC files.

I think the error message error: not a dynamic object is a bit inappropriate. GNU objdump reports the error if it cannot find the dynamic section and the BFD flag DYNAMIC (ET_DYN) is not set. This rules looks weird to me as it can just say it cannot find the .dynamic section. What if the file is an ET_DYN but its .dynamic is missing? It may swallow the error message.

Apr 10 2019, 9:14 AM · Restricted Project
PkmX added a comment to D60250: [llvm-objdump] Allow -dynamic-reloc on ET_EXEC files.

The test case was reduced from a working executable with unnecessary sections/symbols removed, hence the odd addresses and fields. I will specifically craft a minimal yaml for the dynamic test.

Apr 10 2019, 4:34 AM · Restricted Project
PkmX updated the diff for D39323: [lld] Support dynamic linking in RISC-V.

Addressed the review comments:

Apr 10 2019, 4:30 AM · Restricted Project, lld

Apr 9 2019

PkmX committed rG23e23836d5d0: Move tests in r357996 to correct location within monorepo (authored by PkmX).
Move tests in r357996 to correct location within monorepo
Apr 9 2019, 4:47 AM
PkmX committed rL357997: Move tests in r357996 to correct location within monorepo.
Move tests in r357996 to correct location within monorepo
Apr 9 2019, 4:47 AM
PkmX committed rLLD357997: Move tests in r357996 to correct location within monorepo.
Move tests in r357996 to correct location within monorepo
Apr 9 2019, 4:47 AM
PkmX committed rG00100b5d0d1c: [RISCV] Rewrite tests to use llvm-mc/llvm-objdump (authored by PkmX).
[RISCV] Rewrite tests to use llvm-mc/llvm-objdump
Apr 9 2019, 4:40 AM
PkmX committed rG949570ce39da: [RISCV] Fix range check for HI20/LO12/RVC_LUI relocations (authored by PkmX).
[RISCV] Fix range check for HI20/LO12/RVC_LUI relocations
Apr 9 2019, 4:39 AM
PkmX committed rL357996: [RISCV] Rewrite tests to use llvm-mc/llvm-objdump.
[RISCV] Rewrite tests to use llvm-mc/llvm-objdump
Apr 9 2019, 4:39 AM
PkmX committed rLLD357996: [RISCV] Rewrite tests to use llvm-mc/llvm-objdump.
[RISCV] Rewrite tests to use llvm-mc/llvm-objdump
Apr 9 2019, 4:39 AM
PkmX closed D60415: [RISCV] Rewrite lld tests to use MC.
Apr 9 2019, 4:39 AM · Restricted Project
PkmX committed rL357995: [RISCV] Fix range check for HI20/LO12/RVC_LUI relocations.
[RISCV] Fix range check for HI20/LO12/RVC_LUI relocations
Apr 9 2019, 4:39 AM
PkmX committed rLLD357995: [RISCV] Fix range check for HI20/LO12/RVC_LUI relocations.
[RISCV] Fix range check for HI20/LO12/RVC_LUI relocations
Apr 9 2019, 4:39 AM
PkmX closed D60414: [RISCV] Fix range check for HI20/LO12/RVC_LUI relocations.
Apr 9 2019, 4:39 AM · Restricted Project

Apr 8 2019

PkmX added a child revision for D60414: [RISCV] Fix range check for HI20/LO12/RVC_LUI relocations: D60415: [RISCV] Rewrite lld tests to use MC.
Apr 8 2019, 11:25 AM · Restricted Project
PkmX added a parent revision for D60415: [RISCV] Rewrite lld tests to use MC: D60414: [RISCV] Fix range check for HI20/LO12/RVC_LUI relocations.
Apr 8 2019, 11:25 AM · Restricted Project
PkmX added a child revision for D55667: [RISCV] Support assembling TLS LA pseudo instructions: D39324: [lld] Support TLS in RISC-V.
Apr 8 2019, 11:24 AM · Restricted Project
PkmX added a parent revision for D39324: [lld] Support TLS in RISC-V: D55667: [RISCV] Support assembling TLS LA pseudo instructions.
Apr 8 2019, 11:24 AM · lld
PkmX updated the diff for D39324: [lld] Support TLS in RISC-V.
  • Rebased onto master
  • Moved GotRel into if (Config->Is64)
  • Use a literal constant for TLS_DTP_OFFSET.
  • Rewrite all tests in MC. However this depends on D55667 to assemble la.tls.ie and la.tls.gd, which is not accepted yet.
Apr 8 2019, 11:20 AM · lld
PkmX updated the diff for D39323: [lld] Support dynamic linking in RISC-V.

Rebased onto master and:

Apr 8 2019, 11:15 AM · Restricted Project, lld
PkmX created D60415: [RISCV] Rewrite lld tests to use MC.
Apr 8 2019, 11:13 AM · Restricted Project
PkmX created D60414: [RISCV] Fix range check for HI20/LO12/RVC_LUI relocations.
Apr 8 2019, 11:09 AM · Restricted Project
PkmX added a comment to D58245: Remove no-op code..

GNU as for RISC-V does actually produce out-of-order relocations so lld cannot assume they are always sorted by offset. This was previously discussed at:

Apr 8 2019, 10:48 AM · Restricted Project

Apr 5 2019

PkmX updated the diff for D60250: [llvm-objdump] Allow -dynamic-reloc on ET_EXEC files.

The new patch handles non-dynamic objects logic within llvm-objdump and no longer modifies dynamic_relocation_sections other than making it match on sh_addr. I also added tests for all three cases: ET_DYN (for PIE/shared libraries since there doesn't seem to be an existing test), dynamically linked ET_EXEC and statically-linked ET_EXEC (which should error out).

Apr 5 2019, 12:08 PM · Restricted Project

Apr 3 2019

PkmX updated the diff for D60250: [llvm-objdump] Allow -dynamic-reloc on ET_EXEC files.

Modify dynamic_relocation_sections to return Expected and errors out if input is not ET_EXEC/ET_DYN or when no DYNAMIC section is found, the previous revision would just silently do nothing if given a static executable.

Apr 3 2019, 11:50 PM · Restricted Project
PkmX created D60250: [llvm-objdump] Allow -dynamic-reloc on ET_EXEC files.
Apr 3 2019, 10:42 PM · Restricted Project

Dec 13 2018

PkmX updated the diff for D54029: [RISCV] Properly evaluate fixup_riscv_pcrel_lo12.
  • %pcrel_lo that doesn't point to a valid auipc will always produce an error, even if relaxation is enabled. The test pcrel-lo12-invalid.s is modified accordingly.
  • getPCRelHiExpr is renamed to getPCRelHiFixup and returns a MCFixup instead, to allow expansion for non %pcrel_hi modifiers in later patches.
Dec 13 2018, 11:09 PM · Restricted Project
PkmX added a comment to D54029: [RISCV] Properly evaluate fixup_riscv_pcrel_lo12.

@jrtc27 Actually I agree it should produce an error regardless of whether relaxation is enabled, since it is most likely an user error to write a %pcrel_lo that doesn't point to an auipc, and the earlier we can catch it the better.

Dec 13 2018, 8:48 AM · Restricted Project

Dec 11 2018

PkmX added a comment to D55279: [RISCV] Support assembling %got_pcrel_hi operator.

Yes, getPCRelHiExpr from D54029 needs to modified to also look for fixup_riscv_got_hi20, and if it does find one it should just force a relocation.

Dec 11 2018, 6:14 AM · Restricted Project

Dec 10 2018

PkmX updated the diff for D54029: [RISCV] Properly evaluate fixup_riscv_pcrel_lo12.

Specify that pcrel-lo12-invalid.s will only error out without relaxation, otherwise the assembler still emits a relocation which will fail at link time.

Dec 10 2018, 9:38 PM · Restricted Project
PkmX updated the diff for D54029: [RISCV] Properly evaluate fixup_riscv_pcrel_lo12.

Rebased onto trunk.

Dec 10 2018, 9:28 PM · Restricted Project

Nov 21 2018

PkmX updated the diff for D54029: [RISCV] Properly evaluate fixup_riscv_pcrel_lo12.

Rebase onto trunk as the declaration of RISCVAsmBackend is split into its own header file.

Nov 21 2018, 12:18 AM · Restricted Project

Nov 2 2018

PkmX created D54029: [RISCV] Properly evaluate fixup_riscv_pcrel_lo12.
Nov 2 2018, 1:16 AM · Restricted Project

Nov 1 2018

PkmX updated the diff for D39324: [lld] Support TLS in RISC-V.

Rebased onto trunk.

Nov 1 2018, 11:36 PM · lld
PkmX updated the diff for D39323: [lld] Support dynamic linking in RISC-V.

Rebased onto trunk.

Nov 1 2018, 11:36 PM · Restricted Project, lld
PkmX added inline comments to D39323: [lld] Support dynamic linking in RISC-V.
Nov 1 2018, 7:36 PM · Restricted Project, lld
PkmX added a comment to D43157: [RISCV] Properly evaluate VK_RISCV_PCREL_LO.

I have a patch available that handles PCREL_LO12_S and is rebased on trunk, if it is okay I will create a separate patch for reviewing.

Nov 1 2018, 12:53 AM
PkmX added a comment to D39323: [lld] Support dynamic linking in RISC-V.

Ditto -- if you can write tests in assembly, please convert them from YAML to assembly.

Nov 1 2018, 12:31 AM · Restricted Project, lld
PkmX added a comment to D39324: [lld] Support TLS in RISC-V.

Did you create these tests files from assembly files? If so, I'd add assembly as comments to keep them, so that we can rewrite them to assembly without re-inventing the same assembly files in the future.

Nov 1 2018, 12:28 AM · lld

Oct 31 2018

PkmX accepted D53905: [ELF] Refactor per-target TLS layout configuration. NFC..

LGTM. I will update D39324 to reflect this change.

Oct 31 2018, 9:10 AM

Oct 30 2018

PkmX added inline comments to D39324: [lld] Support TLS in RISC-V.
Oct 30 2018, 8:51 AM · lld
PkmX added a comment to D39324: [lld] Support TLS in RISC-V.

Other than my single minor point (and D39323), is there anything blocking this from being accepted?

Oct 30 2018, 8:12 AM · lld

Sep 4 2018

PkmX added a comment to D43157: [RISCV] Properly evaluate VK_RISCV_PCREL_LO.

Ping? This is the last issue blocking lld's RISC-V tests to be rewritten to use llvm-mc and llvm-objdump right now.

Sep 4 2018, 11:23 PM

Aug 14 2018

PkmX committed rL339652: Test commit: fix punctuation.
Test commit: fix punctuation
Aug 14 2018, 1:09 AM

Aug 13 2018

PkmX added inline comments to D43157: [RISCV] Properly evaluate VK_RISCV_PCREL_LO.
Aug 13 2018, 10:24 PM

Aug 7 2018

PkmX abandoned D41277: Implement --just-symbols.

Abandoning as this has been implemented by another commit.

Aug 7 2018, 11:17 PM
PkmX updated the diff for D39322: [lld] Support RISC-V.

@ruiu I've uploaded a new patch that adds the blank line to RISCVGlobalPointer as requested. As I do not have commit rights to the LLD repository, could you commit the patch if there are no last-minute issues.

Aug 7 2018, 7:15 PM · lld

Aug 6 2018

PkmX added a comment to D39322: [lld] Support RISC-V.

Apologies for my belated response. I think this patch is generally looking good. One thing I'd fix before submitting is to rewrite a test using assembly. We do not usually use YAML file for testing. Is there any reason you needed to write them in YAML?

Aug 6 2018, 7:26 PM · lld

Aug 2 2018

PkmX updated the diff for D39324: [lld] Support TLS in RISC-V.

Rebased. NFC from last revision.

Aug 2 2018, 11:51 PM · lld
PkmX updated the diff for D39323: [lld] Support dynamic linking in RISC-V.

RISCV now writes its own GOT header, with one entry that stores the address of .dynamic section. _GLOBAL_OFFSET_TABLE_ should be set to the head of .got so that _GLOBAL_OFFSET_TABLE_[0] == &_DYNAMIC.

Aug 2 2018, 11:50 PM · Restricted Project, lld
PkmX updated the diff for D39322: [lld] Support RISC-V.

I've rebased the diff to latest trunk again. Some notable differences from last revision:

Aug 2 2018, 11:46 PM · lld
Herald added a reviewer for D39322: [lld] Support RISC-V: espindola.
Aug 2 2018, 7:47 PM · lld

Feb 12 2018

PkmX updated the diff for D39324: [lld] Support TLS in RISC-V.

Rebase onto master.

Feb 12 2018, 7:33 PM · lld
PkmX updated the diff for D39323: [lld] Support dynamic linking in RISC-V.

Rebase onto master.

Feb 12 2018, 7:33 PM · Restricted Project, lld
PkmX updated the diff for D39322: [lld] Support RISC-V.

Rebase onto master.

Feb 12 2018, 7:32 PM · lld

Dec 21 2017

xiangzhai awarded D39322: [lld] Support RISC-V a Like token.
Dec 21 2017, 4:08 AM · lld
PkmX updated the diff for D39324: [lld] Support TLS in RISC-V.

Rebase onto latest master.

Dec 21 2017, 3:23 AM · lld
PkmX updated the diff for D39323: [lld] Support dynamic linking in RISC-V.

Rebase onto latest master.

Dec 21 2017, 3:22 AM · Restricted Project, lld
PkmX updated the diff for D39322: [lld] Support RISC-V.

Rebase onto latest master.

Dec 21 2017, 3:22 AM · lld

Dec 19 2017

PkmX updated the diff for D41277: Implement --just-symbols.

Implement the -R option as an alias to either --rpath or --just-symbols. It is treated as latter if the argument file exists and is not a directory.

Dec 19 2017, 12:25 AM

Dec 18 2017

PkmX updated the diff for D41277: Implement --just-symbols.

Added a check to only allow ET_EXEC and the corresponding test.

Dec 18 2017, 11:13 PM

Dec 15 2017

PkmX updated the diff for D41277: Implement --just-symbols.
  • Copy symbol type, size, binding, etc, like D39348.
  • Update test cases.
Dec 15 2017, 8:42 PM
PkmX updated the diff for D41277: Implement --just-symbols.
Dec 15 2017, 8:29 PM
PkmX added inline comments to D41277: Implement --just-symbols.
Dec 15 2017, 8:24 PM
PkmX created D41277: Implement --just-symbols.
Dec 15 2017, 1:07 AM

Dec 11 2017

PkmX added a comment to D39348: Implement --just-symbols..

What is your use case to specify only single --just-symbol file ?

Dec 11 2017, 7:12 AM

Dec 10 2017

PkmX added a comment to D39348: Implement --just-symbols..

If the only input file is specified as the argument of --just-symbol, lld will error out (ld.bfd accepts this):

Dec 10 2017, 11:40 PM

Dec 7 2017

PkmX added inline comments to D39322: [lld] Support RISC-V.
Dec 7 2017, 3:20 AM · lld
PkmX added a comment to D39322: [lld] Support RISC-V.

Oops. It looks like I actually didn't submit some of these draft comments.

Dec 7 2017, 3:19 AM · lld

Nov 6 2017

PkmX updated the diff for D39324: [lld] Support TLS in RISC-V.

Rebase onto latest master

Nov 6 2017, 11:13 PM · lld
PkmX updated the diff for D39323: [lld] Support dynamic linking in RISC-V.
  • Rebase onto latest master
  • Clean up #includes
Nov 6 2017, 11:13 PM · Restricted Project, lld
PkmX updated the diff for D39322: [lld] Support RISC-V.
  • Rebase onto latest master
  • Clean up #includes
Nov 6 2017, 11:12 PM · lld

Nov 1 2017

PkmX updated the diff for D39323: [lld] Support dynamic linking in RISC-V.

clang-format-diff RISCV::writePLT.

Nov 1 2017, 1:49 AM · Restricted Project, lld
PkmX updated the diff for D39322: [lld] Support RISC-V.

Make R_RISCV_CALL reuse R_RISCV_PCREL_HI20 and R_RISCV_PCREL_LO12_I.

Nov 1 2017, 1:46 AM · lld

Oct 31 2017

PkmX added a comment to D39322: [lld] Support RISC-V.

I believe the best place would be either the issue tracker on the psABI doc, or RISC-V's sw-dev mailing list.

Oct 31 2017, 5:24 PM · lld

Oct 30 2017

PkmX updated the diff for D39324: [lld] Support TLS in RISC-V.
  • Mark TLS_DTP_OFFSET as internal linkage.
Oct 30 2017, 11:56 PM · lld
PkmX updated the diff for D39323: [lld] Support dynamic linking in RISC-V.
  • Use write32le.
  • Since __global_pointer$ is no longer absolute, remove workaround to make it a static link-time constant in PIE.
Oct 30 2017, 11:54 PM · Restricted Project, lld
PkmX updated the diff for D39322: [lld] Support RISC-V.
  • Use {read,write}32le to read/write insturctions.
  • Make __global_pointer$ non-absolute.
Oct 30 2017, 11:52 PM · lld
PkmX updated the diff for D39324: [lld] Support TLS in RISC-V.

De-template RISCV class.

Oct 30 2017, 4:26 AM · lld
PkmX updated the diff for D39323: [lld] Support dynamic linking in RISC-V.

De-template RISCV class and assume little-endian.

Oct 30 2017, 4:25 AM · Restricted Project, lld
PkmX updated the diff for D39322: [lld] Support RISC-V.
  • Renamed uint32_t to RelType.
  • Detemplate the RISCV class.
Oct 30 2017, 4:24 AM · lld

Oct 26 2017

PkmX updated the diff for D39324: [lld] Support TLS in RISC-V.
Oct 26 2017, 11:38 PM · lld
PkmX updated the diff for D39323: [lld] Support dynamic linking in RISC-V.
Oct 26 2017, 11:38 PM · Restricted Project, lld
PkmX updated the diff for D39322: [lld] Support RISC-V.
Oct 26 2017, 11:37 PM · lld
PkmX added a comment to D39322: [lld] Support RISC-V.
In D39322#908393, @ruiu wrote:

As you said this looks like a pretty straightforward port to RISC-V. Thank you for doing this!

IIRC, last time when we discussed RISC-V support in lld, I had a concern that linker relaxation (moving code inside a section to make it compact) is virtually mandatory to link RISC-V object files. What is the situation of it? If you can link a small static executable with this patch, then it is probably no longer mandatory, but I want to make sure that that's the case.

Oct 26 2017, 7:49 PM · lld
PkmX created D39324: [lld] Support TLS in RISC-V.
Oct 26 2017, 1:27 AM · lld
PkmX created D39323: [lld] Support dynamic linking in RISC-V.
Oct 26 2017, 1:25 AM · Restricted Project, lld
PkmX created D39322: [lld] Support RISC-V.
Oct 26 2017, 1:24 AM · lld

Oct 10 2017

PkmX created D38779: [RISCV] Fix createObjectWriter after r315327.
Oct 10 2017, 8:33 PM

Sep 28 2017

PkmX added a comment to D38311: [RISCV] Parse RISC-V eflags in ObjectYAML.

llvm-readobj would also need to be modified to recognize RISC-V eflags, and I think it is better to keep that in a separate commit.

Sep 28 2017, 12:16 PM
PkmX updated the diff for D38311: [RISCV] Parse RISC-V eflags in ObjectYAML.

Added RISC-V tests for ObjectYAML

Sep 28 2017, 2:57 AM

Sep 27 2017

PkmX created D38311: [RISCV] Parse RISC-V eflags in ObjectYAML.
Sep 27 2017, 3:44 AM
PkmX created D38310: [RISCV] Define RISC-V specific eflags.
Sep 27 2017, 3:35 AM

Aug 8 2017

PkmX created D36455: [RISCV] Recognize new relocation types.
Aug 8 2017, 3:26 AM