X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:mime-version:references:in-reply-to:from:date
	:message-id:subject:to:content-type; q=dns; s=default; b=jwWX8yW
	5LKIPYXWRiFlbRivw+kHiZWbFiBaRk3M8+t5f37TJ/0rajrJUpg+Gs2Tz0clqxPz
	y3dnNGAQ+0bSL9Qlx3GnWEMg2K67qvFLe7yj8khjVh8z6LUKpGztgkqDH3OhRM/2
	09EkpL1HNdGEMM/1F3PCMldjGTDjNwdbGqg4=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:mime-version:references:in-reply-to:from:date
	:message-id:subject:to:content-type; s=default; bh=hHOR5qB0CHPoI
	6q7x5S8m51Hihs=; b=xWMIj8Vp62iVpeTwUbv1U69kz2TcO41RhvT8lww7YHSFP
	OjlFN9rYHs7hvehylNU+t+vVNL7EXQTXiQPpMReCDLajQ34rRQy72V2FRuKmHmgk
	VDcfMGyD5rF01Bq0NmJsMLnUp4ZXbj1w0WXp0plmOvCZBYbb8d0Np149K+F4sw=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:596
X-HELO: mail-qk1-f170.google.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;        d=gmail.com; s=20161025;        h=mime-version:references:in-reply-to:from:date:message-id:subject:to;        bh=6l0LzeOjPUwiB4jMLbLal6Yo2kzqHGSQ/RVlJoT2ITA=;        b=WcjPDgN1owPQPjhhrgmanH/l5O2Z3HsBCIZ++mtIjjyYgqDwiALM5sw98pTahTj178         BnA6sSFNp8L8gqFLO02MJaxHrLh36tjAJhBrPSmQG6e6+RuMzQT/wP/NAsdSj0pgVL6O         7Fl6cqIYQN12kPozap9LRo3PCzQsgo3sK0V3QpmnnZxnEAozvt/1w5RtoN1agfAHzeJd         /VZDzkVkh8+OzZ1M9wCq0oNRSG1asnApuK6aegbPx/zR6SU4qQYkD1IORSvJxFCAHRa6         8EQg2UGOViCf7+Qm+HN62EY+9oOPVFuFLnLMf+pBNoqkbm/TulnB6N65xYBjFaEPtJVe         Nq1Q==
MIME-Version: 1.0
References: <CALK-3mLHN3sVi5JRqsuiarkpsD5f_LLDHdSMQwR_wDpZ7nXwPw@mail.gmail.com>
In-Reply-To: <CALK-3mLHN3sVi5JRqsuiarkpsD5f_LLDHdSMQwR_wDpZ7nXwPw@mail.gmail.com>
From: =?UTF-8?Q?V=C3=A1clav_Haisman?= <vhaisman@gmail.com>
Date: Fri, 19 Jul 2019 14:45:14 +0200
Message-ID: <CAKw7uVjCRWKoVgb2xN2=SMOasOp1rsc2v7-2HqbHraG1uV6Fvg@mail.gmail.com>
Subject: Re: Function call difference between cygwin and Windows
To: cygwin@cygwin.com
Content-Type: text/plain; charset="UTF-8"
X-IsSubscribed: yes

On Fri, 19 Jul 2019 at 10:23, Biswapriyo Nath wrote:
>
> If a function calls both cygwin and Windows functions the binary creates
> extra subroutine (in assembly) for cygwin ones. Example:
>
> * Windows function:
>
>    call cs:CreatePipe
>
> * cygwin function:
>
>    call ioctl
>
>    ioctl proc near
>    jmp cs:__imp_ioctl
>    endp
>
> The binary is statically compiled. Why there are extra subroutines? Is this
> "by-design"? Or am I missing something?

This is how Windows DLLs work. See also
<https://stackoverflow.com/a/22688670/341065>.

-- 
VH

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

