From 3a31e709a19d469c217cc1b65f9f1d6b2ee51ffb Mon Sep 17 00:00:00 2001 From: Stan Cox Date: Wed, 9 Dec 2009 10:57:36 -0500 Subject: Handle .probes section big endian 32 bit case. sdt.h (STAP_PROBE_ADDR): Add 32 bit big endian case. (STAP_PROBE_DATA_): Use .balign tapsets.cxx (sdt_query::get_next_probe): Stop if there is no probe name. --- includes/sys/sdt.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'includes/sys/sdt.h') diff --git a/includes/sys/sdt.h b/includes/sys/sdt.h index d85d8e2e..7c23d55a 100644 --- a/includes/sys/sdt.h +++ b/includes/sys/sdt.h @@ -12,9 +12,11 @@ #ifdef __LP64__ -#define STAP_PROBE_ADDR "\t.quad " +#define STAP_PROBE_ADDR(arg) "\t.quad " arg +#elif defined (__BIG_ENDIAN__) +#define STAP_PROBE_ADDR(arg) "\t.long 0\n\t.long " arg #else -#define STAP_PROBE_ADDR "\t.long " +#define STAP_PROBE_ADDR(arg) "\t.long " arg #endif /* Allocated section needs to be writable when creating pic shared objects @@ -26,14 +28,14 @@ /* An allocated section .probes that holds the probe names and addrs. */ #define STAP_PROBE_DATA_(probe,guard,arg) \ __asm__ volatile (".section .probes," ALLOCSEC "\n" \ - "\t.align 8\n" \ + "\t.balign 8\n" \ "1:\n\t.asciz " #probe "\n" \ - "\t.align 4\n" \ + "\t.balign 4\n" \ "\t.int " #guard "\n" \ - "\t.align 8\n" \ - STAP_PROBE_ADDR "1b\n" \ - "\t.align 8\n" \ - STAP_PROBE_ADDR #arg "\n" \ + "\t.balign 8\n" \ + STAP_PROBE_ADDR("1b\n") \ + "\t.balign 8\n" \ + STAP_PROBE_ADDR(#arg "\n") \ "\t.int 0\n" \ "\t.previous\n") -- cgit