summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2007-10-02 09:08:08 +0000
committerNils Wallménius <nils@rockbox.org>2007-10-02 09:08:08 +0000
commit605949d48239551f721f5e8110d5f1001a2b2623 (patch)
treeb809945dea13749f8d1881ba50611f6dbfed71d8
parent6d0ee558e86beece998bfa032c06b091cf723355 (diff)
Hide symbols by default on 64 bit sim buildsto avoid clashing, fixes crashing on track change with the same codec, crashing in calculator and text display in midiplay
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14953 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/codecs.h3
-rw-r--r--apps/plugin.h3
-rwxr-xr-xtools/configure5
3 files changed, 8 insertions, 3 deletions
diff --git a/apps/codecs.h b/apps/codecs.h
index 50bc36baa2..a59a791d42 100644
--- a/apps/codecs.h
+++ b/apps/codecs.h
@@ -267,7 +267,8 @@ extern unsigned char plugin_end_addr[];
#else /* def SIMULATOR */
/* decoders */
#define CODEC_HEADER \
- const struct codec_header __header = { \
+ const struct codec_header __header \
+ __attribute__((visibility("default"))) = { \
CODEC_MAGIC, TARGET_ID, CODEC_API_VERSION, \
NULL, NULL, codec_start };
/* encoders */
diff --git a/apps/plugin.h b/apps/plugin.h
index 5f868e5654..5f98f951e6 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -655,7 +655,8 @@ extern unsigned char plugin_end_addr[];
plugin_start_addr, plugin_end_addr, plugin_start };
#else /* SIMULATOR */
#define PLUGIN_HEADER \
- const struct plugin_header __header = { \
+ const struct plugin_header __header \
+ __attribute__((visibility("default"))) = { \
PLUGIN_MAGIC, TARGET_ID, PLUGIN_API_VERSION, \
NULL, NULL, plugin_start };
#endif /* SIMULATOR */
diff --git a/tools/configure b/tools/configure
index ec0fa02aca..5311c64f55 100755
--- a/tools/configure
+++ b/tools/configure
@@ -134,7 +134,10 @@ simcc () {
esac
if [ "`uname -m`" = "x86_64" ] || [ "`uname -m`" = "amd64" ]; then
- GCCOPTS="$GCCOPTS -fPIC" # needed to make shared objects link
+ # fPIC is needed to make shared objects link
+ # setting visibility to hidden is necessary to avoid strange crashes
+ # due to symbol clashing
+ GCCOPTS="$GCCOPTS -fPIC -fvisibility=hidden"
fi
GCCOPTS="$GCCOPTS -I\$(SIMDIR)"