yasm-0.4 with following file messes up symbols:
global sectaddr
global bitwide
section .bss
sectaddr: resd 1
bitwide: resb 1
(EOF)
It generates proper 5-byte .bss section, but in some weird and wicked way places symbols in (0-byte) .text section:
Section Headers:
[Nr] Name Type Addr Off Size ES Flg Lk Inf Al
[ 0] NULL 00000000 000000 000000 00 0 0 0
[ 1] .shstrtab STRTAB 00000000 000034 000026 00 0 0 0
[ 2] .strtab STRTAB 00000000 00005c 00001b 00 0 0 0
[ 3] .symtab SYMTAB 00000000 000078 000060 10 2 4 4
[ 4] .text PROGBITS 00000000 000000 000000 00 AX 0 0 16
[ 5] .bss NOBITS 00000000 000000 000005 00 WA 0 0 4
Symbol table '.symtab' contains 6 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 00000000 0 NOTYPE LOCAL DEFAULT UND
1: 00000000 0 FILE LOCAL DEFAULT ABS hvar.asm
2: 00000000 0 SECTION LOCAL DEFAULT UND
3: 00000000 0 SECTION LOCAL DEFAULT 4
4: 00000000 0 NOTYPE GLOBAL DEFAULT 4 sectaddr
5: 00000004 0 NOTYPE GLOBAL DEFAULT 4 bitwide
The file works correctly with nasm-0.98.39.