Article View: gnu.gcc.bug
Article #17RS/6000, AIX 3.2.3, and gcc -pg - fix included
From: Valdis Kletnieks
Date: Thu, 29 Oct 1992 22:43
Date: Thu, 29 Oct 1992 22:43
65 lines
2731 bytes
2731 bytes
System: RS/6000 running AIX 3.2.3
Problem: Using 'gcc -pg' causes errrors from the assembler.
Fix:
1) You need to install IBM PTF U407530. This includes a patch
to /bin/as to accept a "-u" flag (APAR IX23433).
2) See patch following for config/rs6000.h - basically, there were
two changes that needed to be made.
The first was that we have to change ASM_SPEC to pass the "-u" flag to
/bin/as (note that this *WILL BREAK* gcc if U407530 isn't installed -
so don't do this until you get and install that fix first). I freely
admit that I did NOT fully delve into the comment just above,
concerning ASM_OUTPUT_EXTERNAL and friends. However, it seems to work
OK.
The second problem was that the IBM /bin/as doesn't like to see a
".space" in what it thinks is a ".toc" scope. The fix for that was to
generate a ".csect" before .space.
Warrantee: The code changes *seem* to work. However, I have *NOT*
tested them against 'gdb' or other tools, etc.. It *does* produce
something that 'gprof' is happy with tho. ;)
Valdis Kletnieks
Computer Systems Engineer
Virginia Tech
*** config/rs6000.h.dist Thu Oct 29 16:24:37 1992
--- config/rs6000.h Thu Oct 29 16:26:17 1992
***************
*** 37,43 ****
ASM_OUTPUT_EXTERNAL_LIBCALL, and RS6000_OUTPUT_BASENAME macros will no
longer be needed. */
! /* #define ASM_SPEC "-u" */
/* Define the options for the binder: Start text at 512, align all segments
to 512 bytes, and warn if there is text relocation.
--- 37,43 ----
ASM_OUTPUT_EXTERNAL_LIBCALL, and RS6000_OUTPUT_BASENAME macros will no
longer be needed. */
! #define ASM_SPEC "-u"
/* Define the options for the binder: Start text at 512, align all segments
to 512 bytes, and warn if there is text relocation.
***************
*** 1308,1314 ****
main_input_filename, ".ro_"); \
\
toc_section (); \
! if (write_symbols != NO_DEBUG) \
private_data_section (); \
}
--- 1308,1314 ----
main_input_filename, ".ro_"); \
\
toc_section (); \
! if ((write_symbols != NO_DEBUG) || (profile_flag || profile_block_flag)) \
private_data_section (); \
}
Technical Details
Message-ID:
<8891@vtserf.cc.vt.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!ogicse!uwm.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!vttcf.cc.vt.edu!valdisShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!uwm.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!vttcf.cc.vt.edu!valdis From: valdis@vttcf.cc.vt.edu (Valdis Kletnieks) Newsgroups: gnu.gcc.bug Subject: RS/6000, AIX 3.2.3, and gcc -pg - fix included Message-ID: <8891@vtserf.cc.vt.edu> Date: 29 Oct 92 22:43:19 GMT Article-I.D.: vtserf.8891 Sender: gnulists@ai.mit.edu Distribution: gnu Organization: Virginia Tech, Blacksburg, VA Lines: 65 Approved: bug-gcc@prep.ai.mit.edu