Skip to content

[RISCV] Add Vendor Reloc and Fallback Names #116974

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 9, 2024

Conversation

lenary
Copy link
Member

@lenary lenary commented Nov 20, 2024

The trunk psABI document specifies that R_RISCV_VENDOR is 191, and that relocations 192-255 should be printed as R_RISCV_CUSTOM<enum val> in the absence of better information.

The testcase shows that these parse in .reloc directives, and also print correctly from both the assembler and objdump. There is almost certainly a better way to test this.

@llvmbot
Copy link
Member

llvmbot commented Nov 20, 2024

@llvm/pr-subscribers-llvm-binary-utilities

@llvm/pr-subscribers-backend-risc-v

Author: Sam Elliott (lenary)

Changes

The trunk psABI document specifies that R_RISCV_VENDOR is 191, and that relocations 192-255 should be printed as R_RISCV_CUSTOM&lt;enum val&gt; in the absence of better information.

The testcase shows that these parse in .reloc directives, and also print correctly from both the assembler and objdump. There is almost certainly a better way to test this.


Full diff: https://github.com/llvm/llvm-project/pull/116974.diff

2 Files Affected:

  • (modified) llvm/include/llvm/BinaryFormat/ELFRelocs/RISCV.def (+65)
  • (added) llvm/test/MC/RISCV/custom_reloc.s (+43)
diff --git a/llvm/include/llvm/BinaryFormat/ELFRelocs/RISCV.def b/llvm/include/llvm/BinaryFormat/ELFRelocs/RISCV.def
index d4be34e3b37e5e..2d7ee0814fe4a1 100644
--- a/llvm/include/llvm/BinaryFormat/ELFRelocs/RISCV.def
+++ b/llvm/include/llvm/BinaryFormat/ELFRelocs/RISCV.def
@@ -61,3 +61,68 @@ ELF_RELOC(R_RISCV_TLSDESC_HI20,      62)
 ELF_RELOC(R_RISCV_TLSDESC_LOAD_LO12, 63)
 ELF_RELOC(R_RISCV_TLSDESC_ADD_LO12,  64)
 ELF_RELOC(R_RISCV_TLSDESC_CALL,      65)
