bug-glibc
[Top][All Lists]
Advanced

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

printf denies redirection


From: chenyu
Subject: printf denies redirection
Date: Sat, 23 Oct 2004 15:18:33 +0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510

Hi, everyone
 I'm encoutering a problem with ld.
 First, I compile and link my program as follows:
 gcc -Wl,-r -Wl,-d -static try.c -o try.o
 ld -q try.o -o try.out

The little program try.c is like this:

===========================
#include <stdio.h>
int main()
{
    printf("this is just a try\n");
    return 0;
}
===========================


./try.out
./try.out &> try.log
The first one gives a good output, the second fails, there is nothing in file try.log. The output simply could not be redirected.

The compiler I use is a cross compiler generated by gcc 3.4.1 to work on a mips platform, and the ld version is GNU ld 041021.

All I want to do is to create a statically linked executable file with address information, relocation information and common symbols. Then this file could be used as the input file of ALTO(A Link Time Optimizer). However, when I do this, the output of the file could not be redirected. What's wrong with it?

BTW, if anyone happens to be dealing with ALTO too, would you please give me some advice on how to port it to a mips platform? It originally works on Alpha. And I haven't subscribed this mailing list, so please send the letter directly to my mail box. Thanks a lot.

Best Wishes
yu chen





reply via email to

[Prev in Thread] Current Thread [Next in Thread]