This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

.lcomm generates symbol with type STT+AF8-NOTYPE not STT+AF8-OBJECT


Hi,

The statement

.lcomm symbol, length, align

has the same semantics with

.local symbol
.comm  symbol, length, align

Both of them put symbol in the .bss section.
However, the former makes symbol have type STT+AF8-NOTYPE,
and the latter makes symbol have type STT+AF8-OBJECT.

I think the symbol should have type STT+AF8-OBJECT.
We can achieve this effect by adding a line in read.c in gas directory

At the end of function s+AF8-lcomm+AF8-internal in read.c

change these code :

(2144)  subseg+AF8-set (current+AF8-seg, current+AF8-subseg)+ADs-
(2145)
(2146)  demand+AF8-empty+AF8-rest+AF8-of+AF8-line ()+ADs-

into:

(2144)  subseg+AF8-set (current+AF8-seg, current+AF8-subseg)+ADs-
(2145)  symbol+AF8-get+AF8-bfdsym (symbolP)-+AD4-flags +AHwAPQ- BSF+AF8-OBJECT+ADs-
(2146)  demand+AF8-empty+AF8-rest+AF8-of+AF8-line ()+ADs-




Jie Zhang



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]