This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
get rid of a couple of PTR casts
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sources dot redhat dot com
- Date: Thu, 07 Aug 2003 18:26:58 +0930
- Subject: get rid of a couple of PTR casts
bfd/ChangeLog
* elfxx-target.h: Remove PTR cast.
* targets.c (bfd_target): Make backend_data const void *.
* elf-bfd.h: Constify all occurrences of struct elf_backend_data.
* elf-m10300.c: Likewise.
* elf.c: Likewise.
* elf32-hppa.c: Likewise.
* elf32-i386.c: Likewise.
* elf32-m68hc1x.c: Likewise.
* elf32-ppc.c: Likewise.
* elf32-s390.c: Likewise.
* elf32-sh.c: Likewise.
* elf32-sh64.c: Likewise.
* elf32-sparc.c: Likewise.
* elf32-xtensa.c: Likewise.
* elf64-mips.c: Likewise.
* elf64-ppc.c: Likewise.
* elf64-s390.c: Likewise.
* elf64-sh64.c: Likewise.
* elf64-sparc.c: Likewise.
* elf64-x86-64.c: Likewise.
* elfcode.h: Likewise.
* elfcore.h: Likewise.
* elflink.c: Likewise.
* elflink.h: Likewise.
* elfxx-ia64.c: Likewise.
* elfxx-mips.c: Likewise.
* elfxx-mips.h: Likewise.
* elf.c (prep_headers): Remove useless check for null backend_data.
* bfd-in2.h: Regenerate.
Index: bfd/elf-bfd.h
===================================================================
RCS file: /cvs/src/src/bfd/elf-bfd.h,v
retrieving revision 1.108
diff -u -p -r1.108 elf-bfd.h
--- bfd/elf-bfd.h 7 Aug 2003 07:25:34 -0000 1.108
+++ bfd/elf-bfd.h 7 Aug 2003 08:03:27 -0000
@@ -800,7 +800,7 @@ struct elf_backend_data
newly created and plt/got refcounts and dynamic indices should not
be copied. */
void (*elf_backend_copy_indirect_symbol)
- (struct elf_backend_data *, struct elf_link_hash_entry *,
+ (const struct elf_backend_data *, struct elf_link_hash_entry *,
struct elf_link_hash_entry *);
/* Modify any information related to dynamic linking such that the
@@ -1029,7 +1029,7 @@ struct bfd_elf_section_data
&& sec->sec_info_type != ELF_INFO_TYPE_JUST_SYMS)
#define get_elf_backend_data(abfd) \
- ((struct elf_backend_data *) (abfd)->xvec->backend_data)
+ ((const struct elf_backend_data *) (abfd)->xvec->backend_data)
/* This struct is used to pass information to routines called via
elf_link_hash_traverse which must return failure. */
@@ -1319,7 +1319,7 @@ extern struct bfd_hash_entry *_bfd_elf_l
extern struct bfd_link_hash_table *_bfd_elf_link_hash_table_create
(bfd *);
extern void _bfd_elf_link_hash_copy_indirect
- (struct elf_backend_data *, struct elf_link_hash_entry *,
+ (const struct elf_backend_data *, struct elf_link_hash_entry *,
struct elf_link_hash_entry *);
extern void _bfd_elf_link_hash_hide_symbol
(struct bfd_link_info *, struct elf_link_hash_entry *, bfd_boolean);
Index: bfd/elf-m10300.c
===================================================================
RCS file: /cvs/src/src/bfd/elf-m10300.c,v
retrieving revision 1.38
diff -u -p -r1.38 elf-m10300.c
--- bfd/elf-m10300.c 29 Jul 2003 06:18:40 -0000 1.38
+++ bfd/elf-m10300.c 7 Aug 2003 08:03:29 -0000
@@ -562,7 +562,7 @@ _bfd_mn10300_elf_create_got_section (abf
flagword pltflags;
asection * s;
struct elf_link_hash_entry * h;
- struct elf_backend_data * bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data * bed = get_elf_backend_data (abfd);
int ptralign;
/* This function may be called more than once. */
@@ -4049,7 +4049,7 @@ _bfd_mn10300_elf_create_dynamic_sections
{
flagword flags;
asection * s;
- struct elf_backend_data * bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data * bed = get_elf_backend_data (abfd);
int ptralign = 0;
switch (bed->s->arch_size)
Index: bfd/elf.c
===================================================================
RCS file: /cvs/src/src/bfd/elf.c,v
retrieving revision 1.197
diff -u -p -r1.197 elf.c
--- bfd/elf.c 4 Aug 2003 09:39:46 -0000 1.197
+++ bfd/elf.c 7 Aug 2003 08:03:33 -0000
@@ -325,7 +325,7 @@ bfd_elf_get_elf_syms (bfd *ibfd,
Elf_External_Sym_Shndx *shndx;
Elf_Internal_Sym *isym;
Elf_Internal_Sym *isymend;
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
size_t extsym_size;
bfd_size_type amt;
file_ptr pos;
@@ -638,7 +638,7 @@ _bfd_elf_make_section_from_shdr (bfd *ab
{
asection *newsect;
flagword flags;
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
if (hdr->bfd_section != NULL)
{
@@ -1193,7 +1193,7 @@ bfd_elf_print_symbol (bfd *abfd,
{
const char *section_name;
const char *name = NULL;
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
unsigned char st_other;
bfd_vma val;
@@ -1344,7 +1344,7 @@ _bfd_elf_link_hash_newfunc (struct bfd_h
old indirect symbol. Also used for copying flags to a weakdef. */
void
-_bfd_elf_link_hash_copy_indirect (struct elf_backend_data *bed,
+_bfd_elf_link_hash_copy_indirect (const struct elf_backend_data *bed,
struct elf_link_hash_entry *dir,
struct elf_link_hash_entry *ind)
{
@@ -1649,7 +1649,7 @@ bfd_section_from_shdr (bfd *abfd, unsign
{
Elf_Internal_Shdr *hdr = elf_elfsections (abfd)[shindex];
Elf_Internal_Ehdr *ehdr = elf_elfheader (abfd);
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
const char *name;
name = elf_string_from_elf_strtab (abfd, hdr->sh_name);
@@ -2123,13 +2123,13 @@ bfd_boolean
_bfd_elf_get_sec_type_attr (bfd *abfd, const char *name, int *type, int *attr)
{
bfd_boolean found = FALSE;
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
/* See if this is one of the special sections. */
if (name)
{
const struct bfd_elf_special_section *ssect = NULL;
- unsigned int rela = get_elf_backend_data (abfd)->default_use_rela_p;
+ unsigned int rela = bed->default_use_rela_p;
if (bed->special_sections)
ssect = get_special_section (name, bed->special_sections, rela);
@@ -2274,7 +2274,7 @@ _bfd_elf_make_section_from_phdr (bfd *ab
bfd_boolean
bfd_section_from_phdr (bfd *abfd, Elf_Internal_Phdr *hdr, int index)
{
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
switch (hdr->p_type)
{
@@ -2332,7 +2332,7 @@ _bfd_elf_init_reloc_shdr (bfd *abfd,
bfd_boolean use_rela_p)
{
char *name;
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
bfd_size_type amt = sizeof ".rela" + strlen (asect->name);
name = bfd_alloc (abfd, amt);
@@ -2362,7 +2362,7 @@ _bfd_elf_init_reloc_shdr (bfd *abfd,
static void
elf_fake_sections (bfd *abfd, asection *asect, void *failedptrarg)
{
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
bfd_boolean *failedptr = failedptrarg;
Elf_Internal_Shdr *this_hdr;
@@ -2872,7 +2872,7 @@ static int
sym_is_global (bfd *abfd, asymbol *sym)
{
/* If the backend has a special mapping, use it. */
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
if (bed->elf_backend_sym_is_global)
return (*bed->elf_backend_sym_is_global) (abfd, sym);
@@ -3066,7 +3066,7 @@ bfd_boolean
_bfd_elf_compute_section_file_positions (bfd *abfd,
struct bfd_link_info *link_info)
{
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
bfd_boolean failed;
struct bfd_strtab_hash *strtab;
Elf_Internal_Shdr *shstrtab_hdr;
@@ -4059,7 +4059,7 @@ get_program_header_size (bfd *abfd)
{
size_t segs;
asection *s;
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
/* We can't return a different result each time we're called. */
if (elf_tdata (abfd)->program_header_size != 0)
@@ -4162,7 +4162,7 @@ assign_file_positions_except_relocs (bfd
Elf_Internal_Shdr ** const i_shdrpp = elf_elfsections (abfd);
unsigned int num_sec = elf_numsections (abfd);
file_ptr off;
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
if ((abfd->flags & (EXEC_P | DYNAMIC)) == 0
&& bfd_get_format (abfd) != bfd_core)
@@ -4269,7 +4269,7 @@ prep_headers (bfd *abfd)
Elf_Internal_Phdr *i_phdrp = 0; /* Program header table, internal form */
Elf_Internal_Shdr **i_shdrp; /* Section header table, internal form */
struct elf_strtab_hash *shstrtab;
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
i_ehdrp = elf_elfheader (abfd);
i_shdrp = elf_elfsections (abfd);
@@ -4314,11 +4314,8 @@ prep_headers (bfd *abfd)
Such need can generally be supplied by replacing the tests for
e_machine with the conditions used to determine it. */
default:
- if (get_elf_backend_data (abfd) != NULL)
- i_ehdrp->e_machine = get_elf_backend_data (abfd)->elf_machine_code;
- else
- i_ehdrp->e_machine = EM_NONE;
- }
+ i_ehdrp->e_machine = bed->elf_machine_code;
+ }
i_ehdrp->e_version = bed->s->ev_current;
i_ehdrp->e_ehsize = bed->s->sizeof_ehdr;
@@ -4396,7 +4393,7 @@ _bfd_elf_assign_file_positions_for_reloc
bfd_boolean
_bfd_elf_write_object_contents (bfd *abfd)
{
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
Elf_Internal_Ehdr *i_ehdrp;
Elf_Internal_Shdr **i_shdrp;
bfd_boolean failed;
@@ -4458,7 +4455,7 @@ _bfd_elf_write_corefile_contents (bfd *a
int
_bfd_elf_section_from_bfd_section (bfd *abfd, struct sec *asect)
{
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
int index;
if (elf_section_data (asect) != NULL
@@ -4574,7 +4571,7 @@ copy_private_bfd_data (bfd *ibfd, bfd *o
bfd_vma maxpagesize;
struct elf_segment_map *phdr_adjust_seg = NULL;
unsigned int phdr_adjust_num = 0;
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
|| bfd_get_flavour (obfd) != bfd_target_elf_flavour)
@@ -5269,7 +5266,7 @@ swap_out_syms (bfd *abfd,
struct bfd_strtab_hash **sttp,
int relocatable_p)
{
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
int symcount;
asymbol **syms;
struct bfd_strtab_hash *stt;
@@ -5601,7 +5598,7 @@ _bfd_elf_canonicalize_reloc (bfd *abfd,
{
arelent *tblptr;
unsigned int i;
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
if (! bed->s->slurp_reloc_table (abfd, section, symbols, FALSE))
return -1;
@@ -5618,7 +5615,7 @@ _bfd_elf_canonicalize_reloc (bfd *abfd,
long
_bfd_elf_get_symtab (bfd *abfd, asymbol **allocation)
{
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
long symcount = bed->s->slurp_symbol_table (abfd, allocation, FALSE);
if (symcount >= 0)
@@ -5630,7 +5627,7 @@ long
_bfd_elf_canonicalize_dynamic_symtab (bfd *abfd,
asymbol **allocation)
{
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
long symcount = bed->s->slurp_symbol_table (abfd, allocation, TRUE);
if (symcount >= 0)
@@ -6758,7 +6758,7 @@ elfcore_grok_win32pstatus (bfd *abfd, El
static bfd_boolean
elfcore_grok_note (bfd *abfd, Elf_Internal_Note *note)
{
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
switch (note->type)
{
@@ -7062,7 +7062,7 @@ elfcore_write_note (bfd *abfd,
pad = 0;
if (name != NULL)
{
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
namesz = strlen (name) + 1;
bed = get_elf_backend_data (abfd);
Index: bfd/elf32-hppa.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-hppa.c,v
retrieving revision 1.101
diff -u -p -r1.101 elf32-hppa.c
--- bfd/elf32-hppa.c 7 Aug 2003 07:25:34 -0000 1.101
+++ bfd/elf32-hppa.c 7 Aug 2003 08:03:35 -0000
@@ -990,7 +990,7 @@ elf32_hppa_create_dynamic_sections (bfd
/* Copy the extra info we tack onto an elf_link_hash_entry. */
static void
-elf32_hppa_copy_indirect_symbol (struct elf_backend_data *bed,
+elf32_hppa_copy_indirect_symbol (const struct elf_backend_data *bed,
struct elf_link_hash_entry *dir,
struct elf_link_hash_entry *ind)
{
Index: bfd/elf32-i386.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-i386.c,v
retrieving revision 1.108
diff -u -p -r1.108 elf32-i386.c
--- bfd/elf32-i386.c 21 Jul 2003 00:24:10 -0000 1.108
+++ bfd/elf32-i386.c 7 Aug 2003 08:03:38 -0000
@@ -711,7 +711,7 @@ elf_i386_create_dynamic_sections (bfd *d
/* Copy the extra info we tack onto an elf_link_hash_entry. */
static void
-elf_i386_copy_indirect_symbol (struct elf_backend_data *bed,
+elf_i386_copy_indirect_symbol (const struct elf_backend_data *bed,
struct elf_link_hash_entry *dir,
struct elf_link_hash_entry *ind)
{
Index: bfd/elf32-m68hc1x.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-m68hc1x.c,v
retrieving revision 1.5
diff -u -p -r1.5 elf32-m68hc1x.c
--- bfd/elf32-m68hc1x.c 23 Jul 2003 19:40:23 -0000 1.5
+++ bfd/elf32-m68hc1x.c 7 Aug 2003 08:03:38 -0000
@@ -1119,7 +1119,7 @@ elf32_m68hc11_relocate_section (output_b
Elf_Internal_Rela *rel, *relend;
const char *name;
struct m68hc11_page_info *pinfo;
- struct elf_backend_data * const ebd = get_elf_backend_data (input_bfd);
+ const struct elf_backend_data * const ebd = get_elf_backend_data (input_bfd);
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (input_bfd);
Index: bfd/elf32-ppc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-ppc.c,v
retrieving revision 1.97
diff -u -p -r1.97 elf32-ppc.c
--- bfd/elf32-ppc.c 31 Jul 2003 14:38:15 -0000 1.97
+++ bfd/elf32-ppc.c 7 Aug 2003 08:03:41 -0000
@@ -285,7 +285,7 @@ ppc_elf_link_hash_table_create (bfd *abf
/* Copy the extra info we tack onto an elf_link_hash_entry. */
static void
-ppc_elf_copy_indirect_symbol (struct elf_backend_data *bed,
+ppc_elf_copy_indirect_symbol (const struct elf_backend_data *bed,
struct elf_link_hash_entry *dir,
struct elf_link_hash_entry *ind)
{
@@ -2581,11 +2581,12 @@ elf_finish_pointer_linker_section (bfd *
asection *srel = lsect->rel_section;
Elf_Internal_Rela outrel[MAX_INT_RELS_PER_EXT_REL];
bfd_byte *erel;
- struct elf_backend_data *bed = get_elf_backend_data (output_bfd);
+ const struct elf_backend_data *bed;
unsigned int i;
BFD_ASSERT (srel != NULL);
+ bed = get_elf_backend_data (output_bfd);
for (i = 0; i < bed->s->int_rels_per_ext_rel; i++)
{
outrel[i].r_offset = (lsect->section->output_section->vma
Index: bfd/elf32-s390.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-s390.c,v
retrieving revision 1.45
diff -u -p -r1.45 elf32-s390.c
--- bfd/elf32-s390.c 7 Jul 2003 11:14:40 -0000 1.45
+++ bfd/elf32-s390.c 7 Aug 2003 08:03:43 -0000
@@ -40,7 +40,7 @@ static bfd_boolean create_got_section
static bfd_boolean elf_s390_create_dynamic_sections
PARAMS((bfd *, struct bfd_link_info *));
static void elf_s390_copy_indirect_symbol
- PARAMS ((struct elf_backend_data *, struct elf_link_hash_entry *,
+ PARAMS ((const struct elf_backend_data *, struct elf_link_hash_entry *,
struct elf_link_hash_entry *));
static bfd_boolean elf_s390_check_relocs
PARAMS ((bfd *, struct bfd_link_info *, asection *,
@@ -856,7 +856,7 @@ elf_s390_create_dynamic_sections (dynobj
static void
elf_s390_copy_indirect_symbol (bed, dir, ind)
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
struct elf_link_hash_entry *dir, *ind;
{
struct elf_s390_link_hash_entry *edir, *eind;
Index: bfd/elf32-sh.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-sh.c,v
retrieving revision 1.88
diff -u -p -r1.88 elf32-sh.c
--- bfd/elf32-sh.c 2 Aug 2003 13:46:43 -0000 1.88
+++ bfd/elf32-sh.c 7 Aug 2003 08:03:47 -0000
@@ -57,7 +57,7 @@ static bfd_byte *sh_elf_get_relocated_se
(bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *,
bfd_boolean, asymbol **);
static void sh_elf_copy_indirect_symbol
- (struct elf_backend_data *, struct elf_link_hash_entry *,
+ (const struct elf_backend_data *, struct elf_link_hash_entry *,
struct elf_link_hash_entry *);
static int sh_elf_optimized_tls_reloc
(struct bfd_link_info *, int, int);
@@ -3692,7 +3692,7 @@ sh_elf_create_dynamic_sections (bfd *abf
struct elf_sh_link_hash_table *htab;
flagword flags, pltflags;
register asection *s;
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
int ptralign = 0;
switch (bed->s->arch_size)
@@ -6011,7 +6011,7 @@ sh_elf_gc_sweep_hook (bfd *abfd, struct
/* Copy the extra info we tack onto an elf_link_hash_entry. */
static void
-sh_elf_copy_indirect_symbol (struct elf_backend_data *bed,
+sh_elf_copy_indirect_symbol (const struct elf_backend_data *bed,
struct elf_link_hash_entry *dir,
struct elf_link_hash_entry *ind)
{
Index: bfd/elf32-sh64.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-sh64.c,v
retrieving revision 1.17
diff -u -p -r1.17 elf32-sh64.c
--- bfd/elf32-sh64.c 25 Jul 2003 14:35:56 -0000 1.17
+++ bfd/elf32-sh64.c 7 Aug 2003 08:03:47 -0000
@@ -410,7 +410,7 @@ sh64_elf_add_symbol_hook (bfd *abfd, str
{
/* No previous datalabel symbol. Make one. */
struct bfd_link_hash_entry *bh = NULL;
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
if (! _bfd_generic_link_add_one_symbol (info, abfd, dl_name,
flags, *secp, *valp,
Index: bfd/elf32-sparc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-sparc.c,v
retrieving revision 1.53
diff -u -p -r1.53 elf32-sparc.c
--- bfd/elf32-sparc.c 4 Jul 2003 13:53:37 -0000 1.53
+++ bfd/elf32-sparc.c 7 Aug 2003 08:03:49 -0000
@@ -68,7 +68,7 @@ static bfd_boolean create_got_section
static bfd_boolean elf32_sparc_create_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *));
static void elf32_sparc_copy_indirect_symbol
- PARAMS ((struct elf_backend_data *, struct elf_link_hash_entry *,
+ PARAMS ((const struct elf_backend_data *, struct elf_link_hash_entry *,
struct elf_link_hash_entry *));
static int elf32_sparc_tls_transition
PARAMS ((struct bfd_link_info *, bfd *, int, int));
@@ -750,7 +750,7 @@ elf32_sparc_create_dynamic_sections (dyn
static void
elf32_sparc_copy_indirect_symbol (bed, dir, ind)
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
struct elf_link_hash_entry *dir, *ind;
{
struct elf32_sparc_link_hash_entry *edir, *eind;
Index: bfd/elf32-xtensa.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-xtensa.c,v
retrieving revision 1.9
diff -u -p -r1.9 elf32-xtensa.c
--- bfd/elf32-xtensa.c 25 Jul 2003 14:35:56 -0000 1.9
+++ bfd/elf32-xtensa.c 7 Aug 2003 08:03:52 -0000
@@ -48,7 +48,7 @@ static bfd_boolean elf_xtensa_check_relo
static void elf_xtensa_hide_symbol
PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *, bfd_boolean));
static void elf_xtensa_copy_indirect_symbol
- PARAMS ((struct elf_backend_data *, struct elf_link_hash_entry *,
+ PARAMS ((const struct elf_backend_data *, struct elf_link_hash_entry *,
struct elf_link_hash_entry *));
static asection *elf_xtensa_gc_mark_hook
PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
@@ -799,7 +799,7 @@ elf_xtensa_hide_symbol (info, h, force_l
static void
elf_xtensa_copy_indirect_symbol (bed, dir, ind)
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
struct elf_link_hash_entry *dir, *ind;
{
_bfd_elf_link_hash_copy_indirect (bed, dir, ind);
Index: bfd/elf64-mips.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-mips.c,v
retrieving revision 1.51
diff -u -p -r1.51 elf64-mips.c
--- bfd/elf64-mips.c 25 Jun 2003 06:40:19 -0000 1.51
+++ bfd/elf64-mips.c 7 Aug 2003 08:03:53 -0000
@@ -2100,7 +2100,7 @@ mips_elf64_canonicalize_reloc (abfd, sec
{
arelent *tblptr;
unsigned int i;
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
if (! bed->s->slurp_reloc_table (abfd, section, symbols, FALSE))
return -1;
Index: bfd/elf64-ppc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-ppc.c,v
retrieving revision 1.124
diff -u -p -r1.124 elf64-ppc.c
--- bfd/elf64-ppc.c 6 Aug 2003 12:23:37 -0000 1.124
+++ bfd/elf64-ppc.c 7 Aug 2003 08:03:57 -0000
@@ -3277,9 +3277,10 @@ ppc64_elf_create_dynamic_sections (bfd *
/* Copy the extra info we tack onto an elf_link_hash_entry. */
static void
-ppc64_elf_copy_indirect_symbol (struct elf_backend_data *bed ATTRIBUTE_UNUSED,
- struct elf_link_hash_entry *dir,
- struct elf_link_hash_entry *ind)
+ppc64_elf_copy_indirect_symbol
+ (const struct elf_backend_data *bed ATTRIBUTE_UNUSED,
+ struct elf_link_hash_entry *dir,
+ struct elf_link_hash_entry *ind)
{
struct ppc_link_hash_entry *edir, *eind;
flagword mask;
Index: bfd/elf64-s390.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-s390.c,v
retrieving revision 1.46
diff -u -p -r1.46 elf64-s390.c
--- bfd/elf64-s390.c 7 Jul 2003 11:14:40 -0000 1.46
+++ bfd/elf64-s390.c 7 Aug 2003 08:03:59 -0000
@@ -40,7 +40,7 @@ static bfd_boolean create_got_section
static bfd_boolean elf_s390_create_dynamic_sections
PARAMS((bfd *, struct bfd_link_info *));
static void elf_s390_copy_indirect_symbol
- PARAMS ((struct elf_backend_data *, struct elf_link_hash_entry *,
+ PARAMS ((const struct elf_backend_data *, struct elf_link_hash_entry *,
struct elf_link_hash_entry *));
static bfd_boolean elf_s390_check_relocs
PARAMS ((bfd *, struct bfd_link_info *, asection *,
@@ -809,7 +809,7 @@ elf_s390_create_dynamic_sections (dynobj
static void
elf_s390_copy_indirect_symbol (bed, dir, ind)
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
struct elf_link_hash_entry *dir, *ind;
{
struct elf_s390_link_hash_entry *edir, *eind;
Index: bfd/elf64-sh64.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-sh64.c,v
retrieving revision 1.33
diff -u -p -r1.33 elf64-sh64.c
--- bfd/elf64-sh64.c 25 Jul 2003 14:35:56 -0000 1.33
+++ bfd/elf64-sh64.c 7 Aug 2003 08:04:01 -0000
@@ -2917,7 +2917,7 @@ sh64_elf64_add_symbol_hook (bfd *abfd, s
{
/* No previous datalabel symbol. Make one. */
struct bfd_link_hash_entry *bh = NULL;
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
if (! _bfd_generic_link_add_one_symbol (info, abfd, dl_name,
flags, *secp, *valp,
@@ -3238,7 +3238,7 @@ sh64_elf64_create_dynamic_sections (bfd
{
flagword flags, pltflags;
register asection *s;
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
int ptralign = 0;
switch (bed->s->arch_size)
Index: bfd/elf64-sparc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-sparc.c,v
retrieving revision 1.75
diff -u -p -r1.75 elf64-sparc.c
--- bfd/elf64-sparc.c 4 Jul 2003 13:53:37 -0000 1.75
+++ bfd/elf64-sparc.c 7 Aug 2003 08:04:03 -0000
@@ -518,7 +518,7 @@ sparc64_elf_canonicalize_reloc (abfd, se
{
arelent *tblptr;
unsigned int i;
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
if (! bed->s->slurp_reloc_table (abfd, section, symbols, FALSE))
return -1;
Index: bfd/elf64-x86-64.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-x86-64.c,v
retrieving revision 1.64
diff -u -p -r1.64 elf64-x86-64.c
--- bfd/elf64-x86-64.c 21 Jul 2003 00:24:10 -0000 1.64
+++ bfd/elf64-x86-64.c 7 Aug 2003 08:04:05 -0000
@@ -501,7 +501,7 @@ elf64_x86_64_create_dynamic_sections (bf
/* Copy the extra info we tack onto an elf_link_hash_entry. */
static void
-elf64_x86_64_copy_indirect_symbol (struct elf_backend_data *bed,
+elf64_x86_64_copy_indirect_symbol (const struct elf_backend_data *bed,
struct elf_link_hash_entry *dir,
struct elf_link_hash_entry *ind)
{
Index: bfd/elfcode.h
===================================================================
RCS file: /cvs/src/src/bfd/elfcode.h,v
retrieving revision 1.48
diff -u -p -r1.48 elfcode.h
--- bfd/elfcode.h 7 Aug 2003 07:25:34 -0000 1.48
+++ bfd/elfcode.h 7 Aug 2003 08:04:06 -0000
@@ -492,7 +492,7 @@ elf_object_p (bfd *abfd)
Elf_Internal_Shdr *i_shdrp; /* Section header table, internal form */
unsigned int shindex;
char *shstrtab; /* Internal copy of section header stringtab */
- struct elf_backend_data *ebd;
+ const struct elf_backend_data *ebd;
struct bfd_preserve preserve;
asection *s;
bfd_size_type amt;
@@ -591,11 +591,11 @@ elf_object_p (bfd *abfd)
for which we do not have a specific backend. */
for (target_ptr = bfd_target_vector; *target_ptr != NULL; target_ptr++)
{
- struct elf_backend_data *back;
+ const struct elf_backend_data *back;
if ((*target_ptr)->flavour != bfd_target_elf_flavour)
continue;
- back = (struct elf_backend_data *) (*target_ptr)->backend_data;
+ back = (const struct elf_backend_data *) (*target_ptr)->backend_data;
if (back->elf_machine_code == i_ehdrp->e_machine
|| (back->elf_machine_alt1 != 0
&& back->elf_machine_alt1 == i_ehdrp->e_machine)
@@ -1008,7 +1008,7 @@ elf_slurp_symbol_table (bfd *abfd, asymb
Elf_Internal_Sym *isymbuf = NULL;
Elf_External_Versym *xver;
Elf_External_Versym *xverbuf = NULL;
- struct elf_backend_data *ebd;
+ const struct elf_backend_data *ebd;
bfd_size_type amt;
/* Read each raw ELF symbol, converting from external ELF form to
@@ -1238,7 +1238,7 @@ elf_slurp_reloc_table_from_section (bfd
asymbol **symbols,
bfd_boolean dynamic)
{
- struct elf_backend_data * const ebd = get_elf_backend_data (abfd);
+ const struct elf_backend_data * const ebd = get_elf_backend_data (abfd);
void *allocated = NULL;
bfd_byte *native_relocs;
arelent *relent;
Index: bfd/elfcore.h
===================================================================
RCS file: /cvs/src/src/bfd/elfcore.h,v
retrieving revision 1.19
diff -u -p -r1.19 elfcore.h
--- bfd/elfcore.h 4 Aug 2003 09:39:46 -0000 1.19
+++ bfd/elfcore.h 7 Aug 2003 08:04:06 -0000
@@ -76,7 +76,7 @@ elf_core_file_p (bfd *abfd)
Elf_Internal_Ehdr *i_ehdrp; /* Elf file header, internal form. */
Elf_Internal_Phdr *i_phdrp; /* Elf program header, internal form. */
unsigned int phindex;
- struct elf_backend_data *ebd;
+ const struct elf_backend_data *ebd;
struct bfd_preserve preserve;
bfd_size_type amt;
@@ -153,11 +153,11 @@ elf_core_file_p (bfd *abfd)
for (target_ptr = bfd_target_vector; *target_ptr != NULL; target_ptr++)
{
- struct elf_backend_data *back;
+ const struct elf_backend_data *back;
if ((*target_ptr)->flavour != bfd_target_elf_flavour)
continue;
- back = (struct elf_backend_data *) (*target_ptr)->backend_data;
+ back = (const struct elf_backend_data *) (*target_ptr)->backend_data;
if (back->elf_machine_code == i_ehdrp->e_machine
|| (back->elf_machine_alt1 != 0
&& i_ehdrp->e_machine == back->elf_machine_alt1)
Index: bfd/elflink.c
===================================================================
RCS file: /cvs/src/src/bfd/elflink.c,v
retrieving revision 1.43
diff -u -p -r1.43 elflink.c
--- bfd/elflink.c 6 Aug 2003 01:27:11 -0000 1.43
+++ bfd/elflink.c 7 Aug 2003 08:04:07 -0000
@@ -32,7 +32,7 @@ _bfd_elf_create_got_section (bfd *abfd,
asection *s;
struct elf_link_hash_entry *h;
struct bfd_link_hash_entry *bh;
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
int ptralign;
/* This function may be called more than once. */
@@ -115,7 +115,7 @@ _bfd_elf_link_create_dynamic_sections (b
register asection *s;
struct elf_link_hash_entry *h;
struct bfd_link_hash_entry *bh;
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
if (! is_elf_hash_table (info))
return FALSE;
@@ -248,7 +248,7 @@ _bfd_elf_create_dynamic_sections (bfd *a
{
flagword flags, pltflags;
asection *s;
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
/* We need to create .plt, .rel[a].plt, .got, .got.plt, .dynbss, and
.rel[a].bss sections. */
@@ -1164,7 +1164,7 @@ _bfd_elf_merge_symbol (bfd *abfd,
/* Handle the case where we had a versioned symbol in a dynamic
library and now find a definition in a normal object. In this
case, we make the versioned symbol point to the normal one. */
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
flip->root.type = h->root.type;
h->root.type = bfd_link_hash_indirect;
h->root.u.i.link = (struct bfd_link_hash_entry *) flip;
@@ -1247,7 +1247,7 @@ _bfd_elf_add_default_symbol (bfd *abfd,
char *shortname;
struct elf_link_hash_entry *hi;
struct bfd_link_hash_entry *bh;
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
bfd_boolean collect;
bfd_boolean dynamic;
char *p;
@@ -1621,7 +1621,7 @@ _bfd_elf_link_assign_sym_version (struct
{
struct elf_assign_sym_version_info *sinfo;
struct bfd_link_info *info;
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
struct elf_info_failed eif;
char *p;
bfd_size_type amt;
@@ -1879,7 +1879,7 @@ elf_link_read_relocs_from_section (bfd *
void *external_relocs,
Elf_Internal_Rela *internal_relocs)
{
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
void (*swap_in) (bfd *, const bfd_byte *, Elf_Internal_Rela *);
const bfd_byte *erela;
const bfd_byte *erelaend;
@@ -1943,7 +1943,7 @@ _bfd_elf_link_read_relocs (bfd *abfd,
Elf_Internal_Shdr *rel_hdr;
void *alloc1 = NULL;
Elf_Internal_Rela *alloc2 = NULL;
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
if (elf_section_data (o)->relocs != NULL)
return elf_section_data (o)->relocs;
@@ -2076,7 +2076,7 @@ _bfd_elf_link_output_relocs (bfd *output
Elf_Internal_Shdr *output_rel_hdr;
asection *output_section;
unsigned int *rel_countp = NULL;
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
void (*swap_out) (bfd *, const Elf_Internal_Rela *, bfd_byte *);
output_section = input_section->output_section;
@@ -2223,7 +2223,7 @@ _bfd_elf_fix_symbol_flags (struct elf_li
|| ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0)
{
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
bfd_boolean force_local;
bed = get_elf_backend_data (elf_hash_table (eif->info)->dynobj);
@@ -2238,7 +2238,7 @@ _bfd_elf_fix_symbol_flags (struct elf_li
if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
&& h->root.type == bfd_link_hash_undefweak)
{
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
bed = get_elf_backend_data (elf_hash_table (eif->info)->dynobj);
(*bed->elf_backend_hide_symbol) (eif->info, h, TRUE);
}
@@ -2267,7 +2267,7 @@ _bfd_elf_fix_symbol_flags (struct elf_li
h->weakdef = NULL;
else
{
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
bed = get_elf_backend_data (elf_hash_table (eif->info)->dynobj);
(*bed->elf_backend_copy_indirect_symbol) (bed, weakdef, h);
@@ -2286,7 +2286,7 @@ _bfd_elf_adjust_dynamic_symbol (struct e
{
struct elf_info_failed *eif = data;
bfd *dynobj;
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
if (! is_elf_hash_table (eif->info))
return FALSE;
Index: bfd/elflink.h
===================================================================
RCS file: /cvs/src/src/bfd/elflink.h,v
retrieving revision 1.237
diff -u -p -r1.237 elflink.h
--- bfd/elflink.h 4 Aug 2003 11:32:51 -0000 1.237
+++ bfd/elflink.h 7 Aug 2003 08:04:12 -0000
@@ -415,7 +415,7 @@ elf_link_add_object_symbols (bfd *abfd,
Elf_Internal_Sym *isymbuf = NULL;
Elf_Internal_Sym *isym;
Elf_Internal_Sym *isymend;
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
bfd_boolean dt_needed;
struct elf_link_hash_table * hash_table;
bfd_size_type amt;
@@ -1888,7 +1888,7 @@ NAME(bfd_elf,size_dynamic_sections) (bfd
{
bfd_size_type soname_indx;
bfd *dynobj;
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
struct elf_assign_sym_version_info asvinfo;
*sinterpptr = NULL;
@@ -2859,7 +2859,7 @@ elf_link_adjust_relocs (bfd *abfd,
struct elf_link_hash_entry **rel_hash)
{
unsigned int i;
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
bfd_byte *erela;
void (*swap_in) (bfd *, const bfd_byte *, Elf_Internal_Rela *);
void (*swap_out) (bfd *, const Elf_Internal_Rela *, bfd_byte *);
@@ -2964,7 +2964,7 @@ elf_link_sort_relocs (bfd *abfd, struct
size_t i, ret, sort_elt, ext_size;
bfd_byte *sort, *s_non_relative, *p;
struct elf_link_sort_rela *sq;
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
int i2e = bed->s->int_rels_per_ext_rel;
void (*swap_in) (bfd *, const bfd_byte *, Elf_Internal_Rela *);
void (*swap_out) (bfd *, const Elf_Internal_Rela *, bfd_byte *);
@@ -3096,7 +3096,7 @@ elf_bfd_final_link (bfd *abfd, struct bf
Elf_Internal_Shdr *symtab_hdr;
Elf_Internal_Shdr *symtab_shndx_hdr;
Elf_Internal_Shdr *symstrtab_hdr;
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
struct elf_outext_info eoinfo;
bfd_boolean merged;
size_t relativecount = 0;
@@ -4541,7 +4541,7 @@ elf_link_output_extsym (struct elf_link_
|| (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)
&& elf_hash_table (finfo->info)->dynamic_sections_created)
{
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
bed = get_elf_backend_data (finfo->output_bfd);
if (! ((*bed->elf_backend_finish_dynamic_symbol)
@@ -4687,7 +4687,7 @@ elf_link_input_bfd (struct elf_final_lin
long *pindex;
asection **ppsection;
asection *o;
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
bfd_boolean emit_relocs;
struct elf_link_hash_entry **sym_hashes;
@@ -5321,7 +5321,7 @@ elf_reloc_link_order (bfd *output_bfd,
bfd_vma addend;
struct elf_link_hash_entry **rel_hash_ptr;
Elf_Internal_Shdr *rel_hdr;
- struct elf_backend_data *bed = get_elf_backend_data (output_bfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (output_bfd);
Elf_Internal_Rela irel[MAX_INT_RELS_PER_EXT_REL];
bfd_byte *erel;
unsigned int i;
@@ -5509,7 +5509,7 @@ elf_gc_mark (struct bfd_link_info *info,
size_t nlocsyms;
size_t extsymoff;
bfd *input_bfd = sec->owner;
- struct elf_backend_data *bed = get_elf_backend_data (input_bfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (input_bfd);
Elf_Internal_Sym *isym = NULL;
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
@@ -5727,10 +5727,11 @@ elf_gc_propagate_vtable_entries_used (st
pu = h->vtable_parent->vtable_entries_used;
if (pu != NULL)
{
- asection *sec = h->root.u.def.section;
- struct elf_backend_data *bed = get_elf_backend_data (sec->owner);
- unsigned int log_file_align = bed->s->log_file_align;
+ const struct elf_backend_data *bed;
+ unsigned int log_file_align;
+ bed = get_elf_backend_data (h->root.u.def.section->owner);
+ log_file_align = bed->s->log_file_align;
n = h->vtable_parent->vtable_entries_size >> log_file_align;
while (n--)
{
@@ -5751,7 +5752,7 @@ elf_gc_smash_unused_vtentry_relocs (stru
asection *sec;
bfd_vma hstart, hend;
Elf_Internal_Rela *relstart, *relend, *rel;
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
unsigned int log_file_align;
if (h->root.type == bfd_link_hash_warning)
@@ -5914,7 +5915,7 @@ elf_gc_record_vtentry (bfd *abfd ATTRIBU
struct elf_link_hash_entry *h,
bfd_vma addend)
{
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
unsigned int log_file_align = bed->s->log_file_align;
if (addend >= h->vtable_entries_size)
@@ -5980,7 +5981,7 @@ elf_gc_common_finalize_got_offsets (bfd
struct bfd_link_info *info)
{
bfd *i;
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
bfd_vma gotoff;
/* The GOT offset is relative to the .got section, but the GOT header is
@@ -6183,7 +6184,7 @@ elf_bfd_discard_info (bfd *output_bfd, s
struct elf_reloc_cookie cookie;
asection *stab, *eh;
Elf_Internal_Shdr *symtab_hdr;
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
bfd *abfd;
unsigned int count;
bfd_boolean ret = FALSE;
@@ -6316,7 +6317,7 @@ elf_bfd_discard_info (bfd *output_bfd, s
static bfd_boolean
elf_section_ignore_discarded_relocs (asection *sec)
{
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
switch (sec->sec_info_type)
{
Index: bfd/elfxx-ia64.c
===================================================================
RCS file: /cvs/src/src/bfd/elfxx-ia64.c,v
retrieving revision 1.95
diff -u -p -r1.95 elfxx-ia64.c
--- bfd/elfxx-ia64.c 1 Aug 2003 22:46:16 -0000 1.95
+++ bfd/elfxx-ia64.c 7 Aug 2003 08:04:14 -0000
@@ -211,7 +211,7 @@ static struct bfd_hash_entry *elfNN_ia64
PARAMS ((struct bfd_hash_entry *entry, struct bfd_hash_table *table,
const char *string));
static void elfNN_ia64_hash_copy_indirect
- PARAMS ((struct elf_backend_data *, struct elf_link_hash_entry *,
+ PARAMS ((const struct elf_backend_data *, struct elf_link_hash_entry *,
struct elf_link_hash_entry *));
static void elfNN_ia64_hash_hide_symbol
PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *, bfd_boolean));
@@ -1589,7 +1589,7 @@ elfNN_ia64_new_elf_hash_entry (entry, ta
static void
elfNN_ia64_hash_copy_indirect (bed, xdir, xind)
- struct elf_backend_data *bed ATTRIBUTE_UNUSED;
+ const struct elf_backend_data *bed ATTRIBUTE_UNUSED;
struct elf_link_hash_entry *xdir, *xind;
{
struct elfNN_ia64_link_hash_entry *dir, *ind;
Index: bfd/elfxx-mips.c
===================================================================
RCS file: /cvs/src/src/bfd/elfxx-mips.c,v
retrieving revision 1.71
diff -u -p -r1.71 elfxx-mips.c
--- bfd/elfxx-mips.c 25 Jul 2003 14:35:56 -0000 1.71
+++ bfd/elfxx-mips.c 7 Aug 2003 08:04:19 -0000
@@ -4985,7 +4985,7 @@ _bfd_mips_elf_check_relocs (abfd, info,
const Elf_Internal_Rela *rel_end;
asection *sgot;
asection *sreloc;
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
if (info->relocatable)
return TRUE;
@@ -6171,7 +6171,7 @@ _bfd_mips_elf_relocate_section (output_b
const Elf_Internal_Rela *relend;
bfd_vma addend = 0;
bfd_boolean use_saved_addend_p = FALSE;
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
bed = get_elf_backend_data (output_bfd);
relend = relocs + input_section->reloc_count * bed->s->int_rels_per_ext_rel;
@@ -7626,7 +7626,7 @@ _bfd_mips_elf_gc_sweep_hook (abfd, info,
void
_bfd_mips_elf_copy_indirect_symbol (bed, dir, ind)
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
struct elf_link_hash_entry *dir, *ind;
{
struct mips_elf_link_hash_entry *dirmips, *indmips;
Index: bfd/elfxx-mips.h
===================================================================
RCS file: /cvs/src/src/bfd/elfxx-mips.h,v
retrieving revision 1.11
diff -u -p -r1.11 elfxx-mips.h
--- bfd/elfxx-mips.h 25 Jul 2003 14:35:56 -0000 1.11
+++ bfd/elfxx-mips.h 7 Aug 2003 08:04:19 -0000
@@ -70,7 +70,7 @@ extern bfd_boolean _bfd_mips_elf_gc_swee
PARAMS ((bfd *, struct bfd_link_info *, asection *,
const Elf_Internal_Rela *));
extern void _bfd_mips_elf_copy_indirect_symbol
- PARAMS ((struct elf_backend_data *, struct elf_link_hash_entry *,
+ PARAMS ((const struct elf_backend_data *, struct elf_link_hash_entry *,
struct elf_link_hash_entry *));
extern void _bfd_mips_elf_hide_symbol
PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *, bfd_boolean));
Index: bfd/elfxx-target.h
===================================================================
RCS file: /cvs/src/src/bfd/elfxx-target.h,v
retrieving revision 1.53
diff -u -p -r1.53 elfxx-target.h
--- bfd/elfxx-target.h 31 Jul 2003 14:38:15 -0000 1.53
+++ bfd/elfxx-target.h 7 Aug 2003 08:04:19 -0000
@@ -621,7 +621,7 @@ const bfd_target TARGET_BIG_SYM =
#endif
/* backend_data: */
- (PTR) &elfNN_bed
+ &elfNN_bed
};
#endif
@@ -717,6 +717,6 @@ const bfd_target TARGET_LITTLE_SYM =
#endif
/* backend_data: */
- (PTR) &elfNN_bed
+ &elfNN_bed
};
#endif
Index: bfd/targets.c
===================================================================
RCS file: /cvs/src/src/bfd/targets.c,v
retrieving revision 1.95
diff -u -p -r1.95 targets.c
--- bfd/targets.c 16 Jul 2003 22:48:59 -0000 1.95
+++ bfd/targets.c 7 Aug 2003 08:04:20 -0000
@@ -477,7 +477,7 @@ to find an alternative output format tha
. {* Data for use by back-end routines, which isn't
. generic enough to belong in this structure. *}
-. void *backend_data;
+. const void *backend_data;
.
.} bfd_target;
.
--
Alan Modra
IBM OzLabs - Linux Technology Centre