public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* My proposal for the libgcc runtime ABI (ia64 gcc/glibc is broken.)
@ 2000-07-10  8:04 H . J . Lu
  2000-07-10 10:56 ` Mark Kettenis
  0 siblings, 1 reply; 115+ messages in thread
From: H . J . Lu @ 2000-07-10  8:04 UTC (permalink / raw)
  To: GNU C Library, gcc

I haven't heard any feedbacks about my proposal for the libgcc runtime
ABI:

http://gcc.gnu.org/ml/gcc-bugs/2000-07/msg00117.html

But I think the current situation is quite broken. In glibc, we have

---
/* This must match what's in frame.h in gcc. How can one do that? */
struct object
{
  void *pc_begin;
  void *pc_end;
  void *fde_begin;
  void *fde_array;
  __SIZE_TYPE__ count;
  struct object *next;
};
---

in elf/soinit.c. In gcc, we have

---
      /* This must match what's in frame.h.  */
      fprintf (stream, "struct object {\n");
      fprintf (stream, "  void *pc_begin;\n");
      fprintf (stream, "  void *pc_end;\n");
      fprintf (stream, "  void *fde_begin;\n");
      fprintf (stream, "  void *fde_array;\n");
      fprintf (stream, "  __SIZE_TYPE__ count;\n");
      fprintf (stream, "  struct object *next;\n");
      fprintf (stream, "};\n");
---

in gcc/collect2.c. However, in gcc/frame.h, there are

struct object {
#ifdef IA64_UNWIND_INFO
  void *pc_base;        /* This field will be set by find_fde. */
#endif
  void *pc_begin;
  void *pc_end;
  struct dwarf_fde *fde_begin;
#ifdef IA64_UNWIND_INFO
  struct dwarf_fde *fde_end;
#endif
  struct dwarf_fde **fde_array;
  size_t count;
  struct object *next;
};

So as of today, the ia64 gcc/glibc are broken due to the mismatch in
struct object. My libgcc runtime ABI proposal will fix it as well
as lead to a fix for the original problem. It means gcc can change
the implementation of

---runtime.h---
#ifndef __RUNTIME_H
#define __RUNTIME_H 1

struct frame_object
{
  /* It should be large enough for future expansion. */
  void * dummy [16];
};

/* Note the following routines are exported interfaces from libgcc; do
   not change these interfaces.  Instead create new interfaces.  Also
   note references to these functions may be made weak in files where
   they are referenced.  */

extern void __register_frame (void * );
extern void __register_frame_table (void *);
extern void __deregister_frame (void *);

/* Called either from crtbegin.o or a static constructor to register the
   unwind info for an object or translation unit, respectively.  */

extern void __register_frame_info (void *, struct frame_object *);

/* Similar, but BEGIN is actually a pointer to a table of unwind
   entries for different translation units.  Called from the file
   generated by collect2.  */

extern void __register_frame_info_table (void *, struct frame_object *);

/* Called from crtend.o to deregister the unwind info for an object.  */

extern void *__deregister_frame_info (void *);

#endif /* __RUNTIME_H */
---

as long as we don't change the ABI defined in runtime.h.

Thanks.


-- 
H.J. Lu (hjl@gnu.org)

^ permalink raw reply	[flat|nested] 115+ messages in thread
* Re: My proposal for the libgcc runtime ABI (ia64 gcc/glibc is   broken.)
@ 2000-07-11 11:51 Mike Stump
  2000-07-11 12:08 ` Ulrich Drepper
  0 siblings, 1 reply; 115+ messages in thread
From: Mike Stump @ 2000-07-11 11:51 UTC (permalink / raw)
  To: drepper, martin; +Cc: gcc, hjl, kettenis, law, libc-hacker, rth

> From: Ulrich Drepper <drepper@redhat.com>
> Date: 11 Jul 2000 00:51:24 -0700

> This is my I'm currently favouring a standaline package.  But there
> might be situation where a new libc might require a new version of
> the libgcc.so

Isn't this as desirable as a new version of emacs requiring a new
version of libgcc.so?

^ permalink raw reply	[flat|nested] 115+ messages in thread
* Re: My proposal for the libgcc runtime ABI (ia64 gcc/glibc is broken.)
@ 2000-07-11 16:21 Richard Kenner
  0 siblings, 0 replies; 115+ messages in thread
From: Richard Kenner @ 2000-07-11 16:21 UTC (permalink / raw)
  To: torvalds; +Cc: gcc

    Wouldn't it be better to _not_ consider this to be part of libgcc, and
    instead have a well-defined EH record format and just tell people to use
    it in their system libraries. Possibly with example code (ie the current
    libgcc source for the problem at hand).

I've tried to stay out of this discussion, but my feeling is that the
functions in libgcc.a should be precisely the set of functions that
code in the core compiler (e.g., the main directory) generates calls
to and that are not part of a any standard C library: no more and no less.
In other words, they are the compiler support functions for GCC.

