Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

jonesforth "Killed" error

55 views
Skip to first unread message

wayo.c...@gmail.com

unread,
Jan 5, 2010, 9:29:06 PM1/5/10
to
Hello,

The instructions for jonesforth say to call gcc like so:

gcc -m32 -nostdlib -static -Wl,-Ttext,0 -Wl,--build-id=none -o
jonesforth jonesforth.S

However, the resulting binary doesn't seem to work correctly:

$ cat jonesforth.f - | ./jonesforth
Killed

On the other hand, this produces a binary which runs:

gcc -m32 -nostdlib -static -Wl,--build-id=none -o jonesforth
jonesforth.S

Anybody else run into this?

Ed

Rod Pemberton

unread,
Jan 6, 2010, 9:55:53 AM1/6/10
to
<wayo.c...@gmail.com> wrote in message
news:6511ce3b-055d-49c2...@b2g2000yqi.googlegroups.com...

Haven't tried it. It's probably a typo though. The -Ttext argument for gcc
is set to the loading address of an executable. Zero in this case. e.g.,

-Ttext=0

HTH,


Rod Pemberton


a...@littlepinkcloud.invalid

unread,
Jan 6, 2010, 10:10:55 AM1/6/10
to

There have been some recent Linux kernel changes that forbid programs
from mapping memory at address zero.

Andrew.

Eduardo Cavazos

unread,
Jan 8, 2010, 1:23:21 PM1/8/10
to

Here's a comment from the program mentioning the placement of the text
segment at 0:

One minor point here. Because DOCOL is the first bit of assembly
actually to be defined in this file (the others were just macros), and
because I usually compile this code with the text segment starting at
address 0, DOCOL has address 0. So if you are disassembling the code
and see a word with a codeword of 0, you will immediately know that
the word is written in FORTH (it's not an assembler primitive) and so
uses DOCOL as the interpreter.

Ed

0 new messages