[lld] 678c1f1 - [ELF] Remove a R_ARM_PCA special case from relocateNonAlloc

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 19 21:04:54 PDT 2023


Author: Fangrui Song
Date: 2023-09-19T21:04:50-07:00
New Revision: 678c1f142c0688a092bf36c98294e5302b105a41

URL: https://github.com/llvm/llvm-project/commit/678c1f142c0688a092bf36c98294e5302b105a41
DIFF: https://github.com/llvm/llvm-project/commit/678c1f142c0688a092bf36c98294e5302b105a41.diff

LOG: [ELF] Remove a R_ARM_PCA special case from relocateNonAlloc

https://reviews.llvm.org/D75042 added a special case about R_ARM_PCA to
relocateNonAlloc. This is untested and actually unused in the wild.

Added: 
    

Modified: 
    lld/ELF/InputSection.cpp

Removed: 
    


################################################################################
diff  --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp
index f97ca96bf4a852e..3023cbfae4a59e5 100644
--- a/lld/ELF/InputSection.cpp
+++ b/lld/ELF/InputSection.cpp
@@ -975,7 +975,7 @@ void InputSection::relocateNonAlloc(uint8_t *buf, ArrayRef<RelTy> rels) {
     std::string msg = getLocation(offset) + ": has non-ABS relocation " +
                       toString(type) + " against symbol '" + toString(sym) +
                       "'";
-    if (expr != R_PC && expr != R_ARM_PCA) {
+    if (expr != R_PC) {
       error(msg);
       return;
     }


        


More information about the llvm-commits mailing list