From: Thomas Garnier Subject: [RFC 17/22] compiler: Option to default to hidden symbols Date: Tue, 18 Jul 2017 15:33:28 -0700 Message-ID: <20170718223333.110371-18-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 UHJvdmlkZSBhbiBvcHRpb24gdG8gZGVmYXVsdCB2aXNpYmlsaXR5IHRvIGhpZGRlbiBleGNlcHQg Zm9yIGtleQpzeW1ib2xzLiBUaGlzIG9wdGlvbiBpcyBkaXNhYmxlZCBieSBkZWZhdWx0IGFuZCB3 aWxsIGJlIHVzZWQgYnkgeDg2XzY0ClBJRSBzdXBwb3J0IHRvIHJlbW92ZSBlcnJvcnMgYmV0d2Vl biBjb21waWxhdGlvbiB1bml0cy4KClNpZ25lZC1vZmYtYnk6IFRob21hcyBHYXJuaWVyIDx0aGdh cm5pZUBnb29nbGUuY29tPgotLS0KIGFyY2gveDg2L2Jvb3QvYm9vdC5oIC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