bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/16867] New: linking object with separate debug file results in "


From: amodra at gmail dot com
Subject: [Bug ld/16867] New: linking object with separate debug file results in "relocation .. has invalid symbol index"
Date: Wed, 23 Apr 2014 04:33:04 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=16867

            Bug ID: 16867
           Summary: linking object with separate debug file results in
                    "relocation .. has invalid symbol index"
           Product: binutils
           Version: 2.25 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: amodra at gmail dot com

cat > start.s <<EOF
 .text
 .dc.a main
 nop
EOF
as -gdwarf-2 -o start.o start.s
objcopy --only-keep-debug start.o debug_start.o
strip --strip-debug start.o
objcopy --add-gnu-debuglink=debug_start.o start.o
ld start.o
ld: warning: cannot find entry symbol _start; defaulting to 0000000000400078
ld: debug_start.o(.debug_info): relocation 0 has invalid symbol index 5
ld: debug_start.o(.debug_info): relocation 1 has invalid symbol index 6
ld: debug_start.o(.debug_info): relocation 2 has invalid symbol index 1
ld: debug_start.o(.debug_info): relocation 3 has invalid symbol index 1
start.o:(.text+0x0): undefined reference to `main'

ld tries to give source file/line number for the undefined symbol error.  This
means attempting to read debug info, and it's when relocating that debug info
that we get the "invalid symbol index" errors.

-- 
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]