1# REQUIRES: x86 2# RUN: llvm-mc %s -o %t.o -filetype=obj -triple=x86_64-pc-linux 3# RUN: llvm-mc %p/Inputs/rodynamic.s -o %t.so.o -filetype=obj -triple=x86_64-pc-linux 4 5# RUN: ld.lld -shared %t.so.o -o %t.so 6# RUN: ld.lld %t.o %t.so -o %t.exe 7# RUN: llvm-readobj --dynamic-table %t.exe | FileCheck -check-prefix=DEFDEBUG %s 8# RUN: llvm-readobj --sections %t.exe | FileCheck -check-prefix=DEFSEC %s 9 10# RUN: ld.lld -shared -z rodynamic %t.so.o -o %t.so 11# RUN: ld.lld -z rodynamic %t.o %t.so -o %t.exe 12# RUN: llvm-readobj --dynamic-table %t.exe | FileCheck -check-prefix=RODEBUG %s 13# RUN: llvm-readobj --sections %t.exe | FileCheck -check-prefix=ROSEC %s 14 15.globl _start 16_start: 17 call foo 18 19# DEFDEBUG: DEBUG 20 21# DEFSEC: Section { 22# DEFSEC: Name: .dynamic 23# DEFSEC-NEXT: Type: SHT_DYNAMIC 24# DEFSEC-NEXT: Flags [ 25# DEFSEC-NEXT: SHF_ALLOC 26# DEFSEC-NEXT: SHF_WRITE 27# DEFSEC-NEXT: ] 28 29# RODEBUG-NOT: DEBUG 30 31# ROSEC: Section { 32# ROSEC: Name: .dynamic 33# ROSEC-NEXT: Type: SHT_DYNAMIC 34# ROSEC-NEXT: Flags [ 35# ROSEC-NEXT: SHF_ALLOC 36# ROSEC-NEXT: ] 37