aboutsummaryrefslogtreecommitdiff
path: root/ldso
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2019-08-11 11:57:38 -0400
committerRich Felker <dalias@aerifal.cx>2019-08-11 11:57:38 -0400
commit71af5309874269bcc9e4b84ea716fab33d888c1d (patch)
treebc1a8838513dac5d5f527e4ec301bf097cf67a63 /ldso
parentffab43602b5900c86b7040abdda8ccf6cdec95f5 (diff)
downloadmusl-71af5309874269bcc9e4b84ea716fab33d888c1d.zip
musl-71af5309874269bcc9e4b84ea716fab33d888c1d.tar.gz
musl-71af5309874269bcc9e4b84ea716fab33d888c1d.tar.bz2
ldso: remove redundant runtime checks in static TLS logic
as a result of commit ffab43602b5900c86b7040abdda8ccf6cdec95f5, static_tls_cnt is now valid during relocations at program startup, so it's no longer necessary to condition the check against static_tls_cnt on this being a runtime (dlopen) relocation.
Diffstat (limited to 'ldso')
-rw-r--r--ldso/dynlink.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ldso/dynlink.c b/ldso/dynlink.c
index 93ef363..531811c 100644
--- a/ldso/dynlink.c
+++ b/ldso/dynlink.c
@@ -390,7 +390,7 @@ static void do_relocs(struct dso *dso, size_t *rel, size_t rel_size, size_t stri
tls_val = def.sym ? def.sym->st_value : 0;
if ((type == REL_TPOFF || type == REL_TPOFF_NEG)
- && runtime && def.dso->tls_id > static_tls_cnt) {
+ && def.dso->tls_id > static_tls_cnt) {
error("Error relocating %s: %s: initial-exec TLS "
"resolves to dynamic definition in %s",
dso->name, name, def.dso->name);
@@ -450,7 +450,7 @@ static void do_relocs(struct dso *dso, size_t *rel, size_t rel_size, size_t stri
#endif
case REL_TLSDESC:
if (stride<3) addend = reloc_addr[1];
- if (runtime && def.dso->tls_id > static_tls_cnt) {
+ if (def.dso->tls_id > static_tls_cnt) {
struct td_index *new = malloc(sizeof *new);
if (!new) {
error(