summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCraig Small <csmall@users.sourceforge.net>2012-05-19 18:32:57 +1000
committerCraig Small <csmall@users.sourceforge.net>2012-05-19 18:32:57 +1000
commitaa3f82fc06c5bf5326ce4c03cbea4d1fe8aa6388 (patch)
tree031ae53fbfdaee6f9be7acc8b501982d5cdee53d
parent92f0cf6d90302f2f925489b7dd5c32c410cce611 (diff)
fuser compiles with PIE
Some people have reported that fuser, specifically src/lists won't compile with PIE enabled. This tiny patch fixes it. Bug-Gentoo: http://bugs.gentoo.org/394443 Bug-Gentoo: http://bugs.gentoo.org/401851 Bug-Sourceforge: https://sourceforge.net/tracker/?func=detail&aid=3504801&group_id=15273&atid=115273
-rw-r--r--ChangeLog1
-rw-r--r--src/lists.h2
2 files changed, 2 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index d740ef1..4db5ffd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,6 +10,7 @@ Changes in 22.17 (unreleased)
* Really add ASCII null at command string in add_proc() of pstree.c
* fuser uses correct timeout_stat define Debian #661723
* fuser is not compiled on hurd-i386 Debian #673485
+ * No TEXTRELS in src/lists built as PIE on x86
Changes in 22.16
================
diff --git a/src/lists.h b/src/lists.h
index 5081e25..c1c71ac 100644
--- a/src/lists.h
+++ b/src/lists.h
@@ -68,7 +68,7 @@ extern inline void attribute((used,__gnu_inline__,always_inline,__artificial__))
asm volatile ("lfetch [%0]" :: "r" (x))
#elif defined(__powerpc64__)
asm volatile ("dcbt 0,%0" :: "r" (x))
-#elif !defined(__CYGWIN__) && defined(__i386__)
+#elif !defined(__CYGWIN__) && !defined(__PIC__) && defined(__i386__)
asm volatile ("661:\n\t"
".byte 0x8d,0x74,0x26,0x00\n"
"\n662:\n"