RE: [Tuxnes-devel] Trying to build on OpenBSD 2.9
Brought to you by:
tmmm
From: Ben S. <BSi...@Kn...> - 2001-08-24 02:53:47
|
Okay, I misunderstood what context the #define was used in (unfortunately I haven't got the TuxNES code here to look at.) Eliminate the #define entirely, and find the C file which is using the LASTBLANK variable. Change the C file's LASTBLANK declaration to include the "asm" qualifier, and all should be well. As for the "ld" command you included, my suggestion is to upgrade your binutils! -ben -----Original Message----- From: HUYNH,SONTRI (HP-Richardson,ex1) [mailto:son...@hp...] Sent: Thursday, August 23, 2001 3:27 PM To: 'tux...@li...' Subject: RE: [Tuxnes-devel] Trying to build on OpenBSD 2.9 > Anyhow, my guess is that OpenBSD is using a non-ELF object > file format (the 'file' > command will tell you for sure) and so the C identifier > LASTBLANK *is* the asm > label _LASTBLANK. When you #define LASTBLANK to _LASTBLANK, > the C identifier becomes > _LASTBLANK, which is the asm label __LASTBLANK. OpenBSD/i386 uses a.out (other architectures use ELF and others) although it is capable of running ELF binaries (the kernel itself is a.out). I've heard about the whole pre-fixing symbol names with _ .. it seems something is broken. > There is a way to do this portably, I believe: declare > _LASTBLANK with the "asm" > type qualifier in C, like so: > extern asm int _LASTBLANK; /* or whatever the C declaration > looks like, + asm */ good to know :) unfortunately, this is a .S file which is being processed with gcc but doesn't accept C statements. So I'm still not sure what the real solution to this is (but I agree, a quick grep seems to me that LASTBANK isn't even -really- used and could probably be removed, but what do I know, not having even ran the program once :). I had to add a getopt.h, but then I was able to get all the way down to table.o, where my linker says: ld -r -b binary -r -defsym TRANS_TBL=_binary_compdata_start -o table.o ld: invalid command option `-b' this ld is from a pretty old version of binutils.. it doesn't have the -b or -defsym options. I am guessing that the -b won't be necessary.. but maybe there is some way to hack in the TRANS_TBL symbol in manually. Also, what is this line actually supposed to link? I see that the output is table.o... but what are the src objects? Sorry if I made it seem like it was working, but what fun would it be if it were that easy? :) Tomo _______________________________________________ Tuxnes-devel mailing list Tux...@li... http://lists.sourceforge.net/lists/listinfo/tuxnes-devel |