From: Thomas Garnier Subject: [RFC 15/22] x86/boot/64: Use _text in a global for PIE support Date: Tue, 18 Jul 2017 15:33:26 -0700 Message-ID: <20170718223333.110371-16-thgarnie@google.com> References: <20170718223333.110371-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-kernel@vger.kernel.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 , Thomas Garnier , Arnd Bergmann , Matthias Kaehlcke , Boris Ostrovsky , Juergen Gross , Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= , Joerg Roedel , Andy Lutomirski , Borislav Petkov , "Kirill A . Shutemov" , Brian Gerst , Borislav Petkov , Christian Borntraeger , "Rafael J . Wysocki" , Len Brown In-Reply-To: <20170718223333.110371-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 d2lsbCBhbGxvdyB0byBleHRlbmRlZCB0aGUKS0FTTFIg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