public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: A patch for test case
@ 1997-08-29 23:32 Richard Henderson
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Henderson @ 1997-08-29 23:32 UTC (permalink / raw)
  To: egcs

>   In message you write:
>   > Without this patch, it will fail on any dynamic linker which
>   > uses global strcmp ().
> Tege comments?

Many dynamic linkers are self-contained and isolate themselves from
the surrounding environment. 

With glibc, this is not the case.  We share code between ld.so, libc.so
and libdl.so, and it is a feature that ld.so uses the symbols from the
surrounding environment so that things like overriding malloc work
correctly.

This fails, of course, when the user provides broken versions of those
functions, as this test does.  Making the symbol static removes the
broken function from the view of ld.so.


r~

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

* Re: A patch for test case
  1997-08-29 15:40 g77 problem in egcs-ss-970828 Mumit Khan
@ 1997-08-29 15:45 ` Jeffrey A Law
  0 siblings, 0 replies; 3+ messages in thread
From: Jeffrey A Law @ 1997-08-29 15:45 UTC (permalink / raw)
  To: egcs

  In message you write:
  > Without this patch, it will fail on any dynamic linker which
  > uses global strcmp ().
Tege comments?


  > -- 
  > H.J. Lu (hjl@gnu.ai.mit.edu)
  > ---
  > Index: gcc/testsuite/gcc.c-torture/execute/921007-1.c
  > ===================================================================
  > RCS file: /home/work/cvs/gnu/egcs/gcc/testsuite/gcc.c-torture/execute/92100
  > 7-1.c,v
  > retrieving revision 1.1.1.1
  > diff -u -r1.1.1.1 921007-1.c
  > --- 921007-1.c	1997/08/26 00:21:22	1.1.1.1
  > +++ 921007-1.c	1997/08/28 19:49:30
  > @@ -1,4 +1,4 @@
  > -int strcmp(){return-1;}
  > +static int strcmp(){return-1;}
  >  #define strcmp __builtin_strcmp
  >  main()
  >  {

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

* A patch for test case
@ 1997-08-28 19:37 H.J. Lu
  0 siblings, 0 replies; 3+ messages in thread
From: H.J. Lu @ 1997-08-28 19:37 UTC (permalink / raw)
  To: egcs

Without this patch, it will fail on any dynamic linker which
uses global strcmp ().

Thanks.


-- 
H.J. Lu (hjl@gnu.ai.mit.edu)
---
Index: gcc/testsuite/gcc.c-torture/execute/921007-1.c
===================================================================
RCS file: /home/work/cvs/gnu/egcs/gcc/testsuite/gcc.c-torture/execute/921007-1.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 921007-1.c
--- 921007-1.c	1997/08/26 00:21:22	1.1.1.1
+++ 921007-1.c	1997/08/28 19:49:30
@@ -1,4 +1,4 @@
-int strcmp(){return-1;}
+static int strcmp(){return-1;}
 #define strcmp __builtin_strcmp
 main()
 {

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

end of thread, other threads:[~1997-08-29 23:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-08-29 23:32 A patch for test case Richard Henderson
  -- strict thread matches above, loose matches on Subject: below --
1997-08-29 15:40 g77 problem in egcs-ss-970828 Mumit Khan
1997-08-29 15:45 ` A patch for test case Jeffrey A Law
1997-08-28 19:37 H.J. Lu

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