brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · d8df91a Raw
51 lines · plain
1# REQUIRES: system-linux2 3# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s -o %t.o4# RUN: %clang %cflags -nostdlib %t.o -o %t.exe \5# RUN:   -Wl,--image-base=0xffffffff80000000,--no-dynamic-linker,--no-eh-frame-hdr,--no-pie6# RUN: llvm-bolt %t.exe --print-normalized -o %t.out 2>&1 | FileCheck %s7 8## Check that BOLT correctly parses the Linux kernel .pci_fixup section and9## verify that PCI fixup hook in the middle of a function is detected.10 11# CHECK:      BOLT-INFO: Linux kernel binary detected12# CHECK:      BOLT-WARNING: PCI fixup detected in the middle of function _start13# CHECK:      BOLT-INFO: parsed 2 PCI fixup entries14 15  .text16  .globl _start17  .type _start, %function18_start:19  nop20.L0:21  ret22  .size _start, .-_start23 24## PCI fixup table.25  .section .pci_fixup,"a",@progbits26 27  .short 0x8086     # vendor28  .short 0xbeef     # device29  .long 0xffffffff  # class30  .long 0x0         # class shift31  .long _start - .  # fixup32 33  .short 0x8086     # vendor34  .short 0xbad      # device35  .long 0xffffffff  # class36  .long 0x0         # class shift37  .long .L0 - .     # fixup38 39## Linux kernel version40  .rodata41  .align 1642  .globl linux_banner43  .type  linux_banner, @object44linux_banner:45  .string  "Linux version 6.6.61\n"46  .size  linux_banner, . - linux_banner47 48## Fake Linux Kernel sections.49  .section __ksymtab,"a",@progbits50  .section __ksymtab_gpl,"a",@progbits51