abi_fp_bfd = mips_elf_tdata (obfd)->abi_fp_bfd;
in_attr = elf_known_obj_attributes (ibfd)[OBJ_ATTR_GNU];
- if (!abi_fp_bfd && in_attr[Tag_GNU_MIPS_ABI_FP].i != 0)
+ if (!abi_fp_bfd && in_attr[Tag_GNU_MIPS_ABI_FP].i != Val_GNU_MIPS_ABI_FP_ANY)
mips_elf_tdata (obfd)->abi_fp_bfd = ibfd;
if (!elf_known_obj_attributes_proc (obfd)[0].i)
if (in_attr[Tag_GNU_MIPS_ABI_FP].i != out_attr[Tag_GNU_MIPS_ABI_FP].i)
{
out_attr[Tag_GNU_MIPS_ABI_FP].type = 1;
- if (out_attr[Tag_GNU_MIPS_ABI_FP].i == 0)
+ if (out_attr[Tag_GNU_MIPS_ABI_FP].i == Val_GNU_MIPS_ABI_FP_ANY)
out_attr[Tag_GNU_MIPS_ABI_FP].i = in_attr[Tag_GNU_MIPS_ABI_FP].i;
- else if (in_attr[Tag_GNU_MIPS_ABI_FP].i != 0)
+ else if (in_attr[Tag_GNU_MIPS_ABI_FP].i != Val_GNU_MIPS_ABI_FP_ANY)
switch (out_attr[Tag_GNU_MIPS_ABI_FP].i)
{
- case 1:
+ case Val_GNU_MIPS_ABI_FP_DOUBLE:
switch (in_attr[Tag_GNU_MIPS_ABI_FP].i)
{
- case 2:
+ case Val_GNU_MIPS_ABI_FP_SINGLE:
_bfd_error_handler
(_("Warning: %B uses %s (set by %B), %B uses %s"),
obfd, abi_fp_bfd, ibfd, "-mdouble-float", "-msingle-float");
break;
- case 3:
+ case Val_GNU_MIPS_ABI_FP_SOFT:
_bfd_error_handler
(_("Warning: %B uses %s (set by %B), %B uses %s"),
obfd, abi_fp_bfd, ibfd, "-mhard-float", "-msoft-float");
break;
- case 4:
+ case Val_GNU_MIPS_ABI_FP_64:
_bfd_error_handler
(_("Warning: %B uses %s (set by %B), %B uses %s"),
obfd, abi_fp_bfd, ibfd,
}
break;
- case 2:
+ case Val_GNU_MIPS_ABI_FP_SINGLE:
switch (in_attr[Tag_GNU_MIPS_ABI_FP].i)
{
- case 1:
+ case Val_GNU_MIPS_ABI_FP_DOUBLE:
_bfd_error_handler
(_("Warning: %B uses %s (set by %B), %B uses %s"),
obfd, abi_fp_bfd, ibfd, "-msingle-float", "-mdouble-float");
break;
- case 3:
+ case Val_GNU_MIPS_ABI_FP_SOFT:
_bfd_error_handler
(_("Warning: %B uses %s (set by %B), %B uses %s"),
obfd, abi_fp_bfd, ibfd, "-mhard-float", "-msoft-float");
break;
- case 4:
+ case Val_GNU_MIPS_ABI_FP_64:
_bfd_error_handler
(_("Warning: %B uses %s (set by %B), %B uses %s"),
obfd, abi_fp_bfd, ibfd,
}
break;
- case 3:
+ case Val_GNU_MIPS_ABI_FP_SOFT:
switch (in_attr[Tag_GNU_MIPS_ABI_FP].i)
{
- case 1:
- case 2:
- case 4:
+ case Val_GNU_MIPS_ABI_FP_DOUBLE:
+ case Val_GNU_MIPS_ABI_FP_SINGLE:
+ case Val_GNU_MIPS_ABI_FP_64:
_bfd_error_handler
(_("Warning: %B uses %s (set by %B), %B uses %s"),
obfd, abi_fp_bfd, ibfd, "-msoft-float", "-mhard-float");
}
break;
- case 4:
+ case Val_GNU_MIPS_ABI_FP_64:
switch (in_attr[Tag_GNU_MIPS_ABI_FP].i)
{
- case 1:
+ case Val_GNU_MIPS_ABI_FP_DOUBLE:
_bfd_error_handler
(_("Warning: %B uses %s (set by %B), %B uses %s"),
obfd, abi_fp_bfd, ibfd,
"-mips32r2 -mfp64", "-mdouble-float");
break;
- case 2:
+ case Val_GNU_MIPS_ABI_FP_SINGLE:
_bfd_error_handler
(_("Warning: %B uses %s (set by %B), %B uses %s"),
obfd, abi_fp_bfd, ibfd,
"-mips32r2 -mfp64", "-msingle-float");
break;
- case 3:
+ case Val_GNU_MIPS_ABI_FP_SOFT:
_bfd_error_handler
(_("Warning: %B uses %s (set by %B), %B uses %s"),
obfd, abi_fp_bfd, ibfd, "-mhard-float", "-msoft-float");
default:
switch (in_attr[Tag_GNU_MIPS_ABI_FP].i)
{
- case 1:
+ case Val_GNU_MIPS_ABI_FP_DOUBLE:
_bfd_error_handler
(_("Warning: %B uses unknown floating point ABI %d "
"(set by %B), %B uses %s"),
out_attr[Tag_GNU_MIPS_ABI_FP].i, "-mdouble-float");
break;
- case 2:
+ case Val_GNU_MIPS_ABI_FP_SINGLE:
_bfd_error_handler
(_("Warning: %B uses unknown floating point ABI %d "
"(set by %B), %B uses %s"),
out_attr[Tag_GNU_MIPS_ABI_FP].i, "-msingle-float");
break;
- case 3:
+ case Val_GNU_MIPS_ABI_FP_SOFT:
_bfd_error_handler
(_("Warning: %B uses unknown floating point ABI %d "
"(set by %B), %B uses %s"),
out_attr[Tag_GNU_MIPS_ABI_FP].i, "-msoft-float");
break;
- case 4:
+ case Val_GNU_MIPS_ABI_FP_64:
_bfd_error_handler
(_("Warning: %B uses unknown floating point ABI %d "
"(set by %B), %B uses %s"),
enum
{
/* 0-3 are generic. */
- Tag_GNU_MIPS_ABI_FP = 4, /* Value 1 for hard-float -mdouble-float, 2
- for hard-float -msingle-float, 3 for
- soft-float, 4 for -mips32r2 -mfp64; 0 for
- not tagged or not using any ABIs affected
- by the differences. */
+
+ /* Floating-point ABI used by this object file. */
+ Tag_GNU_MIPS_ABI_FP = 4,
+};
+
+/* Object attribute values. */
+enum
+{
+ /* Values defined for Tag_GNU_MIPS_ABI_FP. */
+
+ /* Not tagged or not using any ABIs affected by the differences. */
+ Val_GNU_MIPS_ABI_FP_ANY = 0,
+
+ /* Using hard-float -mdouble-float. */
+ Val_GNU_MIPS_ABI_FP_DOUBLE = 1,
+
+ /* Using hard-float -msingle-float. */
+ Val_GNU_MIPS_ABI_FP_SINGLE = 2,
+
+ /* Using soft-float. */
+ Val_GNU_MIPS_ABI_FP_SOFT = 3,
+
+ /* Using -mips32r2 -mfp64. */
+ Val_GNU_MIPS_ABI_FP_64 = 4,
};
#endif /* _ELF_MIPS_H */