public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] gas: correct symbol name comparison in .startof./.sizeof. handling
@ 2023-02-13 14:54 Jan Beulich
  2023-02-14  8:33 ` Nick Clifton
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2023-02-13 14:54 UTC (permalink / raw)
  To: Binutils

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.
---
While there were no reports of this breakage, I'm still inclined to also
put this on the 2.40 branch.

--- a/gas/expr.c
+++ b/gas/expr.c
@@ -149,8 +149,8 @@ symbol_lookup_or_make (const char *name,
 
     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;
--- 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
--- 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] 2+ messages in thread

* Re: [PATCH] gas: correct symbol name comparison in .startof./.sizeof. handling
  2023-02-13 14:54 [PATCH] gas: correct symbol name comparison in .startof./.sizeof. handling Jan Beulich
@ 2023-02-14  8:33 ` Nick Clifton
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2023-02-14  8:33 UTC (permalink / raw)
  To: Jan Beulich, Binutils

Hi Jan,

> While there were no reports of this breakage, I'm still inclined to also
> put this on the 2.40 branch.

Please do.

Cheers
   Nick


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-02-14  8:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-13 14:54 [PATCH] gas: correct symbol name comparison in .startof./.sizeof. handling Jan Beulich
2023-02-14  8:33 ` Nick Clifton

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).