This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-devel] [PATCH] don't use weak symbols on x86-64

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] don't use weak symbols on x86-64
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Fri, 07 Jan 2011 14:30:34 +0000
Delivery-date: Fri, 07 Jan 2011 06:31:12 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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 <jbeulich@xxxxxxxxxx>

--- 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;
+#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_id);
 static int __init
 acpi_parse_x2apic_affinity(struct acpi_subtable_header *header,

Attachment: acpi-weak-vs-hidden.patch
Description: Text document

Xen-devel mailing list
<Prev in Thread] Current Thread [Next in Thread>