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]

ld "undefined reference" shows wrong line number


Hi Nick

Thank you for your reply.

On 21 June 2011 16:13, Nick Clifton <nickc@redhat.com> wrote:
> Hi Jon,
>
>> would someone be able to confirm if
>> this issue is reproducable if possible please.
>
> Not with the information you provided. ÂIn particular we need the command
> line to assemble the start.S file and the command line used to link it
> afterwards.

Sorry, I should have provided more info.

I have created a ticket:

http://sourceware.org/bugzilla/show_bug.cgi?id=12974

Cmd line:
arm-none-eabi-gcc -g start.S main.c Â-o test.elf

^ Note the -g is necessary to see line numbers rather than assembler
hex refs in the outout. I expect you already knew this though!


>> The line number 19 is the last symbol in the start.S. void main(void)
>> function does exist in the build as well. Possibly is this the debug
>> info that is incorrect in the start.o file?
>
> Very probably.
>
>> Let me know if you would like me to create a bugzilla ticket.
>
> Yes please. ÂPlease include the start.S file as well as the command lines
> mentioned above.

I've attached a zip to the bug ticket 12974 with the start.S and command line.

Thank you for taking a look.

Best regards, Jon


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