From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=m/GmqowK; spf=pass (domain: linaro.org, ip: 209.85.166.47, mailfrom: ard.biesheuvel@linaro.org) Received: from mail-io1-f47.google.com (mail-io1-f47.google.com [209.85.166.47]) by groups.io with SMTP; Mon, 17 Jun 2019 02:41:41 -0700 Received: by mail-io1-f47.google.com with SMTP id d12so11756757iod.5 for ; Mon, 17 Jun 2019 02:41:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=w45paOp2L9kzUWVbeNz8GUDACUs6oRCEHAexa6eSEnc=; b=m/GmqowKiGOzeIq6fF9dxOvAaRVRBZGctIZ698UpDCL8gm0hKY41vyETC0Lj4pBy0R RluCCsR3sM3MQsM3PetuLtkYS3EttR+BUQhLtzb3nevM9ZT0Rsym2ZFWyILgnmTntQrb +ub1ZHIVIXBraK5UFGf8HUFOgJ0p+2XvLXQfafN/3F2YxgrxOH44i2uCNUcosD3p4Y91 f8wP0/3ywIAWPwsnMiYkLUS1CqtakRSEci6pQlKqZNrCFpDefIqAOZiXgDmwNGA+7guG P45xf+NxYUjmXimaM7LsyRFaKboSQUFJ4hhOu7CiwS+a4BrMJkUSoVuadVhr0srdr63r enPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=w45paOp2L9kzUWVbeNz8GUDACUs6oRCEHAexa6eSEnc=; b=Y8C3ZL+WrHtSJUCUaGJ/R6hEip/r5hfzVQSlqQ+p3sNNxMPGr1lQ3UZvO5P6NC6w4d 2AcZC+3MiZ0TdUrdEGU9SAXD0AkWxlS3ijxd9cwuXhu3zGU6djfYBguBwaoX0H79Jdyd P8YVT+XkVk15Yz7IWbdVK/pm8hplgLJGBzr7TmMuD+LF3YypRCUWUZj3M74t3KcwhalP lUVXLh+CC4qXirtWrz8b3Rp91sUTenDnXI9wsWMAeg/4ouOCxT1MH2yrq+I0qksmbsr2 Nx/9XRVtUrL2YOd0vU//I1wa1dmyTcKlcKYJQEKSGGvyTV5jKOzYkeLXpMoeW9DRgof7 nkKA== X-Gm-Message-State: APjAAAWfyMEFkdStZFXMh/pUcnNd3/qr8YUKShNWssS8o01daSmREIbf /F51GXrrLtDcUvm90/MqCg1BhdNDofpPc1e5Lkjnyg== X-Google-Smtp-Source: APXvYqzIj0q0nU3kWU2/PFbUeMQE8toeKZWRb/aW3rjxnvCGF9ph5q0X0Pm5q6//ldQhkqo4D+z1qqepf5lQeu5zEok= X-Received: by 2002:a02:c90d:: with SMTP id t13mr60763078jao.62.1560764500660; Mon, 17 Jun 2019 02:41:40 -0700 (PDT) MIME-Version: 1.0 References: <250c832b-150d-e63a-761c-8ac1666fbd80@redhat.com> <15A82D62E078CF58.4443@groups.io> In-Reply-To: From: "Ard Biesheuvel" Date: Mon, 17 Jun 2019 11:41:29 +0200 Message-ID: Subject: Re: [edk2-devel] [edk2-discuss] WriteSections64() To: Russell Peterson Cc: "discuss@edk2.groups.io" , edk2-devel-groups-io , Laszlo Ersek Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, 15 Jun 2019 at 02:17, Russell Peterson wrote= : > > Here is a sample of the gcc command line: > > "/x/sdk/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64= -poky-linux-gcc" > -I/x/edk2/edk2/MlxPlatformPkg/Include -march=3Darmv8-a+crc -g -fshort-wc= har > -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunc= tion-sections -fdata-sections -incl\ > ude AutoGen.h -fno-common -DSTRING_ARRAY_NAME=3DBaseCryptLibStrings -g -= Os -fshort-wchar -fno-builtin -fno-stri\ > ct-aliasing -Wall -Werror -Wno-array-bounds -include AutoGen.h -fno-comm= on -mlittle-endian -fno-short-enums -\ > fverbose-asm -funsigned-char -ffunction-sections -fdata-sections -Wno-ad= dress -fno-asynchronous-unwind-tables\ > -fno-pic -fno-pie -ffixed-x18 -flto -Wno-unused-but-set-variable -Wno-u= nused-const-variable -mcmodel=3Dtiny -n\ > ostdinc -nostdlib -DUEFI_C_SOURCE -DMDEPKG_NDEBUG -c -o /x/RELEASE_GCC5/= AARCH64/CryptoPkg/Library/ > BaseCryptLib/BaseCryptLib/OUTPUT/Pk/CryptX509.obj <-I include files left= out> /x/edk2/CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c > You are missing the -fno-unwind-tables option. Please make sure that you apply commit cbf00651eda6818ca3c76115b8a18e3f6b23eef4 to your tree. > echo --strip-unneeded -R .eh_frame /x/edk2/Build/RELEASE_GCC5/AARC\ > H64/MdeModulePkg/Universal/Network/DpcDxe/DpcDxe/DEBUG/DpcDxe.dll > --strip-unneeded -R .eh_frame /x/edk2/Build/RELEASE_GCC5/AARCH64/M\ > deModulePkg/Universal/Network/DpcDxe/DpcDxe/DEBUG/DpcDxe.dll > echo /x/edk2/Build/RELEASE_GCC5/AARCH64/MdeModulePkg/Universal/Ne\ > twork/DpcDxe/DpcDxe/DEBUG/DpcDxe.dll > > -----Original Message----- > From: discuss@edk2.groups.io On Behalf Of Russe= ll Peterson via Groups.Io > Sent: Friday, June 14, 2019 5:19 PM > To: Ard Biesheuvel > Cc: edk2-devel-groups-io ; Laszlo Ersek ; discuss@edk2.groups.io > Subject: Re: [edk2-devel] [edk2-discuss] WriteSections64() > > Hello, Ard. > > The tools_def.txt was updated and both the -fno-pie and -fno-pic are spe= cified when executing gcc. I don=E2=80=99t have access to the code at the = moment but I will post the exact gcc command line as soon as I can. > > Regards, > > Russell > > > On Jun 14, 2019, at 3:43 PM, Ard Biesheuvel > wrote: > > On Fri, 14 Jun 2019 at 21:17, Laszlo Ersek > wrote: > > +Ard, +devel > > On 06/13/19 17:29, Russell Peterson wrote: > Hello, > > We are in the process of upgrading our gcc toolchain to gcc 8.3 (from 7.= 3). In the process of doing that we have hit an error building edk2: > > make[2]: *** [/home/x/RELEASE_GCC5/AARCH64/MdeModulePkg/Universal/Networ= k/DpcDxe/DpcDxe/DEBUG/DpcDxe.efi] Error 1 > WriteSections64(): /home/x/RELEASE_GCC5/AARCH64/MdeModulePkg/Universal/= Network/DpcDxe/DpcDxe/DEBUG/DpcDxe.dll AARCH64 relative relocations require= identical ELF and PE/COFF section offsets > > There are multiple errors similar to this issued by GenFw. Our edk2 ver= sion is fairly recent (UDK2018 upstream branch as of commit 10318063b) but = all this did build fine with gcc 7.3. Any clues? > > > Your Conf/tools_def.txt is probably stale, and does not contain the -fno= -pie option we added a while ago. > > >=20 >