@@ -236,8 +236,8 @@ static size_t getSizeForTypeRISCV(uint32_t Type) {
236
236
case ELF::R_RISCV_GOT_HI20:
237
237
case ELF::R_RISCV_TLS_GOT_HI20:
238
238
case ELF::R_RISCV_TLS_GD_HI20:
239
- // See extractValueRISCV for why this is necessary.
240
- return 8 ;
239
+ // See extractValueRISCV for why this is necessary.
240
+ return 8 ;
241
241
}
242
242
}
243
243
@@ -471,12 +471,11 @@ static uint64_t extractValueRISCV(uint32_t Type, uint64_t Contents,
471
471
case ELF::R_RISCV_GOT_HI20:
472
472
case ELF::R_RISCV_TLS_GOT_HI20:
473
473
case ELF::R_RISCV_TLS_GD_HI20:
474
- // We need to know the exact address of the GOT entry so we extract the
475
- // value from both the AUIPC and L[D|W]. We cannot rely on the symbol in the
476
- // relocation for this since it simply refers to the object that is stored
477
- // in the GOT entry, not to the entry itself.
478
- return extractUImmRISCV (Contents & 0xffffffff ) +
479
- extractIImmRISCV (Contents >> 32 );
474
+ // We need to know the exact address of the GOT entry so we extract the
475
+ // value from both the AUIPC and L[D|W]. We cannot rely on the symbol in the
476
+ // relocation for this since it simply refers to the object that is stored
477
+ // in the GOT entry, not to the entry itself.
478
+ return extractUImmRISCV (Contents & 0xffffffff ) + extractIImmRISCV (Contents >> 32 );
480
479
case ELF::R_RISCV_PCREL_HI20:
481
480
case ELF::R_RISCV_HI20:
482
481
return extractUImmRISCV (Contents);
@@ -687,7 +686,7 @@ static bool isPCRelativeRISCV(uint32_t Type) {
687
686
case ELF::R_RISCV_32_PCREL:
688
687
case ELF::R_RISCV_TLS_GOT_HI20:
689
688
case ELF::R_RISCV_TLS_GD_HI20:
690
- return true ;
689
+ return true ;
691
690
}
692
691
}
693
692
0 commit comments