+ELF_RELOC(R_RISCV_VENDOR,           191)
+ELF_RELOC(R_RISCV_CUSTOM192,        192)
+ELF_RELOC(R_RISCV_CUSTOM193,        193)
+ELF_RELOC(R_RISCV_CUSTOM194,        194)
+ELF_RELOC(R_RISCV_CUSTOM195,        195)
+ELF_RELOC(R_RISCV_CUSTOM196,        196)
+ELF_RELOC(R_RISCV_CUSTOM197,        197)
+ELF_RELOC(R_RISCV_CUSTOM198,        198)
+ELF_RELOC(R_RISCV_CUSTOM199,        199)
+ELF_RELOC(R_RISCV_CUSTOM200,        200)
+ELF_RELOC(R_RISCV_CUSTOM201,        201)
+ELF_RELOC(R_RISCV_CUSTOM202,        202)
+ELF_RELOC(R_RISCV_CUSTOM203,        203)
+ELF_RELOC(R_RISCV_CUSTOM204,        204)
+ELF_RELOC(R_RISCV_CUSTOM205,        205)
+ELF_RELOC(R_RISCV_CUSTOM206,        206)
+ELF_RELOC(R_RISCV_CUSTOM207,        207)
+ELF_RELOC(R_RISCV_CUSTOM208,        208)
+ELF_RELOC(R_RISCV_CUSTOM209,        209)
+ELF_RELOC(R_RISCV_CUSTOM210,        210)
+ELF_RELOC(R_RISCV_CUSTOM211,        211)
+ELF_RELOC(R_RISCV_CUSTOM212,        212)
+ELF_RELOC(R_RISCV_CUSTOM213,        213)
+ELF_RELOC(R_RISCV_CUSTOM214,        214)
+ELF_RELOC(R_RISCV_CUSTOM215,        215)
+ELF_RELOC(R_RISCV_CUSTOM216,        216)
+ELF_RELOC(R_RISCV_CUSTOM217,        217)
+ELF_RELOC(R_RISCV_CUSTOM218,        218)
+ELF_RELOC(R_RISCV_CUSTOM219,        219)
+ELF_RELOC(R_RISCV_CUSTOM220,        220)
+ELF_RELOC(R_RISCV_CUSTOM221,        221)
+ELF_RELOC(R_RISCV_CUSTOM222,        222)
+ELF_RELOC(R_RISCV_CUSTOM223,        223)
+ELF_RELOC(R_RISCV_CUSTOM224,        224)
+ELF_RELOC(R_RISCV_CUSTOM225,        225)
+ELF_RELOC(R_RISCV_CUSTOM226,        226)
+ELF_RELOC(R_RISCV_CUSTOM227,        227)
+ELF_RELOC(R_RISCV_CUSTOM228,        228)
+ELF_RELOC(R_RISCV_CUSTOM229,        229)
+ELF_RELOC(R_RISCV_CUSTOM230,        230)
+ELF_RELOC(R_RISCV_CUSTOM231,        231)
+ELF_RELOC(R_RISCV_CUSTOM232,        232)
+ELF_RELOC(R_RISCV_CUSTOM233,        233)
+ELF_RELOC(R_RISCV_CUSTOM234,        234)
+ELF_RELOC(R_RISCV_CUSTOM235,        235)
+ELF_RELOC(R_RISCV_CUSTOM236,        236)
+ELF_RELOC(R_RISCV_CUSTOM237,        237)
+ELF_RELOC(R_RISCV_CUSTOM238,        238)
+ELF_RELOC(R_RISCV_CUSTOM239,        239)
+ELF_RELOC(R_RISCV_CUSTOM240,        240)
+ELF_RELOC(R_RISCV_CUSTOM241,        241)
+ELF_RELOC(R_RISCV_CUSTOM242,        242)
+ELF_RELOC(R_RISCV_CUSTOM243,        243)
+ELF_RELOC(R_RISCV_CUSTOM244,        244)
+ELF_RELOC(R_RISCV_CUSTOM245,        245)
+ELF_RELOC(R_RISCV_CUSTOM246,        246)
+ELF_RELOC(R_RISCV_CUSTOM247,        247)
+ELF_RELOC(R_RISCV_CUSTOM248,        248)
+ELF_RELOC(R_RISCV_CUSTOM249,        249)
+ELF_RELOC(R_RISCV_CUSTOM250,        250)
+ELF_RELOC(R_RISCV_CUSTOM251,        251)
+ELF_RELOC(R_RISCV_CUSTOM252,        252)
+ELF_RELOC(R_RISCV_CUSTOM253,        253)
+ELF_RELOC(R_RISCV_CUSTOM254,        254)
+ELF_RELOC(R_RISCV_CUSTOM255,        255)
diff --git a/llvm/test/MC/RISCV/custom_reloc.s b/llvm/test/MC/RISCV/custom_reloc.s
new file mode 100644
index 00000000000000..3058cffe4b5914
--- /dev/null
+++ b/llvm/test/MC/RISCV/custom_reloc.s
@@ -0,0 +1,43 @@
+# RUN: llvm-mc -triple riscv32 < %s \
+# RUN:   | FileCheck -check-prefix=CHECK-ASM %s
+# RUN: llvm-mc -triple riscv64 < %s \
+# RUN:   | FileCheck -check-prefix=CHECK-ASM %s
+
+# RUN: llvm-mc -filetype=obj -triple riscv32 < %s \
+# RUN:   | llvm-objdump -dr -M no-aliases - \
+# RUN:   | FileCheck -check-prefix=CHECK-OBJ %s
+# RUN: llvm-mc -filetype=obj -triple riscv64 < %s \
+# RUN:   | llvm-objdump -dr -M no-aliases  - \
+# RUN:   | FileCheck -check-prefix=CHECK-OBJ %s
+
+  # CHECK-ASM: .text
+
+  # If `.set` is used instead, the relocation expression will be evaluated.
+  # This leaves an undef, global symbol called VENDOR_NAME, which I'm not happy
+  # about.
+  .global VENDOR_NAME
+
+  # CHECK-OBJ: <.text>:
+
+  nop
+  # CHECK-ASM: nop
+  # CHECK-OBJ: addi zero, zero, 0x0
+
+  .reloc ., R_RISCV_VENDOR,    VENDOR_NAME
+  .reloc ., R_RISCV_CUSTOM192, my_foo + 1
+  addi a0, a0, 0
+  # CHECK-ASM: [[L1:.L[^:]+]]:
+  # CHECK-ASM-NEXT: .reloc [[L1]], R_RISCV_VENDOR, VENDOR_NAME
+  # CHECK-ASM-NEXT: [[L2:.L[^:]+]]:
+  # CHECK-ASM-NEXT: .reloc [[L2]], R_RISCV_CUSTOM192, my_foo+1
+  # CHECK-ASM-NEXT: mv a0, a0
+
+  # CHECK-OBJ: addi a0, a0, 0
+  # CHECK-OBJ-NEXT: R_RISCV_VENDOR    VENDOR_NAME
+  # CHECK-OBJ-NEXT: R_RISCV_CUSTOM192 my_foo+0x1
+
+  nop
+  # CHECK-ASM: nop
+  # CHECK-OBJ: addi zero, zero, 0x0
+
+

