]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gas: correct symbol name comparison in .startof./.sizeof. handling
authorJan Beulich <jbeulich@suse.com>
Tue, 14 Feb 2023 07:35:02 +0000 (08:35 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 14 Feb 2023 07:35:02 +0000 (08:35 +0100)
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.

gas/expr.c
gas/testsuite/gas/elf/startof.d
gas/testsuite/gas/elf/startof.s

index 78900b50e46fb5c40770a9880b714396194e7fd7..ae24c281ba62f04f09d6b61b2abedd29f577d9e4 100644 (file)
@@ -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;
index 9cffa93e22bdb2c44210d5600e48498f04e6e957..d943bb878875befaf7e35ca7434a1beadb050412 100644 (file)
@@ -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
index a90e1160dd8e0fd0b11cda96f113eafda992fb32..342011e0177587f892f08fed42a517510077e040 100644 (file)
@@ -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)