This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] elfos.h label rollover appears negative


	I encountered a problem on AIX where GCC printed a negative number
as a label count which the assembler interpreted as a difference
calculation.  elfos.h gave me the insight for the fix which I applied to
AIX, but I noticed that elfos.h also has a similar error.

	elfos.h defines ASM_GENERATE_INTERNAL_LABEL correctly, but
ASM_OUTPUT_INTERNAL_LABEL still prints a signed value.  This patch makes
the two macros defined in elfos.h consistent so that

".%s%d:"

does not produce

.L-1347440721:

David


	* config/elfos.h (ASM_OUTPUT_INTERNAL_LABEL): Display count unsigned.

Index: elfos.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/elfos.h,v
retrieving revision 1.39
diff -c -p -r1.39 elfos.h
*** elfos.h	2001/11/28 09:47:25	1.39
--- elfos.h	2001/12/02 23:00:09
*************** Boston, MA 02111-1307, USA.  */
*** 134,144 ****
     with a period is not put into the linker symbol table by the assembler.  */
  
  #undef  ASM_OUTPUT_INTERNAL_LABEL
! #define ASM_OUTPUT_INTERNAL_LABEL(FILE, PREFIX, NUM)	\
!   do							\
!     {							\
!       fprintf (FILE, ".%s%d:\n", PREFIX, NUM);		\
!     }							\
    while (0)
  
  /* This is how to store into the string LABEL
--- 134,144 ----
     with a period is not put into the linker symbol table by the assembler.  */
  
  #undef  ASM_OUTPUT_INTERNAL_LABEL
! #define ASM_OUTPUT_INTERNAL_LABEL(FILE, PREFIX, NUM)		\
!   do								\
!     {								\
!       fprintf (FILE, ".%s%u:\n", PREFIX, (unsigned) (NUM));	\
!     }								\
    while (0)
  
  /* This is how to store into the string LABEL


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]