public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ppryor63 at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/46072] AIX linker chokes on debug info for uninitialized static variables
Date: Wed, 10 Nov 2010 13:02:00 -0000	[thread overview]
Message-ID: <bug-46072-4-cR0ZFrgjWT@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-46072-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46072

Paul Pryor <ppryor63 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ppryor63 at gmail dot com

--- Comment #2 from Paul Pryor <ppryor63 at gmail dot com> 2010-11-10 13:01:48 UTC ---
I encountered the same problem in AIX 5.3 on both boxes that were patched to
5300-12-02-1036 recently. If you need any more information please contact me. I
am attaching all diagnostic information below.

-------

$ oslevel -s
5300-12-02-1036

-------

$ ls -l /usr/bin/ld
lrwxrwxrwx    1 bin      bin              15 Jun 10 2009  /usr/bin/ld ->
/usr/ccs/bin/ld
$ ls -l /usr/ccs/bin/ld
-r-xr-xr-x    1 bin      bin           38942 Aug 06 17:05 /usr/ccs/bin/ld
$ lslpp -w /usr/ccs/bin/ld
  File                                        Fileset               Type
  ----------------------------------------------------------------------------
  /usr/ccs/bin/ld                             bos.rte.bind_cmds     File
$ lslpp -h bos.rte.bind_cmds
  Fileset         Level     Action       Status       Date         Time
  ----------------------------------------------------------------------------
Path: /usr/lib/objrepos
  bos.rte.bind_cmds
                 5.3.0.40   COMMIT       COMPLETE     06/10/09     16:01:41
                  5.3.9.1   COMMIT       COMPLETE     06/10/09     17:42:02
                 5.3.12.1   COMMIT       COMPLETE     11/05/10     06:37:14
$ lslpp -i bos.rte.bind_cmds
                        Vendor
  Fileset               Code    Product Id  Feature Id  Package Name
  ----------------------------------------------------------------------------
Path: /usr/lib/objrepos
  bos.rte.bind_cmds 5.3.0.40
                                5765-E6200  0000        bos
-------

$ cat static.c
static int flag1;
static int flag2 = 0;

int main(int arg, char *argv[])
{
  printf("flag1:%d flag2:%d\n", flag1, flag2);
  return 0;
}
$ gcc -v
Reading specs from /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2/specs
Configured with: ../configure --with-as=/usr/bin/as --with-ld=/usr/bin/ld
--disable-nls --enable-languages=c,c++ --prefix=/opt/freeware --enable-threads
--enable-version-specific-runtime-libs --host=powerpc-ibm-aix5.2.0.0
Thread model: aix
gcc version 3.3.2
$ gcc -g -o static static.c
ld: 0711-593 SEVERE ERROR: Symbol C_BSTAT (entry 24) in object
/tmp//cc6ul6xe.o:
        The symbol refers to a csect with symbol number 0, which was not
        found. The new symbol cannot be associated with a csect and
        is being ignored.
collect2: ld returned 12 exit status
$ gcc -o static static.c
$ ./static
flag1:0 flag2:0

-------

$ cat static.c
#include <stdio.h>

static int flag1;
static int flag2 = 0;

int main(int argc, char *argv[])
{
  printf("flag1:%d flag2:%d\n", flag1, flag2);
  return 0;
}

$ gcc -v
Using built-in specs.
Target: powerpc-ibm-aix5.3.0.0
Configured with: ../configure --with-as=/usr/bin/as --with-ld=/usr/bin/ld
--enable-languages=c,c++,java --prefix=/opt/freeware --enable-threads
--enable-version-specific-runtime-libs --host=powerpc-ibm-aix5.3.0.0
--target=powerpc-ibm-aix5.3.0.0 --build=powerpc-ibm-aix5.3.0.0
--disable-libjava-multilib
Thread model: aix
gcc version 4.2.0

$ gcc -g -o static static.c
ld: 0711-593 SEVERE ERROR: Symbol C_BSTAT (entry 259) in object
/tmp//cccd0Shv.o:
        The symbol refers to a csect with symbol number 0, which was not
        found. The new symbol cannot be associated with a csect and
        is being ignored.
collect2: ld returned 12 exit status
$ gcc -o static static.c
$ ./static
flag1:0 flag2:0

-------

$ cat static.c
#include <stdio.h>

static int flag1;
static int flag2 = 0;

int main(int argc, char *argv[])
{
  printf("flag1:%d flag2:%d\n", flag1, flag2);
  return 0;
}

$ xlc -g -o static static.c
$ ./static
flag1:0 flag2:0

-------

$ cat static.c
static int flag1;
static int flag2 = 0;

int main(int arg, char *argv[])
{
  printf("flag1:%d flag2:%d\n", flag1, flag2);
  return 0;
}

$ gcc -v
Reading specs from /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2/specs
Configured with: ../configure --with-as=/usr/bin/as --with-ld=/usr/bin/ld
--disable-nls --enable-languages=c,c++ --prefix=/opt/freeware --enable-threads
--enable-version-specific-runtime-libs --host=powerpc-ibm-aix5.2.0.0
Thread model: aix
gcc version 3.3.2

$ gcc -g -S static.c

$ cat static.s
        .file   "static.c"
        .toc
        .csect _static.rw_c[RW],3
        .csect .text[PR]
        .stabx 
