public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: davidm@hpl.hp.com
Cc: libc-hacker@sources.redhat.com
Subject: Re: new syscall stub support for ia64 libc
Date: Thu, 30 Oct 2003 09:09:00 -0000	[thread overview]
Message-ID: <20031030070302.GS12344@sunsite.ms.mff.cuni.cz> (raw)
In-Reply-To: <16288.50694.36460.339805@napali.hpl.hp.com>

On Thu, Oct 30, 2003 at 12:04:22AM -0800, David Mosberger wrote:
> Hi Jakub,
> 
> >>>>> On Wed, 29 Oct 2003 08:44:36 +0100, Jakub Jelinek <jakub@redhat.com> said:
> 
>   Jakub> Yes, please post a forward ported complete tested patch (the last
>   Jakub> version of the patch I and Ulrich saw was incomplete (but lead to
>   Jakub> discovery of a linker bug)).
>   Jakub> NPTL is now in sources CVS, so things are way easier for diffing...
> 
> OK, here is a preliminary patch.  Some comments:
> 
>  - The "assert (ph->p_vaddr == GL(dl_sysinfo_dso)" check in elf/rtld.c
>    is too strict.  On ia64, we have two LOAD segments, so the check
>    can't possibly succeed:
> 
>     $ readelf -l arch/ia64/kernel/gate.so |grep LOAD
>     LOAD           0x0000000000000000 0xa000000000010000 0xa000000000010000
>     LOAD           0x0000000000000000 0xa000000000020000 0xa000000000020000

Can you readelf -Wl arch/ia64/kernel/gate.so |grep LOAD 
(or grep -A1 LOAD instead), or better yet readelf -Wa arch/ia64/kernel/gate.so
? I'd like to understand why you need the second LOAD segment, what stuff
has it in etc.

>    The patch below simply #if's out the code, but perhaps a better
>    fix would be to check ph->p_vaddr only for the first LOAD segment?

Yeah, that's doable, add some variable #ifndef NDEBUG, increment it for
each PT_LOAD and use it in the assert.

>  - The changes to linuxthreads/{manager,pthread}.c are almost certainly
>    wrong, but I'm not sure I understand how you want things set up to
>    ensure that single-threaded apps use the new stub but linuxthread
>    apps use the old one.

IMHO NEED_DL_SYSINFO should be defined in both NPTL and
Linuxthread ia64/dl-sysdep.h, while USE_DL_SYSINFO only in NPTL.
And sysdep.h should use sysinfo only if USE_DL_SYSINFO is defined.
Then linuxthreads will work just fine (use break always, who cares)
and NPTL will use VDSO.

>  - The libc-start.c change is also "wrong" but since DL_SYSDEP_OSCHECK()
>    may do syscalls, it is necessary to do __pthread_initialize_minimal()
>    first, as otherwise the minimal thread descriptor isn't setup.

This is handled on IA-32 by providing DL_SYSINFO_DEFAULT (and defining
USE_DL_SYSINFO).  This means the few syscalls in DL_SYSDEP_OSCHECK will
use the break insn and the rest will use VDSO if available.

	Jakub

  reply	other threads:[~2003-10-30  9:09 UTC|newest]

Thread overview: 98+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-29  4:26 David Mosberger
2003-10-29  9:51 ` Jakub Jelinek
2003-10-30  8:04   ` David Mosberger
2003-10-30  9:09     ` Jakub Jelinek [this message]
2003-10-30 19:38       ` Roland McGrath
2003-10-30 19:59       ` David Mosberger
2003-10-30 20:23         ` Jakub Jelinek
2003-10-30 22:35           ` David Mosberger
2003-10-31  8:45     ` Richard Henderson
2003-10-31  9:07       ` Jakub Jelinek
2003-10-31 16:45         ` David Mosberger
2003-10-31 16:54           ` Jakub Jelinek
2003-10-31 18:29             ` David Mosberger
2003-11-03 21:46             ` David Mosberger
2003-11-12 22:53             ` David Mosberger
2003-11-12 23:10               ` Ulrich Drepper
2003-11-12 23:47                 ` David Mosberger
2003-11-12 23:57                   ` Jakub Jelinek
2003-11-13  2:38                     ` David Mosberger
2003-11-13  3:46                       ` Ulrich Drepper
2003-11-13  3:53                         ` David Mosberger
2003-11-13  8:23                       ` Jakub Jelinek
2003-11-13  7:32               ` David Mosberger
2003-11-13  9:24                 ` Ulrich Drepper
2003-11-13 17:30                   ` David Mosberger
2003-11-13 17:56                     ` Ulrich Drepper
2003-11-13 18:47                       ` David Mosberger
2003-11-13 20:16                         ` Ulrich Drepper
2003-11-13 21:34                       ` David Mosberger
2003-11-13 21:44                         ` Jakub Jelinek
2003-11-13 21:58                           ` David Mosberger
2003-11-13 23:45                           ` David Mosberger
2003-11-14  1:44                             ` Ulrich Drepper
2003-11-14  1:54                               ` David Mosberger
2003-11-14  2:18                               ` David Mosberger
2003-11-14  2:57                                 ` Ulrich Drepper
2003-11-14  3:22                                   ` David Mosberger
2003-11-14  3:39                                     ` Ulrich Drepper
2003-11-14  5:29                                     ` Ulrich Drepper
2003-11-14  5:49                                       ` David Mosberger
2003-11-14  6:04                                         ` Ulrich Drepper
2003-11-14  6:43                                           ` David Mosberger
2003-11-14 19:53                                             ` Ulrich Drepper
2003-11-14 19:56                                               ` David Mosberger
2003-11-14 20:36                                                 ` Ulrich Drepper
2003-11-15  0:51                                                   ` David Mosberger
2003-11-15  9:38                                                   ` David Mosberger
2003-11-17 18:21                                                     ` Ulrich Drepper
2003-11-17 18:35                                                       ` David Mosberger
2003-11-18  7:54                                                       ` David Mosberger
2003-11-18  8:22                                                         ` Ulrich Drepper
2003-11-18 16:45                                                           ` David Mosberger
2003-11-19 23:37                                                           ` unwind failures due to __pthread_initialize_minimal David Mosberger
2003-11-19 23:54                                                             ` Ulrich Drepper
2003-11-20  0:30                                                               ` Roland McGrath
2003-11-20  2:35                                                                 ` David Mosberger
2003-11-20  4:01                                                                   ` Ulrich Drepper
2003-11-20 21:20                                                                     ` David Mosberger
2003-12-07  1:46                                                                       ` Ulrich Drepper
2003-12-08 17:40                                                                         ` David Mosberger
2003-12-08 19:27                                                                           ` Ulrich Drepper
2003-12-08 22:22                                                                             ` David Mosberger
2003-11-26  9:40                                                           ` new syscall stub support for ia64 libc David Mosberger
2003-12-03  7:25                                                             ` David Mosberger
2003-12-08 18:16                                                               ` Jakub Jelinek
2003-12-08 19:23                                                                 ` David Mosberger
2003-12-08 21:17                                                                   ` Jakub Jelinek
2003-12-08 22:10                                                                     ` David Mosberger
2003-12-09  4:41                                                                     ` David Mosberger
2003-12-08 22:17                                                                 ` David Mosberger
2003-12-08 22:46                                                                   ` Jakub Jelinek
2003-12-08 23:03                                                                     ` David Mosberger
2003-12-10 23:22                                                               ` Ulrich Drepper
2003-12-11  0:37                                                                 ` David Mosberger
2003-12-11 21:00                                                                   ` Ulrich Drepper
2003-11-17 22:15                                                     ` David Mosberger
2003-11-15 19:05                                                   ` David Mosberger
2003-11-17 18:14                                                     ` Ulrich Drepper
2003-11-18  0:47                                                       ` David Mosberger
2003-11-18  1:02                                                         ` Ulrich Drepper
2003-11-18  1:22                                                           ` David Mosberger
2003-11-18  1:37                                                             ` Ulrich Drepper
2003-11-18  1:46                                                               ` David Mosberger
2003-11-18  2:17                                                                 ` Ulrich Drepper
2003-11-18  5:44                                                                   ` David Mosberger
2003-11-18 19:18                                                                   ` David Mosberger
2003-11-18 19:35                                                                     ` Ulrich Drepper
2003-11-18 20:08                                                                       ` David Mosberger
2003-11-14 20:13                                               ` patch to fix unwind info for ia64 David Mosberger
2003-11-14 20:21                                               ` David Mosberger
2003-11-14 20:24                                                 ` Roland McGrath
2003-11-14 21:12                                                   ` David Mosberger
2003-11-15 17:42                                                 ` Andreas Schwab
2003-11-15 18:52                                                   ` David Mosberger
2003-11-19  6:19                                                     ` David Mosberger
2003-11-19 15:25                                                     ` Ulrich Drepper
2003-10-31 16:43       ` new syscall stub support for ia64 libc David Mosberger
2003-10-29 17:54 ` 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=20031030070302.GS12344@sunsite.ms.mff.cuni.cz \
    --to=jakub@redhat.com \
    --cc=davidm@hpl.hp.com \
    --cc=libc-hacker@sources.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).