🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Valdis Kletnieks Thu, 29 Oct 1992 22:43
RS/6000, AIX 3.2.3, and gcc -pg - fix included
#17
Author: Valdis Kletnieks
Date: Thu, 29 Oct 1992 22:43
65 lines
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 ();					\
  }
  
Re: RS/6000, AIX 3.2.3, and gcc -pg - fix included
#35
Author: Valdis Kletnieks
Date: Mon, 02 Nov 1992 20:56
21 lines
1318 bytes
In article <8891@vtserf.cc.vt.edu> valdis@vttcf.cc.vt.edu (Valdis Kletnieks) writes:
>System: RS/6000 running AIX 3.2.3
>Problem:  Using 'gcc -pg' causes errrors from the assembler.

>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.

Boy, I feel foolish.

The analysis of the bug was correct.  However, my patch was 
severely brain-dead, and causes the program to go into a loop
when run.  It seems that I got the conditions on the 'if'
wrong, and it ends up putting the .space into the *wrong* csect.

I'll follow-up with a *fixed* patch soon as I figure out all the
intricacies involved.  Foo.

				Valdis Kletnieks
				Computer Systems Engineer
				Virginia Tech
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads