[llvm] [RelocationResolver][Xtensa] Implement R_XTENSA_32 (PR #96311)

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 22 12:33:48 PDT 2024


================
@@ -0,0 +1,93 @@
+# Tests Xtensa relocations. We provide a .debug_info section with multiple
+# DW_AT_high_pc entries (that's one of the attributes for which relocations are
+# resolved by llvm-dwarfdump) and we add a relocation for each of them.
+#
+# RUN: yaml2obj %s | llvm-dwarfdump - | FileCheck %s
+
+# To add more tests you need to modify the Content of the .debug_abbrev and
+# .debug_info sections. To do that create a test.s which matches the assembly
+# code below, run the command that follows and copy over the "Content" value of
+# the respective sections:
+#
+# ```
+# $ cat test.s
+# .section .debug_abbrev,"", at progbits
+#  .byte 1                  # Abbreviation Code
+#  .byte 0x11               # DW_TAG_compile_unit
+#  .byte 0                  # DW_CHILDREN_no
+#
+# # Add a DW_AT_high_pc for each relocation we test.
+#  .rept 2                  # (UPDATE HERE)
+#  .byte 0x12               # DW_AT_high_pc
+#  .byte 0x01               # DW_FORM_addr
+#  .endr
+#
+#  .byte 0                  # EOM(1)
+#  .byte 0                  # EOM(2)
+#  .byte 0                  # EOM(3)
+#
+# .section .debug_info,"", at progbits
+#  .4byte 2+4+1+1+4*2       # Length of Unit (UPDATE HERE)
----------------
dwblaikie wrote:

could use assembly labels to compute the length here to make it easier to update the test in the future?

https://github.com/llvm/llvm-project/pull/96311


More information about the llvm-commits mailing list