src/share/tools/hsdis/hsdis-demo.c

Print this page
rev 9494 : 8073139: PPC64: User-visible arch directory and os.arch value on ppc64le cause issues with Java tooling
Contributed-by: Andrew Hughes gnu.andrew@redhat.com

@@ -64,11 +64,11 @@
   if (!greeted)
     greet("world");
   printf("...And now for something completely different:\n");
   void *start = (void*) &main;
   void *end = (void*) &end_of_file;
-#if defined(__ia64) || defined(__powerpc__)
+#if defined(__ia64) || (defined(__powerpc__) && !defined(ABI_ELFv2))
   /* On IA64 and PPC function pointers are pointers to function descriptors */
   start = *((void**)start);
   end = *((void**)end);
 #endif
   disassemble(start, (end > start) ? end : start + 64);