^ permalink raw reply	[flat|nested] 115+ messages in thread
* Re: My proposal for the libgcc runtime ABI (ia64 gcc/glibc is   broken.)
@ 2000-07-12  9:47 Phil Edwards
  2000-07-12 10:01 ` H . J . Lu
  2000-07-12 23:01 ` Jeffrey A Law
  0 siblings, 2 replies; 115+ messages in thread
From: Phil Edwards @ 2000-07-12  9:47 UTC (permalink / raw)
  To: gcc, libc-hacker; +Cc: drepper, law

> Jeffrey A Law <law@cygnus.com> writes:
> > Not necessarily.  One could certainly argue that if it's on the root
> > filesystem that it ought to be linked statically.
>
> Jeff, don't be ridiculous.  First, you should look at the reality.

Well... he is.  I speak as a system administrator now rather than a
developer; Jeff is quite correct in saying that this is an arguable point.
It is by no means ridiculous.

I've had Linux boxes crash hard, and IRIX boxes crash hard, and Solaris,
and Alphas; and Linux has been the only one ever that was a nightmare to
repair due to all the dynamic linking tangles.  Having root-partition
binaries be statically linked is /excellent/ preparation for problems.
Or even just for doing work in a /real/ single-user mode.


> I personally don't care a bit about all these issues.  I have no
> problem with recompiling my whole system since I use almost no program
> where this is not possible and for the few I cannot recompile I can
> find a way around this problem.

That's wonderful for Linux systems.  The rest of us beg (!) to differ.


> But you can be sure you'll have a few million other people on your
> rear end if you screw this up.  And not coming up with a solution soon
> will certainly be in this category.

Oh, we'll all be bitching at the GCC maintainers anyway even if they get it
all correct.  :-)  But I'd rather have a delayed, well-though-out solution
instead of a quick "this works perfectly for Linux, the rest of y'all are
screwed for another 18 months".

GCC is finally getting some /serious/ recognition on non-Linux platforms.
Even non-programmers have heard of it and recognize that it is a quality
compiler, but many of them still incorrectly think of it as "the Linux
compiler" because that's where the attention goes.  Please, folks, let's
not blow this now.


Phil

^ permalink raw reply	[flat|nested] 115+ messages in thread
* Re: My proposal for the libgcc runtime ABI (ia64 gcc/glibc is broken.)
@ 2000-07-12 20:40 Richard Kenner
  0 siblings, 0 replies; 115+ messages in thread
From: Richard Kenner @ 2000-07-12 20:40 UTC (permalink / raw)
  To: torvalds; +Cc: gcc

    I think it was Kenner who said that libgcc should only contain code
    that is actually called by gcc-generated code. That's a good
    definition of what libgcc used to be. Why not go back to that, and
    leave the whole EH thing into the hands of the glibc and other people
    working on libraries and systems issues.

Yes, it was me who said that, but, as I understand it, the EH code *is*
called by gcc-generated code!

^ permalink raw reply	[flat|nested] 115+ messages in thread

end of thread, other threads:[~2000-07-18 15:15 UTC | newest]

Thread overview: 115+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-07-10  8:04 My proposal for the libgcc runtime ABI (ia64 gcc/glibc is broken.) H . J . Lu
2000-07-10 10:56 ` Mark Kettenis
2000-07-10 11:49   ` H . J . Lu
2000-07-10 15:34     ` Richard Henderson
2000-07-10 16:15       ` H . J . Lu
2000-07-10 16:54         ` Mark Kettenis
2000-07-10 17:09           ` Ulrich Drepper
2000-07-10 17:53             ` Joern Rennecke
2000-07-10 17:58               ` Ulrich Drepper
2000-07-10 18:12                 ` H . J . Lu
2000-07-11 10:57               ` Mark Kettenis
2000-07-11 11:52                 ` Jeffrey A Law
2000-07-11 12:11                 ` Joern Rennecke
2000-07-11 12:21                   ` Ulrich Drepper
2000-07-10 20:34             ` Jeffrey A Law
2000-07-10 21:27               ` Ulrich Drepper
2000-07-11  0:37                 ` Martin v. Loewis
2000-07-11  0:51                   ` Ulrich Drepper
2000-07-11  7:23                     ` H . J . Lu
2000-07-11  8:21                     ` Martin v. Loewis
2000-07-11  8:14                 ` Jeffrey A Law
2000-07-11  9:21                   ` Ulrich Drepper
2000-07-11  9:34                     ` Jeffrey A Law
2000-07-11 10:00                       ` H . J . Lu
2000-07-11 10:36                         ` Mark Kettenis
2000-07-11 10:40                           ` H . J . Lu
2000-07-11 15:12                             ` Richard Henderson
2000-07-11 16:07                               ` Mark Kettenis
2000-07-11 17:05                                 ` H . J . Lu
2000-07-11 17:55                                   ` Mark Kettenis
2000-07-11 20:00                                     ` Bill Nottingham
2000-07-11 20:33                                     ` H . J . Lu
2000-07-12  8:45                                       ` Joe Buck
2000-07-11 16:02                           ` Jeffrey A Law
2000-07-11 16:20                             ` Ulrich Drepper
2000-07-11 16:29                               ` Jeffrey A Law
2000-07-11 10:42                       ` Ulrich Drepper
2000-07-11 12:13                         ` Joern Rennecke
2000-07-11 12:38                           ` Ulrich Drepper
2000-07-11 13:26                             ` H . J . Lu
2000-07-11 13:33                         ` Alexandre Oliva
2000-07-11 13:43                           ` H . J . Lu
2000-07-11 14:53                             ` Alexandre Oliva
2000-07-11 15:02                               ` H . J . Lu
2000-07-11 15:23                                 ` Alexandre Oliva
2000-07-11 15:33                                   ` H . J . Lu
2000-07-11 15:47                                     ` Alexandre Oliva
2000-07-11 16:04                                       ` H . J . Lu
2000-07-11 21:49                                       ` A sample implemenation (Re: My proposal for the libgcc runtime ABI) H . J . Lu
2000-07-14  6:22                                   ` My proposal for the libgcc runtime ABI (ia64 gcc/glibc is broken.) Alexandre Oliva
2000-07-14  7:03                                     ` Jason R Thorpe
2000-07-14  7:22                                       ` Richard Earnshaw
2000-07-14  9:28                                         ` Jason R Thorpe
2000-07-14  9:47                                           ` Richard Earnshaw
2000-07-14 10:06                                             ` Jason R Thorpe
2000-07-14 10:23                                               ` Richard Earnshaw
2000-07-14 10:51                                                 ` Jason R Thorpe
2000-07-14  7:25                                     ` Mark Kettenis
2000-07-14 12:45                                       ` Geoff Keating
2000-07-14 18:03                                         ` Mark Kettenis
2000-07-17  2:00                                         ` Alexandre Oliva
2000-07-17  9:13                                           ` H . J . Lu
2000-07-18  9:21                                             ` Mark Kettenis
2000-07-18 15:15                                               ` H . J . Lu
2000-07-11 16:37                                 ` Mark Kettenis
2000-07-11 18:07                                   ` H . J . Lu
2000-07-11 14:28                         ` Martin v. Loewis
2000-07-11 14:36                           ` H . J . Lu
2000-07-11 15:09                           ` Ulrich Drepper
2000-07-11 23:07                             ` Martin v. Loewis
2000-07-12  8:19                               ` H . J . Lu
2000-07-12 10:49                                 ` Martin v. Loewis
2000-07-12 11:00                                   ` H . J . Lu
2000-07-11 23:07                             ` Martin v. Loewis
2000-07-12  8:16                               ` H . J . Lu
2000-07-11 16:08                         ` Jeffrey A Law
2000-07-11 16:30                           ` Ulrich Drepper
2000-07-11 15:10                       ` Richard Henderson
2000-07-11 16:10                         ` David Edelsohn
2000-07-11  9:59                     ` Geoff Keating
2000-07-11 11:45                       ` Linus Torvalds
2000-07-11 12:19                         ` Geoff Keating
2000-07-11 12:49                           ` Linus Torvalds
2000-07-11 14:25                             ` Alexandre Oliva
2000-07-11 15:22                               ` Richard Henderson
2000-07-11 15:01                             ` Geoff Keating
2000-07-11 15:22                               ` Linus Torvalds
2000-07-11 23:25                                 ` Geoff Keating
2000-07-12 11:09                                 ` Martin v. Loewis
2000-07-12 13:31                                   ` Linus Torvalds
2000-07-12 14:00                                     ` Martin v. Loewis
2000-07-12 14:12                                       ` Linus Torvalds
2000-07-12 15:10                                         ` Martin v. Loewis
2000-07-12 19:47                                         ` Geoff Keating
2000-07-12 14:01                                     ` Richard Henderson
2000-07-12 14:14                                     ` Michael Meissner
2000-07-11 14:38                         ` Martin v. Loewis
2000-07-11  0:17         ` Martin v. Loewis
2000-07-10 16:43       ` Mark Kettenis
2000-07-10 17:04         ` Ulrich Drepper
2000-07-10 17:15           ` Mark Kettenis
2000-07-10 17:48             ` Richard Henderson
2000-07-10 18:11               ` Zack Weinberg
2000-07-11  0:41                 ` Richard Henderson
2000-07-12 23:05                   ` Zack Weinberg
2000-07-11 10:46               ` Mark Kettenis
2000-07-15 13:02               ` Nix
2000-07-11 11:51 Mike Stump
2000-07-11 12:08 ` Ulrich Drepper
2000-07-11 16:21 Richard Kenner
2000-07-12  9:47 Phil Edwards
2000-07-12 10:01 ` H . J . Lu
2000-07-12 13:32   ` Richard Henderson
2000-07-12 23:01 ` Jeffrey A Law
2000-07-12 20:40 Richard Kenner

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).