public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
* [binutils-gdb/binutils-2_40-branch] gas: correct symbol name comparison in .startof./.sizeof. handling
@ 2023-02-14  7:38 Jan Beulich
  0 siblings, 0 replies; only message in thread
From: Jan Beulich @ 2023-02-14  7:38 UTC (permalink / raw)
  To: bfd-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b2bc62b7b4e7638c3a249d2d2728ceb4d5f2b22c

commit b2bc62b7b4e7638c3a249d2d2728ceb4d5f2b22c
Author: Jan Beulich <jbeulich@suse.com>
Date:   Tue Feb 14 08:35:02 2023 +0100

    gas: correct symbol name comparison in .startof./.sizeof. handling
    
    In 162c6aef1f3a ("gas: fold symbol table entries generated for
    .startof.() / .sizeof.()") I screwed up quite badly, inverting the case
    sensitive and case insensitive comparison functions.

Diff:
---
 gas/expr.c                      | 4 ++--
 gas/testsuite/gas/elf/startof.d | 2 ++
 gas/testsuite/gas/elf/startof.s | 3 +++
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/gas/expr.c b/gas/expr.c
index 28ec58c421b..ec51bda1aa9 100644
--- a/gas/expr.c
+++ b/gas/expr.c
@@ -149,8 +149,8 @@ symbol_lookup_or_make (const char *name, bool start)
 
     name = S_GET_NAME (symbolP);
     if ((symbols_case_sensitive
-	 ? strcasecmp (buf, name)
-	 : strcmp (buf, name)) == 0)
+	 ? strcmp (buf, name)
+	 : strcasecmp (buf, name)) == 0)
       {
 	free (buf);
 	return symbolP;
diff --git a/gas/testsuite/gas/elf/startof.d b/gas/testsuite/gas/elf/startof.d
index 9cffa93e22b..d943bb87887 100644
--- a/gas/testsuite/gas/elf/startof.d
+++ b/gas/testsuite/gas/elf/startof.d
@@ -7,4 +7,6 @@ Symbol table .*
 #...
      [1-8]: 0+ .* UND \.startof\.\.text
      [2-9]: 0+ .* UND \.sizeof\.\.text
+ +[1-9][0-9]*: 0+ .* UND \.startof\.\.Text
+ +[1-9][0-9]*: 0+ .* UND \.sizeof\.\.TEXT
 #pass
diff --git a/gas/testsuite/gas/elf/startof.s b/gas/testsuite/gas/elf/startof.s
index a90e1160dd8..342011e0177 100644
--- a/gas/testsuite/gas/elf/startof.s
+++ b/gas/testsuite/gas/elf/startof.s
@@ -4,3 +4,6 @@
 	.dc.a	0
 	.dc.a	.sizeof.(.text)
 	.dc.a	.startof.(.text)
+	.dc.a	0
+	.dc.a	.startof.(.Text)
+	.dc.a	.sizeof.(.TEXT)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-02-14  7:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-14  7:38 [binutils-gdb/binutils-2_40-branch] gas: correct symbol name comparison in .startof./.sizeof. handling Jan Beulich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).