Ignore DT_TLSDESC_GOT / DT_TLSDESC_PLT
These dynamic table entries are used for lazy relocation of TLSDESC
relocations. Bionic relocates everything eagerly and can ignore these
entries.
Bug: http://b/78026329
Test: bionic unit tests
Test: manual
Change-Id: I788c4a95041fae66de2fbeab3babe0205631999c
diff --git a/linker/linker.cpp b/linker/linker.cpp
index 412b8eb..8a28bad 100644
--- a/linker/linker.cpp
+++ b/linker/linker.cpp
@@ -3528,13 +3528,14 @@
// this is parsed after we have strtab initialized (see below).
break;
+ case DT_TLSDESC_GOT:
+ case DT_TLSDESC_PLT:
+ // These DT entries are used for lazy TLSDESC relocations. Bionic
+ // resolves everything eagerly, so these can be ignored.
+ break;
+
default:
if (!relocating_linker) {
- if (d->d_tag == DT_TLSDESC_GOT || d->d_tag == DT_TLSDESC_PLT) {
- DL_ERR("unsupported ELF TLS DT entry in \"%s\"", get_realpath());
- return false;
- }
-
const char* tag_name;
if (d->d_tag == DT_RPATH) {
tag_name = "DT_RPATH";