summaryrefslogtreecommitdiff
path: root/sysdeps/i386/link-defines.sym
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-07-07 05:23:24 -0700
committerH.J. Lu <hjl.tools@gmail.com>2015-07-07 05:23:40 -0700
commitddd85a65b6e3d6ec1e756c1f78559f99a2c943ca (patch)
treeaf018587b3304c33b8aeb1016f3faa7737cb2396 /sysdeps/i386/link-defines.sym
parentfa9fef1f9b683582892fe39c4d8cd7b164b3388d (diff)
Add and use sysdeps/i386/link-defines.sym
Define macros for fields in La_i86_regs and La_i86_retval and use them in dl-trampoline.S, instead of hardcoded values. * sysdeps/i386/Makefile (gen-as-const-headers)[elf]: Add link-defines.sym. * sysdeps/i386/dl-trampoline.S: Include <link-defines.h>. (_dl_runtime_profile): Use LONG_DOUBLE_SIZE, LRV_SIZE, LRV_EAX_OFFSET, LRV_EDX_OFFSET, LRV_ST0_OFFSET, LRV_ST1_OFFSET and LR_SIZE. * sysdeps/i386/link-defines.sym: New file.
Diffstat (limited to 'sysdeps/i386/link-defines.sym')
-rw-r--r--sysdeps/i386/link-defines.sym18
1 files changed, 18 insertions, 0 deletions
diff --git a/sysdeps/i386/link-defines.sym b/sysdeps/i386/link-defines.sym
new file mode 100644
index 0000000000..a63dcb9218
--- /dev/null
+++ b/sysdeps/i386/link-defines.sym
@@ -0,0 +1,18 @@
+#include "link.h"
+#include <stddef.h>
+
+--
+LONG_DOUBLE_SIZE sizeof (long double)
+
+LR_SIZE sizeof (struct La_i86_regs)
+LR_EDX_OFFSET offsetof (struct La_i86_regs, lr_edx)
+LR_ECX_OFFSET offsetof (struct La_i86_regs, lr_ecx)
+LR_EAX_OFFSET offsetof (struct La_i86_regs, lr_eax)
+LR_EBP_OFFSET offsetof (struct La_i86_regs, lr_ebp)
+LR_ESP_OFFSET offsetof (struct La_i86_regs, lr_esp)
+
+LRV_SIZE sizeof (struct La_i86_retval)
+LRV_EAX_OFFSET offsetof (struct La_i86_retval, lrv_eax)
+LRV_EDX_OFFSET offsetof (struct La_i86_retval, lrv_edx)
+LRV_ST0_OFFSET offsetof (struct La_i86_retval, lrv_st0)
+LRV_ST1_OFFSET offsetof (struct La_i86_retval, lrv_st1)