summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2014-11-03 01:53:17 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2014-11-03 01:53:17 +0100
commit89abef408f02e463cfe9d462fa10be64a94b3b36 (patch)
tree74881e20527766c31b7bb6007fa4e3a26a9adf04
parentbd611d2bbd2a7faa24ce8d3b1a422cebb8f71e8b (diff)
Fix optional definitions in static binaries
* libcons/extra-version.c (cons_extra_version): Add weak attribute. * libcons/vcons-add.c (cons_vcons_add): Likewise. * libcons/vcons-remove.c (cons_vcons_remove): Likewise. * libdiskfs/extra-version.c (diskfs_extra_version): Likewise. * libdiskfs/get-source.c (diskfs_get_source): Likewise. * libdiskfs/readonly-changed.c (diskfs_readonly_changed): Likewise. * libdiskfs/sync-default.c (diskfs_default_sync_interval): Likewise. * libdiskfs/validate-author.c (diskfs_validate_author_change): Likewise. * libdiskfs/validate-flags.c (diskfs_validate_flags_change): Likewise. * libdiskfs/validate-group.c (diskfs_validate_group_change): Likewise. * libdiskfs/validate-mode.c (diskfs_validate_mode_change): Likewise. * libdiskfs/validate-owner.c (diskfs_validate_owner_change): Likewise. * libdiskfs/validate-rdev.c (diskfs_validate_rdev_change): Likewise. * libnetfs/file-get-storage-info-default.c (netfs_file_get_storage_info): Likewise. * libnetfs/get-source.c (netfs_get_source): Likewise. * libnetfs/set-get-trans.c (netfs_set_translator, netfs_get_translator): Likewise. * libtrivfs/get-source.c (trivfs_get_source): Likewise.
-rw-r--r--libcons/extra-version.c2
-rw-r--r--libcons/vcons-add.c2
-rw-r--r--libcons/vcons-remove.c2
-rw-r--r--libdiskfs/extra-version.c2
-rw-r--r--libdiskfs/get-source.c2
-rw-r--r--libdiskfs/readonly-changed.c2
-rw-r--r--libdiskfs/sync-default.c2
-rw-r--r--libdiskfs/validate-author.c2
-rw-r--r--libdiskfs/validate-flags.c2
-rw-r--r--libdiskfs/validate-group.c2
-rw-r--r--libdiskfs/validate-mode.c2
-rw-r--r--libdiskfs/validate-owner.c2
-rw-r--r--libdiskfs/validate-rdev.c2
-rw-r--r--libnetfs/file-get-storage-info-default.c2
-rw-r--r--libnetfs/get-source.c2
-rw-r--r--libnetfs/set-get-trans.c4
-rw-r--r--libtrivfs/get-source.c2
17 files changed, 18 insertions, 18 deletions
diff --git a/libcons/extra-version.c b/libcons/extra-version.c
index 4ff54d85..1021c878 100644
--- a/libcons/extra-version.c
+++ b/libcons/extra-version.c
@@ -21,4 +21,4 @@
#include "priv.h"
-char *cons_extra_version = "";
+char *cons_extra_version __attribute__ ((weak)) = "";
diff --git a/libcons/vcons-add.c b/libcons/vcons-add.c
index 1a6eb204..c46f5e07 100644
--- a/libcons/vcons-add.c
+++ b/libcons/vcons-add.c
@@ -24,7 +24,7 @@
/* The virtual console entry VCONS_ENTRY was just added. CONS is
locked. */
-void
+void __attribute__ ((weak))
cons_vcons_add (cons_t cons, vcons_list_t vcons_entry)
{
}
diff --git a/libcons/vcons-remove.c b/libcons/vcons-remove.c
index 34b31d6f..273c5a0f 100644
--- a/libcons/vcons-remove.c
+++ b/libcons/vcons-remove.c
@@ -24,7 +24,7 @@
/* The virtual console VCONS_ENTRY is going to be removed.
VCONS_ENTRY->cons is locked. */
-void
+void __attribute__ ((weak))
cons_vcons_remove (cons_t cons, vcons_list_t vcons_entry)
{
assert (!vcons_entry->vcons);
diff --git a/libdiskfs/extra-version.c b/libdiskfs/extra-version.c
index b1d78084..51920aa7 100644
--- a/libdiskfs/extra-version.c
+++ b/libdiskfs/extra-version.c
@@ -21,4 +21,4 @@
#include "priv.h"
-char *diskfs_extra_version = "";
+char *diskfs_extra_version __attribute__ ((weak)) = "";
diff --git a/libdiskfs/get-source.c b/libdiskfs/get-source.c
index 43994464..2ef8ebcd 100644
--- a/libdiskfs/get-source.c
+++ b/libdiskfs/get-source.c
@@ -21,7 +21,7 @@
#include "priv.h"
-error_t
+error_t __attribute__ ((weak))
diskfs_get_source (struct protid *cred, char *source, size_t source_len)
{
if (diskfs_disk_name == NULL)
diff --git a/libdiskfs/readonly-changed.c b/libdiskfs/readonly-changed.c
index 44ee9225..7a1c03e8 100644
--- a/libdiskfs/readonly-changed.c
+++ b/libdiskfs/readonly-changed.c
@@ -24,7 +24,7 @@
changed from read-only to read-write mode or vice-versa. READONLY is the
new state (which is also reflected in DISKFS_READONLY). This function is
also called during initial startup if the filesystem is to be writable. */
-void
+void __attribute__ ((weak))
diskfs_readonly_changed (int readonly)
{
/* By default do nothing at all. */
diff --git a/libdiskfs/sync-default.c b/libdiskfs/sync-default.c
index 0d1fd93b..9646dd69 100644
--- a/libdiskfs/sync-default.c
+++ b/libdiskfs/sync-default.c
@@ -20,4 +20,4 @@
#include "priv.h"
-int diskfs_default_sync_interval = DEFAULT_SYNC_INTERVAL;
+int diskfs_default_sync_interval __attribute__ ((weak)) = DEFAULT_SYNC_INTERVAL;
diff --git a/libdiskfs/validate-author.c b/libdiskfs/validate-author.c
index d7dacabd..cacfbfa4 100644
--- a/libdiskfs/validate-author.c
+++ b/libdiskfs/validate-author.c
@@ -20,7 +20,7 @@
#include "priv.h"
-error_t
+error_t __attribute__ ((weak))
diskfs_validate_author_change (struct node *np, uid_t author)
{
return 0;
diff --git a/libdiskfs/validate-flags.c b/libdiskfs/validate-flags.c
index bb54dadd..0673ad8a 100644
--- a/libdiskfs/validate-flags.c
+++ b/libdiskfs/validate-flags.c
@@ -20,7 +20,7 @@
#include "priv.h"
-error_t
+error_t __attribute__ ((weak))
diskfs_validate_flags_change (struct node *np, int flags)
{
return 0;
diff --git a/libdiskfs/validate-group.c b/libdiskfs/validate-group.c
index 556c5aaa..ef296ce1 100644
--- a/libdiskfs/validate-group.c
+++ b/libdiskfs/validate-group.c
@@ -20,7 +20,7 @@
#include "priv.h"
-error_t
+error_t __attribute__ ((weak))
diskfs_validate_group_change (struct node *np, gid_t group)
{
return 0;
diff --git a/libdiskfs/validate-mode.c b/libdiskfs/validate-mode.c
index 1cf150e6..bfcc9420 100644
--- a/libdiskfs/validate-mode.c
+++ b/libdiskfs/validate-mode.c
@@ -20,7 +20,7 @@
#include "priv.h"
-error_t
+error_t __attribute__ ((weak))
diskfs_validate_mode_change (struct node *np, mode_t mode)
{
return 0;
diff --git a/libdiskfs/validate-owner.c b/libdiskfs/validate-owner.c
index 0cbe296c..7bb30402 100644
--- a/libdiskfs/validate-owner.c
+++ b/libdiskfs/validate-owner.c
@@ -20,7 +20,7 @@
#include "priv.h"
-error_t
+error_t __attribute__ ((weak))
diskfs_validate_owner_change (struct node *np, uid_t uid)
{
return 0;
diff --git a/libdiskfs/validate-rdev.c b/libdiskfs/validate-rdev.c
index 2d766346..0d506676 100644
--- a/libdiskfs/validate-rdev.c
+++ b/libdiskfs/validate-rdev.c
@@ -20,7 +20,7 @@
#include "priv.h"
-error_t
+error_t __attribute__ ((weak))
diskfs_validate_rdev_change (struct node *np, dev_t rdev)
{
return 0;
diff --git a/libnetfs/file-get-storage-info-default.c b/libnetfs/file-get-storage-info-default.c
index 0ca68c96..4339c7bc 100644
--- a/libnetfs/file-get-storage-info-default.c
+++ b/libnetfs/file-get-storage-info-default.c
@@ -23,7 +23,7 @@
#include <sys/mman.h>
-error_t
+error_t __attribute__ ((weak))
netfs_file_get_storage_info (struct iouser *cred,
struct node *np,
mach_port_t **ports,
diff --git a/libnetfs/get-source.c b/libnetfs/get-source.c
index 73e48be8..5a234bce 100644
--- a/libnetfs/get-source.c
+++ b/libnetfs/get-source.c
@@ -21,7 +21,7 @@
#include "priv.h"
-error_t
+error_t __attribute__ ((weak))
netfs_get_source (struct protid *cred, char *source, size_t source_len)
{
return EOPNOTSUPP;
diff --git a/libnetfs/set-get-trans.c b/libnetfs/set-get-trans.c
index b58668d8..c0a4370e 100644
--- a/libnetfs/set-get-trans.c
+++ b/libnetfs/set-get-trans.c
@@ -28,7 +28,7 @@
/* The user may define this function. Attempt to set the passive
translator record for FILE to ARGZ (of length ARGZLEN) for user
CRED. */
-error_t
+error_t __attribute__ ((weak))
netfs_set_translator (struct iouser *cred, struct node *np,
char *argz, size_t argzlen)
{
@@ -40,7 +40,7 @@ netfs_set_translator (struct iouser *cred, struct node *np,
mode, look up the name of its translator. Store the name into newly
malloced storage, and return it in *ARGZ; set *ARGZ_LEN to the total
length. */
-error_t
+error_t __attribute__ ((weak))
netfs_get_translator (struct node *node, char **argz, size_t *argz_len)
{
return EOPNOTSUPP;
diff --git a/libtrivfs/get-source.c b/libtrivfs/get-source.c
index 2605dacc..1b3ce11d 100644
--- a/libtrivfs/get-source.c
+++ b/libtrivfs/get-source.c
@@ -21,7 +21,7 @@
#include "priv.h"
-error_t
+error_t __attribute__ ((weak))
trivfs_get_source (struct trivfs_protid *cred, char *source, size_t source_len)
{
return EOPNOTSUPP;