Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PoroCYon
smol
Commits
5dd269d0
Commit
5dd269d0
authored
May 20, 2019
by
PoroCYon
Browse files
fix SIGBUS crashes when accessing bss data from a large .bss segment
parent
9ec21335
Changes
2
Show whitespace changes
Inline
Side-by-side
rt/header32.asm
View file @
5dd269d0
...
...
@@ -70,8 +70,9 @@ phdr.load:
dd
PT_LOAD
; p_type: 1 = PT_LOAD
dd
0
; p_offset
dd
ehdr
,
0
; p_vaddr, p_paddr
; use memsize twice here, linux doesn't care and it compresses better
dd
_smol_total_memsize
; p_filesz
;; use memsize twice here, linux doesn't care and it compresses better
; actually, linux doesn't care, but the hardware does >__>
dd
_smol_total_filesize
; p_filesz
dd
_smol_total_memsize
; p_memsz
dd
(
PHDR_R
|
PHDR_W
|
PHDR_X
)
; p_flags
dd
0x1000
; p_align
...
...
rt/header64.asm
View file @
5dd269d0
...
...
@@ -63,7 +63,7 @@ phdr.load:
dd
PHDR_R
|
PHDR_W
|
PHDR_X
; p_flags
dq
0
; p_offset
dq
ehdr
,
0
; p_vaddr, p_paddr
dq
_smol_total_
mem
size
; p_filesz
dq
_smol_total_
file
size
; p_filesz
dq
_smol_total_memsize
; p_memsz
dq
0x1000
; p_align
%else
...
...
@@ -80,7 +80,7 @@ phdr.load2:
dd
PHDR_R
|
PHDR_W
dq
_smol_data_off
dq
_smol_data_start
,
0
dq
_smol_data
andbss
_size
dq
_smol_data_size
dq
_smol_dataandbss_size
dq
0x1000
%endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment