delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/09/23/09:23:41

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <0b5701c14432$ff513450$0200a8c0@lifelesswks>
From: "Robert Collins" <robert DOT collins AT itdomain DOT com DOT au>
To: "Stephen Dyke" <sk DOT ml AT btinternet DOT com>, "cygwin" <cygwin AT cygwin DOT com>
References: <3BAD12EA DOT 30290 DOT 3EA67560 AT localhost> <002c01c143ab$501470b0$0149a8c0 AT sknet01> <08f701c143f5$d8336560$0200a8c0 AT lifelesswks> <004401c1442e$93973830$0149a8c0 AT sknet01>
Subject: Re: GetModuleHandleA AT 4
Date: Sun, 23 Sep 2001 23:23:55 +1000
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
X-OriginalArrivalTime: 23 Sep 2001 13:31:54.0743 (UTC) FILETIME=[1C556070:01C14434]

----- Original Message -----
From: "Stephen Dyke" <sk DOT ml AT btinternet DOT com>


> > > Yes I did make some modifications and
> > > looking to build a package for cygwin,
> > > that could simply the overly complex
> > > problem that is building a DLL.
> >
> > I'm a little confused here. What's so complex about gcc -o
> > foo.dll -shared foo.c ?
> >
> > Rob
>
> This is incorrect, the command you use does not create a relocation
> section, and has many problems with windows 95 and win98 first
> edition. furthermore, the dll would suffer from problems with
> maintaining static variables and threading.

Hmm, thats strange. It creates a .reloc section for me (see below). What
specific problems does it have with win95 and 98?

Can you enlarge on the issues with static variables and threading?

Also, are you planning on rolling your improvements into ld?

Rob

$ cat foo.c
int foo;

int bar(int foo1)
{
  return (foo1>foo);
}
==
$ gcc -o foo.dll -shared foo.c
==
$ objdump foo.dll -h

foo.dll:     file format pei-i386

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         00000400  10001000  10001000  00000400  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  1 .data         00000200  10002000  10002000  00000800  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  2 .bss          0000010c  10003000  10003000  00000000  2**2
                  ALLOC
  3 .edata        00000200  10004000  10004000  00000a00  2**2
                  CONTENTS
  4 .idata        00000200  10005000  10005000  00000c00  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  5 .reloc        00000200  10006000  10006000  00000e00  2**2
                  CONTENTS
  6 .stab         00013800  10007000  10007000  00001000  2**2
                  CONTENTS, READONLY, DEBUGGING, NEVER_LOAD, EXCLUDE
  7 .stabstr      0008d200  1001b000  1001b000  00014800  2**0
                  CONTENTS, READONLY, DEBUGGING, NEVER_LOAD, EXCLUDE
==



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019