summaryrefslogtreecommitdiff
path: root/ports/sysdeps/ia64/dl-fptr.h
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2013-05-23 23:37:00 +0200
committerThomas Schwinge <thomas@codesourcery.com>2013-05-23 23:37:00 +0200
commitf9e888643115b4b2f28853ebd1733f4410fb8839 (patch)
tree58c69f6cef623679080e8933b6c79880bfbd7cb8 /ports/sysdeps/ia64/dl-fptr.h
parentd78eef6ebc008f784f501ce208bef12c6eafda27 (diff)
parentb934acf0e93c5a220551ed6e686bb9d45a24a8cc (diff)
Merge branch 'baseline' into refs/top-bases/tschwinge/Roger_Whittaker
Diffstat (limited to 'ports/sysdeps/ia64/dl-fptr.h')
-rw-r--r--ports/sysdeps/ia64/dl-fptr.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/ports/sysdeps/ia64/dl-fptr.h b/ports/sysdeps/ia64/dl-fptr.h
index c2bef6c288..447c098aff 100644
--- a/ports/sysdeps/ia64/dl-fptr.h
+++ b/ports/sysdeps/ia64/dl-fptr.h
@@ -32,4 +32,14 @@
#define ELF_MACHINE_LOAD_ADDRESS(var, symbol) \
asm ("movl %0 = @gprel (" #symbol ");; add %0 = %0, gp" : "=&r" (var));
+/* We don't have a gcc helper to extract the plabel info. */
+#define ELF_PTR_TO_FDESC(ptr) \
+ ({ union { \
+ void *_ptr; \
+ struct fdesc *_fdesc; \
+ } _u; \
+ _u._ptr = ptr; \
+ _u._fdesc; \
+ })
+
#endif /* !dl_ia64_fptr_h */