This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Possible Bug with darwin_asm_named_section() in gcc/config/darwin.c
- From: Mike Stump <mikestump at comcast dot net>
- To: Eric Siroker <esiroker at gmail dot com>
- Cc: Dale Johannesen <dalej at apple dot com>, Eric Christopher <echristo at apple dot com>, Stan Shebs <stanshebs at earthlink dot net>, gcc at gcc dot gnu dot org
- Date: Sat, 3 Jul 2010 09:42:51 -0700
- Subject: Re: Possible Bug with darwin_asm_named_section() in gcc/config/darwin.c
- References: <AANLkTinY7VwBy6FYBE_dOty6PIcfGHS8r1alNBbFDBSI@mail.gmail.com>
On Jul 1, 2010, at 11:29 PM, Eric Siroker wrote:
> I'm getting the frontend for the Go programming language to work in
> Darwin. I encountered what looks like a bug in Darwin-specific gcc
> code.
You are obligated to spell the name of the section correctly...
$ cat t.s
.section __TEXT,__go_export
sym1: .long 1
.section __DATA,__go_export
sym2: .long 2
c-98-210-246-208:gcc mrs$ gcc t.s -c
c-98-210-246-208:gcc mrs$ nm -m t.o
0000000000000000 (__TEXT,__go_export) non-external sym1
0000000000000004 (__DATA,__go_export) non-external sym2
Now, if you want, I'll approve a change to prepend a __DATA, if there is no , already in the string. Bear in mind, there are only ~250 sections allowed, so, go easy on the number you want to create. Also, bear in mind, there are optional flags at the end that you might need to use, depending upon the section contents.