From: Oleksandr Gavenko <gavenkoa@gmail.com>
To: binutils@sources.redhat.com
Subject: Re: How define absolute local symbol by GNU as?
Date: Mon, 11 Jul 2011 20:09:00 -0000 [thread overview]
Message-ID: <4E1B53BF.5030900@gmail.com> (raw)
Message-ID: <20110711200900.KlywkFwaaXaj0To_W2FZlueG1FTVNVBdY3vO90GOtMs@z> (raw)
In-Reply-To: <iv6g63$l40$1@dough.gmane.org>
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.
next prev parent reply other threads:[~2011-07-11 19:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-07 14:25 Oleksandr Gavenko
2011-07-07 14:41 ` Andreas Schwab
2011-07-07 16:18 ` Oleksandr Gavenko
2011-07-07 16:30 ` Bob Plantz
2011-07-08 0:53 ` Andreas Schwab
2011-07-08 12:44 ` Oleksandr Gavenko
2011-07-08 20:28 ` Oleksandr Gavenko
2011-07-11 19:58 ` Oleksandr Gavenko [this message]
2011-07-11 20:09 ` Oleksandr Gavenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E1B53BF.5030900@gmail.com \
--to=gavenkoa@gmail.com \
--cc=binutils@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).