Mail Archives: djgpp/2020/04/28/00:49:03
On Monday, April 27, 2020 at 6:18:11 PM UTC-4, Sébastien GUILLAUME wrote:
> Le lundi 27 avril 2020 21:02:22 UTC+2, nona DOT DOT DOT AT gmail DOT com a écrit :
> > On Monday, April 27, 2020 at 1:33:59 PM UTC-4, Sébastien GUILLAUME wrote:
> > > Hi, nice idea.
> > > I have read your conversation in github.
> > > Can you post here the result of the file command applied to files you try to link?
> > > Remember that djgpp use coff format, which is different from PE for Windows and different to elf to.
> > > PE is descendent of coff, they have some common parts. Weird functions address can come from here.
> >
> > I ran it on one of the object files for my program and this is what I got.
> >
> > dos32-dcb1f62a4632e187.dos32.frqh9yy0-cgu.0.rcgu.o: Intel 80386 COFF object file,
> > not stripped, 4 sections, symbol offset=0x234, 15 symbols
>
> wich compiler made this files ?
>
> I don't know how to switch to nightly rust, gentoo doesn't give rustup package, so I can't build the rust part.
>
> This is what I gave when I try to compile startup.c with this command line :
> $ i586-pc-msdosdjgpp-gcc -c startup.c -o startup.o
> $ file startup.o
> startup.o: Intel 80386 COFF object file, no line number info, not stripped, 5 sections, symbol offset=0x19c, 16 symbols
> $ i586-pc-msdosdjgpp-strings -tx startup.o
> 14 .text
> 3c .data
> 64 .bss
> 8c .comment
> 11c GCC: (GNU) 7.2.0
> 19c .file
> 1ae startup.c
> 1c0 .text
> 1e4 .data
> 208 .bss
> 22c .comment
> 274 _main
> 298 _exit
> 2c0 .eh_frame
> 2ca .eh_frame
> 2d4 ___djgpp_nearptr_enable
> 2ec _rust_main
>
> We can see that we have different number of section and symbols. It can be something interesting.
>
> What do you have with your tools?
>
> To realise my test, I used :
> - GNU Binutils 2.29
> - GCC 7.2.0
> - file-5.37
> - rustc 1.41.1
> - cargo 1.41.0
I'm using a nightly build of Rust and Cargo. GCC and binutils are from DJGPP built and gotten from here:
https://github.com/andrewwutw/build-djgpp
It's the GCC 7.2.0 version.
- Raw text -