Projects
Essentials
xvid
remove-.rotext.patch
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File remove-.rotext.patch of Package xvid (Revision 11)
Currently displaying revision
11
,
Show latest
From: Jiri Slaby <jslaby@suse.cz> Subject: remove .rotext section Patch-mainline: haven't tried to submit avidemux and others crash right when the initialization routine of xvid (xvid_global) is called: > #0 0x00007fffde18d920 in check_cpu_features () from /usr/lib64/libxvidcore.so.4 > #1 0x00007fffde1070db in detect_cpu_flags () at ../../src/xvid.c:156 > #2 0x00007fffde1081e5 in xvid_gbl_init (init=0x7fffffffd304, init=0x7fffffffd304) at ../../src/xvid.c:793 > #3 xvid_global (handle=<optimized out>, opt=<optimized out>, param1=0x7fffffffd304, param2=<optimized out>) at ../../src/xvid.c:816 ... It is because xvid tries to call a function written in assembly and the authors decided to put it in a section called .rotext. The same as other assembly functions: 15 .rotext 00022f69 0000000000075140 0000000000075140 00075140 2**5 CONTENTS, ALLOC, LOAD, READONLY, DATA As can be seen, it is marked as DATA and not CODE, so it ends up in data program headers without permissions to execute it: LOAD 0x000000000006a000 0x000000000006a000 0x000000000006a000 0x0000000000035070 0x0000000000035070 R 0x1000 ... Section to Segment mapping: Segment Sections... 02 .rodata .rotext .eh_frame_hdr .eh_frame So kill .rotext which is no "standard" section and use .text as usual. Note that .text *is* read-only in any way: LOAD 0x0000000000002000 0x0000000000002000 0x0000000000002000 0x000000000008a1d5 0x000000000008a1d5 R E 0x1000 This could work in the past versions of binutils/nasm, but not with my: binutils-2.31 nasm-2.13.03 --- src/nasm.inc | 8 -------- 1 file changed, 8 deletions(-) --- a/src/nasm.inc +++ b/src/nasm.inc @@ -175,15 +175,7 @@ BITS 32 %endmacro %macro TEXT 0 -%ifidn __OUTPUT_FORMAT__,macho32 SECTION .text align=SECTION_ALIGN -%else -%ifidn __OUTPUT_FORMAT__,macho64 - SECTION .text align=SECTION_ALIGN -%else - SECTION .rotext align=SECTION_ALIGN -%endif -%endif %endmacro %macro cglobal 1
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.