LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-14-2006, 09:12 PM   #1
snowing
LQ Newbie
 
Registered: Jul 2005
Posts: 26

Rep: Reputation: 15
__libc_start_main on IA64


Today I encountered a weird problem, I reimplement __libc_start_main in my program. And this program can run very well on i386 and x86_64 either compiled dynamic-linked with " gcc test.c -o test" or compiled staticlly with "gcc test.c -o test -static". But on IA64 the program can run if I compiled it using dynamic-linking, but if I compiled it staticlly, the program cannot run. I read libc_start.c in glibc, but I cannot figure out why it cannot run when compiled staticlly. I am using RHEL4U2. Could you please give me some suggestions? Thank you very much.

#include <stdio.h>
#include <unistd.h>

extern int __libc_start_main(int(*main)())
{
printf("coming to __libc_start_main\n");
int result = main();
exit(result);
}

int main()
{
printf("coming to main\n");
return 0;
}
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ia64 images don't boot jeru Debian 3 07-15-2005 07:18 PM
x86_64, i386, ia64....!?!?!?!?! silex_88 Linux - Software 10 07-01-2005 12:59 PM
Where Can I get Redhat Linux for IA64 empas Linux - General 1 02-10-2004 01:29 AM
ia64 unknown fabster01 Linux - Newbie 5 10-30-2003 03:56 AM
IA32, IA64... Which one? kaega2 Linux - Software 1 09-28-2003 04:48 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration