www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1998/07/04/02:22:12

From: sos AT prospect DOT com DOT ru (Sergey Okhapkin)
Subject: RE: ld bug
4 Jul 1998 02:22:12 -0700 :
Message-ID: <01BDA74C.AE38C0F0.cygnus.cygwin32.developers@sos>
To: "'Ian Lance Taylor'" <ian AT cygnus DOT com>
Cc: "cygwin32-developers AT cygnus DOT com" <cygwin32-developers AT cygnus DOT com>

Ian Lance Taylor wrote:
> I've reworked the way the linker handles grouped and orphaned
> sections.  That should fix this problem.
>

Thanx! I'll try it. One more question - is anybody working on dll-aware 
libbfd? The only problem to fix I see is some data structures exported by 
bfd. The workaround is very simple - do not export datas (make them 
static), but provide a function in bfd to return the address of data. For 
example (bfd.h):

     /* the absolute section */
extern const asection bfd_abs_section;
#define bfd_abs_section_ptr ((asection *) &bfd_abs_section)

must be changed to

     /* the absolute section */
extern asection *bfd_abs_section_addr(void);
#define bfd_abs_section_ptr (bfd_abs_section_addr())


And the function bfd_abs_section_addr will be

asection *
bfd_abs_section_addr(void)
{
	return &bfd_abs_section;
}

--
Sergey Okhapkin, http://www.lexa.ru/sos
Moscow, Russia


- Raw text -


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