[FFmpeg-devel] [PATCH] Move ff_mkv_codec_tags lie on .rodata even with PIC

Aurelien Jacobs aurel
Mon Jan 7 01:03:28 CET 2008


Diego 'Flameeyes' Petten? wrote:

> 
> The attached patch makes sure that the ff_mkv_codec_tags table lies
> entirely in .rodata even when using PIC. As it is now, it's saved in
> .rodata without PIC, and in .data.relro when not using it, as the
> string pointers need to be relocated.
> 
> With this change the table _might_ use a bit more memory, as all the
> string entries will use 16-bytes whatever their actual lenght, but
> there is an actual memory use increase for strings whose size
> (including the final '\0') is less than 8 (in 64-bit) or 12 (in
> 32-bit), as in addition to every string's size, the previous table
> used an extra pointer (which is 8 or 4 bytes depending on
> architecture).
> 
> I don't think that summing up all the changes there is an actual
> increase, but I didn't do the math myself.

Patch OK => Applied.

Aurel




More information about the ffmpeg-devel mailing list