This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How can I get rid of __main ?
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: Monika Chaddha <monika at acmet dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 27 May 2005 14:21:55 +0100
- Subject: Re: How can I get rid of __main ?
- References: <01e601c562a0$39bdda00$5100a8c0@monika>
Monika Chaddha wrote:
When I generate relocatable file (*.o) of (*.s) file then the
disassembly of 'jal __main" does not display properly in GDB
disassmebler. It displays as "jal 0x0<main>" because __main linked only
during linking process.
why is this a problem? You'll notice it happens for all function calls, not just
one to __main. Why are you looking at an unrelocated object file in gdb?
Can I get rid of __main in relocatable file or assembly file?
why do you want to do this?
You can remove the symbol with
objcopy -N __main foo.o newfoo.o
but i doubt very much that that is what you really want to do.
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk