Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F159226400
D29495.id86557.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D29495.id86557.diff
View Options
Index: lib/libkvm/kvm.c
===================================================================
--- lib/libkvm/kvm.c
+++ lib/libkvm/kvm.c
@@ -64,7 +64,7 @@
#include "kvm_private.h"
-SET_DECLARE(kvm_arch, struct kvm_arch);
+SET_DECLARE_WEAK(kvm_arch, struct kvm_arch);
static char _kd_is_null[] = "";
Index: sys/dev/uart/uart_cpu_acpi.h
===================================================================
--- sys/dev/uart/uart_cpu_acpi.h
+++ sys/dev/uart/uart_cpu_acpi.h
@@ -62,7 +62,7 @@
* If your UART driver implements uart_class and custom device layer,
* then use UART_ACPI_CLASS for its declaration
*/
-SET_DECLARE(uart_acpi_class_set, struct acpi_uart_compat_data);
+SET_DECLARE_WEAK(uart_acpi_class_set, struct acpi_uart_compat_data);
#define UART_ACPI_CLASS(data) \
DATA_SET(uart_acpi_class_set, data)
Index: sys/dev/uart/uart_cpu_fdt.h
===================================================================
--- sys/dev/uart/uart_cpu_fdt.h
+++ sys/dev/uart/uart_cpu_fdt.h
@@ -46,7 +46,7 @@
* If your UART driver implements uart_class and custom device layer,
* then use UART_FDT_CLASS for its declaration
*/
-SET_DECLARE(uart_fdt_class_set, struct ofw_compat_data );
+SET_DECLARE_WEAK(uart_fdt_class_set, struct ofw_compat_data );
#define UART_FDT_CLASS(data) \
DATA_SET(uart_fdt_class_set, data)
Index: sys/sys/linker_set.h
===================================================================
--- sys/sys/linker_set.h
+++ sys/sys/linker_set.h
@@ -84,7 +84,12 @@
/*
* Initialize before referring to a given linker set.
*/
-#define SET_DECLARE(set, ptype) \
+#define SET_DECLARE(set, ptype) \
+ extern ptype *__CONCAT(__start_set_,set); \
+ extern ptype *__CONCAT(__stop_set_,set)
+
+/* Like SET_DECLARE() but also marks the symbols weak to support empty sets. */
+#define SET_DECLARE_WEAK(set, ptype) \
extern ptype __weak_symbol *__CONCAT(__start_set_,set); \
extern ptype __weak_symbol *__CONCAT(__stop_set_,set)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jun 12, 1:52 PM (2 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33908890
Default Alt Text
D29495.id86557.diff (1 KB)
Attached To
Mode
D29495: sys/linker_set.h: Add SET_DECLARE_WEAK()
Attached
Detach File
Event Timeline
Log In to Comment