libport: Mark internal functions and data tables as hidden.
Francois Gouget
fgouget at free.fr
Tue Mar 1 05:45:51 CST 2016
On Tue, 1 Mar 2016, Alexandre Julliard wrote:
> Francois Gouget <fgouget at free.fr> writes:
>
> > Removing the DECLSPEC_HIDDEN on wine_digitmap(), wine_compatmap() but
> > also wine_compose() and wine_decompose() fixes this. As far as I can
> > tell the linker considers that hidden symbols are not visible outside
> > the static library.
>
> Do you mean you have to remove it from all 4 symbols? Or only from the
> data tables? Or only from the extern declarations?
I had not tried to remove it only from the externs. It seems to do the
trick, except for wine_decompose() in libs/port/decompose.c where I get
the following error if I don't remove the DECLSPEC_HIDDEN:
gcc -o libwine.so.1.0 casemap.o collation.o config.o debug.o ldt.o loader.o mmap.o port.o sortkey.o string.o \
wctype.o version.o -shared -Wl,-soname,libwine.so.1 ../../libs/port/libwine_port.a -lsocket -lnsl \
Text relocation remains referenced
against symbol offset in file
wine_decompose 0x76 ../../libs/port/libwine_port.a(decompose.o)
I've included what seems to be the minimal patch below:
diff --git a/libs/port/decompose.c b/libs/port/decompose.c
index 34e83ec..3e4a28b 100644
--- a/libs/port/decompose.c
+++ b/libs/port/decompose.c
@@ -747,7 +747,7 @@ static const WCHAR table[4704] =
0x05d1, 0x05bf, 0x05db, 0x05bf, 0x05e4, 0x05bf, 0x0000, 0x0000
};
-unsigned int DECLSPEC_HIDDEN wine_decompose( WCHAR ch, WCHAR *dst, unsigned int dstlen )
+unsigned int wine_decompose( WCHAR ch, WCHAR *dst, unsigned int dstlen )
{
const WCHAR *ptr = table + table[table[ch >> 8] + ((ch >> 4) & 0x0f)] + 2 * (ch & 0xf);
unsigned int res;
diff --git a/libs/port/fold.c b/libs/port/fold.c
index 738469c..87a4a41 100644
--- a/libs/port/fold.c
+++ b/libs/port/fold.c
@@ -22,13 +22,13 @@
static inline WCHAR to_unicode_digit( WCHAR ch )
{
- extern const WCHAR wine_digitmap[] DECLSPEC_HIDDEN;
+ extern const WCHAR wine_digitmap[];
return ch + wine_digitmap[wine_digitmap[ch >> 8] + (ch & 0xff)];
}
static inline WCHAR to_unicode_native( WCHAR ch )
{
- extern const WCHAR wine_compatmap[] DECLSPEC_HIDDEN;
+ extern const WCHAR wine_compatmap[];
return ch + wine_compatmap[wine_compatmap[ch >> 8] + (ch & 0xff)];
}
diff --git a/libs/port/mbtowc.c b/libs/port/mbtowc.c
index fd7764e..9a4bc23 100644
--- a/libs/port/mbtowc.c
+++ b/libs/port/mbtowc.c
@@ -22,7 +22,7 @@
#include "wine/unicode.h"
-extern unsigned int wine_decompose( WCHAR ch, WCHAR *dst, unsigned int dstlen ) DECLSPEC_HIDDEN;
+extern unsigned int wine_decompose( WCHAR ch, WCHAR *dst, unsigned int dstlen );
/* check the code whether it is in Unicode Private Use Area (PUA). */
/* MB_ERR_INVALID_CHARS raises an error converting from 1-byte character to PUA. */
diff --git a/libs/port/utf8.c b/libs/port/utf8.c
index f47561e..5943dda 100644
--- a/libs/port/utf8.c
+++ b/libs/port/utf8.c
@@ -22,7 +22,7 @@
#include "wine/unicode.h"
-extern WCHAR wine_compose( const WCHAR *str ) DECLSPEC_HIDDEN;
+extern WCHAR wine_compose( const WCHAR *str );
/* number of following bytes in sequence based on first byte value (for bytes above 0x7f) */
static const char utf8_length[128] =
diff --git a/libs/port/wctomb.c b/libs/port/wctomb.c
index 65e4aa0..e7f35e5 100644
--- a/libs/port/wctomb.c
+++ b/libs/port/wctomb.c
@@ -22,7 +22,7 @@
#include "wine/unicode.h"
-extern WCHAR wine_compose( const WCHAR *str ) DECLSPEC_HIDDEN;
+extern WCHAR wine_compose( const WCHAR *str );
/****************************************************************/
/* sbcs support */
--
Francois Gouget <fgouget at free.fr> http://fgouget.free.fr/
tcA thgirypoC muinelliM latigiD eht detaloiv tsuj evah uoY
More information about the wine-devel
mailing list