From: Thomas Garnier Subject: [PATCH v1 13/27] x86/boot/64: Use _text in a global for PIE support Date: Wed, 11 Oct 2017 13:30:13 -0700 Message-ID: <20171011203027.11248-14-thgarnie@google.com> References: <20171011203027.11248-1-thgarnie@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Cc: linux-arch@vger.kernel.org, kvm@vger.kernel.org, linux-pm@vger.kernel.org, x86@kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-sparse@vger.kernel.org, linux-crypto@vger.kernel.org, kernel-hardening@lists.openwall.com, xen-devel@lists.xenproject.org To: Herbert Xu , "David S . Miller" , Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , Peter Zijlstra , Josh Poimboeuf , Arnd Bergmann , Thomas Garnier , Kees Cook , Andrey Ryabinin , Matthias Kaehlcke , Tom Lendacky , Andy Lutomirski , "Kirill A . Shutemov" , Borislav Petkov , "Rafael J . Wysocki" , Len Brown , Pavel Machek , Juergen Gross , Chris Wright , Alok Kataria , Rusty Russell , Tejun Heo In-Reply-To: <20171011203027.11248-1-thgarnie@google.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" List-Id: linux-crypto.vger.kernel.org QnkgZGVmYXVsdCBQSUUgZ2VuZXJhdGVkIGNvZGUgY3JlYXRlIG9ubHkgcmVsYXRpdmUgcmVmZXJl bmNlcyBzbyBfdGV4dApwb2ludHMgdG8gdGhlIHRlbXBvcmFyeSB2aXJ0dWFsIGFkZHJlc3MuIElu c3RlYWQgdXNlIGEgZ2xvYmFsIHZhcmlhYmxlCnNvIHRoZSByZWxvY2F0aW9uIGlzIGRvbmUgYXMg ZXhwZWN0ZWQuCgpQb3NpdGlvbiBJbmRlcGVuZGVudCBFeGVjdXRhYmxlIChQSUUpIHN1cHBvcnQg d2lsbCBhbGxvdyB0byBleHRlbmRlZCB0aGUKS0FT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