[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gas/27074] New: Warning option for "bare" symbol names in .intel_sy
From: |
josh at joshtriplett dot org |
Subject: |
[Bug gas/27074] New: Warning option for "bare" symbol names in .intel_syntax noprefix mode |
Date: |
Tue, 15 Dec 2020 19:08:24 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=27074
Bug ID: 27074
Summary: Warning option for "bare" symbol names in
.intel_syntax noprefix mode
Product: binutils
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gas
Assignee: unassigned at sourceware dot org
Reporter: josh at joshtriplett dot org
Target Milestone: ---
In .intel_syntax noprefix mode, the assembler accepts code like this:
mov rax, some_symbol
The assembler treats the bare "some_symbol" as equivalent to "[some_symbol]".
I've seen many people misunderstand this, and think that it's equivalent to
"offset some_symbol" instead. This leads to confusion, and challenging
debugging adventures.
The warning would suggest either using
mov rax, [some_symbol]
to refer to the memory pointed to by the symbol, or
mov rax, offset some_symbol
to refer to the address of the symbol.
This warning would be useful in standalone assembly files, and in GCC inline
assembly; for the latter I'd want to be able to plumb it through to a GCC
warning option.
--
You are receiving this mail because:
You are on the CC list for the bug.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug gas/27074] New: Warning option for "bare" symbol names in .intel_syntax noprefix mode,
josh at joshtriplett dot org <=