From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25902 invoked by alias); 24 Oct 2014 08:57:12 -0000 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 Received: (qmail 25885 invoked by uid 89); 24 Oct 2014 08:57:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 24 Oct 2014 08:57:07 +0000 Received: from svr-orw-fem-04.mgc.mentorg.com ([147.34.97.41]) by relay1.mentorg.com with esmtp id 1XhagC-00056U-3s from Yao_Qi@mentor.com ; Fri, 24 Oct 2014 01:57:04 -0700 Received: from GreenOnly (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.3.181.6; Fri, 24 Oct 2014 01:57:03 -0700 From: Yao Qi To: Andrew Pinski CC: Victor Kamensky , "gdb-patches@sourceware.org" Subject: Re: [PATCH 5/5] ARM: asm-source.exp link options in case of armv7b target References: <1413853021-4393-1-git-send-email-victor.kamensky@linaro.org> <1413853021-4393-6-git-send-email-victor.kamensky@linaro.org> <87siievw6z.fsf@codesourcery.com> Date: Fri, 24 Oct 2014 08:57:00 -0000 In-Reply-To: (Andrew Pinski's message of "Thu, 23 Oct 2014 23:38:33 -0700") Message-ID: <87k33px31z.fsf@codesourcery.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2014-10/txt/msg00633.txt.bz2 Andrew Pinski writes: >> Any executable/library that runs on big endian V7 *must* be linked >> with -be8 option. Otherwise it simply won't run. In any other multilib >> option vfp, neon, etc -be8 must be set. Basically, in big endian case >> gcc/gas generates data and instructions in big endian >> format but ARM V7 requires that instruction should be little endian >> format. It is linker that does instructions byte swap. If -be8 flag >> is not passed during link while running on ARM V7 big endian target >> executable with crash with SIGILL. If link happens through gcc, then >> -be8 always passed for non relocatable code by compiler. In this >> particular case link happens directly with linker and -be8 is not >> default, so it is needed. One may argue that -be8 for final >> executables in ARM V7 BE target should be default even for >> linker, but it is not the current case ... >> >> Also note that you have plenty examples in the same test >> gdb/testsuite/gdb.asm/asm-source.exp >> that do very similar things. For example: >> >> "powerpc64le-*" { >> set asm-arch powerpc64le >> set asm-flags "-a64 -I${srcdir}/${subdir} $obj_include" >> append link-flags " -m elf64lppc" >> } >> >> Why "-m elf64lppc" is set for powerpc64le target? I suspect >> by very similar reasons. > > > Yes and no. For PowerPC64 little-endian is Linux only so it will > never have a multi-libs that support both little-endian and > big-endian. While for arm*-*-*, you can have a bare metal env and > that could have a multi-lib for both little and big endian. Andrew is right. We can have a arm-linux-gnueabi toolchain which has multilibs for the combination of {le, be} x {armv7, armv6, armv5}, and this test still fails on armv7 be multilib. --=20 Yao (=E9=BD=90=E5=B0=A7)