Mail Archives: cygwin-developers/1998/10/02/06:16:49
On Fri, Oct 02, 1998 at 11:41:30AM +0200, Corinna Vinschen wrote:
>Could someone explain the following behaviour of the
>g++ compiler in egcs-1.1b?
>
>I have compiled it with egcs-1.0.2.
>
>E.g. the line
> static const int NO_COPY cygwin_dll_version_major
>= CYGWIN_DLL_VERSION_MAJOR;
>
>from winsup/dcrt0.cc where NO_COPY is
>
> #define NO_COPY __attribute__((section(".data_cygwin_nocopy")))
>
>compiled with
>
>gcc -c -fno-rtti -fno-exceptions -Wall -Wunused -I./include -I.
>-I../libstdc++/stl -I../libio -I../libio -I../newlib/libc/sys/cygwin32
>-I../newlib/libc/include -I./config/i386 -nostdinc++ -o dcrt0.o dcrt0.cc
>
>results in:
>
>dcrt0.cc:37: int const cygwin_dll_version_major causes a section type
>conflict
>make: *** [dcrt0.o] Error 1
>
>Erasing `const' works, but I don't understand, what happens.
>Is it a bug or am I too dull or what?
Yow. It sounds like constants are being put in their own section
now. Since fork doesn't know about this section, it won't be
copied anyway so you can safely remove the NO_COPY attribute.
Maybe Mumit can comment on this "theory".
--
cgf AT cygnus DOT com
http://www.cygnus.com/
- Raw text -