This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: 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.


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