Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Dec 2014 18:23:31 +0000 (UTC)
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r275775 - stable/10/sys/arm/include
Message-ID:  <201412141823.sBEINVne025538@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: andrew
Date: Sun Dec 14 18:23:30 2014
New Revision: 275775
URL: https://svnweb.freebsd.org/changeset/base/275775

Log:
  MFC 275378:
  
  Pull in the NetBSD global offset table handling code. Clang 3.5 creates
  relocations the linker complains about.
  
  Obtained from:	NetBSD

Modified:
  stable/10/sys/arm/include/asm.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/arm/include/asm.h
==============================================================================
--- stable/10/sys/arm/include/asm.h	Sun Dec 14 18:21:03 2014	(r275774)
+++ stable/10/sys/arm/include/asm.h	Sun Dec 14 18:23:30 2014	(r275775)
@@ -118,10 +118,16 @@
 	ldr	x, [x, got]
 #define	GOT_INIT(got,gotsym,pclabel) \
 	ldr	got, gotsym;	\
-	add	got, got, pc;	\
-	pclabel:
+	pclabel: add	got, got, pc
+#ifdef __thumb__
 #define	GOT_INITSYM(gotsym,pclabel) \
-	gotsym: .word _C_LABEL(_GLOBAL_OFFSET_TABLE_) + (. - (pclabel+4))
+	.align 0;		\
+	gotsym: .word _C_LABEL(_GLOBAL_OFFSET_TABLE_) - (pclabel+4)
+#else
+#define	GOT_INITSYM(gotsym,pclabel) \
+	.align 0;		\
+	gotsym: .word _C_LABEL(_GLOBAL_OFFSET_TABLE_) - (pclabel+8)
+#endif
 
 #ifdef __STDC__
 #define	PIC_SYM(x,y)	x ## ( ## y ## )



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201412141823.sBEINVne025538>