This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: How to control the gcc's output format?
- From: Ian Lance Taylor <ian at airs dot com>
- To: "Zhu, Will" <Will dot Zhu at lsil dot com>
- Cc: <gcc-help at gcc dot gnu dot org>
- Date: 26 Apr 2006 10:06:58 -0700
- Subject: Re: How to control the gcc's output format?
- References: <5AE055B67BB5764693E2900C7E3699BE7610A1@pamail.ad.lsil.com>
"Zhu, Will" <Will.Zhu@lsil.com> writes:
> 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?
Configure and build gcc for a different target, e.g., i386-aout.
Ian