relative to the info pointer, so that we can generate
position-independent code.
+ Note [x86-64-relative]
There is a complication on the x86_64 platform, where pointeres are
64 bits, but the tools don't support 64-bit relative relocations.
However, the default memory model (small) ensures that all symbols
have values in the lower 2Gb of the address space, so offsets all
fit in 32 bits. Hence we can use 32-bit offset fields.
+
+ When going via-C, the mangler arranges that we only generate
+ relative relocations between symbols in the same segment (the text
+ segment). The NCG, however, puts things in the right sections and
+ uses 32-bit relative offsets instead.
+
+ Somewhere between binutils-2.16.1 and binutils-2.16.91.0.6,
+ support for 64-bit PC-relative relocations was added, so maybe this
+ hackery can go away sometime.
------------------------------------------------------------------------- */
#if x86_64_TARGET_ARCH
StgInfoTable i;
#endif
-char *con_desc; /* the name of the data constructor as: Package:Module.Name */
+ OFFSET_FIELD(con_desc) // the name of the data constructor
+ // as: Package:Module.Name
#if defined(TABLES_NEXT_TO_CODE)
StgInfoTable i;
#endif
/*
+ * GET_CON_DESC(info)
+ * info must be a StgConInfoTable*.
+ */
+#ifdef TABLES_NEXT_TO_CODE
+#define GET_CON_DESC(info) ((char *)((StgWord)((info)+1) + (info->con_desc)))
+#else
+#define GET_CON_DESC(info) ((info)->con_desc)
+#endif
+
+/*
* GET_FUN_SRT(info)
* info must be a StgFunInfoTable*
*/