Files
TheRock/compiler/amd-llvm/lld/test/ELF/eh-frame-negative-pcrel-sdata4.s
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

84 lines
2.2 KiB
ArmAsm

# REQUIRES: x86
# Test handling of FDE pc negative relative addressing with DW_EH_PE_sdata4.
# This situation can arise when .eh_frame is placed after .text.
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
# RUN: echo "SECTIONS { .text : { *(.text) } .eh_frame : { *(.eh_frame) } }" > %t.script
# RUN: ld.lld --eh-frame-hdr --script %t.script --section-start .text=0x1000 %t.o -o %t
# RUN: llvm-readobj -S --section-data %t | FileCheck %s
# CHECK: Section {
# CHECK: Index:
# CHECK: Name: .eh_frame
# CHECK-NEXT: Type: SHT_PROGBITS
# CHECK-NEXT: Flags [
# CHECK-NEXT: SHF_ALLOC
# CHECK-NEXT: ]
# CHECK-NEXT: Address: 0x1001
# CHECK-NEXT: Offset: 0x1001
# CHECK-NEXT: Size:
# CHECK-NEXT: Link:
# CHECK-NEXT: Info:
# CHECK-NEXT: AddressAlignment:
# CHECK-NEXT: EntrySize:
# CHECK-NEXT: SectionData (
# CHECK-NEXT: 0000: 10000000 00000000 017A5200 01010101
# CHECK-NEXT: 0010: 1B000000 0C000000 18000000 E3FFFFFF
# CHECK-NEXT: 0020: 00000000 00000000
# CHECK: Section {
# CHECK: Index:
# CHECK: Name: .eh_frame_hdr
# CHECK-NEXT: Type: SHT_PROGBITS
# CHECK-NEXT: Flags [
# CHECK-NEXT: SHF_ALLOC
# CHECK-NEXT: ]
# CHECK-NEXT: Address: 0x102C
# CHECK-NEXT: Offset: 0x102C
# CHECK-NEXT: Size: 20
# CHECK-NEXT: Link: 0
# CHECK-NEXT: Info: 0
# CHECK-NEXT: AddressAlignment: 4
# CHECK-NEXT: EntrySize: 0
# CHECK-NEXT: SectionData (
# CHECK-NEXT: 0000: 011B033B D1FFFFFF 01000000 D4FFFFFF
# CHECK-NEXT: 0010: E9FFFFFF
# Header (always 4 bytes): 011B033B
# D1FFFFFF = .eh_frame(0x1001) - .eh_frame_hdr(0x102C) - 4
# 01000000 = 1 = the number of FDE pointers in the table.
# D4FFFFFF = _start(0x1000) - .eh_frame_hdr(0x102C)
# E9FFFFFF = FDE(.eh_frame(0x1001) + 0x18) - .eh_frame_hdr(0x102C)
.text
.global _start
_start:
nop
.section .eh_frame,"a",@unwind
.long 16 # Size
.long 0x00 # ID
.byte 0x01 # Version.
.byte 0x7A # Augmentation string: "zR"
.byte 0x52
.byte 0x00
.byte 0x01
.byte 0x01 # LEB128
.byte 0x01 # LEB128
.byte 0x01 # LEB128
.byte 0x1B # DW_EH_PE_pcrel | DW_EH_PE_sdata4
.byte 0x00
.byte 0x00
.byte 0x00
.long 12 # Size
.long 24 # ID
fde:
.long _start - fde
.long 0