From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9104 invoked by alias); 11 Jul 2011 19:49:54 -0000 Received: (qmail 8977 invoked by uid 22791); 11 Jul 2011 19:49:53 -0000 X-SWARE-Spam-Status: No, hits=-0.6 required=5.0 tests=AWL,BAYES_00,DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,SPF_HELO_PASS,TW_BJ,T_RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from lo.gmane.org (HELO lo.gmane.org) (80.91.229.12) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 11 Jul 2011 19:49:41 +0000 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QgMU6-0005Wk-Lc for binutils@sources.redhat.com; Mon, 11 Jul 2011 21:49:38 +0200 Received: from 248-155-202-46.pool.ukrtel.net ([46.202.155.248]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 11 Jul 2011 21:49:38 +0200 Received: from gavenkoa by 248-155-202-46.pool.ukrtel.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 11 Jul 2011 21:49:38 +0200 To: binutils@sources.redhat.com From: Oleksandr Gavenko Subject: Re: How define absolute local symbol by GNU as? Date: Mon, 11 Jul 2011 20:09:00 -0000 Message-ID: <4E1B53BF.5030900@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.2.18) Gecko/20110616 Thunderbird/3.1.11 In-Reply-To: X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2011-07/txt/msg00114.txt.bz2 Message-ID: <20110711200900.KlywkFwaaXaj0To_W2FZlueG1FTVNVBdY3vO90GOtMs@z> I repost my question as no one replay and my job SMTP server in range of spam area of ISP (I think is just blocked). On 08.07.2011 11:47, Oleksandr Gavenko wrote: > On 07.07.2011 19:29, Andreas Schwab wrote: >> Works for me. >> >> $ echo a=1 | as >> $ nm >> 00000001 a a >> > I try on Linux and FreeBSD host and get similar result (GOOD). > > But with Cygwin: > > /usr/bin/as > /usr/bin/i686-pc-mingw32-as.exe > /usr/bin/i686-w64-mingw32-as.exe > > with version: > > GNU assembler (GNU Binutils) 2.20.51.20100410 > GNU assembler (GNU Binutils) 2.21 > GNU assembler (GNU Binutils) 2.21.51.20110605 > > $ echo a=1 | i686-pc-mingw32-as > $ nm > 00000000 b .bss > 00000000 d .data > 00000000 t .text > > I can not get same result. So this can be related to COFF format? > > --keep-locals also have no effect. I try another approach: $ gcc -c -o test.o -Wa,"-defsym,my=1" test.c $ objdump -t test.o [ 2](sec -1)(fl 0x00)(ty 0)(scl 3) (nx 0) 0x00000001 my To get same result I try write .s file: .def my; .scl 3; .endef then I get: $ as -o test.o test.s; objdump -t test.o; nm test.o [ 8](sec 0)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 my U my Note: scl is 2, not 3!! With: .def my; .scl 3; .val 1; .endef $ as -o test.o test.s; objdump -t test.o; nm test.o 2.s: Assembler messages: 2.s:14: Internal error! Assertion failure in coff_frob_symbol at /netrel/src/binutils-2.20.51-2/gas/config/obj-coff.c line 1335. Please report this bug.