2008-01-21 23:30:17 +00:00
|
|
|
|
|
|
|
/* Size of a pointer-to-data in bytes. */
|
|
|
|
#define SIZEOF_DPTR (sizeof(void*))
|
2016-05-16 14:34:04 +00:00
|
|
|
const char info_sizeof_dptr[] = {
|
2018-05-31 17:28:16 +00:00
|
|
|
/* clang-format off */
|
2016-05-16 14:34:04 +00:00
|
|
|
'I', 'N', 'F', 'O', ':', 's', 'i', 'z', 'e', 'o', 'f', '_', 'd', 'p', 't',
|
|
|
|
'r', '[', ('0' + ((SIZEOF_DPTR / 10) % 10)), ('0' + (SIZEOF_DPTR % 10)), ']',
|
|
|
|
'\0'
|
2018-05-31 17:28:16 +00:00
|
|
|
/* clang-format on */
|
2016-05-06 19:21:30 +00:00
|
|
|
};
|
2008-01-21 23:30:17 +00:00
|
|
|
|
|
|
|
/* Application Binary Interface. */
|
2010-04-10 22:12:45 +00:00
|
|
|
|
|
|
|
/* Check for (some) ARM ABIs.
|
|
|
|
* See e.g. http://wiki.debian.org/ArmEabiPort for some information on this. */
|
2019-01-11 18:50:46 +00:00
|
|
|
#if defined(__GNU__) && defined(__ELF__) && defined(__ARM_EABI__)
|
2018-06-01 13:53:41 +00:00
|
|
|
# define ABI_ID "ELF ARMEABI"
|
2010-04-10 22:12:45 +00:00
|
|
|
#elif defined(__GNU__) && defined(__ELF__) && defined(__ARMEB__)
|
2018-06-01 13:53:41 +00:00
|
|
|
# define ABI_ID "ELF ARM"
|
2010-04-10 22:12:45 +00:00
|
|
|
#elif defined(__GNU__) && defined(__ELF__) && defined(__ARMEL__)
|
2018-06-01 13:53:41 +00:00
|
|
|
# define ABI_ID "ELF ARM"
|
2010-04-10 22:12:45 +00:00
|
|
|
|
2017-02-27 21:06:51 +00:00
|
|
|
#elif defined(__linux__) && defined(__ELF__) && defined(__amd64__) && \
|
|
|
|
defined(__ILP32__)
|
2018-06-01 13:53:41 +00:00
|
|
|
# define ABI_ID "ELF X32"
|
2017-02-27 21:06:51 +00:00
|
|
|
|
2008-01-21 23:30:17 +00:00
|
|
|
#elif defined(__ELF__)
|
2018-06-01 13:53:41 +00:00
|
|
|
# define ABI_ID "ELF"
|
2008-01-21 23:30:17 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(ABI_ID)
|
|
|
|
static char const info_abi[] = "INFO:abi[" ABI_ID "]";
|
|
|
|
#endif
|