aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorNathan Froyd <froydnj@codesourcery.com>2008-10-10 20:55:36 +0000
committerNathan Froyd <froydnj@codesourcery.com>2008-10-10 20:55:36 +0000
commitf82e0623e15e6331a6cb5e7a2c6334cf5ae75ec9 (patch)
tree826b65789b90c112eda67bd4eda2d22d1c6eeb57 /bfd
parentc764a876984ebfc21f3635693aebeee4e8d9d0f3 (diff)
downloadgdb-f82e0623e15e6331a6cb5e7a2c6334cf5ae75ec9.zip
gdb-f82e0623e15e6331a6cb5e7a2c6334cf5ae75ec9.tar.gz
gdb-f82e0623e15e6331a6cb5e7a2c6334cf5ae75ec9.tar.bz2
include/elf/
* ppc.h: Add Tag_GNU_Power_ABI_Struct_Return. bfd/ * elf32-ppc.c (ppc_elf_merge_obj_attributes): Merge Tag_GNU_Power_ABI_Struct_Return. binutils/ * readelf.c (display_power_gnu_attribute): Decode Tag_GNU_Power_ABI_Struct_Return. ld/testsuite/ * ld-powerpc/gnu-attr-12-1.s: New file. * ld-powerpc/gnu-attr-12-2.s: New file. * ld-powerpc/gnu-attr-12-11.d: New file. * ld-powerpc/gnu-attr-12-21.d: New file. * ld-powerpc/powerpc.exp: Run new dump tests.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf32-ppc.c27
2 files changed, 32 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 2c5e391..f0080bb 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2008-10-10 Nathan Froyd <froydnj@codesourcery.com>
+
+ * elf32-ppc.c (ppc_elf_merge_obj_attributes): Merge
+ Tag_GNU_Power_ABI_Struct_Return.
+
2008-10-09 Kai Tietz <kai.tietz@onevision.com>
* cofflink.c (_bfd_coff_generic_relocate_section): Dump bfd_vma sized addresses instead of long sized.
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 1d9cabd..83a9274 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -3964,6 +3964,33 @@ ppc_elf_merge_obj_attributes (bfd *ibfd, bfd *obfd)
ibfd, obfd, in_abi, out_abi);
}
+ /* Check for conflicting Tag_GNU_Power_ABI_Struct_Return attributes
+ and merge non-conflicting ones. */
+ in_attr = &in_attrs[Tag_GNU_Power_ABI_Struct_Return];
+ out_attr = &out_attrs[Tag_GNU_Power_ABI_Struct_Return];
+ if (in_attr->i != out_attr->i)
+ {
+ out_attr->type = 1;
+ if (out_attr->i == 0)
+ out_attr->i = in_attr->i;
+ else if (in_attr->i == 0)
+ ;
+ else if (out_attr->i == 1 && in_attr->i == 2)
+ _bfd_error_handler
+ (_("Warning: %B uses r3/r4 for small structure returns, %B uses memory"), obfd, ibfd);
+ else if (out_attr->i == 2 && in_attr->i == 1)
+ _bfd_error_handler
+ (_("Warning: %B uses r3/r4 for small structure returns, %B uses memory"), ibfd, obfd);
+ else if (in_attr->i > 2)
+ _bfd_error_handler
+ (_("Warning: %B uses unknown small structure return convention %d"), ibfd,
+ in_attr->i);
+ else
+ _bfd_error_handler
+ (_("Warning: %B uses unknown small structure return convention %d"), obfd,
+ out_attr->i);
+ }
+
/* Merge Tag_compatibility attributes and any common GNU ones. */
_bfd_elf_merge_object_attributes (ibfd, obfd);