Generating 32 bit applications on Solaris 9 / UltraSparc III+

Hallo.
I wish to generate some 32 bit applications on Solaris 9 and UltraSparc III+ platform. I need to do that as my process have to dinamically link a 32 bit shared object previosuly installed by another software (to be precise, the library is an "ELF 32-bit MSB dynamic lib SPARC Version 1, dynamically linked, not stripped").
After my generation, some executables that runned perfectly on my previous UNIX SCO platform, now crash when exiting.
Moreover I find out that my master process correctly launches the execution of a slave process (I traced the values of the paramters passed to the execv() system call) but the slave process immediatly exits because it gets wrong parameters (I found out that in the main() function within the slave program, the argc parameter is 0 (!!) that sounds really really strange!!)
Is there anyone able to help me?
For your information, when I compile my objects I use the following options:
cc -g -xc99=none -xtarget=ultra -xchar -c <source>
and when I link them I use the following:
/usr/ccs/bin/ld -z defs -z verbose -dy -B dynamic -o <processname> <object list> <shared library> -lm -lc
Doing so, both the master and slave process are "ELF 32-bit MSB executable SPARC32PLUS Version 1, V8+ Required, UltraSPARC1 Extensions Required, dynamically linked, not stripped"
Thank you in advance!!
Gianni

Why do you want to make your own link lines?
Use cc to link, not ld. You ask for trouble.
I made the following program:
int main(int argc, char **argv) { return argc;}
% cc -c t.c
Then used your link line to link it:
% /usr/ccs/bin/ld -z defs -z verbose -dy -B dynamic -o a.out t.o -ln -lc
% a.out
Segmentation fault (core dumped)
Use cc to link. Do not try to use ld. Or if you really, really think you have to use ld yourselves, run cc -### ... first to se what link line it uses, and try to make the variation you need yourselves. But all kind of options to ld can also be given to cc.

Similar Messages

  • Porting 32-bit Applications on 64-bit Solaris 9i

    Hi All,
    I tried to port an existing and well set 32-bit application onto Solaris 9.While I was compling the C-code part of it,I encountered the error
    wrong ELF class: ELFCLASS64.
    which I realized was due to intermixing of 32 and 64-bit applications.
    I just wanted to know if any oracle 10g libraries called or linked with the application happen to be of 32-bit ELFCLASS as it's only while linking with them that the error is thrown.
    cc -L/u01/app/oracle/product/10.1.0.3/lib/ -L/u01/app/oracle/product/10.1.0.3/rdbms/lib -o cps_lib_test cps_lib_test.o -lclntsh `cat /u01/app/oracle/product/10.1.0.3/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /u01/app/oracle/product/10.1.0.3/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10 -lvsn10 -lcommon10 -lgeneric10 -lmm -lcore10 -lxml10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 `cat /u01/app/oracle/product/10.1.0.3/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /u01/app/oracle/product/10.1.0.3/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10 -lvsn10 -lcommon10 -lgeneric10 -lcore10 -lxml10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 -lclient10 -lnnetd10 -lvsn10 -lcommon10 -lgeneric10 -lcore10 -lxml10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 `cat /u01/app/oracle/product/10.1.0.3/lib/sysliblist` -R/u01/app/oracle/product/10.1.0.3/lib -laio -lposix4 -lkstat -lm -lthread cps_lib.so
    ld: fatal: file cps_lib_test.o: wrong ELF class: ELFCLASS64
    ld: fatal: File processing errors. No output written to cps_lib_test
    *** Error code 1
    make: Fatal error: Command failed for target `build'
    Can someone please help?

    Sorry for the i attached to Solaris 9.
    The output of file cps_lib_test.o is ELF 64-bit MSB relocatable SPARC Version 1.
    Almost all the resulting files are of the type ELFCLASS64.But probably some of the oracle libraries while linking are causing the problem.

  • Porting 32-bit Applications on 64-bit Solaris 9

    Hi All,
    I tried to port an existing and well set 32-bit application onto Solaris 9.While I was compling the C-code part of it,I encountered the error
    wrong ELF class: ELFCLASS64.
    which I realized was due to intermixing of 32 and 64-bit applications.
    I just wanted to know if any oracle 10g libraries called or linked with the application happen to be of 32-bit ELFCLASS as it's only while linking with them that the error is thrown.
    cc -L/u01/app/oracle/product/10.1.0.3/lib/ -L/u01/app/oracle/product/10.1.0.3/rdbms/lib -o cps_lib_test cps_lib_test.o -lclntsh `cat /u01/app/oracle/product/10.1.0.3/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /u01/app/oracle/product/10.1.0.3/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10 -lvsn10 -lcommon10 -lgeneric10 -lmm -lcore10 -lxml10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 `cat /u01/app/oracle/product/10.1.0.3/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /u01/app/oracle/product/10.1.0.3/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10 -lvsn10 -lcommon10 -lgeneric10 -lcore10 -lxml10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 -lclient10 -lnnetd10 -lvsn10 -lcommon10 -lgeneric10 -lcore10 -lxml10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 `cat /u01/app/oracle/product/10.1.0.3/lib/sysliblist` -R/u01/app/oracle/product/10.1.0.3/lib -laio -lposix4 -lkstat -lm -lthread cps_lib.so
    ld: fatal: file cps_lib_test.o: wrong ELF class: ELFCLASS64
    ld: fatal: File processing errors. No output written to cps_lib_test
    *** Error code 1
    make: Fatal error: Command failed for target `build'
    Can someone please help?

    Check your client installation of oracle whether it is 64bit.
    One of your libraries you are linking is 32 bit instead of 64 bit

  • How can I use syscall() from 32-bit application in 64-bit Solaris (v. 5.8)

    Solaris 5.8
    Sun Blade 150 (64-bit)
    I have got SYGSYS when call syscall(...) from my 32-bit application.
    Is it possible to use syscall() in 32-bit applications under 64-bit Solaris?

    Hello again.
    You may use the debugger (mdb) to open the core file generated by the SIGSYS trap:mdb coreThen you type::regs to list the register values at the time of the trap (in hexadecimal form).
    For Sparc machines (it is more complicated on x86 machines) g1 holds the system call number, o0 holds the first argument, o1 the second one ... o5 the 6th one. (For system calls with more than 6 arguments the 7th, 8th... argument are stored on the stack.)
    If g1 is 0 you know that the system call is done indirectly using SYS_syscall so the arguments are shifted (see above) and o0 holds the system call number.
    You can exit mdb using::quitMartin

  • Solaris 9 32-bit application 256 descriptors

    Hi,
    There is a bug in Solaris, a 32-bit application running on 64-bit Solaris cannot open more than 256 descriptors. I read the article from Giri Mandalika http://developers.sun.com/solaris/articles/stdio_256.html. There is a solution for Solaris 10 described in that article. Is there any solution for Solaris 9? Was that solution backported to Solaris 9?
    Any hint is appreciated.
    Tomas

    Hello.
    This limitation is not a limitation of the Solaris operating system but of the libc library.
    A simple workaround could be:
    FILE *myfiles[1000];
    int i;
    // won't work if more than 256 files are open...
    for(i=0;i<1000;i++) myfiles=fopen(names[i],"w");
    for(i=0;i<1000;i++) fprintf(myfiles[i],"%u\n",i);
    Workaround - NOT TESTED:FILE *f;
    int myfiles[1000];
    int i;
    for(i=0;i<1000;i++) myfiles[i]=creat(names[i],0644);
    for(i=0;i<1000;i++)
    f=fdopen(dup(myfiles[i]),"w");
    fprintf(f,"%u\n",i);
    // fclose() will only close the handle duplicate returned by dup() !!
    fclose(f);
    -- EDIT --
    Tested on Solaris 9/Sparc:
    - You have to use "ulimit -n" to allow an application to use more than 256 file descriptors (maximum is 1024).
    - If more than 256 files are open "dup" and "dup2" will cause an SIGSEGV - obviously a bug in Solaris.
      Maybe you can use the following combination instead of using "fprintf":len=sprintf(buffer,...);
    write(file[i],buffer,len);
      I'm not sure if "write" etc. cause SIGSEGVs when more than 256 files are open.
    Martin                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Sun Cluster 3.1 64 bit support  for Solaris 10

    Hi:
    I have some questions when migrate SC 3.1 from solaris 9 to solaris 10.
    1) Does Clutster 3.1 for solaris 10 support 64 bit?
    I have develop own resource type which is compiled with 64 bit mode, while cluster admin program is 32 bit based. E.g. /usr/cluster/bin/scrgadm
    Will that cause any problem? For instance: 32 bit lib and 64 bit lib have the same name libscha.so will be loaded by 32 bit scrgadm and 64 bit my own developped resource type program.
    2) Can I download a Cluster 3.1 install-pkg for solaris 10, 64 bit supported., which means all admin files like scrgadm are 64 bit based.
    Or only ONE Cluster 3.1 version for solaris 10 is deliveried by SUN?
    Thanks in advance!
    BRs
    //rdctahu

    Hi,
    Comments on your 2 questions:
    1) Yes. IIRC, SC31 for S10 actually supports ONLY 64 bit. To be clear, this means
    Solaris has to be booted in 64 bit mode, but 32 bit applications would run just
    fine.
    As for your RT being 64 bit, and scrgadm being 32 bit, no problem.
    2) See (1). You are good.
    Go for it.
    HTH,
    -ashu

  • Multicore on a Java application on solaris 8, JVM 1.4.2_12 64bits ?

    Hello,
    We have a solaris 8 server with eight Ultrasparc-III+ processors (8 cores/threads), so normally 64 logical cpu's.
    We have a java application multithreaded ( actually NLWP is reporting 46 threads ).
    What Solaris 8 command could I use to see if the JVM is using the cores of my 8 processors ?
    I tried to use prstat -L -p <pid> but I only see at maximum 6 different cpuname in the state column. Other threads are in the sleep state, stop state, others in the run state.
    For my understanding run state tell that the thread is waitting for cpu time (Runnable: process in on run queue. ).
    But why don't I see more than a thread running on the same cpu, it's like only 8 threads can be ran at the same time, it's like the cores were not used ?
    Thanks for your advises,
    Best regards,
    Francois

    Interdit wrote:
    But why don't I see more than a thread running on the same cpu, it's like only 8 threads can be ran at the same time, it's like the cores were not used ?What is the real question?
    The OS controls thread scheduling for threads that need to do actual work.
    If your threads are not doing actual work then they won't be doing anything. And you control the work with your code, neither the VM nor the OS controls that.

  • Is there a 64-bit gdb for Solaris (I need both x86 and Sparc)

    I'm looking for publicly available versions of gdb for both SPARC and Intel. I'm the current
    developer of the NetBeans gdb module and we've had bugs filed that our Solaris users
    can't debug 64-bit applications.
    I've built a 64-bit gdb but its trying to dynamicly load a 32-bit .so (libexpat.so.0). I can still
    run it by setting LD_LIBRARY_PATH, but can't figure out how to configure my gdb build
    to use the right libexpat. Even if I could, I need something like the companion CD or
    sunfreeware.com to provide (I'd even settle for gdb.gnu.org:-)
    If anyone knows of publicly available versions, please email me.
    Thanks,
    Gordon

    Again, I think you need to check the Microsoft web page, as I was able to find 64 bit versions of IE8 for download.
    The URL to access the page is
    http://windows.microsoft.com/en-US/internet-explorer/downloads/ie-8
    From that page, I am able to select a 64 bit version of IE 8 for the following Operating Systems
      -- Windows XP 64 Bit
      -- Windows Vista 64 Bit
      -- Windows Server 2003 64 Bit
      -- Windows Server 2008 64 Bit
    Windows 7 is not listed as an option as it already comes with IE8 installed by default.
    Looks to me that Microsoft has already released a 64 bit version of IE8.
    In fact, I went ahead and downloaded IE8 for Windows 2003 Server x64 bit, and looked at the details of the file.  Each microsoft download has a digital signature associated with them, showing a date and time of when the exe was built.
    According to what is shown below, IE8 for Windows Server 2003 has been around since Sunday, March 08, 2009.
    So, what has adobe been doing since March of 2009?  IE8 has been 64 bit for well over 2 years now (it will be 3 in March of 2012). While I know that it does take time to develop new applications, I don't think it would take 3 years for Adobe to come up with a 64 bit version of Reader that could have been built under the 64 bit platform.
    --Brian

  • Running a 32 bits application from a JDK 1.3.1

    Can any one tell me how we can run a 32 bit application from a JDK 1.3.1 on a Solaris and AIX platform

    You mean an executable? See java.lang.Runtime.exec(). (Presumably you have compiled the app for both OSes.)
    If you mean a java application then the 32 bit part doesn't matter.

  • Is iDAR 5.0 64 bits application?

    Does anybody know if iDAR 5.0 is a 64 bit application or 32 bit one? I would like to get the bits because the file descriptor has different soft ulimit on 64 and 32 bits application.
    Thanks!

    Never mind. I just got the answer it run as 32 bit process even it can run on 64 bit Solaris 8
    Thanks!

  • How to delete the Generated files from application server(open hub)?

    hi experts,
    when i try to execute process chain the DTP it is giving below dump. Exception CX_RSBK_REQUEST_LOCKED logged.
    when i execute the DTP manually and trying to delete the previous request, it is giving for dump ITAB_DUPLICATE_KEY.
    so to delete the generated file from application server, how to delete it for specific dates?
    Information on where terminated
    Termination occurred in the ABAP program "GPD6S3OE0BCVGC6L9DBNVYQARZM" - in
    "START_ROUTINE".
    The main program was "RSBATCH_EXECUTE_PROZESS ".
    In the source code you have the termination point in line 2874
    of the (Include) program "GPD6S3OE0BCVGC6L9DBNVYQARZM".
    The program "GPD6S3OE0BCVGC6L9DBNVYQARZM" was started as a background job.
    and when i check the dump it is point out at below code
    " Populate the lookup table for 0STOR_LOC
    SELECT * from /BI0/TSTOR_LOC
    into CORRESPONDING FIELDS OF table L_0STOR_LOC_TEXT
    FOR ALL ENTRIES IN SOURCE_PACKAGE WHERE
    STOR_LOC = SOURCE_PACKAGE-STOR_LOC.
    but the programme is syntactically correct only.
    how to rectify the issue.
    regards
    venuscm
    Edited by: venugopal vadlamudi on Sep 28, 2010 1:59 PM

    hi experts,
    We have written start routine to get the storage location text and sending to File located at Application server through OPEN HUB.
    here is the code written in the Transformations
    In the global section
    Text for 0STOR_LOC
        DATA: l_0stor_loc_text TYPE HASHED TABLE OF /bi0/tstor_loc
              WITH UNIQUE KEY stor_loc.
        DATA: l_0stor_loc_text_wa TYPE /bi0/tstor_loc.
    and in the code to get the text
    " Populate the lookup table for 0STOR_LOC
        *SELECT * from /BI0/TSTOR_LOC*
          into CORRESPONDING FIELDS OF table L_0STOR_LOC_TEXT
          FOR ALL ENTRIES IN SOURCE_PACKAGE WHERE
                  STOR_LOC = SOURCE_PACKAGE-STOR_LOC.
    im sure there is problem with the Routine only. i think i need to change the code if so please provide me the modified one.
    thanks
    venuscm
    Edited by: venugopal vadlamudi on Sep 29, 2010 9:37 AM

  • 32-bit Application stops working on Windows 7 Enterprise machine after Windows is restarted

    Hello,
    We have a legacy 32-bit application that we distribute that was built with Microsoft's Visual Basic 6.0.  I have installed this application on many versions of Windows up to and including Windows 8.1 with no issues.
    Recently we provided the application to one of our end users who is running Windows 7 Enterprise on multiple laptops.  They are able to install the application and run it without issues until the machine is restarted.  After the machine is restarted
    the icon for the application changes to the standard Windows EXE icon and when they attempt to start the application they get the Windows message box:  "The version of this application is not compatible with the version of Windows you're running....".
    From the research I have done, this error would only apply to trying to run a 16-bit application or if you are trying to run a 64-bit application on a 32-bit version of Windows, neither of which is the case here.
    It also quite odd that they are able to install and run the application with no issues until Windows is restarted, and this has been verified on multiple of their machines.  The icon change is also quite odd.
    If anyone can provide any information regarding this issue it would be greatly appreciated.
    Thank you.

    Hi,
    Have you checked this page?
    Help with Windows 7 compatibility problems
    The following steps can help you with programs that aren't working properly:
     Step 1: Find software updates from the program manufacturer.            
     Step 2: Try re-installing the program by following the steps in
    Install a program.
     Step 3: Follow the steps in Make older programs run in this version of Windows.
     Step 4: Try running the program using Windows XP Mode. Get more information in
    Install and use Windows XP Mode.
    Best regards
    Michael Shao
    TechNet Community Support

  • How to run D2k 32 bit Application on Windows 7 64 Bit

    Dear Friends
    How to run D2k 32 bit Application on Windows 7 64 Bit, Presently I am having a Application developed in D2k 32 Bit, and it is running smooth on Windows Visa and Windows Xp. but now OUr company are going for new Laptops having Windows 7 64 Bit.
    Is there any way to Solve this Problem, or I have to upgrade D2k , which will be a 6 month job.
    sandy

    Since Forms 6 was never certified on Vista, I will assume you don't care about using Oracle Support. If that's the case, getting Forms 6 to work on Win 7 would likey require similar steps as you took to getting it to work on Vista.
    At minimum, you would need to do the following:
    1. Start with Forms/Reports 6.0.8.11 (6i Release 2)
    2. Install the latest (last) patch (#17), bring the version to 6.0.8.26
    3. It may be necessary to relax or disable Windows UAC
    4. To run the executables, you have to right click on them and select Run As Administrator in order for them to work properly.
    THE ABOVE IS NOT A SUPPORTED CONFIGURATION
    Forms 6.x was desupported years ago. If you have not already begun to do so, you should probably be working on a migration plan in order to get you to a supported version. The latest version is 11.1.1.3, so you are far behind. All versions newer than 6.x are entirely web based. This means that you will no longer be able to use the Forms runtime on the client machines. Client machines will require an Oracle certified browser and JRE in order to run Forms. Certification information for Fusion Middleware 11 (includes Forms 11) can be found here:
    http://www.oracle.com/technetwork/middleware/downloads/fmw-11gr1certmatrix.xls
    FMw Product information can be found here:
    http://www.oracle.com/us/products/middleware/index.html
    Forms 11 information can be found here:
    http://www.oracle.com/us/products/tools/oracle-forms-161771.html
    http://www.oracle.com/technetwork/developer-tools/forms/overview/index.html

  • BUG! Not system locale Filenames support for 32-bit applications error in Windows 8.1 x64 and other microssoft x64 OS-s.

    BUG! Not system locale Filenames support for 32-bit applications error in Windows 8.1 x64.        
    All Windows x64 (XP,2003,2007,Vista,7,8) have no support for not system locale filenames|foldernames for all 32-bit applications. I think it is BUG!
    For example,  it is possible to read files|folders with French or Chinese in English locale windows installed, rename it, but it is not possible open it, edit or delete. (ERRORS: File not found OR Unknown format)
    With using 64-bit programs no such problems. How does it works and how can I fix this? Is it problem with encoding in translating kernel instructions for 32-bit apps in x64 Windows OS's? Whether there are
    solutions to this problem OR some hacks|fixes? 

    Hi,
    Have you installed the language package for French or Chinese?
    If no, please download the language package and install them.
    To download language package, please click the link below,
    http://windows.microsoft.com/en-US/windows/language-packs#lptabs=win7
    Best Regards.
    Steven Lee
    TechNet Community Support

  • Does PE10 install as a 32-bit or 64-bit application on Windows 8 64 bit?

    Premiere Elements 10 was released as a 64 bit application only when on Windows 7 64 bit. For all other operating systems, it was still a 32 bit application running in the 32 bit compatibility mode of a 64 bit system.
    For me, that poses an interesting question about Premiere Elements 10 and how it was set up to recognize one operating system from another. I am still with Premiere Elements 10 on Windows 7 64 bit. So I ask, if I install Premiere Elements 10 on Windows 8 64 bit, will Premiere Elements 10 be a 32 or 64 bit application?
    Has anyone one been there and done that and found the answer?
    Thanks.
    ATR

    tjmx
    This thread was not directed to an Adobe issue, but rather as a fact finding mission regarding the possibiity to install Premere Elements 10 on Windows 8 64 bit. I am still working with Windows 7 64 bit and, unless forced to for some reason, will not be going to Windows 8 64 bit in the near future. Your post #10 of this thread directed to my attention motivated me to check your prior posts to get more information on your Adobe product issue to which you were referring.
    The first one that I found was
    http://forums.adobe.com/message/4807792#4807792
    Keep in mind that I am not affiliated with Adobe nor Sony in any way nor have any insider information on their products. My information is almost entirely based on hands on exploration and experimentation of the product. And, when my information is from something that I have read, I try to make the distinction between hands on and "from what I have read".
    After reading your thread cited above, it would appear that the issue does not go to Adobe, but rather to Sony and its pre-installed Premiere Elements products. Premiere Elements 10 Windows should be compatible with Windows 8 64 bit, provided you have the proper installation tool given to you. Clearly, Sony does not design to that end for its pre-install Premiere Elements. From what I have read, you should run into problems even in the same operating system if you uninstalled the pre-installed Premiere Elements 10 since Sony is not going to supply you with installation files nor discs for this. Am I correct in this?
    The spin of the message from Sony (shown in your prior thread referenced above) would suggest that you are dealing with a Premiere Elements 10/computer operating system compatibility issue. As I just mentioned in the previous paragraph of this post, you should be running into problems even in the same operating system if you uninstalled the pre-installed Premiere Elements 10 and then wanted to reinstall it.
    Have you read the fine print in the Sony Vaio purchase with regard to pre-installed Premiere Elements 10? If not, see if you can find anything in it that defines your rights as to obtaining installation means for the pre-installed that has to be uninstalled and then reinstalled for whatever reason, troubleshooting or upgrading of the operating system. This is an old story of Sony Vaio and pre-installed Premiere Elements.
    ATR

Maybe you are looking for