aboutsummaryrefslogtreecommitdiff
path: root/elf/dynamic-link.h
diff options
context:
space:
mode:
Diffstat (limited to 'elf/dynamic-link.h')
-rw-r--r--elf/dynamic-link.h33
1 files changed, 1 insertions, 32 deletions
diff --git a/elf/dynamic-link.h b/elf/dynamic-link.h
index 21cdfc8..ac4cc70 100644
--- a/elf/dynamic-link.h
+++ b/elf/dynamic-link.h
@@ -16,35 +16,7 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
-/* This macro is used as a callback from elf_machine_rel{a,} when a
- static TLS reloc is about to be performed. Since (in dl-load.c) we
- permit dynamic loading of objects that might use such relocs, we
- have to check whether each use is actually doable. If the object
- whose TLS segment the reference resolves to was allocated space in
- the static TLS block at startup, then it's ok. Otherwise, we make
- an attempt to allocate it in surplus space on the fly. If that
- can't be done, we fall back to the error that DF_STATIC_TLS is
- intended to produce. */
-#define HAVE_STATIC_TLS(map, sym_map) \
- (__builtin_expect ((sym_map)->l_tls_offset != NO_TLS_OFFSET \
- && ((sym_map)->l_tls_offset \
- != FORCED_DYNAMIC_TLS_OFFSET), 1))
-
-#define CHECK_STATIC_TLS(map, sym_map) \
- do { \
- if (!HAVE_STATIC_TLS (map, sym_map)) \
- _dl_allocate_static_tls (sym_map); \
- } while (0)
-
-#define TRY_STATIC_TLS(map, sym_map) \
- (__builtin_expect ((sym_map)->l_tls_offset \
- != FORCED_DYNAMIC_TLS_OFFSET, 1) \
- && (__builtin_expect ((sym_map)->l_tls_offset != NO_TLS_OFFSET, 1) \
- || _dl_try_allocate_static_tls (sym_map, true) == 0))
-
-int _dl_try_allocate_static_tls (struct link_map *map, bool optional)
- attribute_hidden;
-
+#include <dl-machine.h>
#include <elf.h>
#ifdef RESOLVE_MAP
@@ -91,9 +63,6 @@ elf_machine_lazy_rel (struct link_map *map, struct r_scope_elem *scope[],
# endif
#endif
-#include <dl-machine.h>
-
-
#ifdef RESOLVE_MAP
# if defined RTLD_BOOTSTRAP || defined STATIC_PIE_BOOTSTRAP