Skip to content

[ms] [llvm-ml] Support for NEAR in EXTERN directives #132069

Open
@MisterDA

Description

@MisterDA
$ cat > test.asm <<EOF
      EXTERN  my_symbol_near:NEAR
      EXTERN  my_symbol_far:FAR
      
      .CODE
      call my_symbol_near
      END
EOF
$ build/bin/llvm-ml64 -c -Fo test.obj test.asm
test.asm:1:32: error: unrecognized type in directive 'extern'
        EXTERN  my_symbol_near:NEAR
                              ^
test.asm:2:31: error: unrecognized type in directive 'extern'
        EXTERN  my_symbol_far:FAR
                             ^

EXTERN is defined as:

extern name:type {,name:type...}

The type for symbols is documented by Microsoft to be ABS or PROC, but I've found other documents noting:

Type may be any of near, far, proc, byte, word, dword, qword, tbyte, abs (absolute, which is a constant), or some other user defined type.

I'm interested in support for near.
Cf #131707 cc @ericastor

Metadata

Metadata

Assignees

No one assigned

    Labels

    llvm-toolsAll llvm tools that do not have corresponding tag

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions