From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10478 invoked by alias); 21 May 2004 00:24:20 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 10408 invoked from network); 21 May 2004 00:24:19 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 21 May 2004 00:24:19 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i4KKKkGI006137 for ; Thu, 20 May 2004 16:20:46 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i4KKKj000471; Thu, 20 May 2004 16:20:45 -0400 Received: from localhost.localdomain (vpn50-15.rdu.redhat.com [172.16.50.15]) by pobox.corp.redhat.com (8.12.8/8.12.8) with ESMTP id i4KKKjLj028786; Thu, 20 May 2004 16:20:45 -0400 Received: from saguaro (saguaro.lan [192.168.64.2]) by localhost.localdomain (8.12.10/8.12.10) with SMTP id i4KKKdOR014483; Thu, 20 May 2004 13:20:39 -0700 Date: Fri, 21 May 2004 00:24:00 -0000 From: Kevin Buettner To: "Stephen P. Smith" Cc: gdb Subject: Re: shared library support Message-Id: <20040520132039.7add2b56@saguaro> In-Reply-To: <40ACF33D.3020502@cox.net> References: <20040517120219.5fad9bc0@saguaro> <40AA1198.2010808@cox.net> <20040518084422.5f94d1d5@saguaro> <40AA4328.6000109@cox.net> <20040518114817.76d0632d@saguaro> <40ACF33D.3020502@cox.net> Organization: Red Hat Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SW-Source: 2004-05/txt/msg00143.txt.bz2 On Thu, 20 May 2004 11:04:45 -0700 "Stephen P. Smith" wrote: > ./gdb/solib-svr4.c > warning ("no shared library support for this OS / ABI"); Thanks for tracking this down. If you truly want SVR4 shared library support for your target, you'll need to supply some link map offsets for it to work. See, e.g., ppc_linux_svr4_fetch_link_map_offsets() in ppc-linux-tdep.c. Since you've implemented your own shared library support for your target, my guess is that you don't want SVR4 shared library support at all. Exactly where we go next depends on how you've implemented your shared library support. Ideally, you would have written it as a solib.c backend. If you had, we could add some machinery for enabling your backend in favor of the svr4 backend. (Actually, the machinery for switching amongst the various backends is long overdue, so I'm kind of hoping this is what's needed.) My recollection of the matter is that you didn't do it this way. Did you at least define SOLIB_ADD for your shared library support? If so, and if defined at the proper point, this definition will override the solib.c infrastructure. This is the mechanism that native AIX uses to enable AIX shared library support in favor of that in solib.c / solib-svr4.c. Assuming that I'm right about my guesses thus far, probably the easiest course is for you to define your own target (mytarget-tm.h / mytarget.mt) such that your homebrew shared library support is listed on the TDEPFILES line in the .mt file and some sort of SOLIB_ADD define (even a null one) is made before the include of whatever ppc target you're basing your homebrew target on. If you use a null (or otherwise bogus) SOLIB_ADD define, you'll want to #undef it after the #include of tm-rs6000.h or similar. The easiest course and the preferred course are not the same though. The preferred course is to write your shared library support as a solib.c backend, add some OSABI recognition code for your target along with a suitable OSABI-specific tdep.c file for your target. In this (latter) file, you would call some as yet to be written machinery in solib.c which'd enable your target's shared library support. This is just a thumbnail sketch; if you choose to go this route, I'm willing to go into much more detail and even assist with writing the necessary solib.c support. Kevin