bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/12974] New: ld "undefined reference" shows wrong line number


From: jg at jguk dot org
Subject: [Bug ld/12974] New: ld "undefined reference" shows wrong line number
Date: Fri, 8 Jul 2011 15:21:42 +0000

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

           Summary: ld "undefined reference" shows wrong line number
           Product: binutils
           Version: 2.20
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
        AssignedTo: address@hidden
        ReportedBy: address@hidden


Created attachment 5839
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5839
Sample build that illustrates the issue

output from ld shows the wrong line number for an "undefined reference". as my
tools are not so recent (codesourcery), would someone be able to confirm if
this issue is reproducible if possible please.

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?

I attach my sample assembler file and build commands, which is for ARM.



C:\test>make
arm-none-eabi-gcc --version
arm-none-eabi-gcc.exe (Sourcery G++ Lite 2010.09-51) 4.5.1
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

arm-none-eabi-ld --version
GNU ld (Sourcery G++ Lite 2010.09-51) 2.20.51.20100809
Copyright 2010 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.

arm-none-eabi-gcc -g start.S main.c -o test.elf
c:\tmp\cckh49E5.o: In function `go_main':
C:\test/start.S:18: undefined reference to `missing_global_buffer'
collect2: ld returned 1 exit status
make: *** [all] Error 1

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]