public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* How to control the gcc's output format?
@ 2006-04-26  8:12 Zhu, Will
  2006-04-26 17:07 ` Ian Lance Taylor
  0 siblings, 1 reply; 2+ messages in thread
From: Zhu, Will @ 2006-04-26  8:12 UTC (permalink / raw)
  To: gcc-help

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: How to control the gcc's output format?
  2006-04-26  8:12 How to control the gcc's output format? Zhu, Will
@ 2006-04-26 17:07 ` Ian Lance Taylor
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2006-04-26 17:07 UTC (permalink / raw)
  To: Zhu, Will; +Cc: gcc-help

"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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-04-26 17:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-26  8:12 How to control the gcc's output format? Zhu, Will
2006-04-26 17:07 ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).