[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: gcc on a biarch system

* marc.miller@amd.com <marc.miller@amd.com> [030707 14:41]:
> Since other ISVs are adopting the use of linux32, I recommend
> consistency here.  AFAIK, the basic functions of linux32 are (1) to
> change the architecture reported by uname, and (2) to adjust the
> available address space for that process to 3GB, such as you would
> find on most 32-bit Linux systems (many programs get confused when
> they have access to the full 4GB of 32-bit addressable space, and
> imposing a limit unconfused them).  Exact behavior can be modified by
> passing switches to the command.  

If I understand what linux32 does the program is quite trivial.

$ uname -m
$ ./linux32 uname -m

I am not a Debian developer (yet), so maybe someone that is can package
it to speed up the process...


--- snip ---

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/personality.h>

int main (int argc, char *const argv[])
        int rc;

        if (argc<2) {
                printf ("usage: linux32 <program> <arguments>\n");
		exit (1);

        rc = personality (PER_LINUX32);
        if (rc == -1) {
                perror ("personality (PER_LINUX32)");
                exit (1);

        return execvp (argv[0], argv);


				WebSig: http://www.jukie.net/~bart/sig/

Attachment: pgpxzyDvuF4iu.pgp
Description: PGP signature

Reply to: