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=BTDpOdgt; spf=pass (domain: linaro.org, ip: 209.85.221.67, mailfrom: leif.lindholm@linaro.org) Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by groups.io with SMTP; Thu, 05 Sep 2019 10:16:48 -0700 Received: by mail-wr1-f67.google.com with SMTP id h7so3668726wrt.13 for ; Thu, 05 Sep 2019 10:16:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ZNp2M+118lRWGSwkz9q4B+5H0Aa2VOmr6dJXycKSSTA=; b=BTDpOdgtU+YziJymoUXyrWniwF3mV7+DWiVawuznYEt6gtdrtGL6txnaDku2P0UApX iTtYSpyRf0inVCKbJLAzvHuLRhYBPAOq9+hoDE7715U6bGiZHGKLFtGE60nLo8xD8oqm 9qZDajO6pLp5QSD2tLtOlKwr4gnZzNQBDZ3Ij2BOmlMKM5B4qFfaYBqpqyPFTZL0CAa8 Lz04+ygKv1nNOtszLvNa9bsoFd3zOPmrWR95U5D8pQbSdWExyA6VyU2obPCDddjYQ4f0 A0UDZKBUwEUlKEq76nT/Lq/uZXAvmSLsBU3lxhuU3BICVUid3AkytzyCZ7v3+XkoxO7t 3SBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ZNp2M+118lRWGSwkz9q4B+5H0Aa2VOmr6dJXycKSSTA=; b=F2hsHid0lTVvWMhcvADlnhdBMoqY2fdmOx5b78GCUwlL6FP2MUsU8yZBKzFj6GXwbv H8zTA3rPH8Blt1xtIAlORL0gjfPB2zDjwRgCMCrB2efaQLiKrgQKgMdQ+WLXkk8/cKFg z7fWCn6gHg2ZOUVT6uoGbwVCpPQW9EgVEg5GvAja+taSI+M1bwXwit8iED6JlOA0GYQ/ 9yRZwonJrHk27jqBb1Pk98x8uwFhc9wEz0H8aJgf5fnq2CIk1O/R/t39TrbazGWSkOTs T+nm7K1i1g7+CrDxKXMHUBCfnqvPnNXsPpkEhfACSOM3k0GMq9dKI/uVc1FuSMc10bMr P9tQ== X-Gm-Message-State: APjAAAWVxkyW/PGY0o/FrEyTn5K9C1J3geegMO/xN5+H/cEkTPEI8GIA 0LRZw5Dw8FXAzikS2hKiyRv/FK3r0uc= X-Google-Smtp-Source: APXvYqwY2PDJyONdeQWKxx9WJL5YGcpqMV51Zy1pwhCnLA8pkcOjFRP0vHoUqynEgDyfsp+zvkZdrg== X-Received: by 2002:adf:ec41:: with SMTP id w1mr3824218wrn.215.1567703807225; Thu, 05 Sep 2019 10:16:47 -0700 (PDT) Return-Path: Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id u68sm4869421wmu.12.2019.09.05.10.16.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2019 10:16:46 -0700 (PDT) Date: Thu, 5 Sep 2019 18:16:45 +0100 From: "Leif Lindholm" To: Ard Biesheuvel Cc: edk2-devel-groups-io , Laszlo Ersek Subject: Re: [PATCH] ArmVirtPkg/ArmVirtPrePiUniCoreRelocatable: revert to PIE linking Message-ID: <20190905171645.GQ29255@bivouac.eciton.net> References: <20190904230423.24661-1-ard.biesheuvel@linaro.org> <20190905141923.GX29255@bivouac.eciton.net> <20190905155556.GD29255@bivouac.eciton.net> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Sep 05, 2019 at 10:06:56AM -0700, Ard Biesheuvel wrote: > On Thu, 5 Sep 2019 at 08:55, Leif Lindholm wrote: > > > > On Thu, Sep 05, 2019 at 07:25:39AM -0700, Ard Biesheuvel wrote: > > > > > [BuildOptions] > > > > > - GCC:*_*_*_DLINK_FLAGS = -shared -Wl,-Bsymbolic -Wl,-T,$(MODULE_DIR)/Scripts/PrePi-PIE.lds > > > > > + GCC:*_*_*_DLINK_FLAGS = -Wl,-Bsymbolic,-pie,-T,$(MODULE_DIR)/Scripts/PrePi-PIE.lds > > > > > > > > We already merged a fix for AARCH64 though - could/should this be > > > > active on ARM only? > > > > > > > > A problem I have with this patch is that ArmVirtQemuKernel curently > > > > doesn't boot on my qemu (with/without kvm, built with GCC5 or CLANG38, > > > > with or without this patch): > > > > ProcessPciHost: Config[0x4010000000+0x10000000) Bus[0x0..0xFF] > > > > Io[0x0+0x10000)@0x3EFF0000 Mem32[0x10000000+0x2EFF0000)@0x0 > > > > Mem64[0x8000000000+0x8000000000)@0x0 > > > > MapGcdMmioSpace: failed to set memory space attributes for region > > > > [0x4010000000+0x10000000) > > > > > > > > ASSERT_EFI_ERROR (Status = Unsupported) > > > > ASSERT [PciHostBridgeDxe] > > > > /work/git/edk2/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c(293): > > > > !EFI_ERROR (Status) > > > > qemu-system-arm: terminating on signal 15 from pid 4680 (killall) > > > > > > > > > > Does it work with -M virt,highmem=off ? > > > > Ah, yes - that works fine then, also with the patch. > > > > Well, with that, and your explanation in the other thread: > > Acked-by: Leif Lindholm > > Thanks. I am going to replace the last paragraph of the commit log with > > Note that in this particular case, we are interested in PIE linking > only (i.e., producing a .rela section containing dynamic relocations > that the startup code can process directly), and not in position > independent code generation, and by passing the -pie option to the > linker directly using -Wl,-pie (and dropping -shared), we can coerce > the GOLD linker into doing only the former rather than both when it > performs its LTO code generation. > > and push (unless you have any objections) No objections. / Leif