[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 5/7] xen/riscv: introduce trap_init()
- To: Julien Grall <julien@xxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Wed, 22 Mar 2023 15:02:28 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=HRC3egg895XQ6epe8HYrwV5FDZq5DbMujKQ7impg4Kk=; b=DqndOjmySMUkfjDUZuflOEbqbMIB8kAWC2syr1EmXCgNpUz5XI2QIYWFwdVoYevLeiWOHYeS/ZaOr3gGo5hJaoRDb8wRAAk+Yj/FhQ5P4dRmkRw5E25NxRIGK//iT1Pmgh4bGaThgic5rfZp50cJ/UBdb0wa2aoFNhejQW9i7IVSt1PlIbkqKXXAcDr34akkd6TgjgShgR0AO9TKbl41r/p4++ISt3i3WvrIJxUL1iSKaw2ecwl2wn6yQqYLe6SmW3vqolO2uO23mQqqyIKJCjpQ7kOV3F1UUWZQqGa7NFAxrSkXQIo2WdmarM6Rxa8JfkuTDPQGh9PiPqkYTbzKdg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EW7nHn/wKgigz9/HmI+niyIg89avRRYXad1lel/Yt8uLjjpnjtCTU3frnNU7kc9uMYEvVZoT5DcJmQZr3BRW4TSzZWbPTpJK+KkcFGzpi34jgzkyY3OhFdSHgLq+rENwZEGRpBOt2GrPnWMuPlF0CU4WdN3AkFMZHDlkGJiEbuZMOiOw5Wmahb3AXczuCGjQq1MC6qDCzi6U76pnFZC6hpxpoViPT9JKw25PvHE2GlAVO87WUyWSBHu8ozOaPW+0lmlEXuf45SDHAHRlQ/rrGMzIbMY+M5C30Ffh5l4o7Xvk/nGv2GD5JWTBbHX6IdU5A4hKyWoOswP8GttBbAVTYA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Gianluca Guida <gianluca@xxxxxxxxxxxx>, Bob Eshleman <bobbyeshleman@xxxxxxxxx>, Alistair Francis <alistair.francis@xxxxxxx>, Connor Davis <connojdavis@xxxxxxxxx>, Oleksii <oleksii.kurochko@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Wed, 22 Mar 2023 14:02:47 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 22.03.2023 14:51, Julien Grall wrote:
> I am a bit puzzled with what you wrote. From my understanding, with
> -noPIE, the compiler would be free to use absolute address rather than
> pc-relative one. Do you have any pointer to documentation that would
> back your reasoning?
It might for RV32 (using lui), but for 64-bit the ISA simply doesn't
have any halfway efficient means to load addresses in other than a
PC-relative manner [1]. -nopie really suppresses the compiler emitting
code going through .got (which then indeed would mean using absolute
addresses). I understand that at least for now RV32 isn't really of
interest; if it were, I guess the concern would be more significant.
Jan
[1] There aren't even suitable relocations to express such in ELF,
because you'd need to have a way to get at the top 32 bits of an
address. The only alternative would be .got-like indirection without
actually using .got.
|