digitalmars.D - Writing a small linux binary
- NVolcz (4/4) Jan 11 2015 Can this be done in D? How easy is it? What about the runtime?
- ketmar via Digitalmars-d (8/11) Jan 12 2015 yes.
- Mike (6/8) Jan 12 2015 Here's a link to my 56 byte "Hello, World!" program for the ARM
- Paulo Pinto (4/14) Jan 12 2015 Just posted the link to HN.
- Iain Buclaw via Digitalmars-d (18/30) Jan 12 2015 Without performing any linker magic.
- Paulo Pinto (6/42) Jan 12 2015 Would be considered linker magic to use _start(), write() and
Can this be done in D? How easy is it? What about the runtime? https://www.reddit.com/r/programming/comments/2s1sgg/151byte_static_linux_binary_in_rust/ Best regards, NVolcz
Jan 11 2015
On Mon, 12 Jan 2015 05:59:35 +0000 NVolcz via Digitalmars-d <digitalmars-d puremagic.com> wrote:Can this be done in D?yes.How easy is it?it depends of your experience and readyness to live without phobos and GC.What about the runtime?you may need to write one which will include only functions your program requires. p.s. i've not visited the link.
Jan 12 2015
On Monday, 12 January 2015 at 05:59:36 UTC, NVolcz wrote:Can this be done in D? How easy is it? What about the runtime? https://www.reddit.com/r/programming/comments/2s1sgg/151byte_static_linux_binary_in_rust/Here's a link to my 56 byte "Hello, World!" program for the ARM Cortex-M platform in D. And, if I only used the string "Hello!" like the rust example, I believe it would be 47 bytes. http://goo.gl/qWhpVX Mike
Jan 12 2015
On Monday, 12 January 2015 at 08:46:57 UTC, Mike wrote:On Monday, 12 January 2015 at 05:59:36 UTC, NVolcz wrote:Just posted the link to HN. -- PauloCan this be done in D? How easy is it? What about the runtime? https://www.reddit.com/r/programming/comments/2s1sgg/151byte_static_linux_binary_in_rust/Here's a link to my 56 byte "Hello, World!" program for the ARM Cortex-M platform in D. And, if I only used the string "Hello!" like the rust example, I believe it would be 47 bytes. http://goo.gl/qWhpVX Mike
Jan 12 2015
On 12 January 2015 at 08:46, Mike via Digitalmars-d <digitalmars-d puremagic.com> wrote:On Monday, 12 January 2015 at 05:59:36 UTC, NVolcz wrote:Without performing any linker magic. import core.stdc.stdio; import core.stdc.stdlib; extern(C) void main() { printf("Hello!\n"); exit(0); } EOF -fno-emit-moduleinfo -nostdlib --entry=main small.d -lc -o small 2488 small Hello!Can this be done in D? How easy is it? What about the runtime? https://www.reddit.com/r/programming/comments/2s1sgg/151byte_static_linux_binary_in_rust/Here's a link to my 56 byte "Hello, World!" program for the ARM Cortex-M platform in D. And, if I only used the string "Hello!" like the rust example, I believe it would be 47 bytes. http://goo.gl/qWhpVX Mike
Jan 12 2015
On Monday, 12 January 2015 at 09:00:58 UTC, Iain Buclaw via Digitalmars-d wrote:On 12 January 2015 at 08:46, Mike via Digitalmars-d <digitalmars-d puremagic.com> wrote:Would be considered linker magic to use _start(), write() and _exit() instead? :) -- PauloOn Monday, 12 January 2015 at 05:59:36 UTC, NVolcz wrote:Without performing any linker magic. import core.stdc.stdio; import core.stdc.stdlib; extern(C) void main() { printf("Hello!\n"); exit(0); } EOF -fno-emit-moduleinfo -nostdlib --entry=main small.d -lc -o small 2488 small Hello!Can this be done in D? How easy is it? What about the runtime? https://www.reddit.com/r/programming/comments/2s1sgg/151byte_static_linux_binary_in_rust/Here's a link to my 56 byte "Hello, World!" program for the ARM Cortex-M platform in D. And, if I only used the string "Hello!" like the rust example, I believe it would be 47 bytes. http://goo.gl/qWhpVX Mike
Jan 12 2015