This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
How to control the gcc's output format?
- From: "Zhu, Will" <Will dot Zhu at lsil dot com>
- To: <gcc-help at gcc dot gnu dot org>
- Date: Wed, 26 Apr 2006 16:11:59 +0800
- Subject: 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