From nobody  Tue Feb  9 14:45:32 1999
Received: (from nobody@localhost)
          by hub.freebsd.org (8.8.8/8.8.8) id OAA18857;
          Tue, 9 Feb 1999 14:45:32 -0800 (PST)
          (envelope-from nobody)
Message-Id: <199902092245.OAA18857@hub.freebsd.org>
Date: Tue, 9 Feb 1999 14:45:32 -0800 (PST)
From: kushn@mail.kar.net
To: freebsd-gnats-submit@freebsd.org
Subject: wrong (for FreeBSD) ELF_DYNAMIC_INTERPRETER in binutils
X-Send-Pr-Version: www-1.0

>Number:         9987
>Category:       gnu
>Synopsis:       wrong (for FreeBSD) ELF_DYNAMIC_INTERPRETER in binutils
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    jdp
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb  9 14:50:01 PST 1999
>Closed-Date:    Wed Feb 23 21:46:39 PST 2000
>Last-Modified:  Wed Feb 23 21:48:23 PST 2000
>Originator:     Vladimir Kushnir
>Release:        FreeBSD 4.0-CURRENT
>Organization:
Institute for Theoretical Physics, Kiev
>Environment:
FreeBSD kushnir.kiev.ua 4.0-CURRENT FreeBSD 4.0-CURRENT #0:
Sun Feb  7 03:39:58 EET 1999     volodya@kushnir.kiev.ua:/usr/src/sys/compile/KUSHNIR  i386
>Description:
In binutils (/usr/src/contrib/binutils/bfd/elf32-i386.c and
/usr/src/contrib/binutils/bfd/elf64-alpha.c) defined wrong
(for FreeBSD) ELF_DYNAMIC_INTERPRETER: /usr/lib/libc.so.1 for i386
and /usr/lib/ld.so for alpha. This puts wrong wrong ELF interpreter
into partially static (with some of libs shared) binaries and renders
them unusable
>How-To-Repeat:
/* hello.c */
#include <stdio.h>
void main() { printf("Hello, world!\n"); }

cc -static -o hello hello.c /usr/lib/libc.so (stupid in this case, of course)
./hello with output: ELF interpreter /usr/lib/libc.so.1 not found and "strings hello" shows /usr/lib/libc.so.1
>Fix:
Redefine ELF_DYNAMIC_INTERPRETER in both files
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->jdp 
Responsible-Changed-By: jdp 
Responsible-Changed-When: Thu Feb 11 09:12:45 PST 1999 
Responsible-Changed-Why:  
I'll take a look at this. 
State-Changed-From-To: open->closed 
State-Changed-By: jdp 
State-Changed-When: Wed Feb 23 21:46:39 PST 2000 
State-Changed-Why:  
Fixed in: 

src/contrib/binutils/bfd/elf32-i386.c	1.4 
src/contrib/binutils/bfd/elf64-alpha.c	1.3 
>Unformatted:
