43 lines · plain
1# REQUIRES: mips2# Check the order of dynamic symbols for the MIPS target.3 4# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o %t-be.o5# RUN: ld.lld -shared %t-be.o -o %t-be.so6# RUN: llvm-readobj --symbols --dyn-syms %t-be.so | FileCheck %s7 8# RUN: llvm-mc -filetype=obj -triple=mipsel-unknown-linux %s -o %t-el.o9# RUN: ld.lld -shared %t-el.o -o %t-el.so10# RUN: llvm-readobj --symbols --dyn-syms %t-el.so | FileCheck %s11 12 .data13 .globl v1,v2,v314v1:15 .space 416v2:17 .space 418v3:19 .space 420 21 .text22 .globl __start23__start:24 lui $2, %got(v3) # v3 will precede v1 in the GOT25 lui $2, %got(v1)26 27# Since all these symbols have global binding,28# the Symbols section contains them in the original order.29# CHECK: Symbols [30# CHECK: Name: v131# CHECK: Name: v232# CHECK: Name: v333# CHECK: ]34 35# The symbols in the DynamicSymbols section are sorted in compliance with36# the MIPS rules. v2 comes first as it is not in the GOT.37# v1 and v3 are sorted according to their order in the GOT.38# CHECK: DynamicSymbols [39# CHECK: Name: v240# CHECK: Name: v341# CHECK: Name: v142# CHECK: ]43