brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.3 KiB · 13a1b38 Raw
79 lines · yaml
1# RUN: yaml2obj %s -o %t.o2# RUN: wasm-ld --shared-memory -o %t.wasm %t.o3 4# Verify compatability with older object files that didn't mark individual5# symbols as TLS.   In this case the symbol `bar` is being used in a TLS-only6# relocation (R_WASM_MEMORY_ADDR_TLS_SLEB) but is not itself marked as TLS.7# However, because it is defined in a section (`.mydata`) that *is* marked as8# TLS we implicitly mark bar as TLS.9#10# We had a regression where llvm-13-generated object files were being rejected11# with: "R_WASM_MEMORY_ADDR_TLS_SLEB cannot be used against non-TLS symbol"12# This test verifies that this error is not triggered.13 14--- !WASM15FileHeader:16  Version:         0x117Sections:18  - Type:            TYPE19    Signatures:20      - Index:           021        ParamTypes:      []22        ReturnTypes:     []23  - Type:            IMPORT24    Imports:25      - Module:          env26        Field:           __linear_memory27        Kind:            MEMORY28        Memory:29          Minimum:         0x130  - Type:            FUNCTION31    FunctionTypes:   [ 0 ]32  - Type:            DATACOUNT33    Count:           134  - Type:            CODE35    Relocations:36      - Type:            R_WASM_MEMORY_ADDR_TLS_SLEB37        Index:           138        Offset:          0x439    Functions:40      - Index:           041        Locals:          []42        Body:            4180808080001A0B43  - Type:            DATA44    Segments:45      - SectionOffset:   646        InitFlags:       047        Offset:48          Opcode:          I32_CONST49          Value:           050        Content:         '00000000'51  - Type:            CUSTOM52    Name:            linking53    Version:         254    SymbolTable:55      - Index:           056        Kind:            FUNCTION57        Name:            _start58        Flags:           [  ]59        Function:        060      - Index:           161        Kind:            DATA62        Name:            bar63        Flags:           [  ]64        Segment:         065        Size:            466    SegmentInfo:67      - Index:           068        Name:            .mydata69        Alignment:       070        Flags:           [ TLS ]71  - Type:            CUSTOM72    Name:            target_features73    Features:74      - Prefix:        USED75        Name:          "atomics"76      - Prefix:        USED77        Name:          "bulk-memory"78...79