From owner-freebsd-hackers Fri Apr 25 22:02:14 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id WAA05745 for hackers-outgoing; Fri, 25 Apr 1997 22:02:14 -0700 (PDT) Received: from siesta.cs.wustl.edu (nw1@siesta.cs.wustl.edu [128.252.165.3]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id WAA05740 for ; Fri, 25 Apr 1997 22:02:12 -0700 (PDT) Received: from localhost by siesta.cs.wustl.edu (SMI-8.6/ECL-J1.00) id AAA19523; Sat, 26 Apr 1997 00:01:59 -0500 Message-Id: <199704260501.AAA19523@siesta.cs.wustl.edu> To: John Polstra cc: hackers@freebsd.org Subject: Re: Any compiler guru? (Was: 2 questions about C++ support in 2.2) In-reply-to: Your message of "Thu, 24 Apr 1997 22:26:06 PDT." <199704250526.WAA00902@austin.polstra.com> Date: Sat, 26 Apr 1997 00:01:58 -0500 From: Nanbor Wang Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > I have been working on porting ACE to FreeBSD platform on and off for > > quite some time. > > [...] > > /var/tmp/cc022478.s:16783: Warning: GOT relocation burb: `__vt$15ACE_Local_Mutex > > ' should be global > > This has shown up in some other things as well. I have fixed this sort > of problem in g++ before, and it is on my list to fix this one. > > It would really help to have a small, self-contained test case. > Could you please try to pare down one of the failing source files to > the bare minimum, and send it to me? I can't wait. Here is a short one. Compile it as gcc -fpic -c got.cc and you should get the GOT warning. You can play with it. If you define constructor foo::foo() as an inline function too, or, remove the "inline" keyword from definition of foo::bar(), you can get rid of the GOT warning. Anyone? Thanks a lot!! nw # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # got.cc # got.h # echo x - got.cc sed 's/^X//' >got.cc << 'END-of-got.cc' X#include "got.h" X Xfoo::foo() { X} X END-of-got.cc echo x - got.h sed 's/^X//' >got.h << 'END-of-got.h' Xclass foo { Xpublic: X foo() ; X virtual int bar() ; X} ; X X Xinline int foo::bar() { X return 0 ; X} X END-of-got.h exit