public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Charles Wilson <cwilson@ece.gatech.edu>
To: DJ Delorie <dj@delorie.com>
Cc: nickc@cygnus.com, binutils@sourceware.cygnus.com
Subject: Re: binutils-20000625 ld.exe --shared broken
Date: Fri, 07 Jul 2000 11:24:00 -0000	[thread overview]
Message-ID: <39662116.AF19DFAF@ece.gatech.edu> (raw)
In-Reply-To: <200007071731.NAA28175@envy.delorie.com>

DJ Delorie wrote:
> 
> > I agree with DJ, although I must confess I had to read the explanation
> > and look through the code a couple of times before understanding what
> > is going on.
> 
> I wish I had understood it after just a *couple* of reads.  It took me
> a lot longer than that to figure out why pe-dll was having such a hard
> time of it, until Ian clued me in that BFD_IN_MEMORY was an old hack
> and unlikely to still work right.
> 
> I'll work up a comment for that part of the code, though.

Okay, further investigation shows:

'pe_dll_generate_implib' calls 'make_head', 'make_one' (many times), and
'make_tail' -- so each member bfd of the implib is processed by one of
these three routines. Each of these three routines call
'bfd_make_readable' on the bfd. However, that call fails.

So, 'bfd_make_readable' is broken.

(bfd/opncls.c: bfd_make_readable)
	613	  if (! BFD_SEND_FMT (abfd, _bfd_write_contents, (abfd)))
 	614	    return false;
 	615	

The clause expands to 'if (! coff_write_object_contents(abfd))' based on
all the #define's and stuff, so:

(bfd/coffcode.h: coff_write_object_contents)
-	3250	  if (bfd_seek (abfd, scn_base, SEEK_SET) != 0)
-	3251	    return false;

And this clause is tripped, so coff_write_... returns false, and
bfd_make_readable returns false, and the bfd is still set to direction =
write_direction, etc, etc.

Just before the return, the values of some of the variables are:

amount		169187232
lineno_base	169187232
reloc_base	198
scn_base	20
sym_base	198
reloc_size	30
lnno_size	168176232

And that's as far as I've been able to get.

--Chuck

  reply	other threads:[~2000-07-07 11:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-07-07 10:16 Nick Clifton
2000-07-07 10:31 ` DJ Delorie
2000-07-07 11:24   ` Charles Wilson [this message]
2000-07-07 12:00     ` DJ Delorie
2000-07-07 21:06       ` Charles Wilson
2000-07-12 11:30         ` DJ Delorie
     [not found] <396547F2.333FBD51@ece.gatech.edu>
     [not found] ` <200007070300.XAA08402@envy.delorie.com>
     [not found]   ` <396574C7.924FADB6@ece.gatech.edu>
2000-07-07  6:39     ` DJ Delorie
2000-07-07  8:55       ` Charles Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=39662116.AF19DFAF@ece.gatech.edu \
    --to=cwilson@ece.gatech.edu \
    --cc=binutils@sourceware.cygnus.com \
    --cc=dj@delorie.com \
    --cc=nickc@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).