Skip to content
  • Rafaël Carré's avatar
    Functions MC_put_o_16_arm, MC_put_o_8_arm, MC_put_x_16_arm, MC_put_x_8_arm · 946bf4b5
    Rafaël Carré authored
    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>
    946bf4b5