Sponsored Content
Operating Systems Linux Gentoo compiling 32 bit application on 64 bit linux(x86_64) Post 302151594 by porter on Sunday 16th of December 2007 01:58:16 PM
Old 12-16-2007
Quote:
Originally Posted by this213
Next, why would you want to create 32-bit objects on a 64-bit platform?
32 bit programs are smaller and faster for programs that don't need more than 2Gig of memory. Most 64 bit processers (DEC Alpha excepted) support both 32bit and 64bit binaries, and most 64 bit operating systems support different memory models simultaneously on a process by process basis.

I've generally found that compilers on 64 bit systems build 32 bit code by default and require additional switches to produce 64 bit code. The linkers are normally able to work out what memory model the code is and will reject attempts to link code with differing models.
 

7 More Discussions You Might Find Interesting

1. AIX

Compiling 32 bit app on 64 bit kernal

I've been trying to compile an application that works on AIX 5L in 32 bit mode on an AIX 5L 64 bit mode machine. In doing so I get a lot of undefined symbol errors. Below is a sample of what the output looks like..... %make -f makefile_hl7 all cc... (3 Replies)
Discussion started by: morrisey
3 Replies

2. Red Hat

boot the 32 bit kernel on a 64 bit PPC Linux machine?

Hi all, I'm looking to cover a corner case for an upcoming test cycle. Is there a way to boot a RedHat Advanced Server 4 (update 3) installed on a Power PC machine to use a 32 bit kernel? This would be similar to what is done here -> https://www.unix.com/aix/26204-aix-platform.html I've done... (0 Replies)
Discussion started by: philrau
0 Replies

3. Linux

Is it possible to compile 64 bit application on 32 bit machine

Hi, I am using 32 bit machine, and I want to compile 64 bit application on 32-bit machine. So please tell me is it possible or not? Regards Mandar (7 Replies)
Discussion started by: Mandar123
7 Replies

4. UNIX for Advanced & Expert Users

migrating unix mp-ras 32 bit to linux suse 64 bit

Hi. I need to migrate the whole unix environment from a Unix mp-ras 32 bit to a Linux Suse 64 bit. 1) can i use cpio to copy the data? 2) can i just copy the users from unix to linux or do i have to create them by hand 3) are there any other concerns i should worry about? thanx (1 Reply)
Discussion started by: mrodrig
1 Replies

5. UNIX for Advanced & Expert Users

Error compiling 32-bit Qt-4.7 on 64-bit Ubuntu OS

Hi, I am compiling Qt-4.7 for 32-bit on 64-bit (x86_64) Ubuntu 8.04 desktop. I have installed all the 32-bit libraries (/lib32 and /usr/lib32) through getlibs and "apt-get install ia32-libs". But I am getting the following error while configuring the qt project as: ./configure -platform... (2 Replies)
Discussion started by: royalibrahim
2 Replies

6. UNIX for Dummies Questions & Answers

Unix flavors that run on x86, x86_64 bit processors?

Hello everyone. This is an awesome forum. Glad to have joined! :) I use Linux mostly, even for Desktop usage. I just love everything about it, all the way down to how the font looks while browsing. Its just so sleek and sexy. But I also boot Windows for those programs I just need that only... (23 Replies)
Discussion started by: insomnia
23 Replies

7. Red Hat

Unable to install 32 bit application on 64 bit OS

Hi, I am new to Linux OS. My question is that "is it possible to install 32 Bit application on 64 Bit OS?" I have the following Redhat OS on VMware workstation. OS - Red Hat Enterprise Linux Server release 6.2 | 2.6.32-220.el6.x86_64 While installing the application I am getting the... (2 Replies)
Discussion started by: poga
2 Replies
ddi_model_convert_from(9F)				   Kernel Functions for Drivers 				ddi_model_convert_from(9F)

NAME
ddi_model_convert_from - determine data model type mismatch SYNOPSIS
#include <sys/ddi.h> #include <sys/sunddi.h> uint_tddi_model_convert_from(uint_t model); INTERFACE LEVEL
Solaris DDI specific (Solaris DDI). PARAMETERS
model The data model type of the current thread. DESCRIPTION
ddi_model_convert_from() is used to determine if the current thread uses a different C Language Type Model than the device driver. The 64-bit version of Solaris will require a 64-bit kernel to support both 64-bit and 32-bit user mode programs. The difference between a 32-bit program and a 64-bit program is in its C Language Type Model: a 32-bit program is ILP32 (integer, longs, and pointers are 32-bit) and a 64-bit program is LP64 (longs and pointers are 64-bit). There are a number of driver entry points such as ioctl(9E) and mmap(9E) where it is necessary to identify the C Language Type Model of the user-mode originator of an kernel event. For example any data which flows between programs and the device driver or vice versa need to be identical in format. A 64-bit device driver may need to modify the format of the data before sending it to a 32-bit application. ddi_model_convert_from() is used to determine if data that is passed between the device driver and the application requires reformatting to any non-native data model. RETURN VALUES
DDI_MODEL_ILP32 A conversion to/from ILP32 is necessary. DDI_MODEL_NONE No conversion is necessary. Current thread and driver use the same data model. CONTEXT
ddi_model_convert_from() can be called from any context. EXAMPLES
Example 1 : Using ddi_model_convert_from() in the ioctl() entry point to support both 32-bit and 64-bit applications. The following is an example how to use ddi_model_convert_from() in the ioctl() entry point to support both 32-bit and 64-bit applications. struct passargs32 { int len; caddr32_t addr; }; struct passargs { int len; caddr_t addr; }; xxioctl(dev_t dev, int cmd, intptr_t arg, int mode, cred_t *credp, int *rvalp) { struct passargs pa; switch (ddi_model_convert_from(mode & FMODELS)) { case DDI_MODEL_ILP32: { struct passargs32 pa32; ddi_copyin(arg, &pa32, sizeof (struct passargs32), mode); pa.len = pa32.len; pa.address = pa32.address; break; } case DDI_MODEL_NONE: ddi_copyin(arg, &pa, sizeof (struct passargs), mode); break; } do_ioctl(&pa); .... } SEE ALSO
ioctl(9E), mmap(9E), ddi_mmap_get_model(9F) Writing Device Drivers SunOS 5.11 8 Feb 2001 ddi_model_convert_from(9F)
All times are GMT -4. The time now is 07:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy