User Details
- User Since
- Aug 7 2017, 11:26 PM (256 w, 1 d)
Apr 26 2021
Apr 21 2021
This addresses some of the comments by @jrtc27:
Apr 20 2021
Oct 9 2019
Sep 26 2019
Aug 27 2019
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.
Apr 17 2019
Apr 16 2019
- Use ET_NONE as e_type in tests.
- Drop the unnecessary dyn suffix in test name.
Apr 15 2019
- -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 10 2019
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.
Addressed the review comments:
Apr 9 2019
Apr 8 2019
- 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.
Rebased onto master and:
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 5 2019
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 3 2019
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.
Dec 13 2018
- %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.
@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 11 2018
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 10 2018
Specify that pcrel-lo12-invalid.s will only produce an error with relaxation disabled, otherwise the assembler still emits a relocation which will fail at link time.
Rebased onto trunk.
Nov 21 2018
Rebase onto trunk as the declaration of RISCVAsmBackend is split into its own header file.
Nov 2 2018
Nov 1 2018
Rebased onto trunk.
Rebased onto trunk.
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.
Oct 31 2018
LGTM. I will update D39324 to reflect this change.
Oct 30 2018
Sep 4 2018
Ping? This is the last issue blocking lld's RISC-V tests to be rewritten to use llvm-mc and llvm-objdump right now.
Aug 14 2018
Aug 13 2018
Aug 7 2018
Abandoning as this has been implemented by another commit.
@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 6 2018
Aug 2 2018
Rebased. NFC from last revision.
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.
I've rebased the diff to latest trunk again. Some notable differences from last revision:
Feb 12 2018
Rebase onto master.
Rebase onto master.
Rebase onto master.
Dec 21 2017
Rebase onto latest master.
Rebase onto latest master.
Rebase onto latest master.
Dec 19 2017
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 18 2017
Added a check to only allow ET_EXEC and the corresponding test.
Dec 15 2017
- Copy symbol type, size, binding, etc, like D39348.
- Update test cases.
Dec 11 2017
Dec 10 2017
If the only input file is specified as the argument of --just-symbol, lld will error out (ld.bfd accepts this):
Dec 7 2017
Oops. It looks like I actually didn't submit some of these draft comments.
Nov 6 2017
Rebase onto latest master
- Rebase onto latest master
- Clean up #includes
- Rebase onto latest master
- Clean up #includes
Nov 1 2017
clang-format-diff RISCV::writePLT.
Make R_RISCV_CALL reuse R_RISCV_PCREL_HI20 and R_RISCV_PCREL_LO12_I.
Oct 31 2017
I believe the best place would be either the issue tracker on the psABI doc, or RISC-V's sw-dev mailing list.
Oct 30 2017
- Mark TLS_DTP_OFFSET as internal linkage.
- Use write32le.
- Since __global_pointer$ is no longer absolute, remove workaround to make it a static link-time constant in PIE.
- Use {read,write}32le to read/write insturctions.
- Make __global_pointer$ non-absolute.
De-template RISCV class.
De-template RISCV class and assume little-endian.
- Renamed uint32_t to RelType.
- Detemplate the RISCV class.
Oct 26 2017
Oct 10 2017
Sep 28 2017
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.
Added RISC-V tests for ObjectYAML