{"action":"created","issue":{"url":"https://api.github.com/repos/open-watcom/open-watcom-v2/issues/527","repository_url":"https://api.github.com/repos/open-watcom/open-watcom-v2","labels_url":"https://api.github.com/repos/open-watcom/open-watcom-v2/issues/527/labels{/name}","comments_url":"https://api.github.com/repos/open-watcom/open-watcom-v2/issues/527/comments","events_url":"https://api.github.com/repos/open-watcom/open-watcom-v2/issues/527/events","html_url":"https://github.com/open-watcom/open-watcom-v2/issues/527","id":419824056,"node_id":"MDU6SXNzdWU0MTk4MjQwNTY=","number":527,"title":"Warning! W1014: stack segment not found","user":{"login":"Un1Gfn","id":28521292,"node_id":"MDQ6VXNlcjI4NTIxMjky","avatar_url":"https://avatars3.githubusercontent.com/u/28521292?v=4","gravatar_id":"","url":"https://api.github.com/users/Un1Gfn","html_url":"https://github.com/Un1Gfn","followers_url":"https://api.github.com/users/Un1Gfn/followers","following_url":"https://api.github.com/users/Un1Gfn/following{/other_user}","gists_url":"https://api.github.com/users/Un1Gfn/gists{/gist_id}","starred_url":"https://api.github.com/users/Un1Gfn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Un1Gfn/subscriptions","organizations_url":"https://api.github.com/users/Un1Gfn/orgs","repos_url":"https://api.github.com/users/Un1Gfn/repos","events_url":"https://api.github.com/users/Un1Gfn/events{/privacy}","received_events_url":"https://api.github.com/users/Un1Gfn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2019-03-12T06:36:44Z","updated_at":"2019-03-12T08:47:55Z","closed_at":null,"author_association":"NONE","body":"# Warning! W1014: stack segment not found\r\n\r\ntest.asm\r\n\r\n```asm\r\nassume ds:data\r\nassume ss:stack\r\nassume cs:code\r\n\r\ndata segment\r\n        db 10H dup(0)\r\ndata ends\r\n\r\nstack segment STACK\r\n        db 10H dup(0)\r\nstack ends\r\n\r\ncode segment\r\nstart:\r\n        mov ax,data\r\n        mov ds,ax\r\n        mov ax,stack\r\n        mov ss,ax\r\n        mov ax,4c00h\r\n        int 21h\r\ncode ends\r\n\r\nend start\r\n```\r\n\r\nAssemble & link\r\n\r\n```bash\r\n$ export WATCOM=/opt/watcom\r\n$ export PATH=$WATCOM/binl64:$WATCOM/binl:$PATH\r\n\r\n$ wasm -0 -zcm=masm test.asm\r\nOpen Watcom Assembler Version 2.0 beta Mar 11 2019 08:38:45 (64-bit)\r\nCopyright (c) 2002-2019 The Open Watcom Contributors. All Rights Reserved.\r\nPortions Copyright (c) 1992-2002 Sybase, Inc. All Rights Reserved.\r\nSource code is available under the Sybase Open Watcom Public License.\r\nSee http://www.openwatcom.org/ for details.\r\ntest.asm: 23 lines, 0 warnings, 0 errors\r\n\r\n$ wlink \\\r\n  system dos \\\r\n  option map,packcode=0,packdata=0 \\\r\n  name A.EXE \\\r\n  file '{' test.o '}'\r\nOpen Watcom Linker Version 2.0 beta Mar 11 2019 08:39:27 (64-bit)\r\nCopyright (c) 2002-2019 The Open Watcom Contributors. All Rights Reserved.\r\nPortions Copyright (c) 1985-2002 Sybase, Inc. All Rights Reserved.\r\nSource code is available under the Sybase Open Watcom Public License.\r\nSee http://www.openwatcom.org/ for details.\r\nloading object files\r\ncreating map file\r\nWarning! W1014: stack segment not found\r\ncreating a DOS executable\r\n\r\n```\r\n\r\n<details><summary>A.map (Please click to expand)</summary>\r\n\r\n```\r\nOpen Watcom Linker Version 2.0 beta Mar 11 2019 08:39:27 (64-bit)\r\nCopyright (c) 2002-2019 The Open Watcom Contributors. All Rights Reserved.\r\nPortions Copyright (c) 1985-2002 Sybase, Inc. All Rights Reserved.\r\nCreated on:       19/03/12 14:33:46\r\nExecutable Image: A.EXE\r\ncreating a DOS executable\r\n\r\n\r\n                        +------------+\r\n                        |   Groups   |\r\n                        +------------+\r\n\r\nGroup                           Address              Size\r\n=====                           =======              ====\r\n\r\n\r\n\r\n\r\n                        +--------------+\r\n                        |   Segments   |\r\n                        +--------------+\r\n\r\nSegment                Class          Group          Address         Size\r\n=======                =====          =====          =======         ====\r\n\r\ndata                                  AUTO           0000:0000       00000010\r\nstack                                 AUTO           0001:0000       00000010\r\ncode                                  AUTO           0002:0000       0000000f\r\n\r\n\r\n                        +----------------+\r\n                        |   Memory Map   |\r\n                        +----------------+\r\n\r\n* = unreferenced symbol\r\n+ = symbol only referenced locally\r\n\r\nAddress        Symbol\r\n=======        ======\r\n\r\nWarning! W1014: stack segment not found\r\n\r\n\r\n                        +-----------------------+\r\n                        |   Linker Statistics   |\r\n                        +-----------------------+\r\n\r\nStack size:  1000 (4096.)\r\nMemory size:  002f (47.)\r\nEntry point address: 0002:0000\r\nLink time: 00:00.95\r\n\r\n```\r\n\r\n</details>\r\n\r\n<br>\r\n\r\nWhy `Warning! W1014: stack segment not found`?\r\n\r\n>[OW Linker User’s Guide - OW Linker Diagnostic Messages - MSG 1014](https://open-watcom.github.io/travis-ci-ow-builds/lguide.html#1014_stack_segment_not_found):\r\nThe linker identifies the stack segment by a segment defined as having the \"STACK\" attribute.  This message is issued if no such segment is encountered.  This usually happens if the linker cannot find the run-time libraries required to link your application.\r\n\r\n>[MASM Reference - Directives Reference - SEGMENT](https://docs.microsoft.com/en-us/cpp/assembler/masm/segment)\r\n\r\nPerhaps I should add something to test.asm or give some parameters to `wlink` to \r\nexplicitly attach a \"STACK\" attribute to the segment named \"stack\" in test.asm?\r\n\r\nThanks.\r\n"},"comment":{"url":"https://api.github.com/repos/open-watcom/open-watcom-v2/issues/comments/471909014","html_url":"https://github.com/open-watcom/open-watcom-v2/issues/527#issuecomment-471909014","issue_url":"https://api.github.com/repos/open-watcom/open-watcom-v2/issues/527","id":471909014,"node_id":"MDEyOklzc3VlQ29tbWVudDQ3MTkwOTAxNA==","user":{"login":"jmalak","id":2017260,"node_id":"MDQ6VXNlcjIwMTcyNjA=","avatar_url":"https://avatars0.githubusercontent.com/u/2017260?v=4","gravatar_id":"","url":"https://api.github.com/users/jmalak","html_url":"https://github.com/jmalak","followers_url":"https://api.github.com/users/jmalak/followers","following_url":"https://api.github.com/users/jmalak/following{/other_user}","gists_url":"https://api.github.com/users/jmalak/gists{/gist_id}","starred_url":"https://api.github.com/users/jmalak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmalak/subscriptions","organizations_url":"https://api.github.com/users/jmalak/orgs","repos_url":"https://api.github.com/users/jmalak/repos","events_url":"https://api.github.com/users/jmalak/events{/privacy}","received_events_url":"https://api.github.com/users/jmalak/received_events","type":"User","site_admin":false},"created_at":"2019-03-12T08:47:55Z","updated_at":"2019-03-12T08:47:55Z","author_association":"MEMBER","body":"it is simple solution, add class 'STACK' to stack segment and it will be recognized."}}
{"actor":{"display_login":"jmalak"}}