This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cygwin, libtool, dlpreopen, and .rdata


Brian Ford wrote:

Yes, I see. I hope Danny Smith might weigh in here?

http://sources.redhat.com/ml/binutils/2004-02/msg00003.html

I would argue that this is gcc's responsibility. If a const structure variable contains *any* code or data addresses, it's not safe to put it in .rdata (or .rodata, whatever the platform calls it), because of relocation issues.


So rather than detect a "DLL import", I'd say *any* function addresses in a const initializer should cause the variable to go into a regular .data section, without any complicated decision-making by binutils.

(Note: this is not the same problem that Danny talks about in that message - that usage was legitimate, and there was no attempt to have a const initialized variable with a data address.)


-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/


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