RE: [Tuxnes-devel] Trying to build on OpenBSD 2.9
Brought to you by:
tmmm
From: Ben S. <BSi...@Kn...> - 2001-08-27 19:36:42
|
Right, compdata is a file containing some x86 machine code used by the dynamic recompilation code. The -b binary option tells ld to take a raw binary file as input (instead of an ELF or a.out object file.) When ld reads a raw binary file, there is no symbol table, so it defines the special symbol _binary_XXX_start to refer to the beginning of file XXX. The option -defsym TRANS_TBL=_binary_compdata_start defines TRANS_TBL to refer to the same place (i.e. the beginning of the binary file.) 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.) Does that work any better? -ben -----Original Message----- From: HUYNH,SONTRI (HP-Richardson,ex1) [mailto:son...@hp...] Sent: Monday, August 27, 2001 8:41 AM To: 'tux...@li...' Subject: RE: [Tuxnes-devel] Trying to build on OpenBSD 2.9 > Aha! Use GNU make, and let us know whether that works any better. > $< is GNU Makese for "first file this rule depends on". Aha! So it is some quirky gnumakeism.. Well now, this is what I believe the line to be: ld -r -b binary -r -defsym TRANS_TBL=_binary_compdata_start compdata -o table.o Of course, I still don't have the -b or -defsym options, but I see that it is trying to link compdata to create table.o. Now, I'm not quite sure then what compdata is supposed to be, is it supposed to be an ELF object file? I see that it is spit out by comptbl. I mean, ld gives me this: ld: compdata: malformed input file (not rel or archive) And doing a quick file on the file doesn't tell me anything more than that compdata is "data" (using perhaps an older version of file). This part of the build process really confuses me, perhaps someone could shed more light please? Thanks all, Tomo _______________________________________________ Tuxnes-devel mailing list Tux...@li... http://lists.sourceforge.net/lists/listinfo/tuxnes-devel |