Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* DU binaries and /sbin/loader (argv[0] problem?)
@ 1998-10-20 12:32 Aideen McConville
  1998-10-20 13:47 ` Herbert Riedel
  1998-10-24  4:24 ` DU binaries and /sbin/loader (argv[0] problem?) (FIXED! PATCH!) Bob McElrath
  0 siblings, 2 replies; 12+ messages in thread
From: Aideen McConville @ 1998-10-20 12:32 UTC (permalink / raw)
  To: axp-list

Hi,

I've tried running some 3.2 DU binaries under RH 5.1 (both 2.0.34 and
2.0.35 kernels) and don't know what to do about the "/sbin/loader
being passed as argv[0]" problem.

Communicator (communicator-v406-export.alpha-dec-osf3.2.tar.gz)
complains about "/sbin/loader: Fatal Error: loader cannot be invoked
directly" but then runs ok.

XEmacs (as built for DU3.2) gets very confused, thinking that
/sbin/loader is supposed to be the xemacs binary!

I tried Oleg Gusev's (oleg@leontief.ru) fix

[FAQ:how to send e-mail from netscape]

--- exec.c      Tue Jan 20 17:57:24 1998
+++ exec.c~     Tue Dec  2 18:35:05 1997
@@ -654,7 +654,7 @@
                dput(bprm->dentry);
                bprm->dentry = NULL;
                remove_arg_zero(bprm);
-               bprm->p = copy_strings(1, &bprm->filename, bprm->page, bprm->p, 2);
+               bprm->p = copy_strings(1, dynloader, bprm->page, bprm->p, 2);
                bprm->argc++;
                bprm->loader = bprm->p;
                dentry = open_namei(dynloader[0], 0, 0);

This worked for xemacs but sent communicator into a loop at startup.

Is there any other fix?

Thanks,
-- Aideen


^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: DU binaries and /sbin/loader (argv[0] problem?) (FIXED!  PATCH!)
@ 1998-10-25  1:28 Bob McElrath
  1998-10-26 15:23 ` Alvin Starr
  0 siblings, 1 reply; 12+ messages in thread
From: Bob McElrath @ 1998-10-25  1:28 UTC (permalink / raw)
  To: axp-list

BTW, Herbert, your return address hvr@hvrlab.ml.org doesn't work...you might
want to look into it.

On Sat, 24 Oct 1998, Herbert Riedel wrote:

> Hi!
> 
> On Fri, 23 Oct 1998, Bob McElrath wrote:
> 
> > Attached is a patch that fixes the Digital UNIX loading code so that argv[0]
> > is properly set.  i.e. ps now reveals (for DU 4.0 netscape): 
> [..]
> > With no complaints about /sbin/loader.  I think that this is "The Right Way"
> > to do it.  Herbert Riedel's patch (posted a few days ago) seemed a bit hasty
> > in that it left the bprm->loader variable pointing to the executable, not
> I was aware of that... and even feeling guilty :)

;)

> ...but what is the bprm->loader pointer used for anyway? 

Grepping the sources for loader, It seems that it is just a flag that says
that there is a "loader" that has to be prepended to the memory space of the
executable (I assume). It is checked in exec.c/setup_arg_pages(...) where it
seems to be setting up argv space for the loader.  It is also checked in
binfmt_aout.c/create_aout_tables(...) and I think this grabs the info
pointed to by loader and places it in user space to be run via the function
put_user(...).  I don't know what badness would happen if loader wasn't
pointing to /sbin/loader here...

> > XEmacs gives me symbol versioning problems (xemacs for DU3.2, I have libs
> > for DU4.0...) on libcurses.so.  Netscape 4.5 complains of unresolved symbols
> > in the binary!!!  (I don't think either of these problems are related to the
> I got that too... 
> 
> $ md5sum communicator-v45-export.alpha-dec-osf4.0.tar.gz
> 29649266e726b400cbaa45a352140af9
> communicator-v45-export.alpha-dec-osf4.0.tar.gz
> 
> Then I tried it on the same DU4.0b box where I grabbed the shlibs from and
> there it gave me the same unresolved symbols... no further comment..

Ah, so it's netscape that sucks.  But we knew that already...

No sense in telling them.  I can't count the number of bug reports I've
*tried* to send to those bastards...never a response of any kind, and the
bugs still exist...  I'm going to go hack on mnemonic now.  ;)

-- Bob

  ./'^`\._./'~`\._./'~`\._./'~`\._./'#`\._./'~`\._./'~`\._./'~`\._./'^`\.
 / Rube Goldberg? Bah! Amateur! I give you..Windows 98! Linux everywhere \ 
| Linux, because everyone's work is mission critical.   ANYTHING inside.  |
|_Bob McElrath (mcelrath@wisconsin.cern.ch) Univ. of Wisconsin at Madison_|
  \.___________________________________________________________________./




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

end of thread, other threads:[~1998-10-28 13:16 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-10-20 12:32 DU binaries and /sbin/loader (argv[0] problem?) Aideen McConville
1998-10-20 13:47 ` Herbert Riedel
1998-10-21 16:53   ` Bob McElrath
1998-10-22 12:15     ` Discussion of DU/shlibs patch (was DU binaries and /sbin/loader (argv[0] problem?)) Herbert Riedel
1998-10-28 13:05       ` UDB serial port xstal freq? Carles Perello
1998-10-24  4:24 ` DU binaries and /sbin/loader (argv[0] problem?) (FIXED! PATCH!) Bob McElrath
1998-10-24 10:01   ` Herbert Riedel
1998-10-27  0:00     ` Kurt Garloff
  -- strict thread matches above, loose matches on Subject: below --
1998-10-25  1:28 Bob McElrath
1998-10-26 15:23 ` Alvin Starr
1998-10-27  3:25   ` Bob McElrath
1998-10-27 16:11     ` Kurt Garloff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox