This is the mail archive of the binutils@sources.redhat.com 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: Vector tables and such...


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


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