Subject: siglist ?

From: Philip Blundell <[email-masked]>
Date: Mon, 29 Jun 1998 20:29:26 +0100

If I got everything right (ho, ho) this should be OK for both ELF and a.out.  
Give it a go.

p.

------- Forwarded Message

From: [email-masked] (H.J. Lu)
Subject: binutils 2.9.1.0.7 is released
To: [email-masked] (linuxgcc)
Date: 	Mon, 29 Jun 1998 12:11:59 -0700 (PDT)
X-Mailer: ELM [version 2.4 PL25 PGP2]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Orcpt: rfc822;[email-masked]
Sender: [email-masked]
Precedence: bulk
X-Loop: [email-masked]

Hi,

Since I haven't got any bug reports on 2.9.1.0.6 and 2.9.1.0.7 has only
ARM bug fixes, I will release it to public in a day or 2.

Thanks.

- -- 
H.J. Lu ([email-masked])
- ----
This is the beta release of binutils 2.9.1.0.7 for Linux, which is based
on binutils 2.9.1 plus Linux/ARM support and some x86 assembler changes.

I am planing to release this to the public as the final public release
for binutils 2.9.1.0.x based on binutils 2.9.1 and the current 16-bit
x86 assembler changes. The future release will be based on the binutils
snapshot, which has a different approach for 16-bit x86 assembly code.
Please test it as much as you can.

There was some problem on Linux/alpha. The binaries generated by the
new binituls may not run correctly on Linux/alpha. It turned out it was
a bug in the alpha dynamic linker in glibc 2.0.6. The current glibc 2.1
and glibc 2.0.7 should be ok.

This release should work on linux/x86/alpha. There are some ELF bug
fixes. But I don't know if it fixes all the bugs reported on
linux/sparc, Linux/MIPS and linux/PPC. I'd like to hear reports on them.
I'd like to release it to public soon. Please test it as much as you
can.

Please report any bugs related to binutils 2.9.1.0.7 to [email-masked].

Changes from binutils 2.9.1.0.6:

1. Fix various ARM bugs.

Changes from binutils 2.9.1.0.5:

1. A MIPS assembler ".align" bug is fixed.
2. bfd.h, bfd.h and bfdlink.h are included in the binary package.

Changes from binutils 2.9.1.0.4:

1. 2 x86 16bit mode assembler bugs, "ret" and "movb $35,0x4(%di)", are
fixed.

IMPORTANT:
The .plt format that the Alpha was using was not thread safe.  So I 
changed it.  The new format is *not* binary compatible with the old,
thus you must use glibc 2.0.4 to get an ld.so that can understand it.

Note that the new ld.so knows how to deal with the old .plt format, so
old libraries will still work, but they should be relinked eventually
for performance reasons.

The file list:

1. binutils-2.9.1.0.7.tar.gz. Source code.
2. binutils-2.9.1.0.6-2.9.1.0.7.diff.gz. Patch against the previous
   beta source code.
3. binutils-2.9.1.0.7-libc5.x86.tar.gz. Precompiled Linux/x86 binaries
   for libc 5.
4. binutils-2.9.1.0.7-glibc.x86.tar.gz. Precompiled Linux/x86 binaries
   for libc 6 (glibc 2.0.5c or above).

The primary ftp sites for the compiler/C library:

1. ftp://tsx-11.mit.edu/pub/linux/packages/GCC
2. ftp://sunsite.unc.edu/pub/Linux/GCC

The beta directory is in private/tofu under the GCC directory.
 
Most of my stuff can also be found at

   ftp://ftp.yggdrasil.com/private/hjl
   ftp://ftp.kernel.org/pub/linux/devel/gcc

To install the binary package, please follow the procedure very closely.
Please backup/save all the files you are instructed to delete and you
should do
 
	gzip -dc binutils-2.9.1.0.7-libc5.x86.tar.gz | tar tvvf -
or
	gzip -dc binutils-2.9.1.0.7-glibc.x86.tar.gz | tar tvvf -
 
to see what is in there.
 
Please do back up before you remove things.

To install for libc 5, PLEASE DO
 
1. su root
2. cd /
3. rm -f /usr/bin/encaps /usr/bin/nm
4. gzip -dc binutils-2.9.1.0.7-libc5.x86.tar.gz | tar xvvf -
5. ldconfig
 
