From: "Jan Beulich" Subject: [PATCH] don't use weak symbols on x86-64 Date: Fri, 07 Jan 2011 14:30:34 +0000 Message-ID: <4D27319A020000780002B056@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__PartBB97DC9A.0__=" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__PartBB97DC9A.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Various gcc versions inline functions that are both weak and hidden, without even giving a warning. Certainly the risk exists that we'll see the problem again when another weak function gets introduced, but I don't see a way to protect us from that. Signed-off-by: Jan Beulich --- a/xen/drivers/acpi/numa.c +++ b/xen/drivers/acpi/numa.c @@ -120,6 +120,8 @@ static int __init acpi_parse_slit(struct return 0; } =20 +#ifndef CONFIG_X86 /* At least gcc 4.3 through 4.5 don't fully honor + weak for functions with non-default visibility. */ void __init __attribute__ ((weak)) acpi_numa_x2apic_affinity_init(struct acpi_srat_x2apic_cpu_affinity *pa) { @@ -127,7 +129,7 @@ acpi_numa_x2apic_affinity_init(struct ac "Found unsupported x2apic [0x%08x] SRAT entry\n", pa->apic_i= d); return; } - +#endif =20 static int __init acpi_parse_x2apic_affinity(struct acpi_subtable_header *header, --=__PartBB97DC9A.0__= Content-Type: text/plain; name="acpi-weak-vs-hidden.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="acpi-weak-vs-hidden.patch" Various gcc versions inline functions that are both weak and hidden,=0Awith= out even giving a warning.=0A=0ACertainly the risk exists that we'll see = the problem again when=0Aanother weak function gets introduced, but I = don't see a way to=0Aprotect us from that.=0A=0ASigned-off-by: Jan Beulich = =0A=0A--- a/xen/drivers/acpi/numa.c=0A+++ b/xen/driver= s/acpi/numa.c=0A@@ -120,6 +120,8 @@ static int __init acpi_parse_slit(struc= t=0A return 0;=0A }=0A =0A+#ifndef CONFIG_X86 /* At least gcc 4.3 = through 4.5 don't fully honor=0A+ weak for functions = with non-default visibility. */=0A void __init __attribute__ ((weak))=0A = acpi_numa_x2apic_affinity_init(struct acpi_srat_x2apic_cpu_affinity = *pa)=0A {=0A@@ -127,7 +129,7 @@ acpi_numa_x2apic_affinity_init(struct = ac=0A "Found unsupported x2apic [0x%08x] SRAT entry\n", pa->apic_i= d);=0A return;=0A }=0A-=0A+#endif=0A =0A static int __init=0A acpi_parse_x= 2apic_affinity(struct acpi_subtable_header *header,=0A --=__PartBB97DC9A.0__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=__PartBB97DC9A.0__=--