Article View: gnu.gcc.bug
Article #1263Problems with gcc -pg on RS/6000, AIX 3.2.2
From: Valdis Kletnieks
Date: Tue, 06 Oct 1992 21:49
Date: Tue, 06 Oct 1992 21:49
128 lines
3655 bytes
3655 bytes
Not sure if this is a bug or a feature...
Scenario: RS/6000-550 running AIX 3.2.2. We have the assembler
fix installed, and gcc 2.2.2 builds and runs correctly.
Problem:
Short form:
'gcc' works, but 'gcc -pg' dies in the assemble step with complaints
about '.mcount'.
Long form: See appended script file...
Valdis Kletnieks
Computer Systems Engineer
Virginia Tech
(hit 'n'ext now to skip 100 lines of compiler output)
Script started on Tue Oct 06 17:12:45 1992
$ cat main.c
main()
{
}
$ gcc -v main.c
Reading specs from /usr/local/lib/gcc-lib/rs6000/2.2.2/specs
gcc version 2.2.2
/usr/local/lib/gcc-lib/rs6000/2.2.2/cpp -lang-c -v -undef -D__GNUC__=2 -D_IBMR2 -D_AIX -D___IBMR2__ -D___AIX__ -D___IBMR2 -D___AIX -D__CHAR_UNSIGNED__ main.c /tmp/ccO3wDmb.i
GNU CPP version 2.2.2
/usr/local/lib/gcc-lib/rs6000/2.2.2/cc1 /tmp/ccO3wDmb.i -quiet -dumpbase main.c -version -o /tmp/ccO3wDmb.s
GNU C version 2.2.2 compiled by GNU C version 2.2.2.
as -o main.o /tmp/ccO3wDmb.s
/usr/local/lib/gcc-lib/rs6000/2.2.2/ld -T512 -H512 -btextro -bhalt:4 -bnodelcsect /lib/crt0.o -L/usr/local/lib/gcc-lib/rs6000/2.2.2 -L/usr/local/lib main.o /usr/local/lib/gcc-lib/rs6000/2.2.2/libgcc.a -lc /usr/local/lib/gcc-lib/rs6000/2.2.2/libgcc.a
$ gcc -pg main.c
Assembler:
/tmp/ccO4UDmb.s: line 1: Invalid toc entry within .toc scope
/tmp/ccO4UDmb.s: line 24: Invalid toc entry within .toc scope
/tmp/ccO4UDmb.s: line 29: undefined symbol ".mcount"
/tmp/ccO4UDmb.s: line 29: illegal expression type for branch address
$ gcc -S main.c
$ cat main.s
.toc
gcc2_compiled.:
.extern .__main
.csect [PR]
.align 2
.globl main
.globl .main
.csect main[DS]
main:
.long .main, TOC[tc0], 0
.csect [PR]
.main:
mflr 0
st 31,-4(1)
st 0,8(1)
stu 1,-64(1)
oril 31,1,0
bl .__main
cror 15,15,15
L..1:
l 1,0(1)
l 0,8(1)
mtlr 0
l 31,-4(1)
br
LT..main:
.long 0
.byte 0,0,32,97,128,1,0,1
.long LT..main-.main
.short 4
.byte "main"
.byte 31
_section_.text:
.csect .data[RW]
.long _section_.text
$ gcc -S -pg main.c
$ cat main.s
.toc
gcc2_compiled.:
.space 4
.extern .__main
.csect [PR]
.align 2
.globl main
.globl .main
.csect main[DS]
main:
.long .main, TOC[tc0], 0
.csect [PR]
.main:
mflr 0
stm 23,-36(1)
st 0,8(1)
stu 1,-96(1)
oril 31,1,0
.csect .data[RW]
.align 2
LP..0:
.long 0
.csect [PR]
.toc
LPC..0:
.tc LP..0[TC],LP..0
.csect [PR]
l 3,LPC..0(2)
bl .mcount
bl .__main
cror 15,15,15
L..1:
l 1,0(1)
l 0,8(1)
mtlr 0
lm 23,-36(1)
br
LT..main:
.long 0
.byte 0,0,32,97,128,9,0,1
.long LT..main-.main
.short 4
.byte "main"
.byte 31
_section_.text:
.csect .data[RW]
.long _section_.text
$
script done on Tue Oct 06 17:13:31 1992
Technical Details
Message-ID:
<7867@vtserf.cc.vt.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!vttcf.cc.vt.edu!valdisShow Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!vttcf.cc.vt.edu!valdis From: valdis@vttcf.cc.vt.edu (Valdis Kletnieks) Subject: Problems with gcc -pg on RS/6000, AIX 3.2.2 Message-ID: <7867@vtserf.cc.vt.edu> Followup-To: gnu.gcc.help Sender: gnulists@ai.mit.edu Organization: Virginia Tech, Blacksburg, VA Distribution: gnu Date: Tue, 6 Oct 1992 21:49:46 GMT Approved: bug-gcc@prep.ai.mit.edu Lines: 131