This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: 2.1.94: No way to compile for mipsel-linux-gnu w/o optimization


On Tue, 10 Oct 2000, Maciej W. Rozycki wrote:

>  I've looked into it and it's not the way to go I suppose.  The problem is
> dl-open gets included both in ld.so (where it should use _dl_arg[cv]) and
> in libc.so (where it should use __libc_arg[cv]).  I don't know how to
> resolve this at the moment. 

 Here is a patch that works for me.

2000-10-15  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>

	* elf/rtld.c (_dl_argc): Initialize to allow aliases.
	(_dl_argv): Likewise.
	(__libc_argc): Define as an alias for _dl_argc.
	(__libc_argv): Define as an alias for _dl_argv.

  Maciej

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +

diff -up --recursive --new-file glibc.macro/elf/rtld.c glibc/elf/rtld.c
--- glibc.macro/elf/rtld.c	Wed Sep 27 02:25:53 2000
+++ glibc/elf/rtld.c	Sun Oct 15 15:11:00 2000
@@ -72,8 +72,10 @@ enum mode { normal, list, verify, trace 
    all the entries.  */
 static void process_envvars (enum mode *modep, int *lazyp);
 
-int _dl_argc;
-char **_dl_argv;
+/* These must be initialized or aliases won't work.  */
+int _dl_argc = 0;
+char **_dl_argv = NULL;
+
 unsigned int _dl_skip_args;	/* Nonzero if we were run directly.  */
 int _dl_verbose;
 const char *_dl_platform;
@@ -1605,3 +1607,7 @@ print_statistics (void)
     }
 #endif
 }
+
+/* Define these for dl-open.  */
+strong_alias (_dl_argc, __libc_argc)
+strong_alias (_dl_argv, __libc_argv)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]