To install for libc 6 (glibc 2.0.5c or above), PLEASE DO
 
1. su root
2. cd /
3. rm -f /usr/bin/encaps /usr/bin/nm
4. gzip -dc binutils-2.9.1.0.7-glibc.x86.tar.gz | tar xvvf -
5. ldconfig
 
Now you have the new gas/binutils under /usr/bin and
/usr/ix86-linuxaout/bin. You have to use
 
/usr/ix86-linuxaout/bin/as
 
and
 
/usr/ix86-linuxaout/bin/ld -m i386linux
 
if you want to use a.out as and ld directly.
 
I have changed the target names for Linux/x86 and Linux/x86 (a.out)
to ix86-linux and ix86-linuxaout respectively. The precompiled
binaries are installed under /usr/ix86-linux and /usr/ix86-linuxaout.
You should make appropriate symbolic links if you have a different
name for the Linux/x86 target, like i586-unknown-linux.

If you have an old linux library in the a.out format and you cannot
obtain the newer version in the ELF format for whatever reason, you
can try "objcopy --remove-leading-char" on the a.out library and see
if it can link with your code in ELF. For Sybase client libraries,
I did

# cd sybase/lib
# for f in *.a
do
  objcopy --remove-leading-char $f
done

It seems to compile/link fine with libc 5.4.2x. But I don't know
if it really works or not. The resulting binaries should work
if the libc ABI used by the old library is unchanged in the new
libc.

According to Bruce Milner <[email-masked]>:

Just a quick note about your example using objcopy for
sybase. The sybase a.out libraries "are" dependent on a changed
feature of the libc ABI.
 
The ctype macros changed to a byte order independent format
(little endian). In order to use the sybase libraries, one needs to
rename the the ctype table variables in the sybase library files
and link in an old version of the libc's "C-ctype.o ctype-info.o"
files.

[email-masked] put a ELF'ized version of these
libraries on 

ftp://mudshark.sunquest.com/pub/ctlib-linux-elf

Thanks.

H.J. Lu
[email-masked]
06/29/98

------- End of Forwarded Message

