X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-0.7 required=5.0 tests=AWL,BAYES_05,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org X-Spam-Score: -100.817 Message-ID: <4DB64E0E.8040500@sh.cvut.cz> Date: Tue, 26 Apr 2011 06:46:06 +0200 From: =?UTF-8?B?VsOhY2xhdiBIYWlzbWFu?= User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.15) Gecko/20110303 Lightning/1.0b2 Thunderbird/3.1.9 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: The same assembly code but different result on cygwin and Centos References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com matthew chao wrote, On 26.4.2011 4:52: > The code below assigns an integer number 20 to %ebx, which can be > CORRECTLY assembled on both cygwin and CentOS, > > ###code begin### > .section .data > items: > .long 20 > > .section .text > .globl _start > _start: > movl $0,%edi > movl items(,%edi,4),%eax > movl %eax,%ebx > > movl $1,%eax > int $0x80 >[...] Cygwin is Linux emulation DLL, it runs on top of Win32 API. It does not emulate Linux' syscalls; it cannot emulate that. -- 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