www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/07/05/02:49:38

From: Martin Str|mberg <ams AT ludd DOT luth DOT se>
Message-Id: <199807050645.IAA06017@sister.ludd.luth.se>
Subject: Re: Trying to compile v2/alphas/980628/djlsr202.zip
To: djgpp-workers AT delorie DOT com (DJGPP-WORKERS)
Date: Sun, 5 Jul 1998 08:45:30 +0200 (MET DST)
MIME-Version: 1.0

More info on the libemu troubles. As I said before
> ./../../hostbin/dxegen.exe ./../../bin/emu387.dxe __emu_entry src/emu387.o id_emu.o src/emudummy.o -L../../lib -L../../lib/gcc-lib/djgpp/2.81 -lgcc -lc -lgcc
> ld -X -S -r -o dxe__tmp.o -Le:/djgpp.202/lib src/emu387.o id_emu.o src/emudummy.o -L../../lib -L../../lib/gcc-lib/djgpp/2.81 -lgcc -lc -lgcc  -T dxe.ld 
> 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
to correct by putting together the line starting with "ld" above and
execute that line. Then it checks to see whether it was successful. It
wasn't, that's where the line starting with "Error:" above comes from.

Adding "-M" (as hinted) reveals this (the interesting part is last):
"Archive member included       because of file (symbol)

../../lib/gcc-lib/djgpp/2.81/libgcc.a(_moddi3.o)
                              src/emu387.o (__moddi3)
../../lib/gcc-lib/djgpp/2.81/libgcc.a(_divdi3.o)
                              src/emu387.o (__divdi3)
e:/djgpp.202/lib/libc.a(longjmp.o)
                              src/emu387.o (longjmp)
e:/djgpp.202/lib/libc.a(setjmp.o)
                              src/emu387.o (setjmp)

Allocating common symbols
Common symbol       size              file

__djgpp_exception_state_ptr
                    0x4               src/emudummy.o

Memory Configuration

Name             Origin             Length            
*default*        0x00000000         0xffffffff

Linker script and memory map

LOAD src/emu387.o
LOAD id_emu.o
LOAD src/emudummy.o
LOAD ../../lib/gcc-lib/djgpp/2.81/libgcc.a
LOAD e:/djgpp.202/lib/libc.a
LOAD ../../lib/gcc-lib/djgpp/2.81/libgcc.a

.text           0x00000000     0x67f8
 *(.text)
 .text          0x00000000     0x5cec src/emu387.o
                0x00005c18                _emu_entry
 .text          0x00005cec       0x10 src/emudummy.o
                0x00005cec                vsprintf
                0x00005cf4                _write
 .text          0x00005cfc      0x30c ../../lib/gcc-lib/djgpp/2.81/libgcc.a(_moddi3.o)
                0x00005dfc                __moddi3
 .text          0x00006008      0x29c ../../lib/gcc-lib/djgpp/2.81/libgcc.a(_divdi3.o)
                0x00006108                __divdi3
 .text          0x000062a4       0x74 e:/djgpp.202/lib/libc.a(longjmp.o)
                0x000062a4                longjmp
 .text          0x00006318       0x58 e:/djgpp.202/lib/libc.a(setjmp.o)
                0x00006318                setjmp
 *(.data)
 .data          0x00006370      0x338 src/emu387.o
 .data          0x000066a8       0x78 id_emu.o
                0x000066e4                __libemu_sccs_ident
                0x000066a8                __libemu_ident_string
 *(.bss)
 .bss           0x00006720       0xd4 src/emu387.o
 *(COMMON)
 COMMON         0x000067f4        0x4 src/emudummy.o
                0x000067f4                __djgpp_exception_state_ptr
OUTPUT(dxe__tmp.o coff-go32)

.eh_fram        0x000067f8     0x3148
 .eh_fram       0x000067f8     0x30b0 src/emu387.o
 .eh_fram       0x000098a8       0x4c ../../lib/gcc-lib/djgpp/2.81/libgcc.a(_moddi3.o)
 .eh_fram       0x000098f4       0x4c ../../lib/gcc-lib/djgpp/2.81/libgcc.a(_divdi3.o)"


So where does this .eh_fram section come from?

Please tell me that.


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.

So is this the right thing? And what happens when you're compiling on a
non-DJGPP platform?


This Mortal Coil, Blood,

							MartinS

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019