This is the mail archive of the gcc@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]

Re: How can I get rid of __main ?


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


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