ludo@xxxxxxx (Ludovic Courtès) writes: > Section 3 of [0] explains `initial-exec' like this: > > A more restrictive optimization is usable if the variables accessed > are known to be in one of the modules available and program start and if > the programmer selects to use the static access model. > > I believe it should read "available *at* program start". Yes, I think so. If you send a note to Ulrich he might update it. > Likewise, Section 2.1 of [1] reads: > > Under certain circumstances, [the Initial Exec model] may be used in > dynamic libraries as well, but it may come at the cost of being unable > to dlopen such libraries. > > This gives the impression that shared libraries that are not meant to be > dlopened can be compiled with `-ftls-model=initial-exec'. Is this true? I believe that is true. > If so, would using `-ftls-model=initial-exec' cause problems with the > way the shared library accesses other library's TLS (e.g., libc's > `errno')? IOW, instead of using `-ftls-model', should one instead use > an explicit `tls_model' attribute for all the library's thread-local > variables? That should not be required. Ian