From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/7063 Path: news.gmane.org!not-for-mail From: David Guillen Newsgroups: gmane.linux.lib.musl.general Subject: Re: Executable crashes at __libc_start_main Date: Tue, 17 Feb 2015 09:20:38 +0000 Message-ID: References: <54E29C2C.5080907@davidgf.es> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1424164858 10528 80.91.229.3 (17 Feb 2015 09:20:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 17 Feb 2015 09:20:58 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-7076-gllmg-musl=m.gmane.org@lists.openwall.com Tue Feb 17 10:20:58 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1YNeKv-0003wQ-A7 for gllmg-musl@m.gmane.org; Tue, 17 Feb 2015 10:20:57 +0100 Original-Received: (qmail 5570 invoked by uid 550); 17 Feb 2015 09:20:54 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 5535 invoked from network); 17 Feb 2015 09:20:50 -0000 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=0lt1j4Qie2++H31jCgfH1tFwjYA3Js2ySG+tdRK57hE=; b=ZttGWix8O/3p3dbBtVX6v/LRJdU+vwHfjUeyypkUwSSnN2qLw+MeqrfYl7HPGPrsWJ g2MLPOaPMjfFzH+Eq0ADx0QoC6LPtAD7LWTRXAi5JyTp8vsUVfjcAfHc9i7lkjg30EC3 6BPo2WOOUQye3gfLyy8v0cBLKs/alRgXEfbwD3lcutP0dZTo7cY6AEeBEiJ9m+3lxe4T CXtNis0xJrpEL1KAib0NNDKslpv4wEoWD9p6meN4kO3E4XVDVtJXvj8CHkE5ovuScQo7 LcN5OP3ylb26RVTkeknGIKScdmka06IfTW4CsPf7XWXD1lxGjA08DInQ+mEqCMwDbpS3 LLbg== X-Gm-Message-State: ALoCoQkvXtm15dsZ7y3abFfht/C2lKokwuqRX/9NYeCno9roEp786LesAz7NF5WQlr1SmGJBa9VB X-Received: by 10.107.137.17 with SMTP id l17mr33399862iod.33.1424164838313; Tue, 17 Feb 2015 01:20:38 -0800 (PST) Original-Sender: david@davidgf.es In-Reply-To: X-Google-Sender-Auth: MtZZ0s5nJv1fK8pilwNVbgAXToQ Xref: news.gmane.org gmane.linux.lib.musl.general:7063 Archived-At: Hi, The toolchain is a "buildroot" one, so it _should_ be OK. The funny think as I said is that it works well on some ARM boxes and qemu, so it might be something related to the ld-linux.so. Rich: R5 is OK, it points to the following 4 bytes (due to postincrement), so I guess it must be OK before the load. And BTW I'm not using thumb code, all instructions are ARM 32 bit wide instructions. Thanks David 2015-02-17 6:49 GMT+00:00 Igmar Palsenberg : > >> Finally I got a core dump and the program crashes here: >> >> 88c8: e1550007 cmp r5, r7 >> 88cc: 2a000003 bcs 88e0 <__libc_start_main+0x1b0> >> 88d0: e4953004 ldr r3, [r5], #4 >> 88d4: e1a0e00f mov lr, pc >> 88d8: e12fff13 bx r3 >> 88dc: eafffff9 b 88c8 <__libc_start_main+0x198> >> >> In the 88d8 instruction to be more exact. Seems that R3 is holding the >> value 0xc8000082!!! Where is that 0xC8 at the beginning comming from? >> The PC reported by the core dump is 0xc8000080 which I guess it's just >> the vlaue of R3 aligned to 4 byte boundary. R5 points to the right >> place, it's just the value loaded by the load. Could it be that >> something corrupts my ELF? Could it be the OS being really dumb at >> loading the ELF? It's a pretty old kernel, 2.6.21. > > You're absolutely sure your toolchain is OK ? Hard to track issues like > this are usually caused by a wrong toolchain, and ARM has some nice quirks > when it comes to this. > > > > Igmar