From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18484 invoked by alias); 7 Jan 2010 14:26:05 -0000 Received: (qmail 18415 invoked by uid 22791); 7 Jan 2010 14:26:02 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 07 Jan 2010 14:25:59 +0000 Received: (qmail 1149 invoked from network); 7 Jan 2010 14:25:57 -0000 Received: from unknown (HELO caradoc.them.org) (dan@127.0.0.2) by mail.codesourcery.com with ESMTPA; 7 Jan 2010 14:25:57 -0000 Date: Thu, 07 Jan 2010 14:26:00 -0000 From: Daniel Jacobowitz To: Tristan Gingold Cc: Jan Kratochvil , gdb-patches@sourceware.org Subject: Re: Regression on prelinked-sepdebug-shlibs Message-ID: <20100107142554.GH22607@caradoc.them.org> References: <20091225200440.GA3747@host0.dyn.jankratochvil.net> <20100106180510.GA6748@host0.dyn.jankratochvil.net> <20100106191608.GA28581@caradoc.them.org> <20100107134201.GE22607@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-01/txt/msg00138.txt.bz2 On Thu, Jan 07, 2010 at 03:22:21PM +0100, Tristan Gingold wrote: > $ readelf -S sep > There are 14 section headers, starting at offset 0x136c: > > Section Headers: > [Nr] Name Type Addr Off Size ES Flg Lk Inf Al > [ 0] NULL 00000000 000000 000000 00 0 0 0 > [ 1] sec_zero PROGBITS 00000000 001000 00000a 00 AX 0 0 1 Notice the non-zero offset. % readelf -l sep Elf file type is EXEC (Executable file) Entry point 0x80480f8 There are 5 program headers, starting at offset 52 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align LOAD 0x001000 0x00000000 0x00000000 0x0000a 0x0000a R E 0x1000 LOAD 0x0010d4 0x080480d4 0x080480d4 0x00039 0x00039 R E 0x1000 The file offset 0 is not mapped. That means the program headers, at offset 52, are not mapped. So ld.so can't find them. I'm surprised the static executable worked, but I can see how that might happen. -- Daniel Jacobowitz CodeSourcery