36 lines · plain
1# REQUIRES: x862# RUN: rm -rf %t && split-file %s %t3# RUN: llvm-mc -filetype=obj -triple=i386 %t/a.s -o %t/a.o4# RUN: llvm-mc -filetype=obj -triple=i386 %t/crti.s -o %t/crti.o5# RUN: llvm-mc -filetype=obj -triple=i386 %t/elf-init.s -o %t/elf-init.o6 7## crti.o in i386 glibc<2.32 has .gnu.linkonce.t.__x86.get_pc_thunk.bx that is8## not fully supported. Test that we don't report9## "relocation refers to a symbol in a discarded section: __x86.get_pc_thunk.bx".10# RUN: ld.lld %t/a.o %t/crti.o %t/elf-init.o -o /dev/null11# RUN: ld.lld -shared %t/a.o %t/crti.o %t/elf-init.o -o /dev/null12 13#--- a.s14.globl _start15_start:16 17#--- crti.s18.section .gnu.linkonce.t.__x86.get_pc_thunk.bx,"ax"19.globl __x86.get_pc_thunk.bx20.hidden __x86.get_pc_thunk.bx21__x86.get_pc_thunk.bx:22 movl (%esp),%ebx23 ret24 25#--- elf-init.s26.globl __libc_csu_init27__libc_csu_init:28 call __x86.get_pc_thunk.bx29 30.section .text.__x86.get_pc_thunk.bx,"axG",@progbits,__x86.get_pc_thunk.bx,comdat31.globl __x86.get_pc_thunk.bx32.hidden __x86.get_pc_thunk.bx33__x86.get_pc_thunk.bx:34 movl (%esp),%ebx35 ret36