hbergh@oracle.nl (Herbert van den Bergh) (07/11/90)
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. On other systems I use there is a -S flag to the cc command which does this, but not on AIX 3.1. Trying to fool the compiler by replacing /bin/as doesn't work either because it isn't invoked at all. Why do I want this? I'd like to see what data can be put in the text segment. I think it must be possible to put more in the text segment than the -qro flag does. Thanks, Herbert van den Bergh, ORACLE Europe hbergh@oracle.nl, hbergh@oracle.com Rijnzathe 6, NL-3454 PV De Meern uunet!mcsun!orcenl!hbergh Phone: +31-3406-94211
steve@qe2.paloalto.ibm.com (07/12/90)
In article <914@nlsun1.oracle.nl> hbergh@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@oracle.nl, hbergh@oracle.com >Rijnzathe 6, NL-3454 PV De Meern uunet!mcsun!orcenl!hbergh >Phone: +31-3406-94211