summaryrefslogtreecommitdiffstats
path: root/includes/sys/sdt.h
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2009-07-10 11:17:03 -0400
committerDave Brolley <brolley@redhat.com>2009-07-10 11:17:03 -0400
commit5739030625d3f1697c264e3d8f04e932d1e0773d (patch)
tree0ed2d10376f2bf9bb009e31357d7913277d29bfc /includes/sys/sdt.h
parentbdf70a5d466fa9c1559a93ab71603981f1c0d753 (diff)
parent1e9ab8199dff90c1b6e7290f0f7b4eb424a9ff9f (diff)
downloadsystemtap-steved-5739030625d3f1697c264e3d8f04e932d1e0773d.tar.gz
systemtap-steved-5739030625d3f1697c264e3d8f04e932d1e0773d.tar.xz
systemtap-steved-5739030625d3f1697c264e3d8f04e932d1e0773d.zip
Merge branch 'master' of git://sources.redhat.com/git/systemtap
Diffstat (limited to 'includes/sys/sdt.h')
-rw-r--r--includes/sys/sdt.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/includes/sys/sdt.h b/includes/sys/sdt.h
index 07ece7c1..3b788b88 100644
--- a/includes/sys/sdt.h
+++ b/includes/sys/sdt.h
@@ -1,10 +1,6 @@
/* Copyright (C) 2005-2009 Red Hat Inc.
- Copyright (C) 2006 Intel Corporation.
- This file is part of systemtap, and is free software. You can
- redistribute it and/or modify it under the terms of the GNU General
- Public License (GPL); either version 2, or (at your option) any
- later version.
+ This file is part of systemtap, and is free software in the public domain.
*/
#ifndef _SYS_SDT_H
@@ -21,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" \