seamonkey: apply kettenis's fft.asm fix. Also set USE_NOEXECONLY since

the embedded skia does some embedded assembly stuff that is not easy
neuter and makes seamonkey completely broken on PKU machines.
This commit is contained in:
tb 2023-01-28 09:41:49 +00:00
parent be873f0ff9
commit 7dbeabb708
2 changed files with 46 additions and 1 deletions

View File

@ -1,5 +1,7 @@
BROKEN-aarch64 = third_party/rust/libc/src/lib.rs: error[E0412]: cannot find type 'c_long' in this scope
USE_NOEXECONLY = Yes
COMMENT-main = Mozilla application suite
COMMENT-lightning = Mozilla Seamonkey calendar extension
ONLY_FOR_ARCHS = amd64 i386 aarch64
@ -13,7 +15,7 @@ MULTI_PACKAGES = -main -lightning
PKGNAME-main = ${PKGNAME}
PKGNAME-lightning = lightning-seamonkey-5.8.15
EPOCH-lightning = 0
REVISION-main = 0
REVISION-main = 1
HOMEPAGE = https://www.seamonkey-project.org/

View File

@ -0,0 +1,43 @@
The x86 assembly FFT implementation uses dispatch tables in .text. This is
incompatible with x-only so move them into .data.rel.ro where we can have
relocations. But since they are in the RELRO segment they will be made
read-only by ld.so after relocations have been processed.
Index: media/ffvpx/libavcodec/x86/fft.asm
--- media/ffvpx/libavcodec/x86/fft.asm.orig
+++ media/ffvpx/libavcodec/x86/fft.asm
@@ -548,10 +548,6 @@ DEFINE_ARGS zc, w, n, o1, o3
%macro FFT_DISPATCH 2; clobbers 5 GPRs, 8 XMMs
lea r2, [dispatch_tab%1]
mov r2, [r2 + (%2q-2)*gprsize]
-%ifdef PIC
- lea r3, [$$]
- add r2, r3
-%endif
call r2
%endmacro ; FFT_DISPATCH
@@ -731,12 +727,6 @@ DECL_PASS pass_interleave_3dnow, PASS_BIG 0
%define pass_interleave_3dnowext pass_interleave_3dnow
%endif
-%ifdef PIC
-%define SECTION_REL - $$
-%else
-%define SECTION_REL
-%endif
-
%macro DECL_FFT 1-2 ; nbits, suffix
%ifidn %0, 1
%xdefine fullsuffix SUFFIX
@@ -773,8 +763,10 @@ fft %+ n %+ fullsuffix:
%endrep
%undef n
+[SECTION .data.rel.ro write]
align 8
dispatch_tab %+ fullsuffix: pointer list_of_fft
+__?SECT?__
%endmacro ; DECL_FFT
%if HAVE_AVX_EXTERNAL