"__int128_t:t1=@s128;r1;000000000000000000000000;0377777777777777777777777777777777;",0,140,0
        .stabx 
"__uint128_t:t2=@s128;r2;000000000000000000000000;0377777777777777777777777777777777;",0,140,0
        .stabx  "complex int:t3=s8real:-1,0,32;imag:-1,32,32;;",0,140,0
        .stabx  "complex float:t4=R3;8;0;",0,140,0
        .stabx  "complex double:t5=R4;16;0;",0,140,0
        .stabx  "complex long double:t6=R4;16;0;",0,140,0
        .stabx  "__builtin_va_list:t7=*-2",0,140,0
        .stabx  "_Bool:t8=@s8;-16;",0,140,0
        .lcomm flag2,4,_static.bss_c
        .csect _static.rw_c[RO],3
        .align 2
LC..0:
        .byte "flag1:%d flag2:%d"
        .byte 10, 0
        .toc
LC..1:
        .tc flag1[TC],flag1
LC..2:
        .tc flag2[TC],flag2
LC..3:
        .tc LC..0[TC],LC..0
        .csect .text[PR]
        .align 2
        .globl main
        .globl .main
        .csect main[DS]
main:
        .long .main, TOC[tc0], 0
        .csect .text[PR]
.main:
        .stabx  "main:F-1",.main,142,0
        .function .main,.main,16,044,FE..main-.main
        .bf     5
        .stabx  "arg:p-1",96,130,0
        .stabx  "argv:p9=*10=*-2",100,130,0
        .line   1
        mflr 0
        stw 31,-4(1)
        stw 0,8(1)
        stwu 1,-72(1)
        mr 31,1
        stw 3,96(31)
        stw 4,100(31)
        .line   2
        lwz 11,LC..1(2)
        lwz 9,LC..2(2)
        lwz 3,LC..3(2)
        lwz 4,0(11)
        lwz 5,0(9)
        bl .printf
        nop
        .line   3
        li 0,0
        .line   4
        mr 3,0
        lwz 1,0(1)
        lwz 0,8(1)
        mtlr 0
        lwz 31,-4(1)
        blr
        .ef     8
LT..main:
        .long 0
        .byte 0,0,32,97,128,1,2,1
        .long 0
        .long LT..main-.main
        .short 4
        .byte "main"
        .byte 31
        .align 2
FE..main:
        .lcomm flag1,4,_static.bss_c
        .bs     _static.bss_c
        .stabx  "flag1:S-1",flag1,133,0
        .es
        .bs     _static.rw_c[RW]
        .stabx  "flag2:S-1",flag2,133,0
        .es
_section_.text:
        .csect .data[RW],3
        .long _section_.text

-------

$ gcc -v
Using built-in specs.
Target: powerpc-ibm-aix5.3.0.0
Configured with: ../configure --with-as=/usr/bin/as --with-ld=/usr/bin/ld
--enable-languages=c,c++,java --prefix=/opt/freeware --enable-threads
--enable-version-specific-runtime-libs --host=powerpc-ibm-aix5.3.0.0
--target=powerpc-ibm-aix5.3.0.0 --build=powerpc-ibm-aix5.3.0.0
--disable-libjava-multilib
Thread model: aix
gcc version 4.2.0

$ gcc -g -S static.c

$ cat static.s
        .file   "static.c"
        .csect _static.rw_[RW],3
        .csect .text[PR]
        .toc
        .csect .text[PR]
        .stabx  "_Decimal32:t1=r-1;4;0;",0,140,0
        .stabx  "_Decimal64:t2=r-1;8;0;",0,140,0
        .stabx  "_Decimal128:t3=r-1;16;0;",0,140,0
        .stabx  "__gnuc_va_list:t4=5=*-2",0,140,0
        .stabx  "size_t:t6=-10",0,140,0
        .stabx  "fpos_t:t7=-4",0,140,0
        .stabx  "fpos64_t:t8=-31",0,140,0
        .stabx 
"FILE:t9=10=s32_ptr:11=*-5,0,32;_cnt:-1,32,32;_base:11,64,32;_bufendp:11,96,32;_flag:-3,128,16;_file:-3,144,16;__stdioid:-1,160,32;__newbase:12=*-2,192,32;_lock:13=*-11,224,32;;",0,140,0
        .stabx  "va_list:t14=12",0,140,0
        .stabx  "int8_t:t15=-6",0,140,0
        .stabx  "int16_t:t16=-3",0,140,0
        .stabx  "int32_t:t17=-1",0,140,0
        .stabx  "int64_t:t18=-31",0,140,0
        .stabx  "uint8_t:t19=-5",0,140,0
        .stabx  "uint16_t:t20=-7",0,140,0
        .stabx  "uint32_t:t21=-8",0,140,0
        .stabx  "uint64_t:t22=-32",0,140,0
        .stabx  "intmax_t:t23=18",0,140,0
        .stabx  "uintmax_t:t24=22",0,140,0
        .stabx  "intptr_t:t25=-4",0,140,0
        .stabx  "uintptr_t:t26=-10",0,140,0
        .stabx  "int_least8_t:t27=-6",0,140,0
        .stabx  "int_least16_t:t28=-3",0,140,0
        .stabx  "int_least32_t:t29=-1",0,140,0
        .stabx  "int_least64_t:t30=-31",0,140,0
        .stabx  "uint_least8_t:t31=-5",0,140,0
        .stabx  "uint_least16_t:t32=-7",0,140,0
        .stabx  "uint_least32_t:t33=-8",0,140,0
        .stabx  "uint_least64_t:t34=-32",0,140,0
        .stabx  "int_fast8_t:t35=-6",0,140,0
        .stabx  "int_fast16_t:t36=16",0,140,0
        .stabx  "int_fast32_t:t37=17",0,140,0
        .stabx  "uint_fast8_t:t38=-5",0,140,0
        .stabx  "uint_fast16_t:t39=20",0,140,0
        .stabx  "uint_fast32_t:t40=21",0,140,0
        .stabx  "int_fast64_t:t41=18",0,140,0
        .stabx  "uint_fast64_t:t42=22",0,140,0
        .stabx  "imaxdiv_t:t43=44=s16quot:23,0,64;rem:23,64,64;;",0,140,0
        .align 2
        .lglobl .strtoimax
        .csect strtoimax[DS]
