Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37780179
en ru br
Репозитории ALT

Группа :: Разработка/Прочее
Пакет: lua5.1

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: lua5.1-5.1.5-alt-at-symbol-map.patch
Скачать


commit 0b48e2ea2e11c3fc73bb3ca3215f5642d9411c27
Author: Alexey Tourbin <at@altlinux.ru>
Date:   Wed Oct 11 01:53:19 2006 +0400
    deal with symbol visibility
    
    Lua uses __attribute__((visibility("hidden"))) to hide non-public API
    symbols in the shared library.  However, luac compiler uses some bits of
    internal API, so I had to link it statically with liblua.a.
    
    To avoid static linking, I introduce version script with LUAC_PRIVATE
    interface.  It exposes exactly those bits of internal API which are
    sufficient to link luac.  Other bits are hidden with lua[^Lo_] pattern,
    since the library should only export lua_*, luaL_*, and luaopen_* symbols.
    (And there's no at all symbols which do not match lua*.)
 lua5.spec:
  -gcc -shared -o liblua%soffix -Wl,-soname=liblua%soffix -Wl,-z,defs *.o -lm -ldl
  +gcc -shared -o liblua%soffix -Wl,-soname=liblua%soffix -Wl,--version-script=liblua.map -Wl,-z,defs *.o -lm -ldl
diff --git a/src/liblua.map b/src/liblua.map
new file mode 100644
index 0000000..7c60f53
--- /dev/null
+++ b/src/liblua.map
@@ -0,0 +1,13 @@
+LUAC_PRIVATE {
+    global:
+	luaD_growstack;
+	luaF_newproto;
+	luaM_realloc_;
+	luaM_toobig;
+	luaP_opmodes;
+	luaP_opnames;
+	luaS_newlstr;
+	luaU_dump;
+    local:
+	lua[^Lo_]*;
+};
diff --git a/src/luaconf.h b/src/luaconf.h
index 3b939b8..8b370f6 100644
--- a/src/luaconf.h
+++ b/src/luaconf.h
@@ -178,7 +190,10 @@
 ** (versions 3.2 and later) mark them as "hidden" to optimize access
 ** when Lua is compiled as a shared library.
 */
-#if defined(luaall_c)
+#if 1
+#define LUAI_FUNC	extern
+#define LUAI_DATA	extern
+#elif defined(luaall_c)
 #define LUAI_FUNC	static
 #define LUAI_DATA	/* empty */
 
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin