2.11bsd rogue can't build

Jacob Ritorto jacob.ritorto at gmail.com
Fri Mar 6 23:24:47 CST 2020


Thanks for the leads, everyone!

I made a little progress: I did read enough about ld to get it to load
the .o files from the initial cc run into a separate I&d overlaid
executable.  But when I execute it, it gives me Segmentation fault
(core dumped).. There was one complaint of Undefined during the ld run
even though I said -lc_p (and validated that _environ is in that .a
file using nm.

Undefined:
_environ

but it seemed to succeed in building the executable despite that.
Well, I'm guessing it succeeded because the output file rogue is
sitting there afterwards and has been marked executable, which,
according to the man page, ld doesn't mark that way unless it
succeeds.

[35] root--> ld -t -v -M -i -X -x init.o main.o level.o score.o
machdep.o inventory.o -Z hit.o monster.o -Z message.o move.o -Z
object.o pack.o play.o -Z curses.o random.o ring.o -Z room.o -Z save.o
spec_hit.o -Z throw.o trap.o -Z use.o zap.o -Y -o rogue -lcurses
-ltermlib -lc_p

[36] root--> size rogue
text    data    bss     dec     hex
44928   18554   10520   74002   12112   total text: 88704
        overlays: 7616,6144,7488,1856,4352,6144,3840,6336

[37] root--> ./rogue
Segmentation fault (core dumped)

See anything amiss in my process?  That Undefined _environ during ld
still bugs me.
Is the next step dissecting the program or its core with adb to find
what's wrong?

thx
jake


More information about the cctech mailing list