This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Toralf Lund <toralf@procaptura.com>
It works. I'm 100% sure about that. write() could be incorrect, as I haven't tested its functionality thoroughly - I've been focusing on checking whether it is called or not, and I think it isn't ;-(
I produced my test executable with gcc-2.95.3 when the 'specs' in my gcc-3.3.1 hadn't any default target board edited into it...
The peculiar thing with gcc-3.x has been that it magically replaces
'printf()'s with 'puts()', ie. "printf("Hello World");" will be changed
to be "puts("Hello World");". Producing the assembly file shows this:
That's fun ;-)
when gcc-2.95.3 still didn't edit whole functions away...
A bit like looking at the source code of printf and its friends and try to figure out how it all works, or try to trace its functionality via the disassembler output, I guess...So maybe you even haven't the 'printf()' in your executable but something else and that really doesn't output via 'write()' at all...
In this "Hello World" case the 'replaced printf()'s, also output'ed via '_write_r()' and then via 'write()', ie. these were linked into the executable, so replacing 'printf()'s with 'puts()'s isn't the reason for your problem...
Looking at the assembly output for the C code and seeing whether those
printf()'s are replaced with something else, can be one way to find
some sanity... In my "Hello World" case one looking at the disassembly
listing and trying to find the call to 'printf()' from it, could lead
into one soon going up the walls ;-)
int fflush(fp) int fp; /* dummy argument */ { /* do nothing */
return 0; }
------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |