<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Object/RelocationResolver.cpp, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[llvm-objcopy][libObject] Add RISC-V big-endian support (#146913)</title>
<updated>2025-07-17T08:36:31+00:00</updated>
<author>
<name>Djordje Todorovic</name>
<email>djordje.todorovic@htecgroup.com</email>
</author>
<published>2025-07-17T08:36:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=742147ba1bb26d7a69d4289b6ad9a07bd019a2ae'/>
<id>742147ba1bb26d7a69d4289b6ad9a07bd019a2ae</id>
<content type='text'>
Add support for big-endian RISC-V ELF files:
  - Add riscv32be/riscv64be target architectures to Triple
- Support elf32-bigriscv and elf64-bigriscv output targets in
llvm-objcopy
- Update ELFObjectFile to handle BE RISC-V format strings and
architecture detection
  - Add BE RISC-V support to RelocationResolver
  - Add tests for new functionality

This is a subset of a bigger RISC-V big-endian support patch, containing
only the llvm-objcopy and libObject changes. Other changes will be added
later.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add support for big-endian RISC-V ELF files:
  - Add riscv32be/riscv64be target architectures to Triple
- Support elf32-bigriscv and elf64-bigriscv output targets in
llvm-objcopy
- Update ELFObjectFile to handle BE RISC-V format strings and
architecture detection
  - Add BE RISC-V support to RelocationResolver
  - Add tests for new functionality

This is a subset of a bigger RISC-V big-endian support patch, containing
only the llvm-objcopy and libObject changes. Other changes will be added
later.</pre>
</div>
</content>
</entry>
<entry>
<title>[Object][AMDGPU] Support REL relocations (#143966)</title>
<updated>2025-06-16T19:03:02+00:00</updated>
<author>
<name>Scott Linder</name>
<email>scott.linder@amd.com</email>
</author>
<published>2025-06-16T19:03:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e8362234f60612a250d832cc8d0f68fe7fa9ea17'/>
<id>e8362234f60612a250d832cc8d0f68fe7fa9ea17</id>
<content type='text'>
Shaders compiled with DXC/LLPC generate these relocations, and even if
that changes in the future we want to handle existing binaries. The
friction to support this and the maintenance cost long term both seem
incredibly low, considering other targets like ARM support both REL/RELA
static relocations behind the same interface.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Shaders compiled with DXC/LLPC generate these relocations, and even if
that changes in the future we want to handle existing binaries. The
friction to support this and the maintenance cost long term both seem
incredibly low, considering other targets like ARM support both REL/RELA
static relocations behind the same interface.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Revert "[Object] Handle SHT_CREL relocation sections when resolving relocation data"" (#142075)</title>
<updated>2025-05-30T01:27:21+00:00</updated>
<author>
<name>Kewen12</name>
<email>Kewen.Meng@amd.com</email>
</author>
<published>2025-05-30T01:27:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=65c127f4c6b0da0e9bf1d49fc79fce9074e95264'/>
<id>65c127f4c6b0da0e9bf1d49fc79fce9074e95264</id>
<content type='text'>
Reverts llvm/llvm-project#142068

This PR breaks several buildbots. e.g
https://lab.llvm.org/buildbot/#/builders/10/builds/6340</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reverts llvm/llvm-project#142068

This PR breaks several buildbots. e.g
https://lab.llvm.org/buildbot/#/builders/10/builds/6340</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[Object] Handle SHT_CREL relocation sections when resolving relocation data" (#142068)</title>
<updated>2025-05-30T00:01:32+00:00</updated>
<author>
<name>David Blaikie</name>
<email>dblaikie@gmail.com</email>
</author>
<published>2025-05-30T00:01:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5d86fb7d9deb14a416efa759cf82b123b881e88a'/>
<id>5d86fb7d9deb14a416efa759cf82b123b881e88a</id>
<content type='text'>
Reverts llvm/llvm-project#141843

The test case relies on clang, which LLVM test cases can't use.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reverts llvm/llvm-project#141843

The test case relies on clang, which LLVM test cases can't use.</pre>
</div>
</content>
</entry>
<entry>
<title>[Object] Handle SHT_CREL relocation sections when resolving relocation data (#141843)</title>
<updated>2025-05-29T20:47:20+00:00</updated>
<author>
<name>Zequan Wu</name>
<email>zequanwu@google.com</email>
</author>
<published>2025-05-29T20:47:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=821cd6aa77233b4659fafca5b2d63432ae32610c'/>
<id>821cd6aa77233b4659fafca5b2d63432ae32610c</id>
<content type='text'>
Fixes #141680</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #141680</pre>
</div>
</content>
</entry>
<entry>
<title>[Object] Remove unused includes (NFC) (#116750)</title>
<updated>2024-11-20T03:42:09+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2024-11-20T03:42:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e9c8106a90d49e75bac87341ade57c6049357a97'/>
<id>e9c8106a90d49e75bac87341ade57c6049357a97</id>
<content type='text'>
Identified with misc-include-cleaner.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Identified with misc-include-cleaner.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[Object][x86-64] Add support for `R_X86_64_GLOB_DAT` relocations. (#103029)" (#103497)</title>
<updated>2024-08-15T16:01:06+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2024-08-15T16:01:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=64c856055aed97603510410fd2feab273e1d5b8a'/>
<id>64c856055aed97603510410fd2feab273e1d5b8a</id>
<content type='text'>
This reverts commit 5ae9faa538d100ab38f6f4f99c924de0e4270272.

RelocationResolver is only supposed to handle static relocation types.
Introducing GLOB_DAT could negatively impact other RelocationResolver
users who solely handle static relocations and want to report errors for
dynamic relocations.

If GLOB_DAT is the sole required relocation, explicitly checking for it
in the caller would be more reliable. Additionally, the caller should
handle GLOB_DAT on other architectures.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 5ae9faa538d100ab38f6f4f99c924de0e4270272.

RelocationResolver is only supposed to handle static relocation types.
Introducing GLOB_DAT could negatively impact other RelocationResolver
users who solely handle static relocations and want to report errors for
dynamic relocations.

If GLOB_DAT is the sole required relocation, explicitly checking for it
in the caller would be more reliable. Additionally, the caller should
handle GLOB_DAT on other architectures.</pre>
</div>
</content>
</entry>
<entry>
<title>[Object][x86-64] Add support for `R_X86_64_GLOB_DAT` relocations. (#103029)</title>
<updated>2024-08-13T21:54:43+00:00</updated>
<author>
<name>Alastair Houghton</name>
<email>ahoughton@apple.com</email>
</author>
<published>2024-08-13T21:54:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5ae9faa538d100ab38f6f4f99c924de0e4270272'/>
<id>5ae9faa538d100ab38f6f4f99c924de0e4270272</id>
<content type='text'>
Add support for `R_X86_64_GLOB_DAT` relocations to the relocation
resolver.

rdar://133510292</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add support for `R_X86_64_GLOB_DAT` relocations to the relocation
resolver.

rdar://133510292</pre>
</div>
</content>
</entry>
<entry>
<title>Suppress spurious warnings due to R_RISCV_SET_ULEB128</title>
<updated>2024-08-09T17:59:20+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2024-08-09T17:59:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=edf45e4eddbc5a10cc3db4397b3b7100e8f03dcf'/>
<id>edf45e4eddbc5a10cc3db4397b3b7100e8f03dcf</id>
<content type='text'>
llvm-objdump -S issues unnecessary warnings for RISC-V relocatable files
containing .debug_loclists or .debug_rnglists sections with ULEB128
relocations. This occurred because `DWARFObjInMemory` verifies support for all
relocation types, triggering warnings for unsupported ones.

```
% llvm-objdump -S a.o
...
0000000000000000 &lt;foo&gt;:
warning: failed to compute relocation: R_RISCV_SUB_ULEB128, Invalid data was encountered while parsing the file
warning: failed to compute relocation: R_RISCV_SET_ULEB128, Invalid data was encountered while parsing the file
...
```

This change fixes #101544 by declaring support for the two ULEB128
relocation types, silencing the spurious warnings.

---

In DWARF v5 builds, DW_LLE_offset_pair/DW_RLE_offset_pair might be
generated in .debug_loclists/.debug_rnglists with ULEB128 relocations.
They are only read by llvm-dwarfdump to dump section content and verbose
DW_AT_location/DW_AT_ranges output for relocatable files.

The DebugInfoDWARF user (e.g. DWARFDebugRnglists.cpp) calls
`Data.getULEB128` without checking the ULEB128 relocations, as the
unrelocated value holds meaning (refer to the assembler
implementation https://reviews.llvm.org/D157657). This differs from
`.quad .Lfoo`, which requires relocation reading (e.g.
https://reviews.llvm.org/D74404).

Pull Request: https://github.com/llvm/llvm-project/pull/101607
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
llvm-objdump -S issues unnecessary warnings for RISC-V relocatable files
containing .debug_loclists or .debug_rnglists sections with ULEB128
relocations. This occurred because `DWARFObjInMemory` verifies support for all
relocation types, triggering warnings for unsupported ones.

```
% llvm-objdump -S a.o
...
0000000000000000 &lt;foo&gt;:
warning: failed to compute relocation: R_RISCV_SUB_ULEB128, Invalid data was encountered while parsing the file
warning: failed to compute relocation: R_RISCV_SET_ULEB128, Invalid data was encountered while parsing the file
...
```

This change fixes #101544 by declaring support for the two ULEB128
relocation types, silencing the spurious warnings.

---

In DWARF v5 builds, DW_LLE_offset_pair/DW_RLE_offset_pair might be
generated in .debug_loclists/.debug_rnglists with ULEB128 relocations.
They are only read by llvm-dwarfdump to dump section content and verbose
DW_AT_location/DW_AT_ranges output for relocatable files.

The DebugInfoDWARF user (e.g. DWARFDebugRnglists.cpp) calls
`Data.getULEB128` without checking the ULEB128 relocations, as the
unrelocated value holds meaning (refer to the assembler
implementation https://reviews.llvm.org/D157657). This differs from
`.quad .Lfoo`, which requires relocation reading (e.g.
https://reviews.llvm.org/D74404).

Pull Request: https://github.com/llvm/llvm-project/pull/101607
</pre>
</div>
</content>
</entry>
<entry>
<title>[LoongArch] Add relaxDwarfLineAddr and relaxDwarfCFA to handle the mutable label diff in dwarfinfo (#77728)</title>
<updated>2024-01-16T05:20:13+00:00</updated>
<author>
<name>Jinyang He</name>
<email>hejinyang@loongson.cn</email>
</author>
<published>2024-01-16T05:20:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ed7f4edc19ada006789318a0929b57d1b5a761bd'/>
<id>ed7f4edc19ada006789318a0929b57d1b5a761bd</id>
<content type='text'>
When linker-relaxation is enabled, part of the label diff in dwarfinfo
cannot be computed before static link. Refer to RISCV, we add the
relaxDwarfLineAddr and relaxDwarfCFA to add relocations for these label
diffs. Calculate whether the label diff is mutable. For immutable label
diff, return false and do the other works by its parent function.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When linker-relaxation is enabled, part of the label diff in dwarfinfo
cannot be computed before static link. Refer to RISCV, we add the
relaxDwarfLineAddr and relaxDwarfCFA to add relocations for these label
diffs. Calculate whether the label diff is mutable. For immutable label
diff, return false and do the other works by its parent function.</pre>
</div>
</content>
</entry>
</feed>
