forked from pool/nodejs-electron
- New upstream release 27.1.3 * Chromium 118.0.5993.159 * Fix integer overflow in Skia (CVE-2023-6345) * Fix use after free in WebAudio (CVE-2023-6346) * Fix use after free in Mojo (CVE-2023-6347) * [Leap and Fedora only] Fix use after free in avif (CVE-2023-6350 bsc#1217614) - Hide more private symbols in trap-handler (v8-hide-private-symbols.patch) OBS-URL: https://build.opensuse.org/request/show/1130365 OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-electron?expand=0&rev=116
44 lines
1.6 KiB
Diff
44 lines
1.6 KiB
Diff
Do not export v8 symbols that are used only in unit tests but not exposed in headers.
|
|
This reduces the size of the electron binary by 2MB.
|
|
|
|
--- src/v8/src/base/macros.h.old 2023-09-29 08:54:55.701965801 +0200
|
|
+++ src/v8/src/base/macros.h 2023-10-03 11:54:02.305086047 +0200
|
|
@@ -399,13 +399,18 @@ bool is_inbounds(float_t v) {
|
|
|
|
// Setup for Linux shared library export.
|
|
#if V8_HAS_ATTRIBUTE_VISIBILITY
|
|
+#if defined(HIDE_PRIVATE_SYMBOLS)
|
|
+#define V8_EXPORT_PRIVATE __attribute__((visibility("hidden")))
|
|
+#define V8_EXPORT_ENUM V8_EXPORT_PRIVATE
|
|
+#else
|
|
#ifdef BUILDING_V8_SHARED
|
|
#define V8_EXPORT_PRIVATE __attribute__((visibility("default")))
|
|
#define V8_EXPORT_ENUM V8_EXPORT_PRIVATE
|
|
#else
|
|
#define V8_EXPORT_PRIVATE
|
|
#define V8_EXPORT_ENUM
|
|
#endif
|
|
+#endif // HIDE_PRIVATE_SYMBOLS
|
|
#else
|
|
#define V8_EXPORT_PRIVATE
|
|
#define V8_EXPORT_ENUM
|
|
|
|
|
|
This should also be hidden, see https://github.com/electron/electron/pull/40624
|
|
--- src/v8/src/trap-handler/trap-handler.h.orig 2023-11-22 21:11:42.771625500 +0100
|
|
+++ src/v8/src/trap-handler/trap-handler.h 2023-11-30 20:57:23.411956500 +0100
|
|
@@ -54,11 +54,11 @@ namespace trap_handler {
|
|
#if defined(BUILDING_V8_SHARED) && defined(V8_OS_WIN)
|
|
#define TH_EXPORT_PRIVATE __declspec(dllexport)
|
|
#elif defined(BUILDING_V8_SHARED)
|
|
-#define TH_EXPORT_PRIVATE __attribute__((visibility("default")))
|
|
+#define TH_EXPORT_PRIVATE __attribute__((visibility("hidden")))
|
|
#elif defined(USING_V8_SHARED) && defined(V8_OS_WIN)
|
|
#define TH_EXPORT_PRIVATE __declspec(dllimport)
|
|
#else
|
|
-#define TH_EXPORT_PRIVATE
|
|
+#define TH_EXPORT_PRIVATE __attribute__((visibility("hidden")))
|
|
#endif
|
|
|
|
#define TH_CHECK(condition) \
|