From: Charles Wilson <cwilson@ece.gatech.edu>
To: DJ Delorie <dj@delorie.com>
Cc: binutils@sources.redhat.com, cygwin@cygwin.com
Subject: Re: [aida_s@mx12.freecom.ne.jp: A serious bug of "ld --enable-auto-import"]
Date: Sun, 26 Aug 2001 09:04:00 -0000 [thread overview]
Message-ID: <3B891E23.9090407@ece.gatech.edu> (raw)
In-Reply-To: <200108261543.LAA06415@envy.delorie.com>
DJ Delorie wrote:
>>Here's what hello.o looks like when hello.c uses
>>__declspec(dllimport) (and hwstr.c uses __declspec(dllexport)).
>>Recall that this configuration works as expected.
>>
>
> Right, because we're effectively telling gcc that hwstr1 is a pointer,
> not an array. That changes how gcc generates code. Pointers must be
> indexed at runtime, arrays may be indexed at compile time.
Well, that's interesting. Since arrays ARE pointers(*), then perhaps
it's enough to change gcc's behavior from
"arrays may be indexed at compile time" -- and currently, ARE indexed at
compile time
to
arrays indexed at runtime. (for pe-i386 targets)
That leaves two questions:
a) will it fix the observed problem
b) will gcc accept it
(Is there a gcc option to force runtime indexing of arrays?)
--Chuck
(*) okay, I'm C-biased. I'm not sure how a change of the type proposed
here would affect C++, Fortran, Ada, Java, .... but turning OFF this
optimization shouldn't break anything, should it?
next prev parent reply other threads:[~2001-08-26 9:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-25 22:11 Charles S. Wilson
2001-08-25 22:30 ` DJ Delorie
2001-08-25 22:47 ` Charles Wilson
2001-08-25 23:14 ` DJ Delorie
2001-08-26 8:10 ` Charles Wilson
2001-08-26 8:43 ` DJ Delorie
2001-08-26 9:04 ` Charles Wilson [this message]
2001-08-26 9:43 ` DJ Delorie
2001-08-26 15:35 ` Charles Wilson
2001-08-26 12:27 ` Kurt Roeckx
-- strict thread matches above, loose matches on Subject: below --
2001-08-25 10:50 Christopher Faylor
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=3B891E23.9090407@ece.gatech.edu \
--to=cwilson@ece.gatech.edu \
--cc=binutils@sources.redhat.com \
--cc=cygwin@cygwin.com \
--cc=dj@delorie.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).