public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: "H. J. Lu" <hjl@lucon.org>
To: Jack Howarth <howarth@fuse.net>
Cc: dejagnu@gnu.org, GDB <gdb@sources.redhat.com>,
	binutils@sources.redhat.com
Subject: PATCH: Fix libgloss.exp
Date: Tue, 13 May 2003 05:26:00 -0000	[thread overview]
Message-ID: <20030512222622.A6116@lucon.org> (raw)
In-Reply-To: <1052792498.6517.1.camel@debian>; from howarth@fuse.net on Mon, May 12, 2003 at 10:21:39PM -0400

[-- Attachment #1: Type: text/plain, Size: 1264 bytes --]

On Mon, May 12, 2003 at 10:21:39PM -0400, Jack Howarth wrote:
> HJ,
>    I can reproduce the problem and you did too. Look in your log...
> 
> /home/hjl/build/binutils/build-ppc-linux/binutils/binutils.log
> 
> Executing on host: gcc  -c  -o testglue.o
> /usr/share/dejagnu/testglue.c    (timeout = 300)
> Executing on host: gcc
> /home/hjl/src/binutils/binutils/binutils/testsuite/binutils-all/testprog.c testglue.o  -B/home/hjl/build/binutils/build-i686-linux/binutils/tmpdir/gas/ -Wl,-wrap,exit -Wl,-wrap,main -Wl,-wrap,abort -g  -lm   -o tmpdir/testprog    (timeout = 300)
> testglue.o(.text+0x290): In function `__wrap__exit':
> : undefined reference to `__real__exit'
> collect2: ld returned 1 exit status
> compiler exited with status 1
> output is:
> testglue.o(.text+0x290): In function `__wrap__exit':
> : undefined reference to `__real__exit'
> collect2: ld returned 1 exit status
>  
> UNTESTED: simple objcopy of executable
> UNTESTED: run objcopy of executable
> UNTESTED: run stripped executable
> UNTESTED: run stripped executable with saving a symbol
> 
> It is still happening with current binutils cvs.
> 

Another dejagnu 1.4.3 bug. No wonder why many people don't bother
with it. Here is a patch. I have no idea if it is a correct fix.


H.J.

[-- Attachment #2: dejagnu-_exit.patch --]
[-- Type: text/plain, Size: 945 bytes --]

2003-05-12  H.J. Lu <hongjiu.lu@intel.com>

	* lib/libgloss.exp (build_wrapper): Add -Wl,-wrap,_exit.

--- dejagnu/lib/libgloss.exp._exit	2002-08-29 20:53:40.000000000 -0700
+++ dejagnu/lib/libgloss.exp	2003-05-12 22:20:49.000000000 -0700
@@ -818,13 +818,13 @@ proc build_wrapper { gluefile } {
 	set result "";
     } elseif [target_info exists uses_underscores] {
 	set flags "additional_flags=-DUNDERSCORES";
-	set result "-Wl,-wrap,__exit -Wl,-wrap,_main -Wl,-wrap,_abort";
+	set result "-Wl,-wrap,_exit -Wl,-wrap,__exit -Wl,-wrap,_main -Wl,-wrap,_abort";
     } else {
 	set flags "";
 	if [target_info exists is_vxworks] {
 	    set flags "additional_flags=-DVXWORKS";
 	}
-	set result "-Wl,-wrap,exit -Wl,-wrap,main -Wl,-wrap,abort";
+	set result "-Wl,-wrap,exit -Wl,-wrap,_exit -Wl,-wrap,main -Wl,-wrap,abort";
     }
     if [target_info exists wrap_compile_flags] {
 	lappend flags "additional_flags=[target_info wrap_compile_flags]";

           reply	other threads:[~2003-05-13  5:26 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <1052792498.6517.1.camel@debian>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030512222622.A6116@lucon.org \
    --to=hjl@lucon.org \
    --cc=binutils@sources.redhat.com \
    --cc=dejagnu@gnu.org \
    --cc=gdb@sources.redhat.com \
    --cc=howarth@fuse.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).