hello sir mabdelouahab, these are my tests in linux 64
test2.uasm
;uasm -elf64 -pie test2.uasm
;ld test2.o -o test2
;./test2 ; echo $?
.X64
option casemap:none
.data?
data01 db 7FFFFFFFh dup(?)
data02 db 7FFFFFFFh dup(?)
.code
_start:
mov rdi,0 ;return code
mov rax,60 ;sysexit
syscall
end _start
;---first try
; data01 db 80000000h dup(?) ;Error A2209: Count must be positive or zero
;---second try
; data01 db 7FFFFFFFh dup(?) ;OK to assemble, link and execute
;---third try
; data01 db 7FFFFFFFh dup(?) ;pseudo OK to assemble, link and execute
; data02 db 7FFFFFFFh dup(?)
;readelf -S test2.o
; [ 3] .bss NOBITS 0000000000000000 00000210
; fffffffffffffffe 0000000000000000 WA 0 0 16
;readelf -S test2
; No bss section created in executable
;size test2
; text data bss dec hex filename
; 16 0 0 16 10 test2
;size test2.o
; text data bss dec hex filename
; 16 0 18446744073709551614 14 e test2.o
;fourth try, using previous test.o and changing with hexadecimal editor fffffffffffffffeh at offset 120h
;to FF FF FF FF │ 00 00 00 00
;link OK, execute OK
; [ 3] .bss NOBITS 0000000000000000 00000210 object file
; 00000000ffffffff 0000000000000000 WA 0 0 16
;[ 2] .bss NOBITS 0000000000402000 00002000 executable
; 0000000100000000 0000000000000000 WA 0 0 16
;fifth try, using previous test.o and changing with hexadecimal editor FF FF FF FF │ 00 00 00 00 at offset 120h
;to 00 00 00 00 │ 10 00 00 00
;link OK, execute return 139 segmentation fault
;[ 3] .bss NOBITS 0000000000000000 00000210
; 0000001000000000 0000000000000000 WA 0 0 16
;strace ./test2 ; echo $?
;execve("./test2", ["./test2"], 0x7ffc150b9e40 /* 65 vars */) = -1 ENOMEM (Not possible to alloc memory)
;+++ killed by SIGSEGV +++
So I try with as assembler same tests and increasing allocation data:
test3.s
#as test3.s -o test3.o
#ld -e _start test3.o -o test3
#./test3 ; echo$?
.code64
.intel_syntax noprefix
.bss
data01: .space 0x40fffffff
.text
.global _start
_start:
mov rdi,0
mov rax,60
syscall
I was thinking in elf64 field but thats 64 bits, so not a problem. After I think in 48 bits addressing of some machines or hardware limitation of some machines. After I think in some link switches but was not able to find anything; so I check ld loader, ... . But when I tried with as assembler I see that can be done.
Maybe some field in object file.