RE: [Tuxnes-devel] Trying to build on OpenBSD 2.9
Brought to you by:
tmmm
From: HUYNH,SONTRI (HP-Richardson,ex1) <son...@hp...> - 2001-08-28 16:59:35
|
> Since it sounds like you cannot get a recent version of GNU > binutils, I'd > suggest using a different technique to generate table.o: > > table.s: compdata > (echo '.globl TRANS_TBL'; \ > echo 'TRANS_TBL:'; \ > od -vhw2 < compdata | \ > sed -ne 's/.* \(.*\)/.short 0x\1/p') > table.s > > table.o: table.s > as -o table.o table.s > > This uses the assembler to do the dirty work, rather than the > linker. As > a side-effect, it will generate a huge table.s file (which > you may wish > to delete after compilation is finished.) ben, thanks for the insight. i was able to hack together something which i believe to do the same thing.. so here is some more openbsd trivia. in openbsd, od has been deprecated in favor of hexdump, and hexdump takes od flags when called as od.. however, it does have the new gnu od options in hexdump. so i added this to Makefile instead: table.s: compdata echo '.globl _TRANS_TBL' > table.s echo '_TRANS_TBL:' >> table.s hexdump -v -e '1/2 ".short 0x%04x\n"' compdata >> table.s which creates something like: .globl _TRANS_TBL _TRANS_TBL: .short 0xd801 .short 0x0048 .short 0xd8c9 .short 0x0048 .short 0x0000 ... and i was able to make table.o from this. and i was almost able to fully build... then came link time, and everything and its brother was undefined. to make a long story short, i commented out parts of mapper.h, i changed most of the symbols in x86.S from either having an underscore or not having an underscore, then i commented out the call to getopt_long (since i don't have gnu's getopt installed... i will work on this later). after a lot of hacking, i got tuxnes to build. woohoo! of course, since i'm at work, i haven't actually tried to get it to run yet.. i will let you know if things work out. thanks. tomo |