Skip to content

Commit

Permalink
add STACK segment for OW libc
Browse files Browse the repository at this point in the history
  • Loading branch information
jmalak committed Jul 31, 2024
1 parent 02ddbe3 commit 8b41e7b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 0 additions & 4 deletions elks/tools/objtools/ewlink
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,9 @@ fi

ELKSLIBC=$TOPDIR/libc

# Warning 1014: stack segment not found

LDFLAGS="\
-bos2 \
-s \
-fnostdlib \
-Wl,disable -Wl,1014 \
-Wl,option -Wl,start=_start_ \
-Wl,option -Wl,dosseg \
-Wl,option -Wl,nodefaultlibs \
Expand Down
6 changes: 3 additions & 3 deletions libc/watcom/asm/segments.asm
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
name cstart
assume nothing

DGROUP group _NULL,_AFTERNULL,CONST,STRINGS,_DATA,DATA,XIB,XI,XIE,YIB,YI,YIE,_BSS
DGROUP group _NULL,_AFTERNULL,CONST,STRINGS,_DATA,DATA,XIB,XI,XIE,YIB,YI,YIE,_BSS,STACK

; this guarantees that no function pointer will equal NULL
; (WLINK will keep segment 'BEGTEXT' in front)
Expand Down Expand Up @@ -113,9 +113,9 @@ _BSS segment word public 'BSS'
_BSS ends

;STACK_SIZE equ 1000h
;STACK segment para stack 'STACK'
STACK segment para stack 'STACK'
;db (STACK_SIZE) dup(?)
;STACK ends
STACK ends

assume nothing
public _cstart_
Expand Down

0 comments on commit 8b41e7b

Please sign in to comment.