From: sandmann AT clio DOT rice DOT edu (Charles Sandmann) Message-Id: <9807051601.AA14695@clio.rice.edu> Subject: Re: Trying to compile v2/alphas/980628/djlsr202.zip To: ams AT ludd DOT luth DOT se (Martin Str|mberg) Date: Sun, 5 Jul 1998 11:01:04 -0600 (CDT) Cc: djgpp-workers AT delorie DOT com In-Reply-To: <199807050645.IAA06017@sister.ludd.luth.se> from "Martin Str|mberg" at Jul 5, 98 08:45:30 am Content-Type: text Precedence: bulk > More info on the libemu troubles. As I said before > > Error: input file has more than one section; use -M for map > > objdump reports four sections on src/emu387.o. This is what dxegen tries > ... > So where does this .eh_fram section come from? This is obviously a new "feature" of 2.8.1 ... it looks like some exception handling stuff (which probably won't work in a DXE...) > Anywhere trying a lot of switches and reading ld's info pages didn't help; > at last I (desperately) added without knowing what i was doing this to > lib/dxe.ld (handmade diff): > *(.bss) > + *(.eh_fram) > *(COMMON) > > And loo and behold now I have only one section after dxegen has massaged > the file. Excellent analysis and fix. You get a gold star and an award for creative problem solving! > So is this the right thing? And what happens when you're compiling on a > non-DJGPP platform? You have to understand the history of DXE and my vision on this one ... The DXE loader needed to be as small as possible since it would be linked into every image (to allow loading of the FPU emulator). The current code is a few hundred bytes. But to get there, I needed to just fix up "offsets" in memory to correct for the relative address of where the DXE image was going to be loaded. The smallest, fastest, and easiest way to do this was to put everything in the same section. I couldn't anticipate all the section names, so coded what was there at the time. Since DXEGEN is very COFF specific, and probably not endian correct at all, other platforms may cause problems. The easiest fix might be to just change dxe.ld ... the harder things would be to re-write DXEGEN completely.