From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,3701fec2e2b754c0,start X-Google-Attributes: gid111c93,public From: bmeyer@bruce.cs.monash.edu.au Subject: Using object files created by DU as in Linux? Date: 1998/05/05 Message-ID: <6in56u$2or$1@wombat.cs.monash.edu.au>#1/1 X-Deja-AN: 350306521 X-NNTP-Posting-User: root Organization: This is innd taking over... Reply-To: bmeyer@bruce.cs.monash.edu.au Newsgroups: comp.os.linux.alpha I am trying to do something weird, and consequently, I am failing.... I have a program that creates a large file containing assembler code for lots of functions. This code is slightly inefficient, and (worse) scheduled extremely badly. It still runs faster than generating C code and letting gcc do its thing, though, so for my particular application it is the way to go. But of course it would be nice if something could be made to do peephole optimization and instruction scheduling on it --- which is exactly what the Digital Unix assembler will do with the option "-O1". Great! Only --- after moving my file to DU, assembling it, and moving the object file back, I cannot link it. No surprise, it's a COFF file, and I am running RH5.0, which is completely ELF based. Unfortunately, trying to convert the file using objcopy results in myriads of "bfd assertion fail elf.c:3447", and no conversion. Does anybody know of a way to do this, short of a) figuring out what is eating objcopy, and fixing it, or b) Using "dis" on the DU box to disassemble the code, moving the resulting text file back to Linux, and fixing up all the places where external symbols were referenced? (b) is theoretically possible for my application, because I can reduce the amount of relocation needed almost to zero --- but it still strikes me as a somewhat silly way of doing it. Any ideas? Bernie -- ============================================================================ "It's a magical world, Hobbes ol' buddy... ...let's go exploring" Calvin's final words, on December 31st, 1995