This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: GAS overwrittes important bits when reading from symbol table
- From: BjÃrn Haase <bjoern dot m dot haase at web dot de>
- To: bviyer at ncsu dot edu
- Cc: binutils at sourceware dot org
- Date: Tue, 18 Oct 2005 23:16:07 +0200
- Subject: Re: GAS overwrittes important bits when reading from symbol table
Hi,
I'd suggest that you look wether the value of the symbol is inserted by the
linker or by the assembler. I'd rather assume it's the linker.
Use objdump -d -r unlinked-object-file-name in order to find out if the
reference to the main function is still present in the object file after
assembling the function.
If it's indeed the assembler, you should look for the assembler functions that
are responsible for the "fixups". If the problem is within gas the
responsible code should end up (IIUC with my limited knowledge) in the
gas/config directory of binutils.
If the problem occures during linking you will have to look at the bfd
directory instead. It might help to search a function carrying the keyword
"final_link_relocate".
Bjoern
P.S.:
HTH you meanwhile until someone with really profound knowledge responds.