This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

How to control the gcc's output format?


Hi,
    I meet a problem when developing a project.
    My GCC's output format is ELF obj file. But I want to get an a.out
format obj file. The objcopy failed because the output ELF obj file
contains some sections ( .rodata / .comment) that objcopy can not deal
with.

    So I want to know if I can control the GCC's output format and get
the a.out format obj file directly from the GCC's output? 
    I searched the GCC manual but did not find my desired answer.

    If I can only get an ELF format obj file
        1. Can I get rid of .rodata/.comment sections from my ELF obj
file?
        2. I know objcopy could remove the .comment section from the elf
obj file.         
         But I want to know is there any option control the compile
procedure 
         that can remove the .comment/.rodata section?

 Thank you

 Sincerely yours.
 Will


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]