brintos

brintos / llvm-project-archived public Read only

0
0
Text · 856 B · 38e1251 Raw
29 lines · plain
1; REQUIRES: x862; RUN: llvm-mc %p/Inputs/shared.s -o %t1.o -filetype=obj -triple=x86_64-unknown-linux3; RUN: ld.lld %t1.o -o %t1.so -shared4; RUN: llvm-as %s -o %t2.o5; RUN: ld.lld %t1.so %t2.o -o %t6; RUN: llvm-readobj --dyn-syms --dyn-relocations %t | FileCheck %s7 8target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"9target triple = "x86_64-unknown-linux-gnu"10 11@.str = private unnamed_addr constant [6 x i8] c"blah\0A\00", align 112 13define i32 @_start() {14  %str = call i32 (ptr, ...) @printf(ptr @.str)15  ret i32 016}17 18declare i32 @printf(ptr, ...)19 20; Check that puts symbol is present in the dynamic symbol table and21; there's a relocation for it.22; CHECK:      Dynamic Relocations {23; CHECK-NEXT:   R_X86_64_JUMP_SLOT puts 0x024; CHECK-NEXT: }25 26; CHECK: DynamicSymbols [27; CHECK: Symbol {28; CHECK:    Name: puts29