Vector tables and such...

Nick Clifton nickc@cambridge.redhat.com
Fri Jun 7 03:52:00 GMT 2002


Hi Mark,

> 	.long	start				//  0 - reset
> 
> Now I was hoping that the linker would link "start" above with the
> assembler routine "start". (which happens to be in another file)
> However it only allocates the space for a long (filled with zeros)
> and doesn't put the address of "start" at that location.

> Am I missing something or am I assuming the wrong operation with the
> ".long" keyword?

No, .long should work as you expect.

If you run "objdump -dr" on your assembled test code do you see a
reloc for the "start" symbol ?

Is "start" declared in a C or C++ source file ?  It is possible that
the compiler is prefixing user symbols with an underscore, so that the
definition of "start" actually becomes "_start".

Cheers
        Nick



More information about the Binutils mailing list