This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Regression with strn-stuff
- 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 21:07:57 +0200
- Subject: Re: Regression with strn-stuff
> Date: Sun, 17 Sep 2006 15:40:53 +0100
> From: Nick Clifton <nickc@redhat.com>
> > Running /h/hp/binutils/cvs_latest/src/ld/testsuite/ld-elf/elf.exp ...
> > FAIL: ld-elf/stab
>
> Yes I noticed this failure turning up recently with a number of ports,
> but when I checked I found that it was not connected to the CONST_STRNEQ
> patch but to something else.
Uh hmm, did you actually "find that it was not connected" (by
e.g. reverting the patch and re-test) or did you perhaps just do
what I did; stare at the patch but did not find the bug? ;-}
I'd guess the latter, because of the following I just spotted.
Though I did not revert, build and test, I looked a few more
times, because it *had* to be connected to those changes. It's
not that I distrust you personally (hey, *everybody* lies to me 8-)
but as I said there were no other changes in the cvs update
output in my build log.
Index: elf.c
===================================================================
RCS file: /cvs/src/src/bfd/elf.c,v
retrieving revision 1.353
retrieving revision 1.354
diff -u -p -r1.353 -r1.354
--- elf.c 14 Sep 2006 12:11:33 -0000 1.353
+++ elf.c 16 Sep 2006 18:12:13 -0000 1.354
static const struct bfd_elf_special_section special_sections_s[] =
{
- { ".shstrtab", 9, 0, SHT_STRTAB, 0 },
- { ".strtab", 7, 0, SHT_STRTAB, 0 },
- { ".symtab", 7, 0, SHT_SYMTAB, 0 },
- { ".stabstr", 5, 3, SHT_STRTAB, 0 },
- { NULL, 0, 0, 0, 0 }
+ { STRING_COMMA_LEN (".shstrtab"), 0, SHT_STRTAB, 0 },
+ { STRING_COMMA_LEN (".strtab"), 0, SHT_STRTAB, 0 },
+ { STRING_COMMA_LEN (".symtab"), 0, SHT_SYMTAB, 0 },
+ { STRING_COMMA_LEN (".stabstr"), 3, SHT_STRTAB, 0 },
+ { NULL, 0, 0, 0, 0 }
};
I committed the following as obvious (when you consider the new
comment and the usage of the table) after build+test for cris-elf.
bfd:
* elf.c (special_sections_s): Revert last STRING_COMMA_LEN change
for .stabstr entry, explain why.
Index: elf.c
===================================================================
RCS file: /cvs/src/src/bfd/elf.c,v
retrieving revision 1.354
diff -u -p -r1.354 elf.c
--- elf.c 16 Sep 2006 18:12:13 -0000 1.354
+++ elf.c 17 Sep 2006 18:50:00 -0000
@@ -2374,7 +2374,9 @@ static const struct bfd_elf_special_sect
{ STRING_COMMA_LEN (".shstrtab"), 0, SHT_STRTAB, 0 },
{ STRING_COMMA_LEN (".strtab"), 0, SHT_STRTAB, 0 },
{ STRING_COMMA_LEN (".symtab"), 0, SHT_SYMTAB, 0 },
- { STRING_COMMA_LEN (".stabstr"), 3, SHT_STRTAB, 0 },
+ /* See struct bfd_elf_special_section declaration for the semantics of
+ this special case where .prefix_length != strlen (.prefix). */
+ { ".stabstr", 5, 3, SHT_STRTAB, 0 },
{ NULL, 0, 0, 0, 0 }
};
brgds, H-P