Browse Source

xtensa: remove ldso workaround by real pointer check

An abort() is only generated when gcc does not implement
a trap handler for the target architecture.
This fixes the abort() generation. Latest gcc git master
also contains a trap handler for xtensa.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Walemar Brodkorb <wbx@uclibc-ng.org>
Waldemar Brodkorb 8 years ago
parent
commit
057b857cbe
2 changed files with 2 additions and 5 deletions
  1. 2 0
      ldso/include/tlsdeschtab.h
  2. 0 5
      ldso/ldso/Makefile.in

+ 2 - 0
ldso/include/tlsdeschtab.h

@@ -98,6 +98,8 @@ _dl_make_tlsdesc_dynamic (struct link_map *map, size_t ti_offset)
   test.tlsinfo.ti_module = map->l_tls_modid;
   test.tlsinfo.ti_offset = ti_offset;
   entry = htab_find_slot (ht, &test, 1, hash_tlsdesc, eq_tlsdesc);
+  if (entry == NULL)
+    _dl_exit(1);
   if (*entry)
     {
       td = *entry;

+ 0 - 5
ldso/ldso/Makefile.in

@@ -27,11 +27,6 @@ CFLAGS-$(DODEBUG)-ldso/ldso := -O2 -g
 
 CFLAGS-ldso.c := -DLDSO_ELFINTERP=\"$(TARGET_ARCH)/elfinterp.c\"
 
-# avoid ld.so linking error since gcc 4.9.x: undefined reference to abort
-ifeq ($(TARGET_ARCH),xtensa)
-CFLAGS-ldso.c += -fno-delete-null-pointer-checks
-endif
-
 LDFLAGS-$(UCLIBC_FORMAT_DSBT_ELF)-$(UCLIBC_LDSO_NAME).so := -Wl,--dsbt-index=1
 ifneq ($(SUPPORT_LD_DEBUG),y)
 LDFLAGS-$(UCLIBC_LDSO_NAME).so := $(LDFLAGS)