From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: X-Archive-Original-Message-ID: <9612172044.AA09545@scooter> Date: Tue, 17 Dec 1996 21:22:10 -0100 (GMT+1) From: Christian Czezatke Subject: Re: digital unix <-> linux/alpha portability In-Reply-To: <9612170432.AA06170@scooter> Hi! At first thanks to all who have provided help on that issue. However, there are still some minor issues left... ;-) On Mon, 16 Dec 1996, Jim Nance wrote: > > > > 1) Is it somehow possible to do the same thing under Linux/Alpha (i.e. > > squeezing everything in the lowest 4GB of the address space.)? [snip] > Just as a hunch, try compiling something under Digital Unix with the > -taso flag and see if you can figure out where it put the bss, data, and > text segments. Then see if you can duplicate this under linux by setting > the flags you mentioned above. I would link statically to start > with, you can do the shared libs/loader later. The "-taso" flag was exactly what we are planning to use in the first place. We took a rather crude approach when we first tried to do something similar in Linux/Alpha. -- We just wrote a tiny program that does a pointer -> integer -> pointer cast. Then we tried to relocate the text, data and stack segment of that program to (arbitrary) places within the first gigabyte of the address space by using the appropriate "ld" flags. (Of course we made sure that they don't overlap.) -- Would it make any difference if we were using the same start addresses that digital unix uses in conjunction with the "-taso" flag? Actually I was assuming that _any_ starting address should work. -- Or is this a misconception? > > > 2) How about the compatibility of the gcc-assembler and the > > digital unix assembler? [snip] > You can use the Digital Unix assmebler with gcc, so I think it should be. > Note that Digital Unix generates ECOFF executables. RedHat 4.0 is an > ELF based system, so you might have some trouble using the default tools, > but older version of RedHat were ECOFF. Linux/Alpha can run both ECOFF > and ELF executables. Actually, I'm facing the problem "the other way round". -- The task that we are planning to undertake is to write an Alpha-backend for a compiler. That backend will (hopefully ;-) ) emit assembler code. So the problem is that I would like to be able to feed the same output of that backend into the digital unix assembler as well as into gcc's assembler. What I originally had in mind was wheter the assembler inputs that gcc and digital unix's assembler accept are identical -or at least similar enough- so that it is possible to feed the output of the backend into both with little or no postprocessing at all. The actual creation of an executable binary from assembler code is left to the respective tools of the respective platform. Mutually interchangeable binaries are not a requirement in that project. -- I think this will mostly eliminate the ECOFF vs. ELF problems. Using only the digital unix assembler is unfortunately not a possible solution since it is not available on Linux/Alpha... ;-) Thanks for your input. Christian -------------------------------------------------------------------- | Christian Czezatke, Student of Computer Science at the Vienna | | University Of Technology. -- Also hacking around with Linux and | | ACAD for fun and for profit. | -------------------------------------------------------------------- Our continuing mission: To seek out knowledge of C, explore strange Un*x commands, to boldly code where no-one has manpage 4. - The Linux Programer's Guide -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com