summaryrefslogtreecommitdiff
path: root/ldso/ldso/dl-startup.c
diff options
context:
space:
mode:
authorJoakim Tjernlund <joakim.tjernlund@transmode.se>2004-11-02 08:14:49 +0000
committerJoakim Tjernlund <joakim.tjernlund@transmode.se>2004-11-02 08:14:49 +0000
commitdc0f822bfed430e5b4f87f27c2e63171fa5fba28 (patch)
tree01eda5fa3c42d0c8b114f76622b4794a7735aa41 /ldso/ldso/dl-startup.c
parentf8f7b102217864ea382a46bb9ad173b3493e5cae (diff)
- Remove dynamic_size from struct elf_resolve.
- Replace all open coded dynamic handling with a function. Reduces size. - Fold special MIPS dynamic code into the dynamic_info item. - Add RELRO support. - Support linking with "-z now". - prepare for DT_RELACOUNT/DT_RELCOUNT optimization. - Add -z now to ld.so linking, this is what ld.so does anyway so let the linker know that.
Diffstat (limited to 'ldso/ldso/dl-startup.c')
-rw-r--r--ldso/ldso/dl-startup.c25
1 files changed, 8 insertions, 17 deletions
diff --git a/ldso/ldso/dl-startup.c b/ldso/ldso/dl-startup.c
index 0055435d2..91c41e730 100644
--- a/ldso/ldso/dl-startup.c
+++ b/ldso/ldso/dl-startup.c
@@ -281,23 +281,14 @@ found_got:
#ifdef __SUPPORT_LD_DEBUG_EARLY__
SEND_STDERR("scanning DYNAMIC section\n");
#endif
- while (dpnt->d_tag) {
-#if defined(__mips__)
- if (dpnt->d_tag == DT_MIPS_GOTSYM)
- tpnt->mips_gotsym = (unsigned long) dpnt->d_un.d_val;
- if (dpnt->d_tag == DT_MIPS_LOCAL_GOTNO)
- tpnt->mips_local_gotno = (unsigned long) dpnt->d_un.d_val;
- if (dpnt->d_tag == DT_MIPS_SYMTABNO)
- tpnt->mips_symtabno = (unsigned long) dpnt->d_un.d_val;
+ tpnt->dynamic_addr = dpnt;
+#ifdef __mips__
+ /* MIPS cannot call functions here, must inline */
+ __dl_parse_dynamic_info(dpnt, tpnt->dynamic_info, NULL);
+#else
+ _dl_parse_dynamic_info(dpnt, tpnt->dynamic_info, NULL);
#endif
- if (dpnt->d_tag < 24) {
- tpnt->dynamic_info[dpnt->d_tag] = dpnt->d_un.d_val;
- if (dpnt->d_tag == DT_TEXTREL) {
- tpnt->dynamic_info[DT_TEXTREL] = 1;
- }
- }
- dpnt++;
- }
+
#ifdef __SUPPORT_LD_DEBUG_EARLY__
SEND_STDERR("done scanning DYNAMIC section\n");
#endif
@@ -335,7 +326,7 @@ found_got:
SEND_STDERR("About to do MIPS specific GOT bootstrap\n");
#endif
/* For MIPS we have to do stuff to the GOT before we do relocations. */
- PERFORM_BOOTSTRAP_GOT(got);
+ PERFORM_BOOTSTRAP_GOT(got, tpnt);
#endif
/* OK, now do the relocations. We do not do a lazy binding here, so