summaryrefslogtreecommitdiff
path: root/core/fs/fs.c
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2012-12-04 21:17:47 +0000
committerMatt Fleming <matt.fleming@intel.com>2012-12-05 22:41:32 +0000
commite4b3ce2dd82ce2da85c37fd3f332ec2eb802b734 (patch)
tree8b98440a37716dab0bd4de8b87a3800e5a40b07b /core/fs/fs.c
parenta79ceb45909434d392aacbb92eb2dfa738479783 (diff)
downloadsyslinux-e4b3ce2dd82ce2da85c37fd3f332ec2eb802b734.tar.gz
Symbol export whitelist
Before modules were dynamically loaded the boundary between GPL and non-GPL code was implicit because of the separate link domains for each module. With dynamic modules we need an explicit whitelist of core symbols that non-GPL code can link against at runtime without needing to be re-licensed under the GPL. Mark such symbols with __export, so that it is explicitly clear which symbols in the core can be linked against by non-GPL code. Reduce the visibility of symbols in both the core and ldlinux.c32 with -fvisibility=hidden. __export changes the visibility to 'default'. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'core/fs/fs.c')
-rw-r--r--core/fs/fs.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/core/fs/fs.c b/core/fs/fs.c
index c85e132d..2ad33755 100644
--- a/core/fs/fs.c
+++ b/core/fs/fs.c
@@ -9,13 +9,13 @@
#include "fs.h"
#include "cache.h"
-char *PATH;
+__export char *PATH;
/* The currently mounted filesystem */
-struct fs_info *this_fs = NULL; /* Root filesystem */
+__export struct fs_info *this_fs = NULL; /* Root filesystem */
/* Actual file structures (we don't have malloc yet...) */
-struct file files[MAX_OPEN];
+__export struct file files[MAX_OPEN];
/* Symlink hard limits */
#define MAX_SYMLINK_CNT 20
@@ -74,7 +74,7 @@ static inline void free_file(struct file *file)
memset(file, 0, sizeof *file);
}
-void _close_file(struct file *file)
+__export void _close_file(struct file *file)
{
if (file->fs)
file->fs->fs_ops->close_file(file);
@@ -84,7 +84,7 @@ void _close_file(struct file *file)
/*
* Find and open the configuration file
*/
-int open_config(void)
+__export int open_config(void)
{
int fd, handle;
struct file_info *fp;
@@ -116,7 +116,7 @@ void pm_mangle_name(com32sys_t *regs)
mangle_name(dst, src);
}
-void mangle_name(char *dst, const char *src)
+__export void mangle_name(char *dst, const char *src)
{
this_fs->fs_ops->mangle_name(dst, src);
}
@@ -415,7 +415,7 @@ err_no_close:
return -1;
}
-int open_file(const char *name, struct com32_filedata *filedata)
+__export int open_file(const char *name, struct com32_filedata *filedata)
{
int rv;
struct file *file;
@@ -465,7 +465,7 @@ void pm_open_file(com32sys_t *regs)
}
}
-void close_file(uint16_t handle)
+__export void close_file(uint16_t handle)
{
struct file *file;