[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: luaU_dump() and #define LUAI_FUNC __attribute__((visibility("hidden"))) extern
- From: Дилян Палаузов <dilyan.palauzov@...>
- Date: Thu, 04 Apr 2013 00:56:08 +0200
I noticed, that as of lua522 in src/luaconf.h LUAI_FUNC and LUAI_DDEC
expand to __attribute__((visibility("hidden")) .
In lundump.h the function luaU_dump is annotated with LUAI_FUNC aka as
In lopcodes.h the functions luaP_opnames and luaP_opmodes are annotated
with visibility("hidden"), too.
So if liblua was a shared library, the luaU_dumo, luaP_opmodes and
luaP_opcodes would be strictly hidden symbols, that cannot be access out
of liblua .
However, when linking luac.c with (a shared) liblua there is a problem:
luac.c needs the symbols luaU_dump, and via the macros getBMode/getCMode
also the symbols luaP_opcoded and luaP_opmodes. This does not work, as
the latter symbols are not exported from liblua.so .
As luaU_dump(), luaP_opcodes and luaP_opmodes are used out of liblua,
these shall not be marked with visibility("hidden") in the respective .h
files. I kindly ask you to fix that.