From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28919 invoked by alias); 18 Dec 2008 21:49:39 -0000 Received: (qmail 28870 invoked by uid 22791); 18 Dec 2008 21:49:38 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 18 Dec 2008 21:48:58 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 555DA104A5; Thu, 18 Dec 2008 21:48:56 +0000 (GMT) Received: from caradoc.them.org (209.195.188.212.nauticom.net [209.195.188.212]) by nan.false.org (Postfix) with ESMTP id 42FAB10499; Thu, 18 Dec 2008 21:48:56 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1LDQjn-00022G-5h; Thu, 18 Dec 2008 16:48:55 -0500 Date: Thu, 18 Dec 2008 21:49:00 -0000 From: Daniel Jacobowitz To: Mathieu Lacage Cc: gdb@sourceware.org Subject: Re: how to make gdb happy with my linkmap Message-ID: <20081218214854.GA7706@caradoc.them.org> Mail-Followup-To: Mathieu Lacage , gdb@sourceware.org References: <74fef6df0812181341x8ecdd31me028bd4d658384b1@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <74fef6df0812181341x8ecdd31me028bd4d658384b1@mail.gmail.com> User-Agent: Mutt/1.5.17 (2008-05-11) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-12/txt/msg00084.txt.bz2 On Thu, Dec 18, 2008 at 10:41:20PM +0100, Mathieu Lacage wrote: > hi, > > I am currently trying to write a small ELF loader and make gdb be > happy with it. On SVR4 systems, basically, you can't. There is some information you won't be able to update because it lives in the kernel (auxilliary vector). This is one of the reasons I recently implemented "set wrapper"; if the loader is far enough along when GDB starts looking at it, and has a link map already set up, then it will (generally) not go poking around the auxilliary vector. > Hence, my question: what are the requirements on the structure of a > linkmap which is compatible with gdb's usage (beyond the mere ABI > offset requirements). I don't think this is possible to answer. The answer is that GDB is written to work as best it can with all the system loaders we've encountered. If there's a change that would make things easier for your loader, without breaking any of those systems, you're welcome to propose it :-) -- Daniel Jacobowitz CodeSourcery