changeset 7:07f406218d08

Bug 1408: undefined symbol: __i686.get_pc_thunk.bx reviewed-by: yasuenag review-thread: http://icedtea.classpath.org/pipermail/heapstats/2013-April/000008.html
author KUBOTA Yuji <kubota.yuji@lab.ntt.co.jp>
date Tue, 23 Apr 2013 16:57:20 +0900
parents 98ad0e80f339
children 31c9d9bc743b
files agent/ChangeLog agent/src/overrideFunc.S
diffstat 2 files changed, 19 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/agent/ChangeLog	Thu Apr 18 17:48:55 2013 +0200
+++ b/agent/ChangeLog	Tue Apr 23 16:57:20 2013 +0900
@@ -1,3 +1,11 @@
+2013-04-23  KUBOTA Yuji  <kubota.yuji@lab.ntt.co.jp>
+
+	* Bug 1408: undefined symbol: __i686.get_pc_thunk.bx
+
+2013-04-18  Mario Torre  <neugens.limasoftware@gmail.com>
+
+	* Add hg ignore file.
+
 2013-04-05  Yasumasa Suenaga  <suenaga.yasumasa@lab.ntt.co.jp>
 
 	* Add license indication.
--- a/agent/src/overrideFunc.S	Thu Apr 18 17:48:55 2013 +0200
+++ b/agent/src/overrideFunc.S	Tue Apr 23 16:57:20 2013 +0900
@@ -222,10 +222,17 @@
 	
 	/* Macro for function parts define. */
 	
-	#define GET_GOT_ADDR \
-		push %ebx;                         \
-		call __i686.get_pc_thunk.bx;       \
-		addl $_GLOBAL_OFFSET_TABLE_, %ebx;
+        #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 6)
+                #define GET_GOT_ADDR \
+                        push %ebx;                         \
+                        call __x86.get_pc_thunk.bx;       \
+                        addl $_GLOBAL_OFFSET_TABLE_, %ebx;
+        #else
+                #define GET_GOT_ADDR \
+                        push %ebx;                         \
+                        call __i686.get_pc_thunk.bx;       \
+                        addl $_GLOBAL_OFFSET_TABLE_, %ebx;
+        #endif
 	
 	#define GET_HOOK_REC(header, ary_idx)      \
 		mov header##_hook@GOT(%ebx), %ecx; \