@llvmbot
Copy link
Member

llvmbot commented Nov 20, 2024

@llvm/pr-subscribers-mc

Author: Sam Elliott (lenary)

Changes

The trunk psABI document specifies that R_RISCV_VENDOR is 191, and that relocations 192-255 should be printed as R_RISCV_CUSTOM&lt;enum val&gt; in the absence of better information.

The testcase shows that these parse in .reloc directives, and also print correctly from both the assembler and objdump. There is almost certainly a better way to test this.


Full diff: https://github.com/llvm/llvm-project/pull/116974.diff

2 Files Affected:

  • (modified) llvm/include/llvm/BinaryFormat/ELFRelocs/RISCV.def (+65)
  • (added) llvm/test/MC/RISCV/custom_reloc.s (+43)
diff --git a/llvm/include/llvm/BinaryFormat/ELFRelocs/RISCV.def b/llvm/include/llvm/BinaryFormat/ELFRelocs/RISCV.def
index d4be34e3b37e5e..2d7ee0814fe4a1 100644
--- a/llvm/include/llvm/BinaryFormat/ELFRelocs/RISCV.def
+++ b/llvm/include/llvm/BinaryFormat/ELFRelocs/RISCV.def
@@ -61,3 +61,68 @@ ELF_RELOC(R_RISCV_TLSDESC_HI20,      62)
 ELF_RELOC(R_RISCV_TLSDESC_LOAD_LO12, 63)
 ELF_RELOC(R_RISCV_TLSDESC_ADD_LO12,  64)
 ELF_RELOC(R_RISCV_TLSDESC_CALL,      65)
