Date: Sun, 17 Mar 2002 12:39:58 -0800 From: Peter Wemm <peter@wemm.org> To: obrien@FreeBSD.ORG Cc: sparc64@FreeBSD.ORG Subject: Re: Binutils diff needed Message-ID: <20020317203958.AA810390B@overcee.wemm.org> In-Reply-To: <20020314235003.A86056@dragon.nuxi.com>
next in thread | previous in thread | raw e-mail | index | archive | help
"David O'Brien" wrote:
> You will need to apply this diff to your Bintutils contrib directory
> until the 2.12.0-RELEASE upgrade. After applying this, you should be
> able to build a native binutils from /usr/src.
BTW; did you see what they did for ia64?
peter@overcee[12:28pm]~src/contrib/binutils/ld/emulparams-110> l elf64_ia64*
1 -rw-r--r-- 1 peter src 845 Mar 9 13:19 elf64_ia64.sh
1 -rw-r--r-- 1 peter src 72 Feb 21 20:18 elf64_ia64_fbsd.sh
peter@overcee[12:28pm]~src/contrib/binutils/ld/emulparams-111> cat elf64_ia64_fbsd.sh
. ${srcdir}/emulparams/elf64_ia64.sh
. ${srcdir}/emulparams/elf_fbsd.sh
peter@overcee[12:29pm]~src/contrib/binutils/ld/emulparams-112> cat elf_fbsd.sh
ELF_INTERPRETER_NAME=\"/usr/libexec/ld-elf.so.1\"
peter@overcee[12:29pm]~src/contrib/binutils/ld/emulparams-113>
However, and elf32.em overrides what bfd puts in the .interp section:
emultempl/elf32.em: if test x"${ELF_INTERPRETER_NAME+set}" = xset; then
emultempl/elf32.em: sinterp->contents = ${ELF_INTERPRETER_NAME};
...
if (sinterp != NULL)
{
sinterp->contents = ${ELF_INTERPRETER_NAME};
sinterp->_raw_size = strlen (sinterp->contents) + 1;
}
elf32.em is used for both 32 and 64 bit elf.
I'm not saying what you did was wrong, but I am wondering out loud why the
existing mechanisms are not working. I noticed that there is an
elf64_sparc_fbsd.sh as well as elf64_sparc.sh, which does the same thing as
on ia64. Maybe the bmake glue isn't picking up the emulparms/*_fbsd.sh
versions? I know the ia64 gcc sets -dynamic-interpreter on the command
line so I suspect that if ld is misconfigured on ia64, it would be hidden
by this.
>
> Index: elf64-sparc.c
> ===================================================================
> RCS file: /home/ncvs/src/contrib/binutils/bfd/elf64-sparc.c,v
> retrieving revision 1.1.1.7
> diff -u -r1.1.1.7 elf64-sparc.c
> --- elf64-sparc.c 22 Feb 2002 04:16:32 -0000 1.1.1.7
> +++ elf64-sparc.c 25 Feb 2002 07:50:00 -0000
> @@ -866,7 +866,7 @@
> #define LARGE_PLT_THRESHOLD 32768
> #define GOT_RESERVED_ENTRIES 1
>
> -#define ELF_DYNAMIC_INTERPRETER "/usr/lib/sparcv9/ld.so.1"
> +#define ELF_DYNAMIC_INTERPRETER "/usr/libexec/ld-elf.so.1"
>
> /* Fill in the .plt section. */
>
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-sparc" in the body of the message
>
Cheers,
-Peter
--
Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com
"All of this is for nothing if we don't go to the stars" - JMS/B5
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-sparc" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020317203958.AA810390B>
