See attached tar.gz which duplicates this problems. This is from the README.
ONELINE: Missing Symbols, and erronously reported as undefined
TARGET: ARM-ELF
BINUTILS: binutils-2.17
Problem #1
In the "BAR" case, the SYMBOL is missing
from the disassembly output.
Problem #2
The Linker, (arm-elf-ld) depending upon the
order Foo then Bar, or Bar Then Foo, looses
they symbols also.
See "BthenF.dis" for an example.
Problem #3
The result of which, is the symbol I need
to debug my program, DOES NOT EXIST.
To repeat:
1) Using: "binutils-2.17" - configured with:
2) cd binutils-2.17 && ./configure --prefix=/some/place --target=arm-elf
[The remainder is in demo.sh]
ASSEMBLE the files as follows:
3) arm-elf-as -o foo.o foo.S
4) arm-elf-as -o bar.o bar.S
5) arm-elf-as -o xxx.o xxx.S
Disassemble the files as follows:
6) arm-elf-objdump -D foo.o > foo.dis
7) arm-elf-objdump -D bar.o > bar.dis
8) arm-elf-objdump -D xxx.o > xxx.dis
Link two programs
9) arm-elf-ld -o FthenB.arm-elf foo.o bar.o
10) arm-elf-ld -o BthenF.arm-elf bar.o foo.o
Dissasemble the two programs
11) arm-elf-objdump -D FthenB.arm-elf > FthenB.dis
12) arm-elf-objdump -D BthenF.arm-elf > BthenF.dis
--
FOO.S contains:
.section .textearly,"ax","progbits"
.global Foo
.type Foo, function
Foo:
bl Bar
---
Bar.S contains:
.section .textearly,"ax","progbits"
nop
.global Bar
.type Bar, function
Bar:
bl Foo
--
XXX.S contains
.text
.word 0x12345678
.global Xyz
.type Xyz, function
Xyz:
bl Foo
--
DEMO.SH contains:
(In this example, I am running an un-installed version of "binutils-070315"
I can also duplicate this with 2.17, and 2.17.50
WHERE=binutils-070315
$WHERE/gas/as-new -o foo.o foo.S
$WHERE/gas/as-new -o bar.o bar.S
$WHERE/gas/as-new -o xxx.o xxx.S
$WHERE/binutils/objdump -D foo.o > foo.dis
$WHERE/binutils/objdump -D bar.o > bar.dis
$WHERE/binutils/objdump -D xxx.o > xxx.dis
$WHERE/binutils/nm-new foo.o > foo.symbols
$WHERE/binutils/nm-new bar.o > bar.symbols
$WHERE/binutils/nm-new xxx.o > xxx.symbols
$WHERE/ld/ld-new -o FthenB.arm-elf foo.o bar.o
$WHERE/ld/ld-new -o BthenF.arm-elf bar.o foo.o
$WHERE/binutils/objdump -D FthenB.arm-elf > FthenB.dis
$WHERE/binutils/objdump -D BthenF.arm-elf > BthenF.dis
--
Summary: Missing Symbols, and erronously reported as undefined
Product: binutils
Version: 2.18 (HEAD)
Status: NEW
Severity: normal
Priority: P2
Component: binutils
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: duane at duaneellis dot com
CC: bug-binutils at gnu dot org
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: arm-elf
http://sourceware.org/bugzilla/show_bug.cgi?id=4408
--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.
___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils