public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* PATCH: Use xvec_get_elf_backend_data
@ 2007-08-03 16:30 H.J. Lu
  2007-08-04  0:35 ` Alan Modra
  0 siblings, 1 reply; 2+ messages in thread
From: H.J. Lu @ 2007-08-03 16:30 UTC (permalink / raw)
  To: binutils

This patch uses xvec_get_elf_backend_data in elfcode.h and elfcore.h.


H.J.
----
2007-08-03  H.J. Lu  <hongjiu.lu@intel.com>

	* elf-bfd.h (xvec_get_elf_backend_data): Add const.

	* elfcode.h (elf_object_p): Use xvec_get_elf_backend_data.
	* elfcore.h (elf_core_file_p): Likewise.

--- bfd/elf-bfd.h.xvec	2007-08-02 19:51:33.000000000 -0700
+++ bfd/elf-bfd.h	2007-08-03 09:20:35.000000000 -0700
@@ -1244,7 +1244,7 @@ struct bfd_elf_section_data
 #define elf_sec_group(sec)	(elf_section_data(sec)->sec_group)
 
 #define xvec_get_elf_backend_data(xvec) \
-  ((struct elf_backend_data *) (xvec)->backend_data)
+  ((const struct elf_backend_data *) (xvec)->backend_data)
 
 #define get_elf_backend_data(abfd) \
    xvec_get_elf_backend_data ((abfd)->xvec)
--- bfd/elfcode.h.xvec	2007-07-24 15:03:49.000000000 -0700
+++ bfd/elfcode.h	2007-08-03 09:22:11.000000000 -0700
@@ -605,7 +605,7 @@ elf_object_p (bfd *abfd)
 
 	  if ((*target_ptr)->flavour != bfd_target_elf_flavour)
 	    continue;
-	  back = (const struct elf_backend_data *) (*target_ptr)->backend_data;
+	  back = xvec_get_elf_backend_data (*target_ptr);
 	  if (back->elf_machine_code == i_ehdrp->e_machine
 	      || (back->elf_machine_alt1 != 0
 		  && back->elf_machine_alt1 == i_ehdrp->e_machine)
@@ -658,7 +658,7 @@ elf_object_p (bfd *abfd)
 		  != target->header_byteorder))
 	    continue;
 
-	  back = (const struct elf_backend_data *) (*target_ptr)->backend_data;
+	  back = xvec_get_elf_backend_data (*target_ptr);
 	  if (back->elf_osabi == i_ehdrp->e_ident[EI_OSABI]
 	      && (back->elf_machine_code == i_ehdrp->e_machine
 		  || (back->elf_machine_alt1 != 0
--- bfd/elfcore.h.xvec	2007-08-02 17:50:33.000000000 -0700
+++ bfd/elfcore.h	2007-08-03 09:23:07.000000000 -0700
@@ -158,7 +158,7 @@ elf_core_file_p (bfd *abfd)
 
 	  if ((*target_ptr)->flavour != bfd_target_elf_flavour)
 	    continue;
-	  back = (const struct elf_backend_data *) (*target_ptr)->backend_data;
+	  back = xvec_get_elf_backend_data (*target_ptr);
 	  if (back->elf_machine_code == i_ehdrp->e_machine
 	      || (back->elf_machine_alt1 != 0
 	          && i_ehdrp->e_machine == back->elf_machine_alt1)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: PATCH: Use xvec_get_elf_backend_data
  2007-08-03 16:30 PATCH: Use xvec_get_elf_backend_data H.J. Lu
@ 2007-08-04  0:35 ` Alan Modra
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Modra @ 2007-08-04  0:35 UTC (permalink / raw)
  To: H.J. Lu; +Cc: binutils

On Fri, Aug 03, 2007 at 09:30:18AM -0700, H.J. Lu wrote:
> 	* elf-bfd.h (xvec_get_elf_backend_data): Add const.
> 
> 	* elfcode.h (elf_object_p): Use xvec_get_elf_backend_data.
> 	* elfcore.h (elf_core_file_p): Likewise.

OK.

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-08-04  0:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-03 16:30 PATCH: Use xvec_get_elf_backend_data H.J. Lu
2007-08-04  0:35 ` Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).