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=nG+CPIvU; spf=pass (domain: linaro.org, ip: 209.85.221.68, mailfrom: ard.biesheuvel@linaro.org) Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by groups.io with SMTP; Thu, 05 Sep 2019 10:19:17 -0700 Received: by mail-wr1-f68.google.com with SMTP id s18so3716454wrn.1 for ; Thu, 05 Sep 2019 10:19:17 -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; bh=94qSO/yRZip9UXySraYzVP87zDHbYybMsNE4a9oJrt4=; b=nG+CPIvUWARIS1YDHR/mo2hSMAHHQIoGVMFHBAaBwXf4m3hlXFsq2NFZDkmvl6/W0T PY3XE47iQgdGif/ZSzPR6uXUl8oesdjLEzPKEXHjyECDyuePKDJjm7JGRnABKMSJfJoL gJX33f27RIYZWzGbjV0mCE5M0/VxIQ3bBlvN6IGJ0rint2lEznChkVCSsZhcp3LanIuo G16LGvzj4rZJTgOYur3ohcZYXWqM3oVNtqGcE12RxkSa548V5USCoRI3wpesc6h4QNFo nVNNQimN7SqxYsnsmyqg2k71AVgYqFfd22sludCAuhjvrYNwGbEFQpxBJegrcAaefzqq ipeQ== 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; bh=94qSO/yRZip9UXySraYzVP87zDHbYybMsNE4a9oJrt4=; b=GpSajdwfxaudei/N2bNvqtaaeU80aeLuu1uVp9CFzfZgLHDjGMbjBRBFn+hBT0Jfk/ kwNJxOKqnMOGA4NH7UMSozWcfAQzY83wu8GFQzybXTvVnrfZ/PpJevJI678R9LgFZ13p ekyTqEI8+YO/vY8sk25UECAT4hvxTD1cQEjn9QSK7G4TWAq/yrkd9op9T3M8dcDvyE83 SFHHcMog45kYMAgJmfqjxGr9hFpFk5loz9Bashr4WwCXtMmS8QquCsG+BKzsMb7pcwIO zuLfU/vBgZUTiTPODLMP4mdPDhKCMY5u/KxLtN1lpQX2XSQnQolrt5q7K1xLhAFfN6gx ZlAA== X-Gm-Message-State: APjAAAUWui1x7LwXSykhTzU0CrHFaUziFsyc77qfq6/axuQPRPSfR4Wx WltV7Mm8l/JsMeGZvFuJ3d3mb2FhaxuQOQFyfEKWGQ== X-Google-Smtp-Source: APXvYqyDRM6BIS162Rotj7toPIXXgJxmL1X/HC7QOeZ3GlogGat9djl/Fkw6A/ckd5cS5/xWu2GLJ7NSxOsOvN5mvk8= X-Received: by 2002:adf:fa0a:: with SMTP id m10mr3381250wrr.174.1567703955978; Thu, 05 Sep 2019 10:19:15 -0700 (PDT) MIME-Version: 1.0 References: <20190904230423.24661-1-ard.biesheuvel@linaro.org> <20190905141923.GX29255@bivouac.eciton.net> <20190905155556.GD29255@bivouac.eciton.net> <20190905171645.GQ29255@bivouac.eciton.net> In-Reply-To: <20190905171645.GQ29255@bivouac.eciton.net> From: "Ard Biesheuvel" Date: Thu, 5 Sep 2019 10:19:02 -0700 Message-ID: Subject: Re: [PATCH] ArmVirtPkg/ArmVirtPrePiUniCoreRelocatable: revert to PIE linking To: Leif Lindholm Cc: edk2-devel-groups-io , Laszlo Ersek Content-Type: text/plain; charset="UTF-8" On Thu, 5 Sep 2019 at 10:16, Leif Lindholm wrote: > > 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. > Thanks Pushed as 8a1305a11f3b..04d9d89b7dd4