From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 39010 invoked by alias); 13 Dec 2018 20:27:46 -0000 Mailing-List: contact elfutils-devel-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: elfutils-devel-owner@sourceware.org Received: (qmail 38995 invoked by uid 89); 13 Dec 2018 20:27:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.100.2 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=H*Ad:U*roland, inspired, hacked X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: mail-wr1-f44.google.com Received: from mail-wr1-f44.google.com (HELO mail-wr1-f44.google.com) (209.85.221.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 13 Dec 2018 20:27:44 +0000 Received: by mail-wr1-f44.google.com with SMTP id c14so3362459wrr.0 for ; Thu, 13 Dec 2018 12:27:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=diamand.org; s=google; h=mime-version:from:date:message-id:subject:to:cc; bh=egjDivNMqxYrpp0F8Qo0lKsPDmjm1XMstr5qvKuTAR0=; b=PfObxJX+eCwJhKKit5aOq6r06P/ILFy/XAA1L3FAYcV2s6RRMvXt8h+4yL0P1798Pj Qi/Nxa2Ut7axNaP1MqB+KmAGAs1gRVpGmowsbD+c2Fx37o+WJKI9KztsDLBz7ISAUfw9 SuEiV98LD2ocO9tKS1liwLhDYN8cGI5Vk+PCI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=egjDivNMqxYrpp0F8Qo0lKsPDmjm1XMstr5qvKuTAR0=; b=gNkQ3t5JFnzzfM3TgBK2cb97jSA0ZUW3upKX9RDFtDajSjq/pK9OcuvZCWOtRt3ylY b6RIJI0gNVCT4cQ8JBPvO3YISPkDvZmKi9ZR8u/WfMSKtMc9HKB/I0myT+JlPYzfrJHv H5U75DJBe1hRcbrVcH/grYkK1LsDygJ4VLRQCqtEGYl0EyjyO6Yfp67NObTDZyzD65W8 Hfv3+rbBfkqi1fdhwzp8N9HSQEyzmBIJmHsMYUA3TLUV6Y6rctLO4VhzZptO7FmSh2Db k/9c0FT7zsGD6EoTOEaFTB/HX7oASeICvqqAk8Udqf8xPvfFxURB01kTYD2C92PKB5Eq LNyQ== X-Gm-Message-State: AA+aEWYGXk/WPQDkZj61KbEKs+5+e7OmEs2/p556tz+aoebkyv74P/y2 /B3ki2+rJvylyA0s0ZMRjug1nahE/eDSBO4lwk5eMaAVaypuNA== X-Google-Smtp-Source: AFSGD/VzWtnFSVG4gvs04li+km19UTx+tJKapsxR6pq6EAkpEgt9+NorDTUBCHdj0tHLAdn8qr5tWroIXExCM4MiCRA= X-Received: by 2002:adf:e488:: with SMTP id i8mr237492wrm.10.1544732862525; Thu, 13 Dec 2018 12:27:42 -0800 (PST) MIME-Version: 1.0 From: Luke Diamand Date: Thu, 13 Dec 2018 20:27:00 -0000 Message-ID: Subject: dwfl_link_map_report() on a core file with sysroot? Opens the wrong solibs? To: elfutils-devel@sourceware.org Cc: Roland McGrath Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2018-q4/txt/msg00224.txt.bz2 I'm trying to get callstacks out of a core file using libdwfl where the ELF files live in a sysroot (and are from a different architecture, ARM). I'm possibly doing something stupid as I find that dwfl_link_map_report() opens /lib/libpthread.so on the *host* rather than the libpthread.so from my sysroot. It obviously doesn't then get very far. I called elf_begin(), dwfl_begin() and then dwfl_core_file_report(), passing in the path to the executable (in the sysroot). There's a comment in link_map.c around line 390 which says: // XXX hook for sysroot So inspired by this, I hacked in some code to open files relative to my sysroot and it all started working. Am I just missing some obvious setup, or is this just missing sysroot support? Thanks! Luke