From: Craig Small Date: Sat, 19 May 2012 08:32:57 +0000 (+1000) Subject: fuser compiles with PIE X-Git-Tag: v22.17~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=aa3f82fc06c5bf5326ce4c03cbea4d1fe8aa6388;p=psmisc 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 --- 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"