From owner-freebsd-mips@FreeBSD.ORG Fri Apr 15 16:43:32 2011 Return-Path: Delivered-To: mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3B791065674 for ; Fri, 15 Apr 2011 16:43:32 +0000 (UTC) (envelope-from artemb@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 78BDA8FC1C for ; Fri, 15 Apr 2011 16:43:32 +0000 (UTC) Received: by qwc9 with SMTP id 9so1835506qwc.13 for ; Fri, 15 Apr 2011 09:43:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Gz6wPyu4iTywGWg/q7sthTm5ImKuGo62Fp6RpYp5L5s=; b=q79EYH8LsOvIVeUSiiddEhpBI2Uo9lnA+vu01qh/ZGbjJ3f34mEUoBGA8ruiFUUbHa m1lb8jt/9Ag4n+ajYKneYZ3mhZ/ySLsDdifGH98RPtJXjcxZ0dtqa+SpNC3buqHNVJIe GOuS3N8yAfa/NxahnAGokRDsdRZXj1qCEEBWU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=IXbC03jA3pBvcvCfKQXSRHL7azfdDvsKt/P7lJCz2+Yq5b/b48BYLv0KhYeViWJtDm C+AykDcxdlnXpw+x7JDqzGLv2TsIdf9QT40C8HpS7p2d3pCRyT/+pa9HqLVuibdE9IPs AxCi/cfbaNcnqP0/GZc4JqEQxiKMxkrH0Pj0I= MIME-Version: 1.0 Received: by 10.229.100.229 with SMTP id z37mr825570qcn.133.1302883939047; Fri, 15 Apr 2011 09:12:19 -0700 (PDT) Sender: artemb@gmail.com Received: by 10.229.221.193 with HTTP; Fri, 15 Apr 2011 09:12:19 -0700 (PDT) In-Reply-To: References: Date: Fri, 15 Apr 2011 09:12:19 -0700 X-Google-Sender-Auth: QM6_5nLdiOvbcANlmzLlhIrKRnE Message-ID: From: Artem Belevich To: Andrew Duane Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: "mips@freebsd.org" Subject: Re: Trouble with dynamic executables X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2011 16:43:32 -0000 On Fri, Apr 15, 2011 at 5:26 AM, Andrew Duane wrote: > I'm assuming it's a change to "ld", but it could be one of the directive = scripts. I spent yesterday combing changes to the tree, and looking for any= files that could have caused this. I came up empty, but then I'm not reall= y sure what I'm looking for. Is there a toolchain person who might know? Th= ere's a good person here at Juniper, but he's on California time.... Pass --verbose to linker and see what's in the linker script it uses. I suspect the issue may be somewhere there. You can then tweak the linker script, put .interp in the right place and pass the new script to linker with -T. That should get you by until proper toolchain fix is available. --Artem > > -- > Andrew Duane =A0 =A0 =A0 =A0 =A0 =A0 Juniper Networks > 978-589-0551 =A0 =A0 =A0 =A0 =A0 =A0 =A010 Technology Park Dr > aduane@juniper.net =A0 =A0 =A0Westford, MA =A001886-3418 > > ________________________________________ > From: bhanuprakash bodireddy [bhanuprakashbodireddy@gmail.com] > Sent: Thursday, April 14, 2011 3:11 PM > To: Andrew Duane > Cc: mips@freebsd.org > Subject: Re: Trouble with dynamic executables > > I had a similar issue the other day when i did a fresh build world. I tri= ed it to reproduce the issue you reported and its pretty much there in the = trunk. > But the last buildworld has no such issues and am still using the same ol= d fs image to boot on to the octeon boards. > > I believe, some recent fixes should have caused this. > > Thanks, > Bhanu Prakash. > > > On Thu, Apr 14, 2011 at 11:01 AM, Andrew Duane > wrote: > I've pretty much completed my board bringup of an OCTEON based board, but= am still battling one *major* issue. Dynamically linked executables do not= work at all. Any time I try to run one, I get "Exec format error" (ENOEXEC= ). Sample output from file is: > > Statically linked /bin/cat: > > bin/cat: =A0 =A0 =A0ELF 64-bit MSB executable, MIPS, MIPS64 rel2 version = 1 (FreeBSD), for FreeBSD 9.0 (900035), statically linked, FreeBSD-style, no= t stripped > > Dynamically linked /usr/bin/size: > > usr/bin/size: ELF 64-bit MSB executable, MIPS, MIPS64 rel2 version 1 (Fre= eBSD), for FreeBSD 9.0 (900035), dynamically linked (uses shared libs), Fre= eBSD-style, not stripped > > For now, I've sort of worked around this by editing close to 1000 Makefil= es and making almost everything static. There must be a reason for this tho= ugh. I've done a fresh update and rebuilt everything including the toolchai= n. Is there something missing from my system? The loader itself? Libraries?= An ldscript file? > > -- > > Andrew Duane =A0 =A0 =A0 =A0 =A0 =A0 Juniper Networks > 978-589-0551 =A0 =A0 =A0 =A0 =A0 =A0 10 Technology Park= Dr > aduane@juniper.net =A0 =A0 =A0 Westford, MA = =A001886-3418 > > _______________________________________________ > freebsd-mips@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-mips > To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org" > > _______________________________________________ > freebsd-mips@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-mips > To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org" >