[lld] [lld][macho] Support 1-byte branch relocs for x86_64 (PR #164439)
    Jez Ng via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Oct 21 12:55:22 PDT 2025
    
    
  
================
@@ -84,6 +84,8 @@ int64_t X86_64::getEmbeddedAddend(MemoryBufferRef mb, uint64_t offset,
   const uint8_t *loc = buf + offset + rel.r_address;
 
   switch (rel.r_length) {
+  case 0:
+    return *loc + pcrelOffset(rel.r_type);
   case 2:
     return static_cast<int32_t>(read32le(loc)) + pcrelOffset(rel.r_type);
----------------
int3 wrote:
oh yeah that's probably right
https://github.com/llvm/llvm-project/pull/164439
    
    
More information about the llvm-commits
mailing list