This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
common symbols and GNU ld
- From: ali hagigat <hagigatali at gmail dot com>
- To: binutils at sourceware dot org
- Date: Wed, 11 May 2011 15:04:03 +0430
- Subject: common symbols and GNU ld
What is the meaning of common symbols? Are they defined by .comm
assembler directive ONLY? If I do not see .comm in the assembly
listing of a program so that program does not have common symbols?
right?
"FORCE_COMMON_ALLOCATION" of ld seems not working! Please consider the
following programs:
asm2.s
.comm dovom, 10
aval:
movl %edx, 32(%edi)
asm3.s
.section .text
.comm dovom, 10
aval:
movl $26, %eax
asm2.ld
FORCE_COMMON_ALLOCATION
as asm2.s -o asm2.o
as asm3.s -o asm3.o
ld asm2.o asm3.o -T asm2.ld -o asm2
The result:
asm2: file format elf32-i386
SYMBOL TABLE:
00000000 l d .text 00000000 .text
00000010 l d .bss 00000000 .bss
00000000 l .text 00000000 aval
00000004 l .text 00000000 aval
00000010 g O .bss 0000000a dovom
Why two different spaces are not considered for "dovom"?
The result is the same as 'asm2.ld' is empty!!