## Test that llvm-readobj/llvm-readelf shows proper relocation type ## names and values for loongarch64 target. # RUN: yaml2obj %s -o %t-loongarch64.o # RUN: llvm-readobj -r --expand-relocs %t-loongarch64.o | FileCheck %s # CHECK: Type: R_LARCH_NONE (0) # CHECK: Type: R_LARCH_32 (1) # CHECK: Type: R_LARCH_64 (2) # CHECK: Type: R_LARCH_RELATIVE (3) # CHECK: Type: R_LARCH_COPY (4) # CHECK: Type: R_LARCH_JUMP_SLOT (5) # CHECK: Type: R_LARCH_TLS_DTPMOD32 (6) # CHECK: Type: R_LARCH_TLS_DTPMOD64 (7) # CHECK: Type: R_LARCH_TLS_DTPREL32 (8) # CHECK: Type: R_LARCH_TLS_DTPREL64 (9) # CHECK: Type: R_LARCH_TLS_TPREL32 (10) # CHECK: Type: R_LARCH_TLS_TPREL64 (11) # CHECK: Type: R_LARCH_IRELATIVE (12) # CHECK: Type: R_LARCH_MARK_LA (20) # CHECK: Type: R_LARCH_MARK_PCREL (21) # CHECK: Type: R_LARCH_SOP_PUSH_PCREL (22) # CHECK: Type: R_LARCH_SOP_PUSH_ABSOLUTE (23) # CHECK: Type: R_LARCH_SOP_PUSH_DUP (24) # CHECK: Type: R_LARCH_SOP_PUSH_GPREL (25) # CHECK: Type: R_LARCH_SOP_PUSH_TLS_TPREL (26) # CHECK: Type: R_LARCH_SOP_PUSH_TLS_GOT (27) # CHECK: Type: R_LARCH_SOP_PUSH_TLS_GD (28) # CHECK: Type: R_LARCH_SOP_PUSH_PLT_PCREL (29) # CHECK: Type: R_LARCH_SOP_ASSERT (30) # CHECK: Type: R_LARCH_SOP_NOT (31) # CHECK: Type: R_LARCH_SOP_SUB (32) # CHECK: Type: R_LARCH_SOP_SL (33) # CHECK: Type: R_LARCH_SOP_SR (34) # CHECK: Type: R_LARCH_SOP_ADD (35) # CHECK: Type: R_LARCH_SOP_AND (36) # CHECK: Type: R_LARCH_SOP_IF_ELSE (37) # CHECK: Type: R_LARCH_SOP_POP_32_S_10_5 (38) # CHECK: Type: R_LARCH_SOP_POP_32_U_10_12 (39) # CHECK: Type: R_LARCH_SOP_POP_32_S_10_12 (40) # CHECK: Type: R_LARCH_SOP_POP_32_S_10_16 (41) # CHECK: Type: R_LARCH_SOP_POP_32_S_10_16_S2 (42) # CHECK: Type: R_LARCH_SOP_POP_32_S_5_20 (43) # CHECK: Type: R_LARCH_SOP_POP_32_S_0_5_10_16_S2 (44) # CHECK: Type: R_LARCH_SOP_POP_32_S_0_10_10_16_S2 (45) # CHECK: Type: R_LARCH_SOP_POP_32_U (46) # CHECK: Type: R_LARCH_ADD8 (47) # CHECK: Type: R_LARCH_ADD16 (48) # CHECK: Type: R_LARCH_ADD24 (49) # CHECK: Type: R_LARCH_ADD32 (50) # CHECK: Type: R_LARCH_ADD64 (51) # CHECK: Type: R_LARCH_SUB8 (52) # CHECK: Type: R_LARCH_SUB16 (53) # CHECK: Type: R_LARCH_SUB24 (54) # CHECK: Type: R_LARCH_SUB32 (55) # CHECK: Type: R_LARCH_SUB64 (56) # CHECK: Type: R_LARCH_GNU_VTINHERIT (57) # CHECK: Type: R_LARCH_GNU_VTENTRY (58) --- !ELF FileHeader: Class: ELFCLASS64 Data: ELFDATA2LSB Type: ET_REL Machine: EM_LOONGARCH Sections: - Name: .rela.text Type: SHT_RELA Relocations: - Type: R_LARCH_NONE - Type: R_LARCH_32 - Type: R_LARCH_64 - Type: R_LARCH_RELATIVE - Type: R_LARCH_COPY - Type: R_LARCH_JUMP_SLOT - Type: R_LARCH_TLS_DTPMOD32 - Type: R_LARCH_TLS_DTPMOD64 - Type: R_LARCH_TLS_DTPREL32 - Type: R_LARCH_TLS_DTPREL64 - Type: R_LARCH_TLS_TPREL32 - Type: R_LARCH_TLS_TPREL64 - Type: R_LARCH_IRELATIVE - Type: R_LARCH_MARK_LA - Type: R_LARCH_MARK_PCREL - Type: R_LARCH_SOP_PUSH_PCREL - Type: R_LARCH_SOP_PUSH_ABSOLUTE - Type: R_LARCH_SOP_PUSH_DUP - Type: R_LARCH_SOP_PUSH_GPREL - Type: R_LARCH_SOP_PUSH_TLS_TPREL - Type: R_LARCH_SOP_PUSH_TLS_GOT - Type: R_LARCH_SOP_PUSH_TLS_GD - Type: R_LARCH_SOP_PUSH_PLT_PCREL - Type: R_LARCH_SOP_ASSERT - Type: R_LARCH_SOP_NOT - Type: R_LARCH_SOP_SUB - Type: R_LARCH_SOP_SL - Type: R_LARCH_SOP_SR - Type: R_LARCH_SOP_ADD - Type: R_LARCH_SOP_AND - Type: R_LARCH_SOP_IF_ELSE - Type: R_LARCH_SOP_POP_32_S_10_5 - Type: R_LARCH_SOP_POP_32_U_10_12 - Type: R_LARCH_SOP_POP_32_S_10_12 - Type: R_LARCH_SOP_POP_32_S_10_16 - Type: R_LARCH_SOP_POP_32_S_10_16_S2 - Type: R_LARCH_SOP_POP_32_S_5_20 - Type: R_LARCH_SOP_POP_32_S_0_5_10_16_S2 - Type: R_LARCH_SOP_POP_32_S_0_10_10_16_S2 - Type: R_LARCH_SOP_POP_32_U - Type: R_LARCH_ADD8 - Type: R_LARCH_ADD16 - Type: R_LARCH_ADD24 - Type: R_LARCH_ADD32 - Type: R_LARCH_ADD64 - Type: R_LARCH_SUB8 - Type: R_LARCH_SUB16 - Type: R_LARCH_SUB24 - Type: R_LARCH_SUB32 - Type: R_LARCH_SUB64 - Type: R_LARCH_GNU_VTINHERIT - Type: R_LARCH_GNU_VTENTRY