From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2608 Path: news.gmane.org!not-for-mail From: pierre Newsgroups: gmane.linux.lib.musl.general Subject: dladdr() Date: Tue, 15 Jan 2013 15:54:44 +0100 Message-ID: <1358261684.3766.10.camel@6-core> References: <1358206649.32505.21@driftwood> <22145EB4-CF32-4BCA-8DE6-93790F3E267F@palsenberg.com> <1358254713.32505.27@driftwood> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1358261686 24389 80.91.229.3 (15 Jan 2013 14:54:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 15 Jan 2013 14:54:46 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2609-gllmg-musl=m.gmane.org@lists.openwall.com Tue Jan 15 15:55:04 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Tv7uq-0002Cq-22 for gllmg-musl@plane.gmane.org; Tue, 15 Jan 2013 15:55:04 +0100 Original-Received: (qmail 28667 invoked by uid 550); 15 Jan 2013 14:54:46 -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 28657 invoked from network); 15 Jan 2013 14:54:46 -0000 Original-Reply-To: pierre@silentlife.com In-Reply-To: <1358254713.32505.27@driftwood> X-Mailer: Evolution 3.2.3-0ubuntu6 Xref: news.gmane.org gmane.linux.lib.musl.general:2608 Archived-At: Latest musl-libc dladdr() fails here: // glibc: // gcc hello.c -o hello -ldl // // ret:1 // dli_fname:./hello:0x400000 // dli_sname:puts:0x4004c0 // musl: // musl-gcc hello.c -o hello // // ret:0 // dli_fname:(null):0 // dli_sname:(null):0 Dl_info dl = {0}; int ret = dladdr(puts + 0, &dl); printf("ret:%d\n" "dli_fname:%s:%p\n" "dli_sname:%s:%p\n\n", ret, dl.dli_fname, dl.dli_fbase, dl.dli_sname, dl.dli_saddr); What is missing to make this work? Pierre