1 ; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mxgot %s -o - | elf-dump --dump-section-data | FileCheck %s 2 3 @.str = private unnamed_addr constant [16 x i8] c"ext_1=%d, i=%d\0A\00", align 1 4 @ext_1 = external global i32 5 6 define void @fill() nounwind { 7 entry: 8 9 ; Check that the appropriate relocations were created. 10 ; For the xgot case we want to see R_MIPS_[GOT|CALL]_[HI|LO]16. 11 12 ; R_MIPS_HI16 13 ; CHECK: ('r_type', 0x05) 14 15 ; R_MIPS_LO16 16 ; CHECK: ('r_type', 0x06) 17 18 ; R_MIPS_GOT_HI16 19 ; CHECK: ('r_type', 0x16) 20 21 ; R_MIPS_GOT_LO16 22 ; CHECK: ('r_type', 0x17) 23 24 ; R_MIPS_GOT 25 ; CHECK: ('r_type', 0x09) 26 27 ; R_MIPS_LO16 28 ; CHECK: ('r_type', 0x06) 29 30 ; R_MIPS_CALL_HI16 31 ; CHECK: ('r_type', 0x1e) 32 33 ; R_MIPS_CALL_LO16 34 ; CHECK: ('r_type', 0x1f) 35 36 %0 = load i32* @ext_1, align 4 37 %call = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([16 x i8]* @.str, i32 0, i32 0), i32 %0) nounwind 38 ret void 39 } 40 41 declare i32 @printf(i8* nocapture, ...) nounwind 42 43