From: Jakub Jelinek <jakub@redhat.com>
To: Ulrich Drepper <drepper@redhat.com>
Cc: Glibc hackers <libc-hacker@sources.redhat.com>, mingo@redhat.com
Subject: [PATCH] Two more vDSO issues
Date: Fri, 27 Feb 2004 16:22:00 -0000 [thread overview]
Message-ID: <20040227141249.GF3501@sunsite.ms.mff.cuni.cz> (raw)
Hi!
1) l->ld needs to be relocated as well (I did not catch this up in my
previous testing, because vDSO was mapped both in the new place and
in the old location)
2) if kernel provides just AT_SYSINFO_EHDR but not AT_SYSINFO, ld.so would
segfault.
2004-02-27 Jakub Jelinek <jakub@redhat.com>
* elf/rtld.c (dl_main): Adjust l->l_ld of the vDSO by l->l_addr.
* sysdeps/generic/dl-sysdep.c (_dl_sysdep_start): Only set
GL(dl_sysinfo) if non-zero.
--- libc/elf/rtld.c.jj 2004-02-27 13:51:54.000000000 +0100
+++ libc/elf/rtld.c 2004-02-27 14:56:05.000000000 +0100
@@ -1246,6 +1246,7 @@ ERROR: ld.so: object '%s' from %s cannot
l->l_map_start = (ElfW(Addr)) GL(dl_sysinfo_dso);
l->l_addr = l->l_map_start - l->l_addr;
l->l_map_end += l->l_addr;
+ l->l_ld = (void *) ((ElfW(Addr)) l->l_ld + l->l_addr);
elf_get_dynamic_info (l, dyn_temp);
_dl_setup_hash (l);
l->l_relocated = 1;
--- libc/sysdeps/generic/dl-sysdep.c.jj 2004-02-27 17:08:24.000000000 +0100
+++ libc/sysdeps/generic/dl-sysdep.c 2004-02-27 17:18:39.992891935 +0100
@@ -201,7 +201,7 @@ _dl_sysdep_start (void **start_argptr,
#if defined NEED_DL_SYSINFO
/* Only set the sysinfo value if we also have the vsyscall DSO. */
- if (GL(dl_sysinfo_dso) != 0)
+ if (GL(dl_sysinfo_dso) != 0 && new_sysinfo)
GL(dl_sysinfo) = new_sysinfo;
#endif
Jakub
next reply other threads:[~2004-02-27 16:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-27 16:22 Jakub Jelinek [this message]
2004-02-28 14:22 ` Thorsten Kukuk
2004-03-08 13:15 ` Andreas Schwab
2004-03-09 0:06 ` Ulrich Drepper
2004-03-09 9:09 ` Andreas Schwab
2004-02-28 17:55 ` Ulrich Drepper
2004-03-08 13:44 ` Andreas Schwab
2004-03-09 10:43 ` Ulrich Drepper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040227141249.GF3501@sunsite.ms.mff.cuni.cz \
--to=jakub@redhat.com \
--cc=drepper@redhat.com \
--cc=libc-hacker@sources.redhat.com \
--cc=mingo@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).