* argv[0] wrong for DEC Unix dynamic images
@ 1996-05-17 9:14 Harald Koenig
1996-05-18 9:33 ` Linus Torvalds
0 siblings, 1 reply; 2+ messages in thread
From: Harald Koenig @ 1996-05-17 9:14 UTC (permalink / raw)
running DEC Unix images using shared libs shows a problem with argv[0].
this is important for "virtex" which tries to open `argv[0]`.fmt as
TeX format file.
-------------------------------------------------------------------------------
main(int argc, char *argv[])
{
for (;argc--;) printf("'%s'\n",*argv++);
}
-------------------------------------------------------------------------------
when this program is compiled using DEC cc and run on Linux I get:
# ./a.out
'/sbin/loader'
Harald
--
All SCSI disks will from now on ___ _____
be required to send an email notice 0--,| /OOOOOOO\
24 hours prior to complete hardware failure! <_/ / /OOOOOOOOOOO\
\ \/OOOOOOOOOOOOOOO\
\ OOOOOOOOOOOOOOOOO|//
Harald Koenig, \/\/\/\/\/\/\/\/\/
Inst.f.Theoret.Astrophysik // / \\ \
koenig@tat.physik.uni-tuebingen.de ^^^^^ ^^^^^
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: argv[0] wrong for DEC Unix dynamic images
1996-05-17 9:14 argv[0] wrong for DEC Unix dynamic images Harald Koenig
@ 1996-05-18 9:33 ` Linus Torvalds
0 siblings, 0 replies; 2+ messages in thread
From: Linus Torvalds @ 1996-05-18 9:33 UTC (permalink / raw)
On Fri, 17 May 1996, Harald Koenig wrote:
>
> running DEC Unix images using shared libs shows a problem with argv[0].
> this is important for "virtex" which tries to open `argv[0]`.fmt as
> TeX format file.
Yes, I've seen this problem. I think it used to work corretly at some
point, because I used a lot of OSF/1 shared binaries in the early days of
Linux/alpha. However, I think it broke subtly when the loader was
rewritten. I don't use OSF/1 binaries any more, and most importantly I
don't have a OSF/1 system that I can use easily for testing, so I'd
really prefer it if somebody else (hint hint) tried to look into this.
I might as well warn you that all the OSF/1 binary compatibility stuff
has been gotten by trial and error, and especially the stack layout for
the /sbin/loader call is very much empirical. I don't even know what it's
supposed to look like, I only know that the linux loader works (I got the
stack layout by writing a dummy /sbin/loader and looking what OSF/1 put
on the stack by using execve_with_loader() or whatver the OSF/1 system
call is called that allows you to supply your own loader binary path)
Linus
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1996-05-18 9:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-05-17 9:14 argv[0] wrong for DEC Unix dynamic images Harald Koenig
1996-05-18 9:33 ` Linus Torvalds
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox