[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gettext patches for cygwin #1: rdata

From: Charles Wilson
Subject: Re: gettext patches for cygwin #1: rdata
Date: Thu, 24 Nov 2005 10:50:52 -0500
User-agent: Thunderbird 1.5 (Windows/20051025)

Bruno Haible wrote:

True. And I try to choose the workarounds that require the least knowledge
of the code or are the most automatic.

So, for instance, making both --enable-auto-import --enable-pseudo-runtime-reloc the default setting for cygwin ld, so that DLLs can be compiled EXACTLY like static libs with NO changes, and NO #ifdef this_flag and #define that_macro?

(ignoring, for the moment, the brokenness w.r.t .rdata/const)

It is this kind of low-level reasoning - and the amount of time it takes
to understand it - that takes away brain cycles from the programmer. This
knowledge is essential for the person who will implement the workaround in
gcc. It's good that you wrote it down once, for reference. But for an
average application programmer, this excursion to assembly-language and
compiler internals drags his attention away from the actual application's
purpose. That's what I mean by "valid ANSI C code": everything below this
level is the business of the system implementor, not of the application

Platform note: don't put the address of variables loaded from an external library into const storage.

The app programmer doesn't need to know why. Just what (not) to do. It's OBVIOUSLY not ideal. But it's not THAT bad. Try coding for embedded systems sometime ("whaddaya mean I can't use printf?")

Are you sure this would work without the DLL_VARIABLE declaration?

You are right, as I discovered and detailed in the later email with the code smippets.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]