Mail Archives: djgpp-workers/1999/07/18/19:18:53
Hello folks,
There's not much COFF development going on in binutils, except for
PE-COFF, but there still some things that need some attention.
First, I've ported the ".gnu.linkonce" extension previously available only
to ELF targetsto COFF. This feature, together with weak symbol
support, enables the automatic C++ template support PE COFF
(Win32) and ELF systems have. The price for this improved support is
bigger object files where the template code is used. However, this
bloat is removed at link time. The ".gnu.linkonce" feature does require
COFF long section name support to be enabled. This is not a problem
since everything ends up in sections with short names, which are
stored the same way wether or not long section support is enabled.
dgpp.djl will need some minor changes to handle the new feature:
*** djgpp.djm Sun Jul 12 22:53:46 1998
--- djgpp.djl Sun Jul 18 00:07:16 1999
*************** SECTIONS
*** 4,9 ****
--- 4,10 ----
{
.text 0x1000+SIZEOF_HEADERS : {
*(.text)
+ *(.gnu.linkonce.t*)
etext = . ; _etext = .;
. = ALIGN(0x200);
}
*************** SECTIONS
*** 15,23 ****
*(.dtor)
djgpp_last_dtor = . ;
*(.data)
! *(.gcc_exc)
___EH_FRAME_BEGIN__ = . ;
! *(.eh_fram)
___EH_FRAME_END__ = . ;
LONG(0)
edata = . ; _edata = .;
--- 16,26 ----
*(.dtor)
djgpp_last_dtor = . ;
*(.data)
! *(.gnu.linkonce.d*)
! *(.gnu.linkonce.r*)
! *(.gcc_exc*)
___EH_FRAME_BEGIN__ = . ;
! *(.eh_fram*)
___EH_FRAME_END__ = . ;
LONG(0)
edata = . ; _edata = .;
But this is something that can be handled in the DJGPP port of 2.10
(the patch was just for illustration). gcc will need some minor changes
to DJGPP's config files to enable the compiler to use this feature.
However, I'm not sure when to submit the gcc changes because then
that would require C++ users to have 2.10 and no telling when it will be
released given how long it's been in development.
The bring me to a couple of minor things that could use some
attention. The linker script template currently in CVS doesn't contain the
C++ EH support like djgpp.djl does.
ldmain.c contains code that tries to add
'$DJDIR/$target_alias/ldscripts/' to the library path, where target_alias
expands to i[3456]86-pc-msdosdjgpp. But this isn't a major problem,
since the scripts can be anywhere in the library path.
---
Mark Elbrecht, snowball3 AT bigfoot DOT com
http://snowball.frogspace.net/
- Raw text -