unsubscribe: body of `unsubscribe linux-arm' to [email-masked]

---

From: Vincent PENNE <[email-masked]>
Date: Tue, 30 Jun 1998 15:34:04 +0200

> If I got everything right (ho, ho) this should be OK for both ELF and a.out.

There is not problem only in siglist, but also in errlist.c and clone.S.
Here is my patch which solve the three files in libc as an attachment.

 Vincent.
Only in libc: confdefs.h
Only in libc: config.cache
Only in libc: config.log
diff -ur libc.ori/configure libc/configure
--- libc.ori/configure	Fri May 15 18:23:35 1998
+++ libc/configure	Sun Jun 21 08:34:09 1998
@@ -1455,7 +1455,7 @@
 if test -n "$critic_missing"; then
 { echo "configure: error: 
 *** Some critical program is missing or too old.
-*** Check the INSTALL file for required versions." 1>&2; exit 1; }
+*** Check the INSTALL file for required versions." 1>&2; }
 fi
 
 test -n "$aux_missing" && echo "configure: warning: 
Only in libc: configure~
diff -ur libc.ori/sysdeps/unix/sysv/linux/arm/clone.S libc/sysdeps/unix/sysv/linux/arm/clone.S
--- libc.ori/sysdeps/unix/sysv/linux/arm/clone.S	Sun Jun 21 08:37:19 1998
+++ libc/sysdeps/unix/sysv/linux/arm/clone.S	Sun Jun 21 08:31:04 1998
@@ -79,36 +79,3 @@
 PSEUDO_END (__clone)
 
 weak_alias (__clone, clone)
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public License as
-   published by the Free Software Foundation; either version 2 of the
-   License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public
-   License along with the GNU C Library; see the file COPYING.LIB.  If not,
-   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
-
-/* clone() is even more special than fork() as it mucks with stacks
-   and invokes a function in the right context after its all over.  */
-
-#include <sysdep.h>
-#define _ERRNO_H	1
-#include <bits/errno.h>
-
-/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg); */
-
-        .text
-ENTRY(__clone)
-	/* Somebody needs to write this.  */
-PSEUDO_END (__clone)
-
-weak_alias (__clone, clone)
Only in libc/sysdeps/unix/sysv/linux/arm: clone.S~
diff -ur libc.ori/sysdeps/unix/sysv/linux/errlist.c libc/sysdeps/unix/sysv/linux/errlist.c
--- libc.ori/sysdeps/unix/sysv/linux/errlist.c	Thu Apr  9 03:46:07 1998
+++ libc/sysdeps/unix/sysv/linux/errlist.c	Sun Jun 21 08:32:30 1998
@@ -30,7 +30,7 @@
 #include <sysdeps/gnu/errlist.c>
 
 #if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
-asm (".type __old_sys_errlist,@object;.size __old_sys_errlist,"
+asm (".type __old_sys_errlist,%object;.size __old_sys_errlist,"
      OLD_ERRLIST_SIZE_STR "*" PTR_SIZE_STR);
 
 extern const char *const *__old_sys_errlist;
Only in libc/sysdeps/unix/sysv/linux: errlist.c~
diff -ur libc.ori/sysdeps/unix/sysv/linux/siglist.c libc/sysdeps/unix/sysv/linux/siglist.c
--- libc.ori/sysdeps/unix/sysv/linux/siglist.c	Thu Feb 12 19:21:24 1998
+++ libc/sysdeps/unix/sysv/linux/siglist.c	Sun Jun 21 08:32:51 1998
@@ -40,7 +40,7 @@
 };
 
 #if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
-asm (".type __old_sys_siglist,@object;.size __old_sys_siglist,"
+asm (".type __old_sys_siglist,%object;.size __old_sys_siglist,"
         OLD_SIGLIST_SIZE_STR "*" PTR_SIZE_STR);
 
 asm (".data; .globl __old_sys_sigabbrev;  __old_sys_sigabbrev:");
@@ -54,7 +54,7 @@
 };
 
 #if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
-asm (".type __old_sys_sigabbrev,@object;.size __old_sys_sigabbrev,"
+asm (".type __old_sys_sigabbrev,%object;.size __old_sys_sigabbrev,"
         OLD_SIGLIST_SIZE_STR "*" PTR_SIZE_STR);
 
 extern const char *const *__old_sys_siglist;
Only in libc/sysdeps/unix/sysv/linux: siglist.c~

---

From: Vincent PENNE <[email-masked]>
Date: Tue, 30 Jun 1998 15:36:36 +0200

Here is what I get when trying to build libc for ELF, when it is
constructing the file libc.so. There is only part of it because it comes
from some cut/paste on my xterm window (don't know how to redirect the
stderr ...)

 Vincent.
hr.c: first defined here
sysdeps/../elf/ld.so: In function `__sbrk':
/build/libc/misc/../sysdeps/generic/sbrk.c(.text+0xeac0): multiple definition of `__sbrk'
sysdeps/../libc_pic.os(.text+0x7eed0):/build/libc/misc/../sysdeps/generic/sbrk.c: first defined here
sysdeps/../elf/ld.so: In function `_IO_default_seek':
/build/libc/libio/genops.c(.text+0xd4b4): multiple definition of `_IO_default_seek'
sysdeps/../libc_pic.os(.text+0x385e8):/build/libc/libio/genops.c: first defined here
sysdeps/../elf/ld.so: In function `__muldi3':
/build/gcc-2.8.1/./libgcc2.c(.data+0x1e8): multiple definition of `_IO_list_all'
sysdeps/../libc_pic.os(.data+0x11e8):/build/libc/locale/setlocale.c: first defined here
sysdeps/../elf/ld.so: In function `__open64':
/build/libc/io/../sysdeps/posix/open64.c(.text+0x105ac): multiple definition of `__open64'
sysdeps/../libc_pic.os(.text+0x799e0):/build/libc/io/../sysdeps/posix/open64.c: first defined here
sysdeps/../elf/ld.so: In function `_IO_un_link':
/build/libc/libio/genops.c(.text+0xc514): multiple definition of `_IO_un_link'
sysdeps/../libc_pic.os(.text+0x37648):/build/libc/libio/genops.c: first defined here
sysdeps/../elf/ld.so: In function `_IO_default_pbackfail':
/build/libc/libio/genops.c(.text+0xd3a4): multiple definition of `_IO_default_pbackfail'
sysdeps/../libc_pic.os(.text+0x384d8):/build/libc/libio/genops.c: first defined here
sysdeps/../elf/ld.so: In function `__strsep':
/build/libc/string/../sysdeps/generic/strsep.c(.text+0xe770): multiple definition of `__geteuid'
sysdeps/../libc_pic.os(.text+0x690d0):/build/libc/posix/execlp.c: first defined here
sysdeps/../elf/ld.so: In function `_wordcopy_bwd_aligned':
/build/libc/string/../sysdeps/generic/wordcopy.c(.text+0xe48c): multiple definition of `_wordcopy_bwd_aligned'
sysdeps/../libc_pic.os(.text+0x40300):/build/libc/string/../sysdeps/generic/wordcopy.c: first defined here
sysdeps/../elf/ld.so: In function `__muldi3':
/build/gcc-2.8.1/./libgcc2.c(.data+0x150): multiple definition of `_IO_2_1_stderr_'
sysdeps/../libc_pic.os(.data+0x1150):/build/libc/locale/setlocale.c: first defined here
sysdeps/../elf/ld.so: In function `strpbrk':
/build/libc/string/../sysdeps/generic/strpbrk.c(.text+0x10420): multiple definition of `strpbrk'
sysdeps/../libc_pic.os(.text+0x3e768):/build/libc/string/../sysdeps/generic/strpbrk.c: first defined here
sysdeps/../elf/ld.so: In function `_IO_switch_to_main_get_area':
/build/libc/libio/genops.c(.text+0xc614): multiple definition of `_IO_switch_to_main_get_area'
sysdeps/../libc_pic.os(.text+0x37748):/build/libc/libio/genops.c: first defined here
sysdeps/../elf/ld.so: In function `raise':
/build/libc/signal/../sysdeps/posix/raise.c(.text+0xee68): multiple definition of `raise'
sysdeps/../libc_pic.os(.text+0x5d70):/build/libc/signal/../sysdeps/posix/raise.c: first defined here
sysdeps/../elf/ld.so: In function `_IO_seekmark':
/build/libc/libio/genops.c(.text+0xd308): multiple definition of `_IO_seekmark'
sysdeps/../libc_pic.os(.text+0x3843c):/build/libc/libio/genops.c: first defined here
sysdeps/../libc_pic.os: In function `__pread':
/build/libc/posix/../sysdeps/unix/sysv/linux/pread.c(.text+0x78548): undefined reference to `__syscall_pread64'
sysdeps/../libc_pic.os: In function `__pwrite':
/build/libc/posix/../sysdeps/unix/sysv/linux/pwrite.c(.text+0x78678): undefined reference to `__syscall_pwrite64'
sysdeps/../libc_pic.os: In function `__pread64':
/build/libc/posix/../sysdeps/unix/sysv/linux/pread64.c(.text+0x787b4): undefined reference to `__syscall_pread64'
sysdeps/../libc_pic.os: In function `__pwrite64':
/build/libc/posix/../sysdeps/unix/sysv/linux/pwrite64.c(.text+0x7891c): undefined reference to `__syscall_pwrite64'
sysdeps/../libc_pic.os: In function `sysctl':
/build/libc/misc/../sysdeps/unix/sysv/linux/sysctl.c(.text+0x83c8c): undefined reference to `__syscall__sysctl'

---

From: Philip Blundell <[email-masked]>
Date: Tue, 30 Jun 1998 15:04:03 +0100

>constructing the file libc.so. There is only part of it because it comes

It looks like your libc.a is screwed up somehow.  Can you try `make clean && 
make' and see if the error still happens?

p.

---

From: Vincent PENNE <[email-masked]>
Date: Tue, 30 Jun 1998 18:01:45 +0200

> make' and see if the error still happens?

I have tryed maybe ten times already, deleting everything, uncompressing
the archive and patching again with your patches and my little patch. I
don't think the problem comes from my patch since it concerns only few
files and the the error are reported as coming from many files, however
since I sent it to you, you might check it is correct ... 

 Vincent.

---

From: Philip Blundell <[email-masked]>
Date: Tue, 30 Jun 1998 17:10:11 +0100

>since I sent it to you, you might check it is correct ... 

It wouldn't be correct to actually put it into the sources, but it looks OK 
for your purposes.  It's unlikely to be the cause of your problem I'd think.

p.