Re: Can collect2 just generate the c file?

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

 



I think you misunderstood my question.

collect2 runs through the list of files to link and collects the constructors and destructors. It then makes a c file of those items, compiles it, then calls ld again with the original list of objects plus the new object. I'd like to stop before the second call to ld is made. (I'm looking at the source now and I don't see that option).

Thanks,
Perry

On Jan 13, 2006, at 10:26 AM, Ian Lance Taylor wrote:

Perry Smith <pedz@xxxxxxxxxxxxxxxx> writes:

Can I call g++ with arguments so that it will generate the source
file (I assume it is a .c file) and then stop.

I want to call the linker myself.  I think that is going to be easier
to do in my situation.

g++ does not generate C code.  It translates directly from C++ to
assembler code.

You can get the assembler code with -S, or the assembler output with
-c.  Using -c will give you a .o file which you can use to call the
linker yourself.

Ian



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux