+2001-08-11 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * elf-bfd.h (struct elf_backend_data): Add new fields
+ 'elf_backend_sprintf_vma' and 'elf_backend_fprintf_vma'.
+ (bfd_elf_sprintf_vma): Rename function prototype to
+ '_bfd_elf_sprintf_vma'.
+ (bfd_elf_fprintf_vma): Rename function prototype to
+ '_bfd_elf_fprintf_vma'.
+ * bfd.c (bfd_sprintf_vma): Do not invoke bfd_elf_sprintf_vma
+ directly, instead indirect via the elf_backend_data structure.
+ (bfd_fprintf_vma): Do not invoke bfd_elf_fprintf_vma directly,
+ instead indirect via the elf_backend_data structure.
+ * elf.c (bfd_elf_sprintf_vma): Rename to _bfd_elf_sprintf_vma.
+ (bfd_elf_fprintf_vma): Rename to _bfd_elf_fprintf_vma.
+ * elfxx-target.h (elf_backend_sprintf_vma): Initialise if not
+ already defined.
+ (elf_backend_fprintf_vma): Initialise if not already defined.
+ (struct elf_backend_data): Initialise the
+ elf_backend_sprintf_vma and elf_backend_fprintf_vma fields.
+
2001-08-10 Andreas Jaeger <aj@suse.de>
* elf64-sparc.c: Add missing prototypes.
bfd_vma value;
{
if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
- bfd_elf_sprintf_vma (abfd, buf, value);
+ get_elf_backend_data (abfd)->elf_backend_sprintf_vma (abfd, buf, value);
else
sprintf_vma (buf, value);
}
bfd_vma value;
{
if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
- bfd_elf_fprintf_vma (abfd, stream, value);
+ get_elf_backend_data (abfd)->elf_backend_fprintf_vma (abfd, stream, value);
else
fprintf_vma ((FILE *) stream, value);
}
note is found in a core file. */
boolean (*elf_backend_grok_psinfo) PARAMS ((bfd *, Elf_Internal_Note *));
+ /* Functions to print VMAs. Special code to handle 64 bit ELF files. */
+ void (* elf_backend_sprintf_vma) PARAMS ((bfd *, char *, bfd_vma));
+ void (* elf_backend_fprintf_vma) PARAMS ((bfd *, PTR, bfd_vma));
+
/* The swapping table to use when dealing with ECOFF information.
Used for the MIPS ELF .mdebug section. */
const struct ecoff_debug_swap *elf_backend_ecoff_debug_swap;
#define bfd_elf32_print_symbol bfd_elf_print_symbol
#define bfd_elf64_print_symbol bfd_elf_print_symbol
-extern void bfd_elf_sprintf_vma PARAMS ((bfd *, char *, bfd_vma));
-extern void bfd_elf_fprintf_vma PARAMS ((bfd *, PTR, bfd_vma));
+extern void _bfd_elf_sprintf_vma PARAMS ((bfd *, char *, bfd_vma));
+extern void _bfd_elf_fprintf_vma PARAMS ((bfd *, PTR, bfd_vma));
extern unsigned long bfd_elf_hash PARAMS ((const char *));
}
void
-bfd_elf_sprintf_vma (abfd, buf, value)
+_bfd_elf_sprintf_vma (abfd, buf, value)
bfd *abfd ATTRIBUTE_UNUSED;
char *buf;
bfd_vma value;
}
void
-bfd_elf_fprintf_vma (abfd, stream, value)
+_bfd_elf_fprintf_vma (abfd, stream, value)
bfd *abfd ATTRIBUTE_UNUSED;
PTR stream;
bfd_vma value;
#ifndef elf_backend_grok_psinfo
#define elf_backend_grok_psinfo NULL
#endif
+#ifndef elf_backend_sprintf_vma
+#define elf_backend_sprintf_vma _bfd_elf_sprintf_vma
+#endif
+#ifndef elf_backend_fprintf_vma
+#define elf_backend_fprintf_vma _bfd_elf_fprintf_vma
+#endif
/* Previously, backends could only use SHT_REL or SHT_RELA relocation
sections, but not both. They defined USE_REL to indicate SHT_REL
elf_backend_count_relocs,
elf_backend_grok_prstatus,
elf_backend_grok_psinfo,
+ elf_backend_sprintf_vma,
+ elf_backend_fprintf_vma,
elf_backend_ecoff_debug_swap,
ELF_MACHINE_ALT1,
ELF_MACHINE_ALT2,