summaryrefslogtreecommitdiffstats
path: root/includes/sys
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2009-07-10 11:10:51 -0400
committerDave Brolley <brolley@redhat.com>2009-07-10 11:10:51 -0400
commit1e9ab8199dff90c1b6e7290f0f7b4eb424a9ff9f (patch)
treea0c10b78ad3e7142a59ffd6f6e75b75abf90d88e /includes/sys
parent7d54db1a2c0b3831b6fbc8282f1155426c4be540 (diff)
parentc728b7da8be430367aa33f9fbacda93d4add9ea2 (diff)
downloadsystemtap-steved-1e9ab8199dff90c1b6e7290f0f7b4eb424a9ff9f.tar.gz
systemtap-steved-1e9ab8199dff90c1b6e7290f0f7b4eb424a9ff9f.tar.xz
systemtap-steved-1e9ab8199dff90c1b6e7290f0f7b4eb424a9ff9f.zip
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
Diffstat (limited to 'includes/sys')
-rw-r--r--includes/sys/sdt.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/includes/sys/sdt.h b/includes/sys/sdt.h
index e448c90e..3b788b88 100644
--- a/includes/sys/sdt.h
+++ b/includes/sys/sdt.h
@@ -17,9 +17,17 @@
#define STAP_PROBE_ADDR "\t.long "
#endif
+/* Allocated section needs to be writable when creating pic shared objects
+ because we store relocatable addresses in them. */
+#ifdef __PIC__
+#define ALLOCSEC "\"aw\""
+#else
+#define ALLOCSEC "\"a\""
+#endif
+
/* An allocated section .probes that holds the probe names and addrs. */
#define STAP_PROBE_DATA_(probe,guard,arg) \
- __asm__ volatile (".section .probes, \"a\"\n" \
+ __asm__ volatile (".section .probes," ALLOCSEC "\n" \
"\t.align 8\n" \
"1:\n\t.asciz " #probe "\n" \
"\t.align 4\n" \