This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Increment


Alan Modra wrote:
> On Fri, May 26, 2006 at 02:46:47PM -0700, Ian Lance Taylor wrote:
> > bfd_hash_lookup in bfd/hash.c has an incorrectly indented and
> > misplaced increment of table->count:
> 
> This seems to have fallen through the cracks.  Applying the obvious
> fix.
> 
> 	* hash.c (bfd_hash_lookup): Correct stray line.
> 
> Index: bfd/hash.c
> ===================================================================
> RCS file: /cvs/src/src/bfd/hash.c,v
> retrieving revision 1.22
> diff -u -p -r1.22 hash.c
> --- bfd/hash.c	3 May 2006 04:20:52 -0000	1.22
> +++ bfd/hash.c	6 Jun 2006 03:02:53 -0000
> @@ -455,7 +455,6 @@ bfd_hash_lookup (struct bfd_hash_table *
>    if (copy)
>      {
>        char *new;
> -  table->count ++;
>  
>        new = objalloc_alloc ((struct objalloc *) table->memory, len + 1);
>        if (!new)
> @@ -470,6 +469,7 @@ bfd_hash_lookup (struct bfd_hash_table *
>    hashp->hash = hash;
>    hashp->next = table->table[index];
>    table->table[index] = hashp;
> +  table->count++;
>  
>    if (table->count > table->size * 3 / 4)
>      {

This change broke two MIPS (mips-linux) ld testcases, I'm not sure if
this indicates breakage or invalid tests:

/home/ths/gcc/binutils-upstream/head-build/ld/../gas/as-new  -EB -32 -KPIC  -o tmpdir/dump0.o /home/ths/gcc/binutils-upstream/head/ld/testsuite/ld-mips-elf/multi-got-1-1.s
/home/ths/gcc/binutils-upstream/head-build/ld/../gas/as-new  -EB -32 -KPIC  -o tmpdir/dump1.o /home/ths/gcc/binutils-upstream/head/ld/testsuite/ld-mips-elf/multi-got-1-2.s
./ld-new  -L/home/ths/gcc/binutils-upstream/head/ld/testsuite/ld-mips-elf  -melf32btsmip -shared -o tmpdir/dump tmpdir/dump0.o tmpdir/dump1.o
/home/ths/gcc/binutils-upstream/head-build/ld/../binutils/readelf  -d -r tmpdir/dump > tmpdir/dump.out
regexp_diff match failure
regexp "^^[0-9a-f]+  [0-9a-f]+ R_MIPS_REL32      [0-9a-f]+   sym_2_3817$"
line   "000c447c  00200b03 R_MIPS_REL32      0009ffdc   sym_2_4428"
regexp_diff match failure
regexp "^^[0-9a-f]+  [0-9a-f]+ R_MIPS_REL32      [0-9a-f]+   sym_2_1864$"
line   "000c99ac  00200c03 R_MIPS_REL32      0009fa64   sym_2_4078"
regexp_diff match failure
regexp "^^[0-9a-f]+  [0-9a-f]+ R_MIPS_REL32      [0-9a-f]+   sym_2_771$"
line   "000c6380  00200d03 R_MIPS_REL32      0009c1b4   sym_2_450"
regexp_diff match failure
regexp "^^[0-9a-f]+  [0-9a-f]+ R_MIPS_REL32      [0-9a-f]+   sym_2_4264$"
line   "000ca434  00200e03 R_MIPS_REL32      0009c120   sym_2_413"
[snip many more lines]
regexp_diff match failure
regexp "^^[0-9a-f]+  [0-9a-f]+ R_MIPS_REL32      [0-9a-f]+   sym_2_2228$"
line   "000c8f48  00400903 R_MIPS_REL32      0009fdb4   sym_2_4290"
regexp_diff match failure
regexp "^^[0-9a-f]+  [0-9a-f]+ R_MIPS_REL32      [0-9a-f]+   sym_2_2140$"
line   "000cb328  00400a03 R_MIPS_REL32      0009f8a4   sym_2_3966"
FAIL: MIPS multi-got-1

[snip]
/home/ths/gcc/binutils-upstream/head-build/ld/../gas/as-new   -o tmpdir/tls-multi-got-1-1.o -EB -march=mips1 -32 -KPIC /home/ths/gcc/binutils-upstream/head/ld/testsuite/ld-mips-elf/tls-multi-got-1-1.s
/home/ths/gcc/binutils-upstream/head-build/ld/../gas/as-new   -o tmpdir/tls-multi-got-1-2.o -EB -march=mips1 -32 -KPIC /home/ths/gcc/binutils-upstream/head/ld/testsuite/ld-mips-elf/tls-multi-got-1-2.s
/home/ths/gcc/binutils-upstream/head-build/ld/ld-new  -o tmpdir/tlslib-multi.so -L/home/ths/gcc/binutils-upstream/head/ld/testsuite/ld-mips-elf -shared -melf32btsmip -T mips-lib.ld tmpdir/tls-multi-got-1-1.o tmpdir/tls-multi-got-1-2.o
/home/ths/gcc/binutils-upstream/head-build/ld/../binutils/readelf -d -r tmpdir/tlslib-multi.so > dump.out
regexp_diff match failure
regexp "^001495d8  00000c2f R_MIPS_TLS_TPREL3 00000004   tlsvar_ie$"
line   "001495d8  00000b2f R_MIPS_TLS_TPREL3 00000004   tlsvar_ie"
regexp_diff match failure
regexp "^0013f950  00000c2f R_MIPS_TLS_TPREL3 00000004   tlsvar_ie$"
line   "0013f950  00000b2f R_MIPS_TLS_TPREL3 00000004   tlsvar_ie"
regexp_diff match failure
regexp "^00135fcc  00000e03 R_MIPS_REL32      000e0a4c   sym_2_8355$"
line   "00143f7c  00000e03 R_MIPS_REL32      000d8048   sym_1_9526"
regexp_diff match failure
regexp "^001424ac  00000f03 R_MIPS_REL32      000d3594   sym_1_4745$"
line   "00143768  00000f03 R_MIPS_REL32      000d66a4   sym_1_7885"
extra regexps in /home/ths/gcc/binutils-upstream/head/ld/testsuite/ld-mips-elf/tls-multi-got-1.r starting with "^001369b0  004e2c03 R_MIPS_REL32      000da930   sym_2_2140$"
EOF from dump.out
FAIL: Shared library with multiple GOTs and TLS


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]