109 lines · plain
1// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o %t2// RUN: llvm-readobj -S %t | FileCheck --check-prefix=SECTIONS %s3// RUN: llvm-readobj --symbols %t | FileCheck --check-prefix=SYMBOLS %s4 5// Test that we don't create a .symtab_shndx since we are one section short of6// SHN_LORESERVE (0xFF00).7 8// SECTIONS-NOT: Name: .symtab_shndx9 10// Check the last referenced section.11 12// SYMBOLS: Name: (0)13// SYMBOLS: Value: 0x014// SYMBOLS: Size: 015// SYMBOLS: Binding: Local (0x0)16// SYMBOLS: Type: Section (0x3)17// SYMBOLS: Other: 018// SYMBOLS: Section: zed (0xFEFF)19// SYMBOLS-NEXT: }20// SYMBOLS-NEXT:]21 22.macro gen_sections4 x23 .section a\x24 .section b\x25 .section c\x26 .section d\x27.endm28 29.macro gen_sections8 x30 gen_sections4 a\x31 gen_sections4 b\x32.endm33 34.macro gen_sections16 x35 gen_sections8 a\x36 gen_sections8 b\x37.endm38 39.macro gen_sections32 x40 gen_sections16 a\x41 gen_sections16 b\x42.endm43 44.macro gen_sections64 x45 gen_sections32 a\x46 gen_sections32 b\x47.endm48 49.macro gen_sections128 x50 gen_sections64 a\x51 gen_sections64 b\x52.endm53 54.macro gen_sections256 x55 gen_sections128 a\x56 gen_sections128 b\x57.endm58 59.macro gen_sections512 x60 gen_sections256 a\x61 gen_sections256 b\x62.endm63 64.macro gen_sections1024 x65 gen_sections512 a\x66 gen_sections512 b\x67.endm68 69.macro gen_sections2048 x70 gen_sections1024 a\x71 gen_sections1024 b\x72.endm73 74.macro gen_sections4096 x75 gen_sections2048 a\x76 gen_sections2048 b\x77.endm78 79.macro gen_sections8192 x80 gen_sections4096 a\x81 gen_sections4096 b\x82.endm83 84.macro gen_sections16384 x85 gen_sections8192 a\x86 gen_sections8192 b\x87.endm88 89.macro gen_sections32768 x90 gen_sections16384 a\x91 gen_sections16384 b\x92.endm93 94gen_sections32768 a95gen_sections16384 b96gen_sections8192 c97gen_sections4096 d98gen_sections2048 e99gen_sections1024 f100gen_sections512 g101gen_sections128 h102gen_sections64 i103gen_sections32 j104gen_sections16 k105gen_sections8 l106gen_sections4 m107 .section zed108.long zed109