[Ffmpeg-devel] [PATCH] rtp.h warning

Rich Felker dalias
Thu Mar 22 22:26:04 CET 2007


On Thu, Mar 22, 2007 at 09:07:40PM +0000, M?ns Rullg?rd wrote:
> Rich Felker <dalias at aerifal.cx> writes:
> 
> > On Thu, Mar 22, 2007 at 02:12:05PM -0400, Glenn Maynard wrote:
> >> Regarding XXX: is there a reason this isn't simply "const char *enc_name"?
> >> It'd save a few K on that table.
> >
> > Dunno the specifics here, but using const char * instead of const
> > char[] in tables is very bad with shared libaries. It greatly
> > increases the startup time (relocations) and prevents the tables from
> > being in shared memory.
> 
> Why is that so?

Because the pointer is not a linktime constant. It depends on the
address at which the library is loaded, which in turn depends on which
other libraries have been loaded. Thus, the addresses in the table
have to be patched in at runtime-link-time.

Rich




More information about the ffmpeg-devel mailing list