https://sourceware.org/bugzilla/show_bug.cgi?id=21667
Bug ID: 21667
Summary: Global alias of common symbol is silently dropped
Product: binutils
Version: 2.29 (HEAD)
Status: NEW
Severity: normal
Priority: P2
Component: gas
Assignee: unassigned at sourceware dot org
Reporter: hjl.tools at gmail dot com
Target Milestone: ---
[hjl@gnu-6 pr21661]$ cat y.S
.set foo1,foo
.globl foo1
.comm foo,8,8
[hjl@gnu-6 pr21661]$ make y.o
gcc -B./ -c -o y.o y.S
[hjl@gnu-6 pr21661]$ readelf -s y.o
Symbol table '.symtab' contains 5 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
1: 0000000000000000 0 SECTION LOCAL DEFAULT 1
2: 0000000000000000 0 SECTION LOCAL DEFAULT 2
3: 0000000000000000 0 SECTION LOCAL DEFAULT 3
4: 0000000000000008 8 OBJECT GLOBAL DEFAULT COM foo
[hjl@gnu-6 pr21661]$
I am expecting an error, like
[hjl@gnu-6 pr21661]$ cat z.S
.set foo1,foo
.comm foo,8,8
[hjl@gnu-6 pr21661]$ make z.o
gcc -B./ -c -o z.o z.S
/tmp/ccUmeC8m.s: Assembler messages:
/tmp/ccUmeC8m.s: Error: Local symbol `foo1' can't be equated to common symbol
`foo'
Makefile:37: recipe for target 'z.o' failed
make: *** [z.o] Error 1
[hjl@gnu-6 pr21661]$
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-binutils