don't use weak symbols on x86-64
PATCH 1/1 don't use weak symbols on x86-64
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.
xen/drivers/acpi/numa.c +3 -1
@@ -120,6 +120,8 @@ static int __init acpi_parse_slit(structreturn 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);return ; } - +#endif static int __init acpi_parse_x2apic_affinity(struct acpi_subtable_header *header,
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.
xen/drivers/acpi/numa.c +3 -1
@@ -120,6 +120,8 @@ static int __init acpi_parse_slit(structreturn 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);return ; } - +#endif static int __init acpi_parse_x2apic_affinity(struct acpi_subtable_header *header,
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
We should just disallow use of weak definitions. Your patch plus removing this one weak attribute achieves that just fine.
-- Keir
Quoted 36 lines · Jan Beulich
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 <[email protected]>xen/drivers/acpi/numa.c +3
-1@@ -120,6 +120,8 @@ static int __init acpi_parse_slit(structreturn 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);return ; } - +#endif static int __init acpi_parse_x2apic_affinity(struct acpi_subtable_header *header,_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel