https://sourceware.org/bugzilla/show_bug.cgi?id=32370

            Bug ID: 32370
           Summary: Handle R_RISCV_SET_ULEB128 and R_RISCV_SUB_ULEB128
                    relocations
           Product: elfutils
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: backends
          Assignee: unassigned at sourceware dot org
          Reporter: mark at klomp dot org
                CC: elfutils-devel at sourceware dot org
  Target Milestone: ---

Currently elfutils had no knowledge of R_RISCV_SET_ULEB128 and
R_RISCV_SUB_ULEB128 relocations.

These only occur in risc-v ET_REL files (object files or kernel modules).

They are described here:
https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-elf.adoc#uleb128-note

As an example the hello.o, world.o and testfileloc from
tests/run-readelf-loc.sh are attached (build on a risc-v gcc 14.2.0 and
binutils 2.43.1).

eu-readelf -r will show

Relocation section [ 9] '.rela.debug_loclists' for section [ 8]
'.debug_loclists' at offset 0xde0 contains 24 entries:
  Offset              Type            Value               Addend Name
  0x000000000000000d  <INVALID RELOC> 000000000000000000      +0 .LVL0
  0x000000000000000d  <INVALID RELOC> 000000000000000000      +0 .Ltext0
  0x000000000000000e  <INVALID RELOC> 0x000000000000000a      +0 .LVL2
  0x000000000000000e  <INVALID RELOC> 000000000000000000      +0 .Ltext0
  0x0000000000000012  <INVALID RELOC> 0x000000000000000a      +0 .LVL2
  0x0000000000000012  <INVALID RELOC> 000000000000000000      +0 .Ltext0
  0x0000000000000013  <INVALID RELOC> 0x0000000000000012      +0 .LVL4
  0x0000000000000013  <INVALID RELOC> 000000000000000000      +0 .Ltext0
  0x000000000000001a  <INVALID RELOC> 0x0000000000000012      +0 .LVL4
  0x000000000000001a  <INVALID RELOC> 000000000000000000      +0 .Ltext0
  0x000000000000001b  <INVALID RELOC> 0x0000000000000016      +0 .LVL5
  0x000000000000001b  <INVALID RELOC> 000000000000000000      +0 .Ltext0
  0x000000000000001f  <INVALID RELOC> 0x0000000000000016      +0 .LVL5
  0x000000000000001f  <INVALID RELOC> 000000000000000000      +0 .Ltext0
  0x0000000000000020  <INVALID RELOC> 0x0000000000000018      +0 .LFE2
  0x0000000000000020  <INVALID RELOC> 000000000000000000      +0 .Ltext0
  0x0000000000000028  <INVALID RELOC> 0x0000000000000002      +0 .LVL1
  0x0000000000000028  <INVALID RELOC> 000000000000000000      +0 .Ltext0
  0x0000000000000029  <INVALID RELOC> 0x000000000000000a      +0 .LVL2
  0x0000000000000029  <INVALID RELOC> 000000000000000000      +0 .Ltext0
  0x000000000000002e  <INVALID RELOC> 0x000000000000000a      +0 .LVL2
  0x000000000000002e  <INVALID RELOC> 000000000000000000      +0 .Ltext0
  0x000000000000002f  <INVALID RELOC> 0x000000000000000e      +0 .LVL3
  0x000000000000002f  <INVALID RELOC> 000000000000000000      +0 .Ltext0

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to