.lcomm generates symbol with type STT+AF8-NOTYPE not STT+AF8-OBJECT
Jie Zhang
zhangjie@magima.com.cn
Mon Aug 12 21:19:00 GMT 2002
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_NOTYPE,
and the latter makes symbol have type STT_OBJECT.
I think the symbol should have type STT_OBJECT.
We can achieve this effect by adding a line in read.c in gas directory
At the end of function s_lcomm_internal in read.c
change these code :
(2144) subseg_set (current_seg, current_subseg);
(2145)
(2146) demand_empty_rest_of_line ();
into:
(2144) subseg_set (current_seg, current_subseg);
(2145) symbol_get_bfdsym (symbolP)->flags |= BSF_OBJECT;
(2146) demand_empty_rest_of_line ();
Jie Zhang
More information about the Binutils
mailing list