1 ; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mxgot %s -o - | elf-dump --dump-section-data | FileCheck %s
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
6 define void @fill() nounwind {
9 ; Check that the appropriate relocations were created.
10 ; For the xgot case we want to see R_MIPS_[GOT|CALL]_[HI|LO]16.
13 ; CHECK: ('r_type', 0x05)
16 ; CHECK: ('r_type', 0x06)
19 ; CHECK: ('r_type', 0x16)
22 ; CHECK: ('r_type', 0x17)
25 ; CHECK: ('r_type', 0x09)
28 ; CHECK: ('r_type', 0x06)
31 ; CHECK: ('r_type', 0x1e)
34 ; CHECK: ('r_type', 0x1f)
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
41 declare i32 @printf(i8* nocapture, ...) nounwind