This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Regression with strn-stuff (was: Re: [PATCH] Make the compiler do the math 2.)
- From: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- To: nickc at redhat dot com
- Cc: binutils at sourceware dot org
- Date: Sun, 17 Sep 2006 05:38:58 +0200
- Subject: Regression with strn-stuff (was: Re: [PATCH] Make the compiler do the math 2.)
> Date: Sat, 16 Sep 2006 19:16:00 +0100
> From: Nick Clifton <nickc@redhat.com>
> I have tested as
> thoroughly as I can, and I think that there are no regressions although
> of course I will fix anything that does turn up.
These changes were logged together with this regression for
--target=cris-elf:
...
Running /h/hp/binutils/cvs_latest/src/ld/testsuite/ld-elf/elf.exp ...
FAIL: ld-elf/stab
...
I looked briefly but can't see the presumed typo. However, I
spotted a different one:
Index: cofflink.c
===================================================================
RCS file: /cvs/src/src/bfd/cofflink.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -p -r1.60 -r1.61
--- cofflink.c 5 Jul 2006 10:21:39 -0000 1.60
+++ cofflink.c 16 Sep 2006 18:12:13 -0000 1.61
...
@@ -583,7 +583,7 @@ coff_link_add_symbols (bfd *abfd,
asection *stab;
for (stab = abfd->sections; stab; stab = stab->next)
- if (strncmp (".stab", stab->name, 5) == 0
+ if (CONST_STRNEQ (".stab", stab->name)
&& (!stab->name[5]
|| (stab->name[5] == '.' && ISDIGIT (stab->name[6]))))
{
Gotta find a way to automatically check the const-stringness of
the second operand. Use __builtin_constant_p in a checking
macro enabled for gcc?
brgds, H-P