Skip to content
Commit 946bf4b5 authored by Rafaël Carré's avatar Rafaël Carré
Browse files

Functions MC_put_o_16_arm, MC_put_o_8_arm, MC_put_x_16_arm, MC_put_x_8_arm

in libmpeg2/motion_comp_arm_s.S have addresses in .text, which is bad
for shared libraries.  Some environments demand that .text actually be
read-only all the time, yet MC_put_o_16_arm etc require that the addresses
be modified by the dynamic linking mechanism (dlopen, LoadLibrary, etc.)
Even in those environments which permit the dynamic linker to modify the
.text segment, the runtime cost of doing the relocation can be noticeable.

This commit rewrites the linkage, discarding the tables of addresses
in favor of tables of offsets.  All transfers are local within each individual
function, so there can be no interference by processing that occurs
after assembly, such as link-time re-ordering (even of individual functions.)

Patch by John Reiser <jreiser@bitwagon.com>
parent 2ae0353e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment