Hi Frank, below is two output for GoLink and "ld" each. You see, with "ld", the three sections are all well-aligned to 3 different page boundaries (text=rax=1000h, data=2000h,bss=3000h). With GoLink, the .bss alignment dont seem to work.
D:\NASM>golink /console prog.obj base6.dll ;using golink. Attention to RBX and RCX
D:\NASM>prog
RAX|0000000000401000 RBX|0000000000402000 RCX|0000000000402010
RDX|0000000000401000 RSI|0000000000000000 RDI|0000000000000000
R8 |00000000003F7000 R9 |0000000000401000 R10|0000000000000000
R11|0000000000000000 R12|0000000000000000 R13|0000000000000000
R14|0000000000000000 R15|0000000000000000 RBP|0000000000000000
RSP|000000000014FF58 RIP|000000000040101E
D:\NASM>ld prog.obj base6.dll -o prog.exe
D:\NASM>prog
RAX|0000000000401000 RBX|0000000000402000 RCX|0000000000403000
RDX|0000000000401000 RSI|0000000000000000 RDI|0000000000000000
R8 |00000000003B1000 R9 |0000000000401000 R10|0000000000000000
R11|0000000000000000 R12|0000000000000000 R13|0000000000000000
R14|0000000000000000 R15|0000000000000000 RBP|0000000000000000
RSP|000000000060FF58 RIP|000000000040101E
With golink, alignb or align dont seem to work well. The only way it works is by setting the 32-byte alignment from inside the .data section, which is weird IMHO. Have no problems using other linkers.
The test code;
global Start
section .data
s db 'hello world',0ah,0
;align 32 ;this works for below
section .bss alignb=32 ;this wont do
f resb 5
section .text
Start:
mov rax,Start
mov rbx,s
mov rcx,f
call dumpreg
call exitx
extern dumpreg
extern exitx