aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2024-08-28 04:30:08 -0700
committerH.J. Lu <hjl.tools@gmail.com>2024-08-28 05:01:34 -0700
commit903ae636569889dbfab81356f81831041bc03a8f (patch)
tree6ad1627e79c37fcf515d259ccb152b42a330bb30 /gas
parent2e3759c2609c25c4ee59726e3c97e0f2a7c40311 (diff)
downloadgdb-903ae636569889dbfab81356f81831041bc03a8f.zip
gdb-903ae636569889dbfab81356f81831041bc03a8f.tar.gz
gdb-903ae636569889dbfab81356f81831041bc03a8f.tar.bz2
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>
Diffstat (limited to 'gas')
-rw-r--r--gas/config/tc-i386.c4
-rw-r--r--gas/testsuite/gas/i386/inval-tls.l2
-rw-r--r--gas/testsuite/gas/i386/x86-64-inval-tls.l4
3 files changed, 5 insertions, 5 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 25cfe0b..ca87afd 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 5e4b82c..98f7a29 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 f31082c..da8ac19 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'