1# RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s -o %t.obj 2# RUN: llvm-readobj --symbols -r %t.obj | FileCheck %s 3 4# Previously .secrel32 and .secidx relocations against undefined symbols 5# resulted in an error. That was a mistake. The linker is fully capable of 6# resolving these relocations against symbols in other object files. Such 7# relocations can be found in the MSVCRT debug info describing linker-provided 8# symbols like __safe_se_handler_table and __guard_fids_table. 9 10.data 11foo: 12 .secrel32 bar 13 .secidx baz 14 15 16# CHECK: Relocations [ 17# CHECK: Section (2) .data { 18# CHECK: 0x0 IMAGE_REL_I386_SECREL bar 19# CHECK: 0x4 IMAGE_REL_I386_SECTION baz 20# CHECK: } 21# CHECK: ] 22 23# CHECK: Symbol { 24# CHECK: Name: bar 25# CHECK-NEXT: Value: 0 26# CHECK-NEXT: Section: IMAGE_SYM_UNDEFINED (0) 27# CHECK: Symbol { 28# CHECK: Name: baz 29# CHECK-NEXT: Value: 0 30# CHECK-NEXT: Section: IMAGE_SYM_UNDEFINED (0) 31