strtoimax:
        .long .strtoimax, TOC[tc0], 0
        .csect .text[PR]
.strtoimax:
        .bi     "/usr/include/sys/inttypes.h"
        .stabx  "strtoimax:f23",.strtoimax,142,0
        .function .strtoimax,.strtoimax,16,044,FE..strtoimax-.strtoimax
        .bf     67
        .stabx  "__nptr:p45=*46=k-2",104,130,0
        .stabx  "__endptr:p47=*12",108,130,0
        .stabx  "__base:p-1",112,130,0
        .line   1
        mflr 0
        stw 31,-4(1)
        stw 0,8(1)
        stwu 1,-80(1)
        mr 31,1
        stw 3,104(31)
        stw 4,108(31)
        stw 5,112(31)
        .line   2
        lwz 3,104(31)
        lwz 4,108(31)
        lwz 5,112(31)
        bl .__strtollmax
        nop
        mr 10,4
        mr 9,3
        .line   3
        mr 3,9
        mr 4,10
        lwz 1,0(1)
        lwz 0,8(1)
        mtlr 0
        lwz 31,-4(1)
        blr
        .ef     69
LT..strtoimax:
        .long 0
        .byte 0,0,32,97,128,1,3,1
        .long 0
        .long LT..strtoimax-.strtoimax
        .short 9
        .byte "strtoimax"
        .byte 31
        .align 2
FE..strtoimax:
        .stabx  "wchar_t:t48=-7",0,140,0
        .stabx  "intfast_t:t49=17",0,140,0
        .stabx  "uintfast_t:t50=21",0,140,0
        .stabx  "__long32_t:t51=-4",0,140,0
        .stabx  "__ulong32_t:t52=-10",0,140,0
        .stabx  "__long64_t:t53=-1",0,140,0
        .stabx  "__ulong64_t:t54=-8",0,140,0
        .stabx  "int32long64_t:t55=-1",0,140,0
        .stabx  "uint32long64_t:t56=-8",0,140,0
        .stabx  "long32int64_t:t57=-4",0,140,0
        .stabx  "ulong32int64_t:t58=-10",0,140,0
        .stabx  "int8:t59=-6",0,140,0
        .stabx  "int16:t60=-3",0,140,0
        .stabx  "int32:t61=-1",0,140,0
        .stabx  "int64:t62=-31",0,140,0
        .stabx  "u_int8:t63=-5",0,140,0
        .stabx  "u_int8_t:t64=-5",0,140,0
        .stabx  "u_int16:t65=-7",0,140,0
        .stabx  "u_int16_t:t66=-7",0,140,0
        .stabx  "u_int32:t67=-8",0,140,0
        .stabx  "u_int32_t:t68=-8",0,140,0
        .stabx  "u_int64:t69=-32",0,140,0
        .stabx  "u_int64_t:t70=-32",0,140,0
        .stabx  "ptrdiff_t:t71=-4",0,140,0
        .stabx  "wctype_t:t72=-8",0,140,0
        .stabx  "time_t:t73=-1",0,140,0
        .stabx  "clock_t:t74=-1",0,140,0
        .stabx  "uchar_t:t75=-5",0,140,0
        .stabx  "ushort_t:t76=-7",0,140,0
        .stabx  "uint_t:t77=-8",0,140,0
        .stabx  "ulong_t:t78=-10",0,140,0
        .stabx  "ssize_t:t79=-4",0,140,0
        .stabx  "level_t:t80=-1",0,140,0
        .stabx  "daddr_t:t81=53",0,140,0
        .stabx  "daddr32_t:t82=-1",0,140,0
        .stabx  "daddr64_t:t83=18",0,140,0
        .stabx  "caddr_t:t84=12",0,140,0
        .stabx  "ino_t:t85=54",0,140,0
        .stabx  "ino32_t:t86=77",0,140,0
        .stabx  "ino64_t:t87=22",0,140,0
        .stabx  "cnt_t:t88=-3",0,140,0
        .stabx  "dev_t:t89=54",0,140,0
        .stabx  "dev32_t:t90=77",0,140,0
        .stabx  "dev64_t:t91=22",0,140,0
        .stabx  "chan_t:t92=-1",0,140,0
        .stabx  "time32_t:t93=-1",0,140,0
        .stabx  "pid32_t:t94=-1",0,140,0
        .stabx  "tid32_t:t95=-1",0,140,0
        .stabx  "pid64_t:t96=22",0,140,0
        .stabx  "tid64_t:t97=22",0,140,0
        .stabx  "time64_t:t98=18",0,140,0
        .stabx  "__ptr32:t99=13",0,140,0
        .stabx  "__cptr32:t100=12",0,140,0
        .stabx  "soff_t:t101=-1",0,140,0
        .stabx  "off_t:t102=-4",0,140,0
        .stabx  "off64_t:t103=-31",0,140,0
        .stabx  "paddr_t:t104=-4",0,140,0
        .stabx  "key_t:t105=55",0,140,0
        .stabx  "timer_t:t106=53",0,140,0
        .stabx  "timer32_t:t107=-1",0,140,0
        .stabx  "timer64_t:t108=18",0,140,0
        .stabx  "nlink_t:t109=-3",0,140,0
        .stabx  "mode_t:t110=77",0,140,0
        .stabx  "uid_t:t111=77",0,140,0
        .stabx  "gid_t:t112=77",0,140,0
        .stabx  "mid_t:t113=99",0,140,0
        .stabx  "pid_t:t114=55",0,140,0
        .stabx  "tid_t:t115=53",0,140,0
        .stabx  "slab_t:t116=117=ar118=r118;0;037777777777;;0;11;-2",0,140,0
        .stabx  "mtyp_t:t119=-4",0,140,0
        .stabx  "boolean_t:t120=-1",0,140,0
        .stabx  "crid_t:t121=-1",0,140,0
        .stabx  "blkcnt_t:t122=53",0,140,0
        .stabx  "blksize_t:t123=53",0,140,0
        .stabx  "blkcnt32_t:t124=-1",0,140,0
        .stabx  "blksize32_t:t125=-1",0,140,0
        .stabx  "blkcnt64_t:t126=22",0,140,0
        .stabx  "blksize64_t:t127=22",0,140,0
        .stabx  "fsblkcnt_t:t128=78",0,140,0
        .stabx  "fsfilcnt_t:t129=78",0,140,0
        .stabx  "wint_t:t130=-1",0,140,0
        .stabx  "id_t:t131=56",0,140,0
        .stabx  "useconds_t:t132=-8",0,140,0
        .stabx  "suseconds_t:t133=-1",0,140,0
        .stabx  "clockid_t:t134=-31",0,140,0
        .stabx  "sigset_t:T135=s8losigs:-8,0,32;hisigs:-8,32,32;;",0,140,0
        .stabx  "sigset_t:t136=135",0,140,0
        .stabx 
"sigset32_t:t137=138=s8losigs:-8,0,32;hisigs:-8,32,32;;",0,140,0
        .stabx 
"sigset64_t:t139=140=s32ss_set:141=ar118;0;3;22,0,256;;",0,140,0
        .stabx  "signal_t:t142=-1",0,140,0
        .stabx  "fsid_t:T143=s8val:144=ar118;0;1;-8,0,64;;",0,140,0
        .stabx  "fsid_t:t145=143",0,140,0
        .stabx  "fsid64_t:T146=s16val:147=ar118;0;1;22,0,128;;",0,140,0
        .stabx  "fsid64_t:t148=146",0,140,0
        .stabx  "pthread_attr_t:t149=13",0,140,0
        .stabx  "pthread_condattr_t:t150=13",0,140,0
        .stabx  "pthread_mutexattr_t:t151=13",0,140,0
        .stabx  "pthread_rwlockattr_t:t152=13",0,140,0
        .stabx  "pthread_barrierattr_t:t153=13",0,140,0
        .stabx  "pthread_t:t154=-8",0,140,0
        .stabx  "pthread_key_t:t155=-8",0,140,0
        .stabx 
"pthread_mutex_t:t156=157=s52__mt_word:158=ar118;0;12;-1,0,416;;",0,140,0
        .stabx 
"pthread_cond_t:t159=160=s44__cv_word:161=ar118;0;10;-1,0,352;;",0,140,0
        .stabx 
"pthread_once_t:t162=163=s112__on_word:164=ar118;0;27;-1,0,896;;",0,140,0
        .stabx 
"pthread_spinlock_t:t165=166=s24__sp_word:167=ar118;0;5;-1,0,192;;",0,140,0
        .stabx 
"pthread_barrier_t:t168=169=s32__br_word:170=ar118;0;7;-1,0,256;;",0,140,0
        .stabx 
