brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 9a33681 Raw
36 lines · plain
1// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -S --sr --symbols - | FileCheck %s2 3// When doing a rename, all the checks for where the relocation should go4// should be performed with the original symbol. Only if we decide to relocate5// with the symbol we should then use the renamed one.6 7// This is a regression test for a bug where we used bar5@@@zed when deciding8// if we should relocate with the symbol or with the section and we would then9// not produce a relocation with .text.10 11defined1:12defined3:13        .symver defined3, bar5@@@zed14        .long defined315 16        .global defined117 18// CHECK:        Section {19// CHECK:          Index:20// CHECK:          Name: .rela.text21// CHECK-NEXT:     Type: SHT_RELA (0x4)22// CHECK-NEXT:     Flags [23// CHECK-NEXT:       SHF_INFO_LINK24// CHECK-NEXT:     ]25// CHECK-NEXT:     Address: 0x026// CHECK-NEXT:     Offset:27// CHECK-NEXT:     Size: 2428// CHECK-NEXT:     Link:29// CHECK-NEXT:     Info:30// CHECK-NEXT:     AddressAlignment: 831// CHECK-NEXT:     EntrySize: 2432// CHECK-NEXT:     Relocations [33// CHECK-NEXT:       0x0 R_X86_64_32 .text 0x034// CHECK-NEXT:     ]35// CHECK-NEXT:   }36