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]

[ARM] Remove spurious links to undefined local symbols


The ARM_FUNC_ALIAS macro in arm/lib1funcs.asm was creating spurious
references to an undefined local symbol using .set.  These weren't
creating link errors, but were leaving unresolved symbols in the
executable.

Since the symbols were never being used in a relocation, I'm not sure if
that could end up being a problem (certainly the linker wasn't
complaining), but it's easy to fix the problem so that they don't
occur...

tested on an arm-elf cross

2005-02-18  Richard Earnshaw  <rearnsha@arm.com>

	* arm/lib1funcs.asm (FUNC_ALIAS): New macro.
	(div0): Use it in place of ARM_FUNC_ALIAS.
	(lshrdi3, ashrdi3, ashlrdi3): Likewise.


Index: lib1funcs.asm
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arm/lib1funcs.asm,v
retrieving revision 1.36
diff -p -r1.36 lib1funcs.asm
*** lib1funcs.asm	14 Oct 2004 07:37:11 -0000	1.36
--- lib1funcs.asm	18 Feb 2005 14:43:24 -0000
*************** SYM (__\name):
*** 223,228 ****
--- 223,233 ----
  .endm
  #endif
  
+ .macro	FUNC_ALIAS new old
+ 	.globl	SYM (__\new)
+ 	EQUIV	SYM (__\new), SYM (__\old)
+ .endm
+ 
  .macro	ARM_FUNC_ALIAS new old
  	.globl	SYM (__\new)
  	EQUIV	SYM (__\new), SYM (__\old)
*************** LSYM(Lover12):
*** 885,892 ****
  #ifdef L_dvmd_tls
  
  	FUNC_START div0
! 	ARM_FUNC_ALIAS aeabi_idiv0 div0
! 	ARM_FUNC_ALIAS aeabi_ldiv0 div0
  
  	RET
  
--- 890,897 ----
  #ifdef L_dvmd_tls
  
  	FUNC_START div0
! 	FUNC_ALIAS aeabi_idiv0 div0
! 	FUNC_ALIAS aeabi_ldiv0 div0
  
  	RET
  
*************** LSYM(Lover12):
*** 939,945 ****
  #ifdef L_lshrdi3
  
  	FUNC_START lshrdi3
! 	ARM_FUNC_ALIAS aeabi_llsr lshrdi3
  	
  #ifdef __thumb__
  	lsr	al, r2
--- 944,950 ----
  #ifdef L_lshrdi3
  
  	FUNC_START lshrdi3
! 	FUNC_ALIAS aeabi_llsr lshrdi3
  	
  #ifdef __thumb__
  	lsr	al, r2
*************** LSYM(Lover12):
*** 971,977 ****
  #ifdef L_ashrdi3
  	
  	FUNC_START ashrdi3
! 	ARM_FUNC_ALIAS aeabi_lasr ashrdi3
  	
  #ifdef __thumb__
  	lsr	al, r2
--- 976,982 ----
  #ifdef L_ashrdi3
  	
  	FUNC_START ashrdi3
! 	FUNC_ALIAS aeabi_lasr ashrdi3
  	
  #ifdef __thumb__
  	lsr	al, r2
*************** LSYM(Lover12):
*** 1008,1014 ****
  #ifdef L_ashldi3
  
  	FUNC_START ashldi3
! 	ARM_FUNC_ALIAS aeabi_llsl ashldi3
  	
  #ifdef __thumb__
  	lsl	ah, r2
--- 1013,1019 ----
  #ifdef L_ashldi3
  
  	FUNC_START ashldi3
! 	FUNC_ALIAS aeabi_llsl ashldi3
  	
  #ifdef __thumb__
  	lsl	ah, r2

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