From: Jan Beulich <jbeulich@suse.com>
To: Binutils <binutils@sourceware.org>
Subject: [PATCH] gas: correct symbol name comparison in .startof./.sizeof. handling
Date: Mon, 13 Feb 2023 15:54:00 +0100 [thread overview]
Message-ID: <2096ddec-287a-de42-a2f6-58293af2fd48@suse.com> (raw)
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)
next reply other threads:[~2023-02-13 14:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-13 14:54 Jan Beulich [this message]
2023-02-14 8:33 ` Nick Clifton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2096ddec-287a-de42-a2f6-58293af2fd48@suse.com \
--to=jbeulich@suse.com \
--cc=binutils@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).