"pthread_rwlock_t:t171=172=s208__rw_word:173=ar118;0;51;-1,0,1664;;",0,140,0
        .stabx  "_quad:T174=s8val:175=ar118;0;1;-1,0,64;;",0,140,0
        .stabx  "quad:t176=174",0,140,0
        .stabx  "vmid_t:t177=-4",0,140,0
        .stabx  "vmhandle_t:t178=78",0,140,0
        .stabx  "vmid32_t:t179=-1",0,140,0
        .stabx  "vmhandle32_t:t180=77",0,140,0
        .stabx  "kvmid_t:t181=57",0,140,0
        .stabx  "kvmhandle_t:t182=58",0,140,0
        .stabx  "vmid64_t:t183=-31",0,140,0
        .stabx  "rpn64_t:t184=-31",0,140,0
        .stabx  "cnt64_t:t185=-31",0,140,0
        .stabx  "psize_t:t186=-31",0,140,0
        .stabx  "vmidx_t:t187=55",0,140,0
        .stabx  "vmfkey_t:t188=56",0,140,0
        .stabx  "vmprkey_t:t189=56",0,140,0
        .stabx  "vmkey_t:t190=55",0,140,0
        .stabx  "vmhwkey_t:t191=55",0,140,0
        .stabx  "vpn_t:t192=55",0,140,0
        .stabx  "rpn_t:t193=55",0,140,0
        .stabx  "ptex_t:t194=-10",0,140,0
        .stabx  "swhatx_t:t195=-10",0,140,0
        .stabx  "esid_t:t196=56",0,140,0
        .stabx  "aptx_t:t197=76",0,140,0
        .stabx  "pdtx_t:t198=-1",0,140,0
        .stabx  "psx_t:t199=-3",0,140,0
        .stabx  "pshift_t:t200=76",0,140,0
        .stabx  "sshift_t:t201=76",0,140,0
        .stabx  "unidx_t:t202=-1",0,140,0
        .stabx  "snidx_t:t203=-1",0,140,0
        .stabx  "vmnodeidx_t:t204=-1",0,140,0
        .stabx  "kvpn_t:t205=-1",0,140,0
        .stabx  "krpn_t:t206=-1",0,140,0
        .stabx  "vmsize_t:t207=55",0,140,0
        .stabx  "vmm_lock_t:t208=55",0,140,0
        .stabx  "ureg_t:t209=-10",0,140,0
        .stabx  "vmaddr_t:T210=s8srval:178,0,32;offset:84,32,32;;",0,140,0
        .stabx  "vmaddr_t:t211=210",0,140,0
        .stabx 
"adspace_t:T212=s68alloc:58,0,32;srval:213=ar118;0;15;178,32,512;;",0,140,0
        .stabx  "adspace_t:t214=212",0,140,0
        .stabx 
"adspace32_t:T215=s68alloc:77,0,32;srval:216=ar118;0;15;77,32,512;;",0,140,0
        .stabx  "adspace32_t:t217=215",0,140,0
        .stabx  "_MR_ATTR_TYPE:T218=eBadAttr:0,VirtAddr:1,;",0,140,0
        .stabx  "MR_ATTR_TYPE:t219=218",0,140,0
        .stabx 
"_MR_LABEL_TYPE:T220=eBadMem:0,FreeMem:1,IPLCB:2,RMALLOC:3,PM_HEAP:4,RTAS_HEAP:5,TCE_TABLE:6,IO_SPACE:7,HUGE_PAGE:8,;",0,140,0
        .stabx  "MR_LABEL_TYPE:t221=220",0,140,0
        .stabx 
"iplcb_map_reg_t:t222=223=s24mr_addr:-32,0,64;mr_size:-32,64,64;mr_att:-5,128,8;mr_label:-5,136,8;mr_nodeid:-7,144,16;reserved:224=ar118;0;3;-2,160,32;;",0,140,0
        .stabx  "vmlpghandle_t:t225=178",0,140,0
        .stabx 
"label_t:T226=s100prev:227=*226,0,32;iar:78,32,32;stack:78,64,32;toc:78,96,32;cr:78,128,32;intpri:78,160,32;reg:228=ar118;0;18;78,192,608;;",0,140,0
        .stabx  "label_t:t229=226",0,140,0
        .stabx  "ext_t:t230=55",0,140,0
        .stabx  "__ptr64:t231=-32",0,140,0
        .stabx  "__cptr64:t232=-32",0,140,0
        .stabx  "UniChar:t233=76",0,140,0
        .stabx  "UTF32Char:t234=77",0,140,0
        .stabx  "uchar:t235=75",0,140,0
        .stabx  "ushort:t236=76",0,140,0
        .stabx  "uint:t237=77",0,140,0
        .stabx  "ulong:t238=78",0,140,0
        .stabx  "physadr_t:t239=240=*241=s4r:242=ar118;0;0;-1,0,32;;",0,140,0
        .stabx  "physadr:t243=239",0,140,0
        .stabx  "u_char:t244=-5",0,140,0
        .stabx  "u_short:t245=-7",0,140,0
        .stabx  "u_int:t246=-8",0,140,0
        .stabx  "u_long:t247=-10",0,140,0
        .stabx  "swblk_t:t248=-1",0,140,0
        .stabx  "sigset:T249=s8losigs:-8,0,32;hisigs:-8,32,32;;",0,140,0
        .stabx  "fsid:T250=s8val:144,0,64;;",0,140,0
        .stabx 
"fileid:T251=s24fid_len:77,0,32;fid_ino:86,32,32;fid_gen:77,64,32;fid_x:252=ar118;0;9;-2,96,80;;",0,140,0
        .stabx 
"fid:T253=s24fid_len:77,0,32;fid_data:254=ar118;0;19;-2,32,160;;",0,140,0
        .stabx  "fid_t:t255=253",0,140,0
        .stabx  "fhandle:T256=s32x:257=ar118;0;31;-2,0,256;;",0,140,0
        .stabx  "fhandle_t:t258=256",0,140,0
        .stabx 
"filehandle:T259=s32fh_fsid:145,0,64;fh_fid:251,64,192;;",0,140,0
        .stabx 
