[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc-bugs
Subject:    Repository bug : i586-pc-linux-gnu, gcc-2.95.2 (and potential fix?)
From:       Chris Rankin <rankinc () zip ! com ! au>
Date:       1999-10-30 15:57:34
[Download RAW message or body]

Hi,
I have been tripping over a bug in the g++ -frepo option for a while
now where the link continually fails with a stream of unresolved
symbols. Anyway, I decided to dive into the code and see if I could
fix it. What I have come up with is this diff against gcc/tlink.c

--- tlink.c.orig        Sun Oct 31 01:38:38 1999
+++ tlink.c     Sun Oct 31 01:39:31 1999
@@ -663,10 +663,7 @@
        }
 
       if (sym && sym->tweaked)
-       {
-         fclose (stream);
-         return 0;
-       }
+        continue;
       if (sym && !sym->tweaking)
        {
          if (tlink_verbose >= 2)

This SEEMS to do the trick in that my test-programs all now link and
run successfully. However, my most aggressive test now exhibits the
following odd behaviour:

With the -frepo option:
$ ls -als ex31
  29 -rwxr-xr-x    1 Chris    users       28208 Oct 31 01:47 ex31

Without the -frepo option:
$ ls -als ex31
  26 -rwxr-xr-x    1 Chris    users       25240 Oct 31 01:47 ex31

As you can see, the version built with the repository is actually
BIGGER! The symbol tables for these different object files are as
follows:

With -frepo:
00000e64 T _M_insert_aux__t6vector2Z1XZt9allocator1Z1XP1XRC1X
00001774 T _M_insert_aux__t6vector2ZP1XZt9allocator1ZP1XPP1XRCP1X
         U _S_oom_malloc__t23__malloc_alloc_template1i0Ui
         U _S_refill__t24__default_alloc_template2b1i0Ui
00000000 ? __EXCEPTION_TABLE__
00000000 ? __FRAME_BEGIN__
000011f8 T __adjust_heap__H3ZP1XZiZ1X_X01X11X11X21_v
000033f4 T __adjust_heap__H3ZPP1XZiZP1X_X01X11X11X21_v
00003698 T __adjust_heap__H4ZPP1XZiZP1XZ8XCompare_X01X11X11X21X31_v
00003ab0 T __adjust_heap__H4ZPP1XZiZP1XZt13binary_negate1Z8XCompare_X01X11X11X21X31_v
         U __cl__C8XComparePC1XT1
         U __cp_pop_exception
000032f0 T __final_insertion_sort__H1ZP1X_X01X01_v
00001d50 T __final_insertion_sort__H1ZPP1X_X01X01_v
000023cc T __final_insertion_sort__H2ZPP1XZ8XCompare_X01X01X11_v
00002da4 T __final_insertion_sort__H2ZPP1XZt13binary_negate1Z8XCompare_X01X01X11_v
00001670 T __insertion_sort__H1ZP1X_X01X01_v
00003568 T __insertion_sort__H1ZPP1X_X01X01_v
00003908 T __insertion_sort__H2ZPP1XZ8XCompare_X01X01X11_v
00002cb0 T __insertion_sort__H2ZPP1XZt13binary_negate1Z8XCompare_X01X01X11_v
000014fc T __introsort_loop__H3ZP1XZ1XZi_X01X01PX11X21_v
00001c60 T __introsort_loop__H3ZPP1XZP1XZi_X01X01PX11X21_v
000021f8 T __introsort_loop__H4ZPP1XZP1XZiZ8XCompare_X01X01PX11X21X31_v
00002aa4 T __introsort_loop__H4ZPP1XZP1XZiZt13binary_negate1Z8XCompare_X01X01PX11X21X31_v
         U __ls__7ostreamPCc
         U __ls__7ostreami
00003068 T __make_heap__H3ZP1XZ1XZi_X01X01PX11PX21_v
00003468 T __make_heap__H3ZPP1XZP1XZi_X01X01PX11PX21_v
00003748 T __make_heap__H4ZPP1XZ8XCompareZP1XZi_X01X01X11PX21PX31_v
00002608 T __make_heap__H4ZPP1XZt13binary_negate1Z8XCompareZP1XZi_X01X01X11PX21PX31_v
0000131c T __partial_sort__H2ZP1XZ1X_X01X01X01PX11_v
00001afc T __partial_sort__H2ZPP1XZP1X_X01X01X01PX11_v
00001f9c T __partial_sort__H3ZPP1XZP1XZ8XCompare_X01X01X01PX11X21_v
000028bc T __partial_sort__H3ZPP1XZP1XZt13binary_negate1Z8XCompare_X01X01X01PX11X21_v
00002fec T __push_heap__H3ZP1XZiZ1X_X01X11X11X21_v
000033b4 T __push_heap__H3ZPP1XZiZP1X_X01X11X11X21_v
00003640 T __push_heap__H4ZPP1XZiZP1XZ8XCompare_X01X11X11X21X31_v
00003a54 T __push_heap__H4ZPP1XZiZP1XZt13binary_negate1Z8XCompare_X01X11X11X21X31_v
         U __start_cp_handler
         U __throw
         U __uncatch_exception
00003278 T __unguarded_insertion_sort_aux__H2ZP1XZ1X_X01X01PX11_v
000035d4 T __unguarded_insertion_sort_aux__H2ZPP1XZP1X_X01X01PX11_v
000039e8 T __unguarded_insertion_sort_aux__H3ZPP1XZP1XZ8XCompare_X01X01PX11X21_v
00003c28 T __unguarded_insertion_sort_aux__H3ZPP1XZP1XZt13binary_negate1Z8XCompare_X01X01PX11X21_v
0000323c T __unguarded_linear_insert__H2ZP1XZ1X_X01X11_v
00003548 T __unguarded_linear_insert__H2ZPP1XZP1X_X01X11_v
000038c4 T __unguarded_linear_insert__H3ZPP1XZP1XZ8XCompare_X01X11X21_v
00003be4 T __unguarded_linear_insert__H3ZPP1XZP1XZt13binary_negate1Z8XCompare_X01X11X21_v
000031cc T __unguarded_partition__H2ZP1XZ1X_X01X01X11_X01
000034fc T __unguarded_partition__H2ZPP1XZP1X_X01X01X11_X01
00003858 T __unguarded_partition__H3ZPP1XZP1XZ8XCompare_X01X01X11X21_X01
00003b70 T __unguarded_partition__H3ZPP1XZP1XZt13binary_negate1Z8XCompare_X01X01X11X21_X01
00000e30 T __uninitialized_copy_aux__H2ZP1XZP1X_X01X01X11G12__false_type_X11
         U _t24__default_alloc_template2b1i0._S_free_list
         U _t24__default_alloc_template2b1i0._S_node_allocator_lock
         U cout
         U endl__FR7ostream
00002fb8 T for_each__H2ZP1XZPFRC1X_v_X01X01X11_X11
0000360c T for_each__H2ZPP1XZPFPC1X_v_X01X01X11_X11
         U free
00000000 t gcc2_compiled.
00000000 T main
         U malloc
         U memmove
         U pthread_mutex_lock
         U pthread_mutex_unlock
000030f0 T sort_heap__H1ZP1X_X01X01_v
00001a38 T sort_heap__H1ZPP1X_X01X01_v
00001e64 T sort_heap__H2ZPP1XZ8XCompare_X01X01X11_v
00002728 T sort_heap__H2ZPP1XZt13binary_negate1Z8XCompare_X01X01X11_v
         U terminate__Fv
00002ed0 T xPrint__FRC1X
00002f44 T xPtrPrint__FPC1X


Without the -frepo option:
00000000 W _M_insert_aux__t6vector2Z1XZt9allocator1Z1XP1XRC1X
00000000 W _M_insert_aux__t6vector2ZP1XZt9allocator1ZP1XPP1XRCP1X
00000000 W _S_chunk_alloc__t24__default_alloc_template2b1i0UiRi
00000000 ? __EXCEPTION_TABLE__
00000000 ? __FRAME_BEGIN__
00000000 W __adjust_heap__H3ZP1XZiZ1X_X01X11X11X21_v
         U __cl__C8XComparePC1XT1
         U __cp_pop_exception
00000000 W __final_insertion_sort__H1ZP1X_X01X01_v
00000000 W __final_insertion_sort__H1ZPP1X_X01X01_v
00000000 W __final_insertion_sort__H2ZPP1XZ8XCompare_X01X01X11_v
00000000 W __final_insertion_sort__H2ZPP1XZt13binary_negate1Z8XCompare_X01X01X11_v
00000000 W __insertion_sort__H1ZP1X_X01X01_v
00000000 W __insertion_sort__H2ZPP1XZt13binary_negate1Z8XCompare_X01X01X11_v
00000000 W __introsort_loop__H3ZP1XZ1XZi_X01X01PX11X21_v
00000000 W __introsort_loop__H3ZPP1XZP1XZi_X01X01PX11X21_v
00000000 W __introsort_loop__H4ZPP1XZP1XZiZ8XCompare_X01X01PX11X21X31_v
00000000 W __introsort_loop__H4ZPP1XZP1XZiZt13binary_negate1Z8XCompare_X01X01PX11X21X31_v
         U __ls__7ostreamPCc
         U __ls__7ostreami
00000000 W __make_heap__H4ZPP1XZt13binary_negate1Z8XCompareZP1XZi_X01X01X11PX21PX31_v
00000000 W __partial_sort__H2ZP1XZ1X_X01X01X01PX11_v
00000000 W __partial_sort__H2ZPP1XZP1X_X01X01X01PX11_v
00000000 W __partial_sort__H3ZPP1XZP1XZ8XCompare_X01X01X01PX11X21_v
00000000 W __partial_sort__H3ZPP1XZP1XZt13binary_negate1Z8XCompare_X01X01X01PX11X21_v
         U __start_cp_handler
         U __throw
         U __uncatch_exception
00000000 W __uninitialized_copy_aux__H2ZP1XZP1X_X01X01X11G12__false_type_X11
00000000 W _t23__malloc_alloc_template1i0.__malloc_alloc_oom_handler
00000000 W _t24__default_alloc_template2b1i0._S_end_free
00000000 W _t24__default_alloc_template2b1i0._S_free_list
00000000 W _t24__default_alloc_template2b1i0._S_heap_size
00000000 W _t24__default_alloc_template2b1i0._S_node_allocator_lock
00000000 W _t24__default_alloc_template2b1i0._S_start_free
         U cerr
         U cout
         U endl__FR7ostream
         U exit
00000000 W for_each__H2ZP1XZPFRC1X_v_X01X01X11_X11
00000000 W for_each__H2ZPP1XZPFPC1X_v_X01X01X11_X11
         U free
00000000 t gcc2_compiled.
00000000 T main
         U malloc
         U memmove
         U pthread_mutex_lock
         U pthread_mutex_unlock
00000000 W sort_heap__H1ZPP1X_X01X01_v
00000000 W sort_heap__H2ZPP1XZ8XCompare_X01X01X11_v
00000000 W sort_heap__H2ZPP1XZt13binary_negate1Z8XCompare_X01X01X11_v
         U terminate__Fv
00000e30 T xPrint__FRC1X
00000ea4 T xPtrPrint__FPC1X

I have already sent the source code to this program to you in a
previous bug report, so I won't waste bandwidth with it here.

I would really like to get to the bottom of this. Please let me know
if there's anything else I can do in this regard,

Cheers,
Chris.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic