public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* 2.1.2pre1 outlook
@ 1999-07-14 18:26 Ulrich Drepper
  1999-07-14 22:58 ` Andreas Jaeger
  1999-07-15  4:41 ` Philip Blundell
  0 siblings, 2 replies; 8+ messages in thread
From: Ulrich Drepper @ 1999-07-14 18:26 UTC (permalink / raw)
  To: GNU libc hacker

Hi,

I will be in Montreal next week and would like to use this quiet phase
to have people test 2.1.2.  I hope to make 2.1.2pre1 before or on
Sunday.

So, if you kow about any missing patches in the 2.1 branch or any bugs
which have to be fixed please let me know ASAP.

-- 
---------------.      drepper at gnu.org  ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com   `------------------------

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

* Re: 2.1.2pre1 outlook
  1999-07-14 18:26 2.1.2pre1 outlook Ulrich Drepper
@ 1999-07-14 22:58 ` Andreas Jaeger
  1999-07-15 11:41   ` Ulrich Drepper
  1999-07-15  4:41 ` Philip Blundell
  1 sibling, 1 reply; 8+ messages in thread
From: Andreas Jaeger @ 1999-07-14 22:58 UTC (permalink / raw)
  To: Ulrich Drepper; +Cc: GNU libc hacker

>>>>> Ulrich Drepper writes:

 > Hi,
 > I will be in Montreal next week and would like to use this quiet phase
 > to have people test 2.1.2.  I hope to make 2.1.2pre1 before or on
 > Sunday.

 > So, if you kow about any missing patches in the 2.1 branch or any bugs
 > which have to be fixed please let me know ASAP.

Please add the following two patches.  That should be all except
perhaps some platform specific fixes.

Andreas

1999-07-13  Jakub Jelinek  <jj@ultra.linux.cz>

        * sysdeps/unix/sysv/linux/shmat.c (shmat): Avoid casting a pointer
        to int.

1999-07-13  Andreas Schwab  <schwab@suse.de>

        * elf/dl-runtime.c (fixup, profile_fixup): Call alloca to prevent
        inlining.  Fixes PR libc/1198.

--- glibc-2-1-branch/elf/dl-runtime.c	Sun Feb 21 07:13:50 1999
+++ libc/elf/dl-runtime.c	Thu Jul 15 06:56:22 1999
@@ -57,6 +57,12 @@
   void *const rel_addr = (void *)(l->l_addr + reloc->r_offset);
   ElfW(Addr) value;
 
+  /* The use of `alloca' here looks ridiculous but it helps.  The goal is
+     to prevent the function from being inlined and thus optimized out.
+     There is no official way to do this so we use this trick.  gcc never
+     inlines functions which use `alloca'.  */
+  alloca (sizeof (int));
+
   /* Sanity check that we're really looking at a PLT relocation.  */
   assert (ELFW(R_TYPE)(reloc->r_info) == ELF_MACHINE_JMP_SLOT);
 
@@ -110,6 +116,12 @@
   ElfW(Addr) *resultp;
   ElfW(Addr) value;
 
+  /* The use of `alloca' here looks ridiculous but it helps.  The goal is
+     to prevent the function from being inlined, and thus optimized out.
+     There is no official way to do this so we use this trick.  gcc never
+     inlines functions which use `alloca'.  */
+  alloca (sizeof (int));
+
   /* This is the address in the array where we store the result of previous
      relocations.  */
   resultp = &l->l_reloc_result[reloc_offset / sizeof (PLTREL)];
--- glibc-2-1-branch/sysdeps/unix/sysv/linux/shmat.c	Wed Dec 16 06:57:28 1998
+++ libc/sysdeps/unix/sysv/linux/shmat.c	Thu Jul 15 06:56:45 1999
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1997, 1998, 1999 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
 
@@ -33,11 +33,11 @@
      const void *shmaddr;
      int shmflg;
 {
-  int retval;
+  long int retval;
   unsigned long raddr;
 
-  retval = INLINE_SYSCALL (ipc, 5, IPCOP_shmat, shmid, shmflg, (int) &raddr,
-			   (void *) shmaddr);
+  retval = INLINE_SYSCALL (ipc, 5, IPCOP_shmat, shmid, shmflg,
+			   (long int) &raddr, (void *) shmaddr);
   return ((unsigned long int) retval > -(unsigned long int) SHMLBA
 	  ? (void *) retval : (void *) raddr);
 }

-- 
 Andreas Jaeger   aj@arthur.rhein-neckar.de    jaeger@informatik.uni-kl.de
  for pgp-key finger ajaeger@aixd1.rhrk.uni-kl.de

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

* Re: 2.1.2pre1 outlook
  1999-07-14 18:26 2.1.2pre1 outlook Ulrich Drepper
  1999-07-14 22:58 ` Andreas Jaeger
@ 1999-07-15  4:41 ` Philip Blundell
  1 sibling, 0 replies; 8+ messages in thread
From: Philip Blundell @ 1999-07-15  4:41 UTC (permalink / raw)
  To: Ulrich Drepper; +Cc: GNU libc hacker

>So, if you kow about any missing patches in the 2.1 branch or any bugs
>which have to be fixed please let me know ASAP.

I think we need a patch to make the dynamic linker work with the ELF OSABI 
value that the new ARM binutils uses.  I'll send one shortly.

p.


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

* Re: 2.1.2pre1 outlook
  1999-07-14 22:58 ` Andreas Jaeger
@ 1999-07-15 11:41   ` Ulrich Drepper
  1999-07-15 14:05     ` Andreas Jaeger
  0 siblings, 1 reply; 8+ messages in thread
From: Ulrich Drepper @ 1999-07-15 11:41 UTC (permalink / raw)
  To: GNU libc hacker

Andreas Jaeger <aj@arthur.rhein-neckar.de> writes:

> 1999-07-13  Jakub Jelinek  <jj@ultra.linux.cz>
> 
>         * sysdeps/unix/sysv/linux/shmat.c (shmat): Avoid casting a pointer
>         to int.

This one is not necesary since it only effects SPARC64 which does not
work correctly with glibc 2.1 anyway.

> 1999-07-13  Andreas Schwab  <schwab@suse.de>
> 
>         * elf/dl-runtime.c (fixup, profile_fixup): Call alloca to prevent
>         inlining.  Fixes PR libc/1198.

This one I've added.  Thanks,

-- 
---------------.      drepper at gnu.org  ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com   `------------------------

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

* Re: 2.1.2pre1 outlook
  1999-07-15 11:41   ` Ulrich Drepper
@ 1999-07-15 14:05     ` Andreas Jaeger
  1999-07-15 16:14       ` Ulrich Drepper
  0 siblings, 1 reply; 8+ messages in thread
From: Andreas Jaeger @ 1999-07-15 14:05 UTC (permalink / raw)
  To: Ulrich Drepper; +Cc: GNU libc hacker

>>>>> Ulrich Drepper writes:

Ulrich> Andreas Jaeger <aj@arthur.rhein-neckar.de> writes:
>> 1999-07-13  Jakub Jelinek  <jj@ultra.linux.cz>
>> 
>> * sysdeps/unix/sysv/linux/shmat.c (shmat): Avoid casting a pointer
>> to int.

Ulrich> This one is not necesary since it only effects SPARC64 which does not
Ulrich> work correctly with glibc 2.1 anyway.

Does it only affect sparc64?  I thought it would affect every 64 bit
platform including alpha.

Andreas
-- 
 Andreas Jaeger   aj@arthur.rhein-neckar.de    jaeger@informatik.uni-kl.de
  for pgp-key finger ajaeger@aixd1.rhrk.uni-kl.de

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

* Re: 2.1.2pre1 outlook
  1999-07-15 14:05     ` Andreas Jaeger
@ 1999-07-15 16:14       ` Ulrich Drepper
  0 siblings, 0 replies; 8+ messages in thread
From: Ulrich Drepper @ 1999-07-15 16:14 UTC (permalink / raw)
  To: GNU libc hacker

Andreas Jaeger <aj@arthur.rhein-neckar.de> writes:

> Does it only affect sparc64?  I thought it would affect every 64 bit
> platform including alpha.

There is only one other supported one (Alpha) and they don't use this code.

-- 
---------------.      drepper at gnu.org  ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com   `------------------------

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

* Re: 2.1.2pre1 outlook
  1999-07-15 10:12 Philip Blundell
@ 1999-07-15 11:13 ` Ulrich Drepper
  0 siblings, 0 replies; 8+ messages in thread
From: Ulrich Drepper @ 1999-07-15 11:13 UTC (permalink / raw)
  To: Philip Blundell; +Cc: GNU libc hacker

Philip Blundell <pb@nexus.co.uk> writes:

> Here's that patch.  It's against the 2.1 branch; if it's OK we should also 
> install something morally equivalent in the mainline.

I don't like the patch in this way since it punishes other platforms
as well.  I'll see how I can rewrite it.

-- 
---------------.      drepper at gnu.org  ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com   `------------------------

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

* Re: 2.1.2pre1 outlook
@ 1999-07-15 10:12 Philip Blundell
  1999-07-15 11:13 ` Ulrich Drepper
  0 siblings, 1 reply; 8+ messages in thread
From: Philip Blundell @ 1999-07-15 10:12 UTC (permalink / raw)
  To: Ulrich Drepper, GNU libc hacker

>I think we need a patch to make the dynamic linker work with the ELF OSABI 
>value that the new ARM binutils uses.  I'll send one shortly.

Here's that patch.  It's against the 2.1 branch; if it's OK we should also 
install something morally equivalent in the mainline.

p.

1999-07-15  Philip Blundell  <pb@nexus.co.uk>

	* elf/dl-load.c (_dl_map_object_from_fd): Use ELF_ABI_RECOGNIZED
	to decide whether an object's ABI is acceptable.
	(ELF_ABI_RECOGNIZED): New macro; provide default definition.
	* sysdeps/arm/dl-machine.h (ELF_ABI_RECOGNIZED): Define.

--- elf/dl-load.c	1999/06/17 10:41:12	1.103.2.1
+++ elf/dl-load.c	1999/07/15 17:05:16
@@ -58,6 +58,12 @@
 #define MAP_BASE_ADDR(l)	0
 #endif
 
+/* By default we accept only ELFOSABI_SYSV and an ABI version of 0.  But
+   some systems may wish to do this differently.  */
+#ifndef ELF_ABI_RECOGNIZED
+#define ELF_ABI_RECOGNIZED(_h)		\
+	((_h)[EI_OSABI] == ELFOSABI_SYSV && (_h)[EI_ABIVERSION] == 0)
+#endif
 
 #include <endian.h>
 #if BYTE_ORDER == BIG_ENDIAN
@@ -663,9 +669,7 @@
     [EI_MAG3] = ELFMAG3,
     [EI_CLASS] = ELFW(CLASS),
     [EI_DATA] = byteorder,
-    [EI_VERSION] = EV_CURRENT,
-    [EI_OSABI] = ELFOSABI_SYSV,
-    [EI_ABIVERSION] = 0
+    [EI_VERSION] = EV_CURRENT
   };
   struct link_map *l = NULL;
 
@@ -721,7 +725,7 @@
   header = (void *) readbuf;
 
   /* Check the header for basic validity.  */
-  if (memcmp (header->e_ident, expected, EI_PAD) != 0)
+  if (memcmp (header->e_ident, expected, EI_OSABI) != 0)
     {
       /* Something is wrong.  */
       if (*(Elf32_Word *) &header->e_ident !=
@@ -746,10 +750,6 @@
 	LOSE (0, "ELF file version ident not " STRING(EV_CURRENT));
       /* XXX We should be able so set system specific versions which are
 	 allowed here.  */
-      if (header->e_ident[EI_OSABI] != ELFOSABI_SYSV)
-	LOSE (0, "ELF file OS ABI not " STRING(ELFOSABI_SYSV));
-      if (header->e_ident[EI_ABIVERSION] != 0)
-	LOSE (0, "ELF file ABI version not 0");
       LOSE (0, "internal error");
     }
 
@@ -759,6 +759,8 @@
     LOSE (0, "ELF file machine architecture not " ELF_MACHINE_NAME);
   if (header->e_phentsize != sizeof (ElfW(Phdr)))
     LOSE (0, "ELF file's phentsize not the expected size");
+  if (! ELF_ABI_RECOGNIZED (header->e_ident))
+    LOSE (0, "ELF file ABI not recognized");
 
 #ifndef MAP_ANON
 # define MAP_ANON 0
--- sysdeps/arm/dl-machine.h	1999/06/13 09:23:47	1.12.2.1
+++ sysdeps/arm/dl-machine.h	1999/07/15 17:05:41
@@ -454,3 +454,8 @@
 }
 
 #endif /* RESOLVE */
+
+/* We have unusual requirements for ABI acceptance.  */
+#define ELF_ABI_RECOGNIZED(_h)						\
+	(((_h)[EI_OSABI] == ELFOSABI_SYSV && (_h)[EI_ABIVERSION] == 0)  \
+	|| ((_h)[EI_OSABI] == ELFOSABI_ARM && (_h)[EI_ABIVERSION] == 0))


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

end of thread, other threads:[~1999-07-15 16:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-07-14 18:26 2.1.2pre1 outlook Ulrich Drepper
1999-07-14 22:58 ` Andreas Jaeger
1999-07-15 11:41   ` Ulrich Drepper
1999-07-15 14:05     ` Andreas Jaeger
1999-07-15 16:14       ` Ulrich Drepper
1999-07-15  4:41 ` Philip Blundell
1999-07-15 10:12 Philip Blundell
1999-07-15 11:13 ` Ulrich Drepper

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