aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfxx-mips.c
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2013-07-15 15:07:30 +0000
committerMaciej W. Rozycki <macro@linux-mips.org>2013-07-15 15:07:30 +0000
commitd929bc19b96005d473ca4205725a4b9d218e6ba5 (patch)
treedc2f65fa83d1486b462dcbda8ef9de124f898de5 /bfd/elfxx-mips.c
parent054e8d9e20cf24e4b4fea6f46f289cf0475746ea (diff)
downloadgdb-d929bc19b96005d473ca4205725a4b9d218e6ba5.zip
gdb-d929bc19b96005d473ca4205725a4b9d218e6ba5.tar.gz
gdb-d929bc19b96005d473ca4205725a4b9d218e6ba5.tar.bz2
include/elf/
* mips.h (Tag_GNU_MIPS_ABI_FP): Remove comment. (Val_GNU_MIPS_ABI_FP_ANY, Val_GNU_MIPS_ABI_FP_DOUBLE, Val_GNU_MIPS_ABI_FP_SINGLE, Val_GNU_MIPS_ABI_FP_SOFT, Val_GNU_MIPS_ABI_FP_64): New enum. bfd/ * elfxx-mips.c (mips_elf_merge_obj_attributes): Replace hardcoded magic numbers with enum values. binutils/ * readelf.c (display_mips_gnu_attribute): Replace hardcoded magic numbers with enum values. gdb/ * mips-tdep.c (mips_gdbarch_init): Replace hardcoded magic numbers with enum values.
Diffstat (limited to 'bfd/elfxx-mips.c')
-rw-r--r--bfd/elfxx-mips.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index b7138cf..fd7900d 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -14316,7 +14316,7 @@ mips_elf_merge_obj_attributes (bfd *ibfd, bfd *obfd)
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)
@@ -14337,27 +14337,27 @@ mips_elf_merge_obj_attributes (bfd *ibfd, bfd *obfd)
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,
@@ -14374,22 +14374,22 @@ mips_elf_merge_obj_attributes (bfd *ibfd, bfd *obfd)
}
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,
@@ -14406,12 +14406,12 @@ mips_elf_merge_obj_attributes (bfd *ibfd, bfd *obfd)
}
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");
@@ -14427,24 +14427,24 @@ mips_elf_merge_obj_attributes (bfd *ibfd, bfd *obfd)
}
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");
@@ -14463,7 +14463,7 @@ mips_elf_merge_obj_attributes (bfd *ibfd, bfd *obfd)
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"),
@@ -14471,7 +14471,7 @@ mips_elf_merge_obj_attributes (bfd *ibfd, bfd *obfd)
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"),
@@ -14479,7 +14479,7 @@ mips_elf_merge_obj_attributes (bfd *ibfd, bfd *obfd)
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"),
@@ -14487,7 +14487,7 @@ mips_elf_merge_obj_attributes (bfd *ibfd, bfd *obfd)
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"),