This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: ld --auto-import for cygwin and libtool


> Robert Collins wrote:
>
> > I've cc'd this for wide exposure.
>
>
> As have I.  However, the appropriate place for this discussion is the
> binutils mailing list; please restrict to that list when replying.
>
> I'm trying to restart this thread after ~6 weeks, to lobby for the
> inclusion of Robert's version of Paul Sokolovsky's auto-import patch.
>
> Robert's version also includes Paul's auto-EXport filtering patch which
> in its final form appeared here:
> [patch] ld: PE: comprehensive auto-filtering for DLL-exportable symbols
> http://sources.redhat.com/ml/binutils/2001-04/msg00373.html
> http://sources.redhat.com/ml/binutils/2001-05/msg00019.html
> It first appeared in an early form here:
> [patch] ld [pei]: Filter off unnecessary symbols from auto-export
> http://sources.redhat.com/ml/binutils/2000-11/msg00131.html
>
> While I can't seem to find Paul's original auto-import patch, it made
> its appearance on Nov 4, 2000 as part of the mingw binutils port.
> Robert's version is here:
> http://users.bigpond.net.au/robertc/paul-ld-auto-import-with-cygwin.patch
>
> Ralf Habacker reported a bug in Paul's auto-import, which the patch at
> the URL below fixes(?). However, Robert's version does not use this
> patch; I've been testing without this patch, and do not see the buggy
> behavior Ralf reported.  I mention it here only for completeness.
> http://sources.redhat.com/ml/binutils/2001-05/msg00088.html
>
That's not true. This patch comes from Paul after my reporting and it is
contained
in Robert binutils. Verify the relating part of pe.dll below:

<snip>------------------------------
928,....
void
pe_walk_relocs_of_symbol (info, name, cb)
     struct bfd_link_info *info;
     CONST char *name;
     int (*cb)(arelent*);
{
  bfd *b;
  struct sec *s;

  for (b = info->input_bfds; b; b = b->link_next)
    {
      arelent **relocs;
      int relsize, nrelocs, i;

      for (s = b->sections; s; s = s->next)
	{
	  static asymbol **symbols = NULL;
	  int nsyms, symsize;
	int flags = bfd_get_section_flags (b, s);
!
!	/* Skip discarded linkonce sections */
!	if (flags & SEC_LINK_ONCE
!	    && s->output_section == bfd_abs_section_ptr)
!	  continue;
!
          current_sec=s;

	  symsize = bfd_get_sy
<snip>------------------------------------------------------------



Ralf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]