This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


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

RE: link errors with simple c++ prog on hpux10/11/a couple others


For me, it shows with a lowercase t. The vt's show with lowercase d's. 

/afs/.umr.edu/software/egcs2/hpux10/lib/gcc-lib/hppa2.0-hp-hpux10.20/2.96/li
bgcc.a[opdel.o]:
0000000000 t  $CODE$
0000000508 t  L$0005
0000000456 t  L$0013
0000000168 t  L$0018
0000000220 t  L$0019
0000000392 t  L$0020
0000000000 d  L$text0000
0000000000 d  L$text_end0000
0000000000 tS __builtin_delete
0000000000 U  __check_null_eh_spec
0000000000 U  __cp_pop_exception
0000000000 U  __get_eh_context
0000000000 U  __sjthrow
0000000000 U  __start_cp_handler
0000000000 U  __terminate
0000000000 U  free

I also checked both gcc/libgcc.a and gcc/stage2/libgcc.a, both had tS.

From your other note - you mentioned .IMPORT - I checked and it is in
hello.s:

	 .IMPORT __builtin_delete,CODE

The som.h patch appeared to already be applied:

revision 1.12
date: 2000/06/30 18:14:05;  author: law;  state: Exp;  lines: +10 -2
        * pa/som.h (ASM_WEAKEN_LABEL): Export weak data symbols so that they
        have global scope.

The typeck.c patch didn't apply cleanly, but I hand applied it, I believe in
the appropriate place. (There wasn't much context.)

This is the change I applied:

Index: gcc/cp/typeck.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/typeck.c,v
retrieving revision 1.297
diff -u -u -1 -0 -r1.297 typeck.c
--- typeck.c    2000/07/10 07:16:23     1.297
+++ typeck.c    2000/07/11 18:09:47
@@ -4976,21 +4976,22 @@
 
       case FUNCTION_DECL:
        /* We have to test both conditions here.  The first may be
           non-zero in the case of processing a default function.  The
           second may be non-zero in the case of a template function.  */
        if (DECL_LANG_SPECIFIC (x)
            && DECL_TEMPLATE_INFO (x) 
            && !DECL_TEMPLATE_SPECIALIZATION (x))
          mark_used (x);
        TREE_ADDRESSABLE (x) = 1;
-       TREE_USED (x) = 1;
+       if ( !DECL_ARTIFICIAL (x))
+         TREE_USED (x) = 1;
        TREE_ADDRESSABLE (DECL_ASSEMBLER_NAME (x)) = 1;
        return 1;
 
       case CONSTRUCTOR:
        TREE_ADDRESSABLE (x) = 1;
        return 1;
 
       case TARGET_EXPR:
        TREE_ADDRESSABLE (x) = 1;
        mark_addressable (TREE_OPERAND (x, 0));



I'll try running the full bootstrap again, just in case I've dorked
something up, but sure looks to me like it should be working.

-- Nathan

> -----Original Message-----
> From: John David Anglin [mailto:dave@hiauly1.hia.nrc.ca]
> Sent: Tuesday, July 11, 2000 12:46 PM
> To: nneul@umr.edu
> Cc: gcc-bugs@gcc.gnu.org
> Subject: Re: link errors with simple c++ prog on hpux10/11/a couple
> others
> 
> 
> > 
> > Here is the linker output when trying to link the simple 
> program. I even
> > went so far as to pull one of the .o files out of libgcc.a. 
> It sure looks to
> > me like the code is there, but somehow the linker isn't finding it.
> ...
> > /usr/bin/ld: Unsatisfied symbols:
> >    __builtin_delete (code)
> 
> Look at libgcc.a with "nm -p".  __builtin_delete should be in 
> module opdel.o.
> This is how it looks from my build:
> 
> libgcc.a[opdel.o]:
> 0000000000 t  $CODE$
> 0000000508 t  L$0005
> 0000000456 t  L$0013
> 0000000168 t  L$0018
> 0000000220 t  L$0019
> 0000000392 t  L$0020
> 0000000000 d  L$text0000
> 0000000000 d  L$text_end0000
> 0000000003 TS __builtin_delete
> 0000000000 U  __check_null_eh_spec
> 0000000000 U  __cp_pop_exception
> 0000000000 U  __get_eh_context
> 0000000000 U  __sjthrow
> 0000000000 U  __start_cp_handler
> 0000000000 U  __terminate
> 0000000000 U  free
> 
> The 'S' indicates that it is a secondary definition.  The 
> other references
> to it in the library should be 'U'.
> 
> The virtual table symbols should look like:
> 
> 1073741968 DS _vt$10bad_typeid
> 
> Dave
> -- 
> J. David Anglin                                  dave.anglin@nrc.ca
> National Research Council of Canada              (613) 
> 990-0752 (FAX: 952-6605)
> 

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