From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4001:c0b::241; helo=mail-it0-x241.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-it0-x241.google.com (mail-it0-x241.google.com [IPv6:2607:f8b0:4001:c0b::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 3553B2119307E for ; Mon, 11 Jun 2018 01:53:15 -0700 (PDT) Received: by mail-it0-x241.google.com with SMTP id a3-v6so9991053itd.0 for ; Mon, 11 Jun 2018 01:53:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ld52/xvqaPZ8hT4vTntDuivNBosOz/9tJHpYeb6Glqg=; b=CqOwrQfTUZtO1fEOvQsU5zK03iFBnrPbRpu+NidFO43E20dnIOUZsGReNLaoO1lh6c moDaGyyhNpYWkU+neypPtqymFdDuzGl0JPCRDITaxNtUgs+7HqDQ2naR4Hyp5LLEC8SF 4o0UlPf1I0pNIE9j7PihZM9VyyWVaWIb7hrSo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ld52/xvqaPZ8hT4vTntDuivNBosOz/9tJHpYeb6Glqg=; b=oMyps7FWr8/fAWFYYe61/k64Fmt20m6qKRmp8Cy3OcnuVIPpe5UOs7gOP5MV7fiqWi ZyNVuQujsS3rRE4YjT1gxbBqYQJ71vRnk7SeFQWGFwuaaO4sdnDLsrtjfJVQIrF5Gnkn M0y22+yfCr7HYnW1BZdtW6W8+0pW62xIIpIq7n8kDZNT8pMsv03vvdKapUZ5psXRo6JU 76pyHC10Qntp7PS/AdLEBTrr05y/fcsnpYfq0qIogWDR2SQQIWG4iDLRlTAt58XMaQRe muKahWJRbyFW/prPC9FZTpNofAn9XmghnopHTrMfh15rmzzmQCJ3Dii+7caziYSjKcGz Fq3A== X-Gm-Message-State: APt69E3O9uXkXV8h3l+1BmzMVenjeTqUV2BkdpxUSvb4OGwMCr4OVJNT LgRBE7yvbGIQiWoGhoTX5hQNJKG5xnyfrVoYWFZETW6v X-Google-Smtp-Source: ADUXVKLNYaQv7JTrJnd3l/btJ599H4hqz6iFXrjciUGVd7AGCx3bzqOeSGTOyAquNrWXx4141E4vnptuDAmetO6sxiY= X-Received: by 2002:a24:1d0e:: with SMTP id 14-v6mr9519338itj.50.1528707194475; Mon, 11 Jun 2018 01:53:14 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a6b:bbc7:0:0:0:0:0 with HTTP; Mon, 11 Jun 2018 01:53:14 -0700 (PDT) In-Reply-To: References: <20180611074227.30625-1-ard.biesheuvel@linaro.org> <4A89E2EF3DFEDB4C8BFDE51014F606A14E295663@SHSMSX104.ccr.corp.intel.com> From: Ard Biesheuvel Date: Mon, 11 Jun 2018 10:53:14 +0200 Message-ID: To: "Gao, Liming" Cc: "edk2-devel@lists.01.org" , "Zhu, Yonghong" , "lersek@redhat.com" , "Shi, Steven" , "zenith432@users.sourceforge.net" Subject: Re: [PATCH] BaseTools/tools_def IA32: disable PIE code generation explicitly X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jun 2018 08:53:15 -0000 Content-Type: text/plain; charset="UTF-8" On 11 June 2018 at 10:52, Ard Biesheuvel wrote: > On 11 June 2018 at 10:38, Gao, Liming wrote: >> Ard: >> Do you mean the default GCC compiler disables PIC and PIE for IA32 arch? But now, some distribution GCC compiler enables PIC and PIE by default. So, we have to obviously disable PIC and PIE in tools_def.txt. >> > > Yes. On my x86 Ubuntu 18.04 LTS system: > > $ gcc -v > Using built-in specs. > COLLECT_GCC=gcc > COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper > OFFLOAD_TARGET_NAMES=nvptx-none > OFFLOAD_TARGET_DEFAULT=1 > Target: x86_64-linux-gnu > Configured with: ../src/configure -v --with-pkgversion='Ubuntu > 7.3.0-16ubuntu3' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs > --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ > --prefix=/usr --with-gcc-major-version-only > --with-as=/usr/bin/x86_64-linux-gnu-as > --with-ld=/usr/bin/x86_64-linux-gnu-ld --program-suffix=-7 > --program-prefix=x86_64-linux-gnu- --enable-shared > --enable-linker-build-id --libexecdir=/usr/lib > --without-included-gettext --enable-threads=posix --libdir=/usr/lib > --enable-nls --with-sysroot=/ --enable-clocale=gnu > --enable-libstdcxx-debug --enable-libstdcxx-time=yes > --with-default-libstdcxx-abi=new --enable-gnu-unique-object > --disable-vtable-verify --enable-libmpx --enable-plugin > --enable-default-pie --with-system-zlib --with-target-system-zlib > --enable-objc-gc=auto --enable-multiarch --disable-werror > --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 > --enable-multilib --with-tune=generic > --enable-offload-targets=nvptx-none --without-cuda-driver > --enable-checking=release --build=x86_64-linux-gnu > --host=x86_64-linux-gnu --target=x86_64-linux-gnu > Thread model: posix > gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3) > > > Notice the '--enable-default-pie' 4 lines from the bottom. > (or 9 lines after the mail was rewrapped by gmail)