"unique_id:T260=s16word1:52,0,32;word2:52,32,32;word3:52,64,32;word4:52,96,32;;",0,140,0
        .stabx  "unique_id_t:t261=260",0,140,0
        .stabx  "offset_t:t262=-31",0,140,0
        .stabx  "ssize64_t:t263=-31",0,140,0
        .stabx  "longlong_t:t264=-31",0,140,0
        .stabx  "u_longlong_t:t265=-32",0,140,0
        .stabx  "class_id_t:t266=-8",0,140,0
        .stabx  "liobn_t:t267=77",0,140,0
        .stabx  "unit_addr_t:t268=-32",0,140,0
        .stabx  "size64_t:t269=-32",0,140,0
        .lcomm flag2,4,_static.bss_
        .csect _static.rw_[RO],3
        .align 2
LC..2:
        .byte "flag1:%d flag2:%d"
        .byte 10, 0
        .toc
LC..0:
        .tc flag1[TC],flag1
LC..1:
        .tc flag2[TC],flag2
LC..3:
        .tc LC..2[TC],LC..2
        .csect .text[PR]
        .align 2
        .globl main
        .globl .main
        .csect main[DS]
main:
        .long .main, TOC[tc0], 0
        .csect .text[PR]
.main:
        .ei     "/usr/include/sys/inttypes.h"
        .stabx  "main:F-1",.main,142,0
        .function .main,.main,16,044,FE..main-.main
        .bf     7
        .stabx  "argc:p-1",104,130,0
        .stabx  "argv:p47",108,130,0
        .line   1
        mflr 0
        stw 31,-4(1)
        stw 0,8(1)
        stwu 1,-80(1)
        mr 31,1
        stw 3,104(31)
        stw 4,108(31)
        .line   2
        lwz 9,LC..0(2)
        lwz 11,0(9)
        lwz 9,LC..1(2)
        lwz 0,0(9)
        lwz 3,LC..3(2)
        mr 4,11
        mr 5,0
        bl .printf
        nop
        .line   3
        li 0,0
        .line   4
        mr 3,0
        lwz 1,0(1)
        lwz 0,8(1)
        mtlr 0
        lwz 31,-4(1)
        blr
        .ef     10
LT..main:
        .long 0
        .byte 0,0,32,97,128,1,2,1
        .long 0
        .long LT..main-.main
        .short 4
        .byte "main"
        .byte 31
        .align 2
FE..main:
        .lcomm flag1,4,_static.bss_
        .bs     _static.bss_
        .stabx  "flag1:S-1",flag1,133,0
        .es
        .bs     _static.rw_[RW]
        .stabx  "flag2:S-1",flag2,133,0
        .es
_section_.text:
        .csect .data[RW],3
        .long _section_.text

-------

$ xlc -g -S static.c

$ cat static.s
.set r0,0; .set SP,1; .set RTOC,2; .set r3,3; .set r4,4
.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9
.set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14
.set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19
.set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24
.set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29
.set r30,30; .set r31,31
.set fp0,0; .set fp1,1; .set fp2,2; .set fp3,3; .set fp4,4
.set fp5,5; .set fp6,6; .set fp7,7; .set fp8,8; .set fp9,9
.set fp10,10; .set fp11,11; .set fp12,12; .set fp13,13; .set fp14,14
.set fp15,15; .set fp16,16; .set fp17,17; .set fp18,18; .set fp19,19
.set fp20,20; .set fp21,21; .set fp22,22; .set fp23,23; .set fp24,24
.set fp25,25; .set fp26,26; .set fp27,27; .set fp28,28; .set fp29,29
.set fp30,30; .set fp31,31
.set v0,0; .set v1,1; .set v2,2; .set v3,3; .set v4,4
.set v5,5; .set v6,6; .set v7,7; .set v8,8; .set v9,9
.set v10,10; .set v11,11; .set v12,12; .set v13,13; .set v14,14
.set v15,15; .set v16,16; .set v17,17; .set v18,18; .set v19,19
.set v20,20; .set v21,21; .set v22,22; .set v23,23; .set v24,24
.set v25,25; .set v26,26; .set v27,27; .set v28,28; .set v29,29
.set v30,30; .set v31,31
.set MQ,0; .set XER,1; .set FROM_RTCU,4; .set FROM_RTCL,5; .set FROM_DEC,6
.set LR,8; .set CTR,9; .set TID,17; .set DSISR,18; .set DAR,19; .set TO_RTCU,20
.set TO_RTCL,21; .set TO_DEC,22; .set SDR_0,24; .set SDR_1,25; .set SRR_0,26
.set SRR_1,27
.set BO_dCTR_NZERO_AND_NOT,0; .set BO_dCTR_NZERO_AND_NOT_1,1
.set BO_dCTR_ZERO_AND_NOT,2; .set BO_dCTR_ZERO_AND_NOT_1,3
.set BO_IF_NOT,4; .set BO_IF_NOT_1,5; .set BO_IF_NOT_2,6
.set BO_IF_NOT_3,7; .set BO_dCTR_NZERO_AND,8; .set BO_dCTR_NZERO_AND_1,9
.set BO_dCTR_ZERO_AND,10; .set BO_dCTR_ZERO_AND_1,11; .set BO_IF,12
.set BO_IF_1,13; .set BO_IF_2,14; .set BO_IF_3,15; .set BO_dCTR_NZERO,16
.set BO_dCTR_NZERO_1,17; .set BO_dCTR_ZERO,18; .set BO_dCTR_ZERO_1,19
.set BO_ALWAYS,20; .set BO_ALWAYS_1,21; .set BO_ALWAYS_2,22
.set BO_ALWAYS_3,23; .set BO_dCTR_NZERO_8,24; .set BO_dCTR_NZERO_9,25
.set BO_dCTR_ZERO_8,26; .set BO_dCTR_ZERO_9,27; .set BO_ALWAYS_8,28
.set BO_ALWAYS_9,29; .set BO_ALWAYS_10,30; .set BO_ALWAYS_11,31
.set CR0_LT,0; .set CR0_GT,1; .set CR0_EQ,2; .set CR0_SO,3
.set CR1_FX,4; .set CR1_FEX,5; .set CR1_VX,6; .set CR1_OX,7
.set CR2_LT,8; .set CR2_GT,9; .set CR2_EQ,10; .set CR2_SO,11
.set CR3_LT,12; .set CR3_GT,13; .set CR3_EQ,14; .set CR3_SO,15
.set CR4_LT,16; .set CR4_GT,17; .set CR4_EQ,18; .set CR4_SO,19
.set CR5_LT,20; .set CR5_GT,21; .set CR5_EQ,22; .set CR5_SO,23
.set CR6_LT,24; .set CR6_GT,25; .set CR6_EQ,26; .set CR6_SO,27
.set CR7_LT,28; .set CR7_GT,29; .set CR7_EQ,30; .set CR7_SO,31
.set TO_LT,16; .set TO_GT,8; .set TO_EQ,4; .set TO_LLT,2; .set TO_LGT,1

        .rename H.19.NO_SYMBOL{PR},""
        .rename H.36.NO_SYMBOL{TC},""
        .rename H.38.NO_SYMBOL{RO},""
        .rename E.40.__STATIC{RW},"_$STATIC"
        .rename H.45.__STATIC{TC},"_$STATIC"
        .rename E.47.__STATIC_BSS,"_$STATIC_BSS"
        .rename H.52.__STATIC_BSS{TC},"_$STATIC_BSS"
        .rename H.56.main{TC},"main"

        .lglobl H.19.NO_SYMBOL{PR}
        .globl  .main
        .lglobl H.38.NO_SYMBOL{RO}
        .lglobl E.40.__STATIC{RW}
        .lglobl E.47.__STATIC_BSS{RW}
        .globl  main{DS}
        .extern .printf{PR}


# .text section
        .file   "static.c"
        .stabx  "__default_char:t20=-5",0x00,0x8c,0x0
        .stabx  ":t2=-2",0x00,0x8c,0x0
        .stabx  ":t1=-1",0x00,0x8c,0x0
        .stabx  ":t3=*-2",0x00,0x8c,0x0
        .stabx  ":t4=*3",0x00,0x8c,0x0
        .stabx  ":t5=f-1;",0x00,0x8c,0x0
        .stabx  ":t6=k-2",0x00,0x8c,0x0
        .stabx  ":t7=ar0;0;4;6",0x00,0x8c,0x0
        .stabx  ":t21=Z",0x00,0x8c,0x0


        .csect  H.19.NO_SYMBOL{PR}, 5
.main:                                  # 0x00000000 (H.19.NO_SYMBOL)
        .stabx  "main:F-1",0x00,0x8e,0x0
        .function .main,.main,2,0
        mfspr   r0,LR
        st      r31,-4(SP)
        st      r30,-8(SP)
        st      r0,8(SP)
        stu     SP,-80(SP)
        l       r31,T.45.__STATIC(RTOC)
        l       r30,T.36.NO_SYMBOL(RTOC)
        st      r3,104(SP)
        st      r4,108(SP)
        .bf     6
        .stabx  "arg:p-1",0x068,0x82,0x0
        .stabx  "argv:p4",0x06c,0x82,0x0
        .bs     H.38.NO_SYMBOL{RO}
        .stabx  "__func__:V7",0x00,0x85,0x0
        .es
        .line   1
        l       r3,T.52.__STATIC_BSS(RTOC)
        l       r4,0(r3)
        l       r5,0(r31)
        cal     r3,8(r30)
        bl      .printf{PR}
        oril    r0,r0,0x0000
        .line   2
        cal     r3,0(r0)
        b       __L44
__L44:                                  # 0x00000044 (H.19.NO_SYMBOL+0x44)
        .line   3
        l       r0,88(SP)
        mtspr   LR,r0
        cal     SP,80(SP)
        l       r30,-8(SP)
        l       r31,-4(SP)
        bcr     BO_ALWAYS,CR0_LT
        .ef     8
        .long   0x00000000
