To: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: binutils on linux for go32/dos Date: Tue, 8 Nov 1994 13:12:22 PST From: "Marty Leisner" (I spelled it wrong and it bounced)... - ------- Unsent Draft To: dgjpp, bug-gnu-utils AT prep DOT ai DOT mit DOT edu Subject: compiling binutils on linux for go32/dos Fcc: +sent - - -------- This is a general problem for generating cross configurations... I want to: do linux/go32 on linux do sparc/lynx-sparc/linux/go32 on sun/sparc I made binutils on linux for linux and go32... (its working for 2.5.1). Since I understand you need a different assembler for each target: 1) I made the binutils and ld for go32 and linux 2) I made an assembler for linux 3) I made an assembler for go32 I have a trivial C program: main() { printf("Hello world\n"); } Both produce the following assembler: .file "hello.c" gcc2_compiled.: ___gnu_compiled_c: .text LC0: .ascii "Hello world\12\0" .align 4 .globl _main _main: pushl %ebp movl %esp,%ebp call ___main pushl $LC0 call _printf addl $4,%esp L1: movl %ebp,%esp popl %ebp ret When I use the go32 version nm I get: marty AT compaq$ nm hello.o 0000002c b .bss 0000002c d .data 00000000 t .text 00000025 t L1 00000000 t LC0 00000000 t ___gnu_compiled_c U ___main 00000010 T _main U _printf 00000000 t gcc2_compiled. hello.o is 521 bytes... For linux: marty AT compaq$ nm hello.o 00000000 t ___gnu_compiled_c U ___main 00000010 T _main U _printf 00000000 t gcc2_compiled. marty AT compaq$ ls -l hello.o - - -rw-r--r-- 1 marty users 219 Oct 31 23:27 hello.o I'm not sure whatis different -- on Linux it knows enough that I'm not interested in the .text, .bss, etc... and the internal jumps...but its present in go32... How can I get the assembler and nm to eat the internal jumps and .text, .data, .bss symbols? marty Member of the League of Programming Freedom leisner AT sdsp DOT mc DOT xerox DOT com Any sufficiently advanced technology is indistinquishable from magic Arthur C. Clarke, The Lost Worlds of 2001 - ------- End of Unsent Draft ------- End of Forwarded Message