* abi-tags: Add support for FreeBSD with ABI OS value 3.
* elf/cache.c (print_entry): Support the GNU/FreeBSD ABI tag.
.*-sun-solaris2.* 2 2.0.0 # just an arbitrary value
+.*-.*-freebsd.*-gnu.* 3 4.0.0 # earliest compatible kernel version
+
# There is no catch-all default here because every supported OS that uses
# ELF must have its own unique ABI tag.
[0] = "Linux",
[1] = "Hurd",
[2] = "Solaris",
- [3] = N_("Unknown OS")
+ [3] = "FreeBSD",
+ [4] = N_("Unknown OS")
};
+#define MAXTAG (sizeof abi_tag_os / sizeof abi_tag_os[0] - 1)
unsigned int os = osversion >> 24;
printf (_(", OS ABI: %s %d.%d.%d"),
- _(abi_tag_os[os > 3 ? 3 : os]),
+ _(abi_tag_os[os > MAXTAG ? MAXTAG : os]),
(osversion >> 16) & 0xff,
(osversion >> 8) & 0xff,
osversion & 0xff);