Sponsored Content
Full Discussion: 64 bit Porting Problem !!!
Operating Systems Linux SuSE 64 bit Porting Problem !!! Post 302274715 by skaushal.schip on Thursday 8th of January 2009 08:17:22 AM
Old 01-08-2009
Hi otheus,

Thanx for your reply. Carefully looking at the code gave me idea that making that variable as unsigned long is harmless. So I made it as unsigned long.

I am facing another issue for which I need your help. Could you give me any idea about some compiler flags which give 64 bit porting specific warnings for LInux? For example in Solaris if I provide "CC +w2 -xarch=v9" it gives the 64 bit porting warnings, but I couldn't find any similar things for Linux. I am using "gcc" to build the project and the above mentioned flag is not working with this.

Thank you in advance.

Regards,
Saurabh
 

9 More Discussions You Might Find Interesting

1. AIX

porting an application on 64-bit AIX version 5

Hi all, I am facing problem in porting to 64 bit AIX especially with compiling options to compile and run under 64 bit kernel.Can any one put some light on the issue thanks in advance vishal (14 Replies)
Discussion started by: vishalzone2002
14 Replies

2. UNIX for Dummies Questions & Answers

A bit of a problem with a UNIX based server.

Alright. As the title states, I'm working with a UNIX based web server(Sun Fire v120). The problem I'm currently having is trying to properly configure it for hosting. If anyone could help me out, it would be great. Much thanks. -XTIZ3 (2 Replies)
Discussion started by: XTIZ3
2 Replies

3. Solaris

Porting C++ 32-bit code on 64-bit Solaris

Hi, I am trying to convert 32-bit code to 64-bit. I have defined function int main() { int* l; size_t len1; fun(len1); return 0; } void fun(int* ptr) { cout<<"\nsizeof(ptr)"<<sizeof(ptr); } However while compiling getting error as : Error: Formal argument ptr... (2 Replies)
Discussion started by: amit_27
2 Replies

4. Red Hat

No Error for 64-bit porting

I am just trying to get the warning while compiling for 64-bit on Linux >> uname -a Linux mms4.es.cpth.ie 2.6.9-22.ELsmp #1 SMP Mon Sep 19 18:00:54 EDT 2005 x86_64 x86_64 x86_64 GNU/Linux =================================== Written test.c file which conatin : #include<stdio.h>... (1 Reply)
Discussion started by: amit_27
1 Replies

5. HP-UX

Tru 64 bit on HP AlphaServer ES45 creating problem Help Needed !!!

Dear All, I am new on Tru 64 bit Unix platform. I have a database server "HP AlphaServer ES45" version p5.1 of Tru Ux 64 bit installed. I have 4 hard drives in this system (1,2,3,4). My 4th hard drive is damaged which contain Oracle database files including partitions on 4th drives... (2 Replies)
Discussion started by: hellozishan
2 Replies

6. HP-UX

HP-Unix 64 bit Tape Drive creating problem

Hello All, I have HP Openview storage data protector version 5.5. When I am going to write my backup I have an error message saying "Connot Open Device /dev/rmt/0mn" Follownig is my output: # ls -l /dev/rmt/0mn crw-rw-rw- 2 bin bin 205 0x080140 Jan 17 16:41 /dev/rmt/0mn # uname -a... (2 Replies)
Discussion started by: hellozishan
2 Replies

7. HP-UX

hpux-itanium 64 bit problem for libC

i am trying to build on hpux-itanium 64 bit platform. my application needs to link to 64 bit version of the library libCsup.so This library is present in /usr/lib/hpux64/libCsup.so I am specifying the location of this library as linker flags LDFLAGS := -Wl,-N -Wl,+s... (0 Replies)
Discussion started by: skyineyes
0 Replies

8. Red Hat

DB2 ODBC connectivity problem in RHEL5 32 bit

Hi, I installed Db2 9.7 on RHEL5 32bit . Instance Name is db2inst1 amd in that i created database as mydb. I exported env variables for classpath ,db2dir,db2instance LD_LIBRARY_PATH ,PATH ,ODBC, ODBCHOME ,ODBCINI My application needs ODBC connectivity and so I modified odbc.ini file . ... (0 Replies)
Discussion started by: roopalidalvi231
0 Replies

9. Solaris

Solaris 10 apache 64 bit libldap.so problem

Hello, I am fairly new to Solaris so please be gentle ;). I am trying to install apache 2.4.3 adapting a script one of my colleagues wrote for version 2.2.23. The problem lies in the fact that I am aiming at creating a 64bit package hence I've already amended the script to reflect that. I... (3 Replies)
Discussion started by: teotao
3 Replies
ARCH_PRCTL(2)						     Linux Programmer's Manual						     ARCH_PRCTL(2)

NAME
arch_prctl - set architecture-specific thread state SYNOPSIS
#include <asm/prctl.h> #include <sys/prctl.h> int arch_prctl(int code, unsigned long addr); int arch_prctl(int code, unsigned long *addr); DESCRIPTION
arch_prctl() sets architecture-specific process or thread state. code selects a subfunction and passes argument addr to it; addr is inter- preted as either an unsigned long for the "set" operations, or as an unsigned long *, for the "get" operations. Subfunctions for x86-64 are: ARCH_SET_FS Set the 64-bit base for the FS register to addr. ARCH_GET_FS Return the 64-bit base value for the FS register of the current thread in the unsigned long pointed to by addr. ARCH_SET_GS Set the 64-bit base for the GS register to addr. ARCH_GET_GS Return the 64-bit base value for the GS register of the current thread in the unsigned long pointed to by addr. RETURN VALUE
On success, arch_prctl() returns 0; on error, -1 is returned, and errno is set to indicate the error. ERRORS
EFAULT addr points to an unmapped address or is outside the process address space. EINVAL code is not a valid subcommand. EPERM addr is outside the process address space. CONFORMING TO
arch_prctl() is a Linux/x86-64 extension and should not be used in programs intended to be portable. NOTES
arch_prctl() is supported only on Linux/x86-64 for 64-bit programs currently. The 64-bit base changes when a new 32-bit segment selector is loaded. ARCH_SET_GS is disabled in some kernels. Context switches for 64-bit segment bases are rather expensive. As an optimization, if a 32-bit TLS base address is used, arch_prctl() may use a real TLS entry as if set_thread_area(2) had been called, instead of manipulating the segment base register directly. Memory in the first 2 GB of address space can be allocated by using mmap(2) with the MAP_32BIT flag. Because of the aforementioned optimization, using arch_prctl() and set_thread_area(2) in the same thread is dangerous, as they may over- write each other's TLS entries. As of version 2.7, glibc provides no prototype for arch_prctl(). You have to declare it yourself for now. This may be fixed in future glibc versions. FS may be already used by the threading library. Programs that use ARCH_SET_FS directly are very likely to crash. SEE ALSO
mmap(2), modify_ldt(2), prctl(2), set_thread_area(2) AMD X86-64 Programmer's manual COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. Linux 2017-09-15 ARCH_PRCTL(2)
All times are GMT -4. The time now is 05:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy