Main Page | Report this Page
Computers Forum Index  »  Computer Languages (Forth)  »  jonesforth "Killed" error...
Page 1 of 1    

jonesforth "Killed" error...

Author Message
wayo.cavazos at (no spam) gmail.com...
Posted: Wed Jan 06, 2010 2:29 am
Guest
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...
Posted: Wed Jan 06, 2010 7:55 pm
Guest
<wayo.cavazos at (no spam) gmail.com> wrote in message
news:6511ce3b-055d-49c2-84ab-889adcb2afde at (no spam) b2g2000yqi.googlegroups.com...
Quote:

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?


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
 
...
Posted: Wed Jan 06, 2010 8:10 pm
Guest
Rod Pemberton <do_not_have at (no spam) nohavenot.cmm> wrote:
Quote:
wayo.cavazos at (no spam) gmail.com> wrote in message
news:6511ce3b-055d-49c2-84ab-889adcb2afde at (no spam) b2g2000yqi.googlegroups.com...

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?


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

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

Andrew.
 
Eduardo Cavazos...
Posted: Fri Jan 08, 2010 6:23 pm
Guest
Quote:
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

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
 
 
Page 1 of 1    
All times are GMT
The time now is Sun Mar 21, 2010 6:25 am