27 lines · plain
1# REQUIRES: x862 3# If there are two relocations such that the first one requires4# dynamic COPY relocation, the second one requires GOT entry5# creation, linker should create both - dynamic relocation6# and GOT entry.7 8# RUN: llvm-mc -filetype=obj -triple=i386-pc-linux \9# RUN: %S/Inputs/copy-in-shared.s -o %t.so.o10# RUN: llvm-mc -filetype=obj -triple=i386-pc-linux %s -o %t.o11# RUN: ld.lld %t.so.o -shared -o %t.so12# RUN: ld.lld --hash-style=sysv %t.o %t.so -o %t.exe13# RUN: llvm-readobj -r %t.exe | FileCheck %s14 15# CHECK: Relocations [16# CHECK-NEXT: Section (4) .rel.dyn {17# CHECK-NEXT: 0x{{[0-9A-F]+}} R_386_GLOB_DAT foo18# CHECK-NEXT: 0x{{[0-9A-F]+}} R_386_COPY foo19# CHECK-NEXT: }20# CHECK-NEXT: ]21 22 .text23 .global _start24_start:25 movl $foo, (%esp) # R_386_32 - requires R_386_COPY relocation26 movl foo@GOT, %eax # R_386_GOT32 - requires GOT entry27