This is the mail archive of the
mailing list for the binutils project.
ld "undefined reference" shows wrong line number
- From: Jon Grant <jg at jguk dot org>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Sun, 10 Jul 2011 12:52:48 +0100
- Subject: ld "undefined reference" shows wrong line number
- References: <BANLkTikU-vUGwwgHCt+rpUFAzR=aXo4sng@mail.gmail.com> <4E00B4FF.firstname.lastname@example.org>
Thank you for your reply.
On 21 June 2011 16:13, Nick Clifton <email@example.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
Sorry, I should have provided more info.
I have created a ticket:
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