# traceback table
        .byte   0x00                    # VERSION=0
        .byte   0x00                    # LANG=TB_C
        .byte   0x20                    # IS_GL=0,IS_EPROL=0,HAS_TBOFF=1
                                        # INT_PROC=0,HAS_CTL=0,TOCLESS=0
                                        # FP_PRESENT=0,LOG_ABORT=0
        .byte   0x41                    # INT_HNDL=0,NAME_PRESENT=1
                                        # USES_ALLOCA=0,CL_DIS_INV=WALK_ONCOND
                                        # SAVES_CR=0,SAVES_LR=1
        .byte   0x80                    # STORES_BC=1,FPR_SAVED=0
        .byte   0x02                    # GPR_SAVED=2
        .byte   0x02                    # FIXEDPARMS=2
        .byte   0x01                    # FLOATPARMS=0,PARMSONSTK=1
        .long   0x00000000              #
        .long   0x0000005c              # TB_OFFSET
        .short  4                       # NAME_LEN
        .byte   "main"
        .byte   0                       # padding
        .byte   0                       # padding
# End of traceback table
        .long   0x00000000              # "\0\0\0\0"
        .long   0x00000000              # "\0\0\0\0"
# End   csect   H.19.NO_SYMBOL{PR}

# .data section


        .toc                            # 0x00000080
T.56.main:
        .tc     H.56.main{TC},main{DS}
T.45.__STATIC:
        .tc     H.45.__STATIC{TC},E.40.__STATIC{RW}
T.36.NO_SYMBOL:
        .tc     H.36.NO_SYMBOL{TC},H.38.NO_SYMBOL{RO}
T.52.__STATIC_BSS:
        .tc     H.52.__STATIC_BSS{TC},E.47.__STATIC_BSS


        .csect  main{DS}
        .long   .main                   # "\0\0\0\0"
        .long   TOC{TC0}                # "\0\0\0\200"
        .long   0x00000000              # "\0\0\0\0"
# End   csect   main{DS}


        .csect  E.40.__STATIC{RW}
        .bs     E.40.__STATIC{RW}
        .stabx  "flag2:V-1",0x00,0x85,0x0
        .es
        .long   0x00000000              # "\0\0\0\0"
# End   csect   E.40.__STATIC{RW}


        .csect  H.38.NO_SYMBOL{RO}, 3
        .long   0x6d61696e              # "main"
        .long   0x0049424d              # "\0IBM"
        .long   0x666c6167              # "flag"
        .long   0x313a2564              # "1:%d"
        .long   0x20666c61              # " fla"
        .long   0x67323a25              # "g2:%"
# End   csect   H.38.NO_SYMBOL{RO}
        .long   0x640a0000              # "d\n\0\0"



# .bss section
        .lcomm  L.E.47.__STATIC_BSS, 4, E.47.__STATIC_BSS
        .bs     E.47.__STATIC_BSS{RW}
        .stabx  "flag1:V-1",0x00,0x85,0x0
        .es


  parent reply	other threads:[~2010-11-10 13:02 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-18 18:49 [Bug debug/46072] New: " skunk at iskunk dot org
2010-10-19 21:51 ` [Bug target/46072] " skunk at iskunk dot org
2010-11-10 13:02 ` ppryor63 at gmail dot com [this message]
2011-01-25  9:28 ` michael.haubenwallner at salomon dot at
2011-01-25 13:17 ` michael.haubenwallner at salomon dot at
2011-01-25 16:23 ` michael.haubenwallner at salomon dot at
2011-02-09  9:16 ` michael.haubenwallner at salomon dot at
2011-02-24  2:21 ` pedzsan at gmail dot com
2011-03-18 17:15 ` pedzsan at gmail dot com
2011-03-18 18:57 ` skunk at iskunk dot org
2011-03-18 19:04 ` pedzsan at gmail dot com
2011-03-23  9:05 ` michael.haubenwallner at salomon dot at
2011-03-23 11:06 ` david.kirkby at onetel dot net
2011-03-23 14:53 ` pedzsan at gmail dot com
2011-03-23 17:20 ` david.kirkby at onetel dot net
2011-03-23 19:45 ` pedzsan at gmail dot com
2011-03-24 14:01 ` david.kirkby at onetel dot net
2011-04-06  8:36 ` rockdreamer at gmail dot com
2011-04-07  7:59 ` michael.haubenwallner at salomon dot at
2011-04-07 12:55 ` pedzsan at gmail dot com
2011-04-07 17:15 ` david.kirkby at onetel dot net
2011-04-08  7:54 ` michael.haubenwallner at salomon dot at
2011-04-08 19:56 ` ppryor63 at gmail dot com
2011-04-08 21:31 ` david.kirkby at onetel dot net
2011-04-12  2:38 ` david.kirkby at onetel dot net
2011-05-17 14:41 ` dje at gcc dot gnu.org
2011-05-17 15:12 ` michael.haubenwallner at salomon dot at
2011-05-17 15:41 ` david.kirkby at onetel dot net
2011-05-17 18:34 ` skunk at iskunk dot org
2011-05-18  0:49 ` ppryor63 at gmail dot com
2011-05-18  1:37 ` skunk at iskunk dot org
2011-05-20  8:19 ` mrgcc at mailinator dot com
2011-09-15  8:33 ` vovata at gmail dot com
2011-09-15  8:45 ` vovata at gmail dot com
2011-09-15 14:07 ` skunk at iskunk dot org
2011-09-15 14:17 ` vovata at gmail dot com
2012-04-12 16:31 ` skunk at iskunk dot org
2012-04-16 13:31 ` michael.haubenwallner at salomon dot at
2014-02-16 10:01 ` jackie.rosen at hushmail dot com

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=bug-46072-4-cR0ZFrgjWT@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).