[binutils-gdb] x86: Report invalid TLS operator
H.J. Lu
hjl@sourceware.org
Wed Aug 28 12:01:44 GMT 2024
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=903ae636569889dbfab81356f81831041bc03a8f
commit 903ae636569889dbfab81356f81831041bc03a8f
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Aug 28 04:30:08 2024 -0700
x86: Report invalid TLS operator
Report invalid TLS operator, instead of relocation.
PR gas/28595
* config/tc-i386.c (gotrel): Replace int with unsigned int.
(i386_assemble): Report invalid TLS operator.
* testsuite/gas/i386/inval-tls.l: updated.
* testsuite/gas/i386/x86-64-inval-tls.l: Likewise.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Diff:
---
gas/config/tc-i386.c | 4 ++--
gas/testsuite/gas/i386/inval-tls.l | 2 +-
gas/testsuite/gas/i386/x86-64-inval-tls.l | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 25cfe0bdb8d..ca87afd10a1 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -1297,7 +1297,7 @@ static htab_t reg_hash;
static const struct
{
const char *str;
- int len;
+ unsigned int len;
const enum bfd_reloc_code_real rel[2];
const i386_operand_type types64;
bool need_GOT_symbol;
@@ -6678,7 +6678,7 @@ i386_assemble (char *line)
{
if (gotrel[k].rel[object_64bit] == i.reloc[j])
{
- as_bad (_("%s relocation cannot be used with `%s'"),
+ as_bad (_("@%s operator cannot be used with `%s'"),
gotrel[k].str, insn_name (&i.tm));
return;
}
diff --git a/gas/testsuite/gas/i386/inval-tls.l b/gas/testsuite/gas/i386/inval-tls.l
index 5e4b82c2119..98f7a29f1ab 100644
--- a/gas/testsuite/gas/i386/inval-tls.l
+++ b/gas/testsuite/gas/i386/inval-tls.l
@@ -1,2 +1,2 @@
.*: Assembler messages:
-.*:3: Error: GOTNTPOFF relocation cannot be used with `kmovd'
+.*:3: Error: @GOTNTPOFF operator cannot be used with `kmovd'
diff --git a/gas/testsuite/gas/i386/x86-64-inval-tls.l b/gas/testsuite/gas/i386/x86-64-inval-tls.l
index f31082cee73..da8ac19f869 100644
--- a/gas/testsuite/gas/i386/x86-64-inval-tls.l
+++ b/gas/testsuite/gas/i386/x86-64-inval-tls.l
@@ -1,3 +1,3 @@
.*: Assembler messages:
-.*:3: Error: GOTTPOFF relocation cannot be used with `kmovq'
-.*:4: Error: TLSLD relocation cannot be used with `kmovq'
+.*:3: Error: @GOTTPOFF operator cannot be used with `kmovq'
+.*:4: Error: @TLSLD operator cannot be used with `kmovq'
More information about the Binutils-cvs
mailing list