summaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorH.J. Lu <hjl@lucon.org>2007-08-04 16:31:00 +0000
committerH.J. Lu <hjl@lucon.org>2007-08-04 16:31:00 +0000
commit1092ec2bdef4aa18cbf021396d9047556ad293ca (patch)
treee8ea58e2b62f85808c6969a8c33bc790575d02f9 /bfd
parentd37c2263d65b80927e54abf90b552594cf536561 (diff)
downloadgdb-1092ec2bdef4aa18cbf021396d9047556ad293ca.tar.gz
2007-08-04 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.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog7
-rw-r--r--bfd/elf-bfd.h2
-rw-r--r--bfd/elfcode.h4
-rw-r--r--bfd/elfcore.h2
4 files changed, 11 insertions, 4 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 16690a5a4a1..9ad32c480f1 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,10 @@
+2007-08-04 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.
+
2007-08-02 H.J. Lu <hongjiu.lu@intel.com>
* coffcode.h (ALIGN_SET): Removed.
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index 5db52f3c9fc..dffb83b8ee9 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -1239,7 +1239,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)
diff --git a/bfd/elfcode.h b/bfd/elfcode.h
index d2f4751e95f..e16f579f951 100644
--- a/bfd/elfcode.h
+++ b/bfd/elfcode.h
@@ -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
diff --git a/bfd/elfcore.h b/bfd/elfcore.h
index 6e78a19cf45..dbf93975728 100644
--- a/bfd/elfcore.h
+++ b/bfd/elfcore.h
@@ -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)