This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v4] [BZ #14579] rtld: limit self loading check to normalmode only
On Sun, Sep 16, 2012 at 10:14:04PM +0400, Dmitry V. Levin wrote:
> Commit glibc-2.14~10 disallowed rtld self loading to avoid a segfault
> that used to happen when rtld was loading itself in normal mode.
> Unfortunately, that commit disallowed all modes of self loading,
> including those that used to work before. This change limits the check
> for self loading to normal mode only, so that instruments like ldd could
> handle rtld properly.
> ---
> ChangeLog | 8 +++++++
> NEWS | 4 +-
> elf/Makefile | 5 +++-
> elf/rtld.c | 3 +-
> elf/tst-rtld-load-self.sh | 46 +++++++++++++++++++++++++++++++++++++++++++++
> 5 files changed, 62 insertions(+), 4 deletions(-)
> create mode 100755 elf/tst-rtld-load-self.sh
>
> diff --git a/ChangeLog b/ChangeLog
> index b214afc..8f885a8 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,3 +1,11 @@
> +2012-09-14 Dmitry V. Levin <ldv@altlinux.org>
> +
> + [BZ #14579]
> + * elf/rtld.c (dl_main): Limit the check for self loading to normal
> + mode only.
> + * elf/tst-rtld-load-self.sh: New test.
> + * elf/Makefile: Run it.
> +
This version looks good to me.
You've fixed all of the comments, namely:
- Used `set -e'
- Ran all tests even if some failed.
- Output the .out file via redirection in makefile.
- Added informative output to .out file.
Check this in on Wednesday to allow Roland to have some time to comment
on any more details.
Cheers,
Carlos.