Issue 132069
Summary [ms] [llvm-ml] Support for `NEAR` in `EXTERN` directives
Labels new issue
Assignees
Reporter MisterDA
    ```console
$ cat > test.asm <<EOF
 EXTERN  my_symbol_near:NEAR
      EXTERN  my_symbol_far:FAR
EOF
$ build/bin/llvm-ml -m64 -c -F test.obj test.asm
test.asm:1:32: error: unrecognized type in directive 'extern'
        EXTRN  my_symbol_near: NEAR
                               ^
test.asm:2:31: error: unrecognized type in directive 'extern'
        EXTRN  my_symbol_far: FAR
 ^
```

[`EXTERN`](https://learn.microsoft.com/en-us/cpp/assembler/masm/extern-masm?view=msvc-170) is defined as:

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

The _type_ for symbols is documented by Microsoft to be [`ABS`](https://learn.microsoft.com/en-us/cpp/assembler/masm/operator-abs?view=msvc-170) or [`PROC`](https://learn.microsoft.com/en-us/cpp/assembler/masm/proc?view=msvc-170), 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 

_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to