+ELF_RELOC(R_RISCV_VENDOR,           191)
+ELF_RELOC(R_RISCV_CUSTOM192,        192)
+ELF_RELOC(R_RISCV_CUSTOM193,        193)
+ELF_RELOC(R_RISCV_CUSTOM194,        194)
+ELF_RELOC(R_RISCV_CUSTOM195,        195)
+ELF_RELOC(R_RISCV_CUSTOM196,        196)
+ELF_RELOC(R_RISCV_CUSTOM197,        197)
+ELF_RELOC(R_RISCV_CUSTOM198,        198)
+ELF_RELOC(R_RISCV_CUSTOM199,        199)
+ELF_RELOC(R_RISCV_CUSTOM200,        200)
+ELF_RELOC(R_RISCV_CUSTOM201,        201)
+ELF_RELOC(R_RISCV_CUSTOM202,        202)
+ELF_RELOC(R_RISCV_CUSTOM203,        203)
+ELF_RELOC(R_RISCV_CUSTOM204,        204)
+ELF_RELOC(R_RISCV_CUSTOM205,        205)
+ELF_RELOC(R_RISCV_CUSTOM206,        206)
+ELF_RELOC(R_RISCV_CUSTOM207,        207)
+ELF_RELOC(R_RISCV_CUSTOM208,        208)
+ELF_RELOC(R_RISCV_CUSTOM209,        209)
+ELF_RELOC(R_RISCV_CUSTOM210,        210)
+ELF_RELOC(R_RISCV_CUSTOM211,        211)
+ELF_RELOC(R_RISCV_CUSTOM212,        212)
+ELF_RELOC(R_RISCV_CUSTOM213,        213)
+ELF_RELOC(R_RISCV_CUSTOM214,        214)
+ELF_RELOC(R_RISCV_CUSTOM215,        215)
+ELF_RELOC(R_RISCV_CUSTOM216,        216)
+ELF_RELOC(R_RISCV_CUSTOM217,        217)
+ELF_RELOC(R_RISCV_CUSTOM218,        218)
+ELF_RELOC(R_RISCV_CUSTOM219,        219)
+ELF_RELOC(R_RISCV_CUSTOM220,        220)
+ELF_RELOC(R_RISCV_CUSTOM221,        221)
+ELF_RELOC(R_RISCV_CUSTOM222,        222)
+ELF_RELOC(R_RISCV_CUSTOM223,        223)
+ELF_RELOC(R_RISCV_CUSTOM224,        224)
+ELF_RELOC(R_RISCV_CUSTOM225,        225)
+ELF_RELOC(R_RISCV_CUSTOM226,        226)
+ELF_RELOC(R_RISCV_CUSTOM227,        227)
+ELF_RELOC(R_RISCV_CUSTOM228,        228)
+ELF_RELOC(R_RISCV_CUSTOM229,        229)
+ELF_RELOC(R_RISCV_CUSTOM230,        230)
+ELF_RELOC(R_RISCV_CUSTOM231,        231)
+ELF_RELOC(R_RISCV_CUSTOM232,        232)
+ELF_RELOC(R_RISCV_CUSTOM233,        233)
+ELF_RELOC(R_RISCV_CUSTOM234,        234)
+ELF_RELOC(R_RISCV_CUSTOM235,        235)
+ELF_RELOC(R_RISCV_CUSTOM236,        236)
+ELF_RELOC(R_RISCV_CUSTOM237,        237)
+ELF_RELOC(R_RISCV_CUSTOM238,        238)
+ELF_RELOC(R_RISCV_CUSTOM239,        239)
+ELF_RELOC(R_RISCV_CUSTOM240,        240)
+ELF_RELOC(R_RISCV_CUSTOM241,        241)
+ELF_RELOC(R_RISCV_CUSTOM242,        242)
+ELF_RELOC(R_RISCV_CUSTOM243,        243)
+ELF_RELOC(R_RISCV_CUSTOM244,        244)
+ELF_RELOC(R_RISCV_CUSTOM245,        245)
+ELF_RELOC(R_RISCV_CUSTOM246,        246)
+ELF_RELOC(R_RISCV_CUSTOM247,        247)
+ELF_RELOC(R_RISCV_CUSTOM248,        248)
+ELF_RELOC(R_RISCV_CUSTOM249,        249)
+ELF_RELOC(R_RISCV_CUSTOM250,        250)
+ELF_RELOC(R_RISCV_CUSTOM251,        251)
+ELF_RELOC(R_RISCV_CUSTOM252,        252)
+ELF_RELOC(R_RISCV_CUSTOM253,        253)
+ELF_RELOC(R_RISCV_CUSTOM254,        254)
+ELF_RELOC(R_RISCV_CUSTOM255,        255)
diff --git a/llvm/test/MC/RISCV/custom_reloc.s b/llvm/test/MC/RISCV/custom_reloc.s
new file mode 100644
index 00000000000000..3058cffe4b5914
--- /dev/null
+++ b/llvm/test/MC/RISCV/custom_reloc.s
@@ -0,0 +1,43 @@
+# RUN: llvm-mc -triple riscv32 < %s \
+# RUN:   | FileCheck -check-prefix=CHECK-ASM %s
+# RUN: llvm-mc -triple riscv64 < %s \
+# RUN:   | FileCheck -check-prefix=CHECK-ASM %s
+
+# RUN: llvm-mc -filetype=obj -triple riscv32 < %s \
+# RUN:   | llvm-objdump -dr -M no-aliases - \
+# RUN:   | FileCheck -check-prefix=CHECK-OBJ %s
+# RUN: llvm-mc -filetype=obj -triple riscv64 < %s \
+# RUN:   | llvm-objdump -dr -M no-aliases  - \
+# RUN:   | FileCheck -check-prefix=CHECK-OBJ %s
+
+  # CHECK-ASM: .text
+
+  # If `.set` is used instead, the relocation expression will be evaluated.
+  # This leaves an undef, global symbol called VENDOR_NAME, which I'm not happy
+  # about.
+  .global VENDOR_NAME
+
+  # CHECK-OBJ: <.text>:
+
+  nop
+  # CHECK-ASM: nop
+  # CHECK-OBJ: addi zero, zero, 0x0
+
+  .reloc ., R_RISCV_VENDOR,    VENDOR_NAME
+  .reloc ., R_RISCV_CUSTOM192, my_foo + 1
+  addi a0, a0, 0
+  # CHECK-ASM: [[L1:.L[^:]+]]:
+  # CHECK-ASM-NEXT: .reloc [[L1]], R_RISCV_VENDOR, VENDOR_NAME
+  # CHECK-ASM-NEXT: [[L2:.L[^:]+]]:
+  # CHECK-ASM-NEXT: .reloc [[L2]], R_RISCV_CUSTOM192, my_foo+1
+  # CHECK-ASM-NEXT: mv a0, a0
+
+  # CHECK-OBJ: addi a0, a0, 0
+  # CHECK-OBJ-NEXT: R_RISCV_VENDOR    VENDOR_NAME
+  # CHECK-OBJ-NEXT: R_RISCV_CUSTOM192 my_foo+0x1
+
+  nop
+  # CHECK-ASM: nop
+  # CHECK-OBJ: addi zero, zero, 0x0
+
+

@jrtc27
Copy link
Collaborator

jrtc27 commented Nov 22, 2024

Is the expectation that downstream tools support R_RISCV_CUSTOM<n> as non-canonical aliases when they are given a defined meaning? There doesn't seem to be an ELF_RELOC_ALIAS equivalent to allow for that, so such downstream (ourselves included) would have to add extra cases to RISCVAsmBackend::getFixupKind manually. We can do that if needed, but it'd be nicer if upstream supported this more directly.

@lenary
Copy link
Member Author

lenary commented Nov 22, 2024

Is the expectation that downstream tools support R_RISCV_CUSTOM<n> as non-canonical aliases when they are given a defined meaning? There doesn't seem to be an ELF_RELOC_ALIAS equivalent to allow for that, so such downstream (ourselves included) would have to add extra cases to RISCVAsmBackend::getFixupKind manually. We can do that if needed, but it'd be nicer if upstream supported this more directly.

I have a solution for getFixupKind to support using vendor relocation names "correctly", but I'm waiting for review on the ABI extension I've written before I can release the spec and open a PR for the corresponding implementation.

Broadly, my intention is to add another header, ELFRelocs/RISCV_nonstandard.def, with a ELF_RISCV_NONSTANDARD_RELOC(vendor_symbol, name, id) macro, and to hook that macro into getFixupKind so you can use the name directly. The reason for including the vendor_symbol is so that we can start to have other places use the mapping correctly. I'm not familiar with the cheri relocations, and whether they use the R_RISCV_VENDOR with a named symbol, but I took a quick look at the corev relocs and an example from that in my scheme would be ELF_RISCV_NONSTANDARD_RELOC(COREV, R_RISCV_CVPCREL_UI12, 224). The nice thing about this is it means different places in LLVM can opt into the pretty-printing (rather than the fallback) behaviour, depending on whether they want a 1:1 mapping or have more information available.

A lot more reworking of llvm-objdump will be required to support printing out the right name depending on the vendor relocation - in the meantime, it will print out R_RISCV_CUSTOM<n> - which I don't think is wrong, even though it could do better.

I'm trying to juggle my priorities fairly carefully, and have had to make the hard decision to prioritise the linker implementation of my specification, rather than reworking llvm-objdump, so until I can get to it (likely after 20.0) I think downstream implementations will just have to keep some modifications to ELFRelocs/RISCV.def if they want their name to be printed out rather than the R_RISCV_CUSTOM<n> name (and presumably those downstream implementations are, right now, ignoring the R_RISCV_VENDOR implementation when they are printing anyway).

