From: Mumit Khan <khan@xraylith.wisc.EDU>
To: Ian Lance Taylor <ian@zembu.com>
Cc: binutils@sourceware.cygnus.com
Subject: Re: (fixed patch) pe-dll fix for exporting common symbols
Date: Thu, 01 Jul 1999 00:00:00 -0000 [thread overview]
Message-ID: <199906242204.RAA09516@mercury.xraylith.wisc.edu> (raw)
In-Reply-To: <19990624205518.17904.qmail@daffy.airs.com>
Ian Lance Taylor <ian@zembu.com> writes:
> Date: Thu, 24 Jun 1999 14:43:05 -0500
> From: Mumit Khan <khan@xraylith.wisc.EDU>
>
> + if (blhe->type == bfd_link_hash_defined)
> + {
> + exported_symbol_offsets[i] = blhe->u.def.value;
> + exported_symbol_sections[i] = blhe->u.def.section;
> + }
> + else
> + {
> + exported_symbol_offsets[i] = 0;
> + exported_symbol_sections[i] = blhe->u.c.p->section;
> + }
>
> I don't know how PE handles common symbols in DLLs, but I don't see
> how this could be right. This appears to assume that the common
> symbol is at the start of the section, but that is not correct. You
> can have multiple common symbols in a single section. Try putting
> several common symbols in a single input file, and see what happens.
Yeah, it's completely bogus. Please pretend I never sent it in ;-)
Turns out that the offset value for common variables is *always* 16
no matter what the type is and how many there. So either way, I was
overwriting the values by unintended means.
I have yet to figure out how bfd is laying out common symbols, and how
I can access the info to write out the offsets into bss/common section.
Regards,
Mumit
next prev parent reply other threads:[~1999-07-01 0:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-07-01 0:00 Mumit Khan
1999-07-01 0:00 ` Ian Lance Taylor
1999-07-01 0:00 ` Mumit Khan [this message]
1999-07-01 0:00 ` Ian Lance Taylor
1999-07-01 0:00 ` Mumit Khan
1999-07-01 0:00 ` DJ Delorie
1999-07-01 0:00 ` take 2: " Mumit Khan
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=199906242204.RAA09516@mercury.xraylith.wisc.edu \
--to=khan@xraylith.wisc.edu \
--cc=binutils@sourceware.cygnus.com \
--cc=ian@zembu.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).