PATCH: Pass plugin as target for "ar --plugin" when opening a BFD file

H.J. Lu hjl.tools@gmail.com
Sat Sep 18 00:44:00 GMT 2010


On Fri, Sep 17, 2010 at 5:22 PM, Alan Modra <amodra@gmail.com> wrote:
> On Wed, Sep 15, 2010 at 10:08:20AM -0700, H.J. Lu wrote:
>> Since it only affects --plugin, I am checking it in.  We can fix any
>> fallouts if there are any.
>
> /src/binutils-current/binutils/emul_aix.c:160: error: initialization from incompatible pointer type
> /src/binutils-current/binutils/emul_aix.c:161: error: initialization from incompatible pointer type
> /src/binutils-current/binutils/emul_aix.c:168: error: initialization from incompatible pointer type
> /src/binutils-current/binutils/emul_aix.c:169: error: initialization from incompatible pointer type
> make[4]: *** [emul_aix.o] Error 1
> make[4]: Leaving directory `/home/alan/build/gas/rs6000-aix4.3.3/binutils'
>

This is the patch I checked in.


-- 
H.J.
-
2010-09-17  H.J. Lu  <hongjiu.lu@intel.com>

	* emul_aix.c (ar_emul_aix_append): Add a target argument
	and ignore it if it is set.
	(ar_emul_aix5_append): Likewise.
	(ar_emul_aix_replace): Likewise.
	(ar_emul_aix5_replace): Likewise.
-------------- next part --------------
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index d0d5bb6..d8a3fcc 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,5 +1,13 @@
 2010-09-15  H.J. Lu  <hongjiu.lu@intel.com>
 
+	* emul_aix.c (ar_emul_aix_append): Add a target argument
+	and ignore it if it is set.
+	(ar_emul_aix5_append): Likewise.
+	(ar_emul_aix_replace): Likewise.
+	(ar_emul_aix5_replace): Likewise.
+
+2010-09-15  H.J. Lu  <hongjiu.lu@intel.com>
+
 	* ar.c (plugin_target): New.
 	(main): Set plugin_target to "plugin" for --plugin.
 	(open_inarch): Initialize target to plugin_target.
diff --git a/binutils/emul_aix.c b/binutils/emul_aix.c
index 256bfd1..dd5c97e 100644
--- a/binutils/emul_aix.c
+++ b/binutils/emul_aix.c
@@ -92,31 +92,41 @@ ar_emul_aix_internal (bfd **       after_bfd,
 
 
 static bfd_boolean
-ar_emul_aix_append (bfd **after_bfd, char *file_name, bfd_boolean verbose,
-                    bfd_boolean flatten)
+ar_emul_aix_append (bfd **after_bfd, char *file_name, const char *target,
+		    bfd_boolean verbose, bfd_boolean flatten)
 {
+  if (target)
+    non_fatal (_("target `%s' ignored."), target);
   return ar_emul_aix_internal (after_bfd, file_name, verbose,
 			       "aixcoff64-rs6000", TRUE, flatten);
 }
 
 static bfd_boolean
-ar_emul_aix5_append (bfd **after_bfd, char *file_name, bfd_boolean verbose,
-                     bfd_boolean flatten)
+ar_emul_aix5_append (bfd **after_bfd, char *file_name, const char *target,
+		     bfd_boolean verbose, bfd_boolean flatten)
 {
+  if (target)
+    non_fatal (_("target `%s' ignored."), target);
   return ar_emul_aix_internal (after_bfd, file_name, verbose,
 			       "aix5coff64-rs6000", TRUE, flatten);
 }
 
 static bfd_boolean
-ar_emul_aix_replace (bfd **after_bfd, char *file_name, bfd_boolean verbose)
+ar_emul_aix_replace (bfd **after_bfd, char *file_name, const char *target,
+		     bfd_boolean verbose)
 {
+  if (target)
+    non_fatal (_("target `%s' ignored."), target);
   return ar_emul_aix_internal (after_bfd, file_name, verbose,
 			       "aixcoff64-rs6000", FALSE, FALSE);
 }
 
 static bfd_boolean
-ar_emul_aix5_replace (bfd **after_bfd, char *file_name, bfd_boolean verbose)
+ar_emul_aix5_replace (bfd **after_bfd, char *file_name,
+		      const char *target, bfd_boolean verbose)
 {
+  if (target)
+    non_fatal (_("target `%s' ignored."), target);
   return ar_emul_aix_internal (after_bfd, file_name, verbose,
 			       "aix5coff64-rs6000", FALSE, FALSE);
 }


More information about the Binutils mailing list