I hope this is a reasonable/acceptable way forwards?

@lenary
Copy link
Member Author

lenary commented Nov 27, 2024

@jrtc27 ping? What do you think of the approach I outlined?

@jrtc27
Copy link
Collaborator

jrtc27 commented Nov 27, 2024

So, for CHERI-RISC-V, we predate the existence of R_RISCV_VENDOR by many years and thus just use the custom reloc encodings directly with no namespacing. Fixing that isn't worth doing because we're on the path to standardisation, which will yield the necessary relocations existing in the standard range. So your ELF_RISCV_NONSTANDARD_RELOC wouldn't help us, but might be the right shape for "proper" vendor relocations. Which may mean that it's our responsibility to deal with downstream if we're not doing things what is now the "proper" way.

@lenary
Copy link
Member Author

lenary commented Nov 27, 2024

Ok, so I guess in that case, if we can land this, downstream you would just comment out some of the ELF_RELOC(..., ...) that relate to relocs CHERI has its own names for already in that file. You might also need to xfail the test, but your toolchain wouldn't have a regression for users, I believe.

Once we get ELF_RISCV_NONSTANDARD_RELOC, the implementation I have in in getFixupKind ignores the vendor field for the moment anyway, and just allows the name to be used in .reloc directives (so vendors following the standard need a separate .reloc ., R_RISCV_VENDOR, .. directive - I didn't want to change how many relocation .reloc creates/encodes). I guess this is when you get a regression for users - because this is the point you might start to see R_RISCV_CUSTOM<n> instead of your nice names - but maybe you can just keep the downstream changes from the first paragraph to ELF_RELOC(..., ...)?

I can understand not wanting to regress downstream, and it is mostly a CHERI problem that upstream doesn't care about, but maybe with this sketched out, we can proceed on merging this patch upstream?

@jrtc27
Copy link
Collaborator

jrtc27 commented Nov 27, 2024

Yeah I've convinced myself that I have no issue with you moving ahead with this upstream. If this becomes a problem we can revisit the conversation at that later date.

@lenary
Copy link
Member Author

lenary commented Nov 27, 2024

Cool. In that case, please may you approve the PR?

nop
# CHECK-ASM: nop
# CHECK-OBJ: addi zero, zero, 0x0

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete trailing blank lines

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

# RUN: llvm-mc -triple riscv64 < %s \
# RUN: | FileCheck -check-prefix=CHECK-ASM %s

# RUN: llvm-mc -filetype=obj -triple riscv32 < %s \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

< %s => %s

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

# If `.set` is used instead, the relocation expression will be evaluated.
# This leaves an undef, global symbol called VENDOR_NAME, which I'm not happy
# about.
.global VENDOR_NAME
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can drop this .globl. Symbols only referenced by .reloc directives are emitted to .symtab as undefined symbols.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

The trunk psABI document specifies that R_RISCV_VENDOR is 191, and that
relocations 192-255 should be printed as R_RISCV_CUSTOM<enum val> in
the absence of better information.
@lenary lenary force-pushed the pr/riscv-unknown-relocs branch from a9eeb16 to 6d81b67 Compare November 29, 2024 21:57
Copy link
Member Author

@lenary lenary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the force push, I have some branches stacked on this in my local repo which I wanted to update too.

# RUN: llvm-mc -triple riscv64 < %s \
# RUN: | FileCheck -check-prefix=CHECK-ASM %s

# RUN: llvm-mc -filetype=obj -triple riscv32 < %s \
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

# If `.set` is used instead, the relocation expression will be evaluated.
# This leaves an undef, global symbol called VENDOR_NAME, which I'm not happy
# about.
.global VENDOR_NAME
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

nop
# CHECK-ASM: nop
# CHECK-OBJ: addi zero, zero, 0x0

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@lenary
Copy link
Member Author

lenary commented Dec 4, 2024

ping?

@lenary lenary requested a review from MaskRay December 5, 2024 20:13
Copy link
Member

@MaskRay MaskRay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if jrtc27 is happy

@lenary lenary merged commit fea7b65 into llvm:main Dec 9, 2024
8 checks passed
@lenary lenary deleted the pr/riscv-unknown-relocs branch December 9, 2024 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants