generating assembly from c source

steve at qe2.paloalto.ibm.com steve at qe2.paloalto.ibm.com
Thu Jul 12 11:05:44 AEST 1990


In article <914 at nlsun1.oracle.nl> hbergh at oracle.nl (Herbert van den Bergh) writes:
>Can anyone tell me if it is possible to generate an assembly
>source from a c source that can be assembled again with /bin/as?
>I'm using AIX 3.1 9021.

	It's not possible.  Short of writing a disassembler, it can't be done.
You can get some partially informative information by using:

	cc -qlist file.c

This produces output into 'file.lst'.  Probably not exactly what you're looking
for, but it might be of some use.

>On other systems I use there is a -S flag to the cc command which
>does this, but not on AIX 3.1.

	Correct.  As mentioned above, it's not supported by the AIX C compiler.

>Trying to fool the compiler by replacing /bin/as doesn't work either
>because it isn't invoked at all.

	True.  The compiler goes straight to machine code.  It doesn't 
translate to assembler first.

>Herbert van den Bergh, ORACLE Europe	hbergh at oracle.nl, hbergh at oracle.com
>Rijnzathe 6, NL-3454 PV De Meern	uunet!mcsun!orcenl!hbergh
>Phone: +31-3406-94211



More information about the Comp.unix.aix mailing list