]> rtime.felk.cvut.cz Git - l4.git/blobdiff - l4/pkg/uclibc/lib/contrib/uclibc/ldso/include/dl-elf.h
update
[l4.git] / l4 / pkg / uclibc / lib / contrib / uclibc / ldso / include / dl-elf.h
index cbb2100b115c1dc5ba09a54bc083a3639f72fac2..7fbb373b4fd5f93bb4e08fb62f6df29c7c55bb3b 100644 (file)
@@ -162,8 +162,13 @@ unsigned int __dl_parse_dynamic_info(ElfW(Dyn) *dpnt, unsigned long dynamic_info
                if (dynamic_info[tag]) \
                        dynamic_info[tag] = (unsigned long) DL_RELOC_ADDR(load_off, dynamic_info[tag]); \
        } while (0)
-       /* Don't adjust .dynamic unnecessarily.  */
-       if (load_off != 0) {
+       /* Don't adjust .dynamic unnecessarily.  For FDPIC targets,
+          we'd have to walk all the loadsegs to find out if it was
+          actually unnecessary, so skip this optimization.  */
+#if !defined __FDPIC__ && !defined __DSBT__
+       if (load_off != 0)
+#endif
+       {
                ADJUST_DYN_INFO(DT_HASH, load_off);
                ADJUST_DYN_INFO(DT_PLTGOT, load_off);
                ADJUST_DYN_INFO(DT_STRTAB, load_off);
@@ -174,6 +179,15 @@ unsigned int __dl_parse_dynamic_info(ElfW(Dyn) *dpnt, unsigned long dynamic_info
                ADJUST_DYN_INFO(DT_GNU_HASH_IDX, load_off);
 #endif
        }
+#ifdef __DSBT__
+       /* Get the mapped address of the DSBT base.  */
+       ADJUST_DYN_INFO(DT_DSBT_BASE_IDX, load_off);
+
+       /* Initialize loadmap dsbt info.  */
+       load_off.map->dsbt_table = dynamic_info[DT_DSBT_BASE_IDX];
+       load_off.map->dsbt_size = dynamic_info[DT_DSBT_SIZE_IDX];
+       load_off.map->dsbt_index = dynamic_info[DT_DSBT_INDEX_IDX];
+#endif
 #undef ADJUST_DYN_INFO
        return rtld_flags;
 }