'assembly: limit of uninitialized data section .bss?

I have the following x86_64 assembly program (Intel syntax):

%define BUFSIZE 3000000000

        section .bss

buf:    resb  BUFSIZE
        
section .text

        global _start

_start:

When I invoke nasm -f elf64 bsstest.asm (with version 2.13.02), I get the following error message: bsstest.asm:5: panic: assertion data.insoffs == insn_size failed at asm/assemble.c:725.

If I reduce BUFSIZE to 2000000000, the error disappears. It seems, the uninitialized data segment is restricted to 2 GB. Why is this?

Thanks a lot for your help.


Edit: actually, the limits only seems to relate to a single resb, I can have multiple resb which add up to more than 2 GB.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source