summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoakim Tjernlund <joakim.tjernlund@transmode.se>2005-04-12 23:07:43 +0000
committerJoakim Tjernlund <joakim.tjernlund@transmode.se>2005-04-12 23:07:43 +0000
commit895f19d4e54cccc86c958f738cd8ad0ff0a15792 (patch)
treeca12bd89d85bd8242c336d0373cf7ec99d1581ed
parentb6f2c594dffc44b5a3a40f493a84850a30410879 (diff)
Remove __FORCE_SHAREABLE_TEXT_SEGMENTS__ hack from ldso itself.
-rw-r--r--ldso/ldso/dl-startup.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/ldso/ldso/dl-startup.c b/ldso/ldso/dl-startup.c
index 77c726e71..97a0e19e0 100644
--- a/ldso/ldso/dl-startup.c
+++ b/ldso/ldso/dl-startup.c
@@ -214,34 +214,6 @@ static void * __attribute_used__ _dl_start(unsigned long args)
SEND_STDERR("done scanning DYNAMIC section\n");
#endif
-#ifndef __FORCE_SHAREABLE_TEXT_SEGMENTS__
- /* Ugly, ugly. We need to call mprotect to change the protection of
- the text pages so that we can do the dynamic linking. We can set the
- protection back again once we are done */
-
- {
- ElfW(Phdr) *ppnt;
- int i;
-
-#ifdef __SUPPORT_LD_DEBUG_EARLY__
- SEND_STDERR("calling mprotect on the shared library/dynamic linker\n");
-#endif
-
- /* First cover the shared library/dynamic linker. */
- if (tpnt->dynamic_info[DT_TEXTREL]) {
- header = (ElfW(Ehdr) *) auxvt[AT_BASE].a_un.a_ptr;
- ppnt = (ElfW(Phdr) *) ((int)auxvt[AT_BASE].a_un.a_ptr +
- header->e_phoff);
- for (i = 0; i < header->e_phnum; i++, ppnt++) {
- if (ppnt->p_type == PT_LOAD && !(ppnt->p_flags & PF_W)) {
- _dl_mprotect((void *) (load_addr + (ppnt->p_vaddr & PAGE_ALIGN)),
- (ppnt->p_vaddr & ADDR_ALIGN) + (unsigned long) ppnt->p_filesz,
- PROT_READ | PROT_WRITE | PROT_EXEC);
- }
- }
- }
- }
-#endif
#ifdef PERFORM_BOOTSTRAP_GOT
#ifdef __SUPPORT_LD_DEBUG_EARLY__
SEND_STDERR("About to do specific GOT bootstrap\n");