/* vms.c -- BFD back-end for VAX (openVMS/VAX) and
EVAX (openVMS/Alpha) files.
- Copyright 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright 1996, 97, 98, 99, 2000 Free Software Foundation, Inc.
Written by Klaus K"ampf (kkaempf@rmi.de)
#include "vms.h"
static boolean vms_initialize PARAMS ((bfd *));
-static int priv_section_count;
+static unsigned int priv_section_count;
static boolean fill_section_ptr PARAMS ((struct bfd_hash_entry *, PTR));
static boolean vms_fixup_sections PARAMS ((bfd *));
static boolean copy_symbols PARAMS ((struct bfd_hash_entry *, PTR));
const bfd_target vms_alpha_vec =
{
-
"vms-alpha", /* name */
bfd_target_evax_flavour,
- false, /* data byte order is little */
- false, /* header byte order is little */
+ BFD_ENDIAN_LITTLE, /* data byte order is little */
+ BFD_ENDIAN_LITTLE, /* header byte order is little */
(HAS_RELOC | HAS_SYMS
| WP_TEXT | D_PAGED), /* object flags */
BFD_JUMP_TABLE_LINK (vms),
BFD_JUMP_TABLE_DYNAMIC (vms),
+ NULL,
+
(PTR) 0
};
const bfd_target vms_vax_vec =
{
-
"vms-vax", /* name */
bfd_target_ovax_flavour,
- false, /* data byte order is little */
- false, /* header byte order is little */
+ BFD_ENDIAN_LITTLE, /* data byte order is little */
+ BFD_ENDIAN_LITTLE, /* header byte order is little */
(HAS_RELOC | HAS_SYMS /* object flags */
| WP_TEXT | D_PAGED
BFD_JUMP_TABLE_LINK (vms),
BFD_JUMP_TABLE_DYNAMIC (vms),
+ NULL,
+
(PTR) 0
};
\f
/* fill forward references (these contain section number, not section ptr). */
- if ((int)sec < priv_section_count)
+ if ((unsigned int) sec < priv_section_count)
{
sec = ((vms_symbol_entry *)entry)->symbol->section =
((asection **)sections)[(int)sec];
vms_fixup_sections (abfd)
bfd *abfd;
{
- asection *s;
-
if (PRIV(fixup_done))
return true;
static const struct bfd_target *
vms_archive_p (abfd)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
{
#if VMS_DEBUG
vms_debug (1, "vms_archive_p(%p)\n", abfd);
{
asection *sec;
vms_section *es, *es1;
- vms_reloc *er, *er1;
int i;
#if VMS_DEBUG
/* Ask the BFD to free all cached information. */
static boolean
vms_bfd_free_cached_info (abfd)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
{
#if VMS_DEBUG
vms_debug (1, "vms_bfd_free_cached_info(%p)\n", abfd);
static boolean
vms_get_section_contents (abfd, section, buf, offset, buf_size)
- bfd *abfd;
- asection *section;
- PTR buf;
- file_ptr offset;
- bfd_size_type buf_size;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asection *section ATTRIBUTE_UNUSED;
+ PTR buf ATTRIBUTE_UNUSED;
+ file_ptr offset ATTRIBUTE_UNUSED;
+ bfd_size_type buf_size ATTRIBUTE_UNUSED;
{
#if VMS_DEBUG
vms_debug (1, "vms_get_section_contents(%p, %s, %p, off %ld, size %d)\n",
static boolean
vms_get_section_contents_in_window (abfd, section, w, offset, count)
- bfd *abfd;
- asection *section;
- bfd_window *w;
- file_ptr offset;
- bfd_size_type count;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asection *section ATTRIBUTE_UNUSED;
+ bfd_window *w ATTRIBUTE_UNUSED;
+ file_ptr offset ATTRIBUTE_UNUSED;
+ bfd_size_type count ATTRIBUTE_UNUSED;
{
#if VMS_DEBUG
vms_debug (1, "vms_get_section_contents_in_window(%p, %s, %p, off %ld, count %d)\n",
static boolean
vms_bfd_copy_private_bfd_data (src, dest)
- bfd *src;
- bfd *dest;
+ bfd *src ATTRIBUTE_UNUSED;
+ bfd *dest ATTRIBUTE_UNUSED;
{
#if VMS_DEBUG
vms_debug (1, "vms_bfd_copy_private_bfd_data(%p, %p)\n", src, dest);
static boolean
vms_bfd_merge_private_bfd_data (ibfd, obfd)
- bfd *ibfd;
- bfd *obfd;
+ bfd *ibfd ATTRIBUTE_UNUSED;
+ bfd *obfd ATTRIBUTE_UNUSED;
{
#if VMS_DEBUG
vms_debug (1,"vms_bfd_merge_private_bfd_data(%p, %p)\n", ibfd, obfd);
static boolean
vms_bfd_set_private_flags (abfd, flags)
- bfd *abfd;
- flagword flags;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ flagword flags ATTRIBUTE_UNUSED;
{
#if VMS_DEBUG
vms_debug (1,"vms_bfd_set_private_flags(%p, %lx)\n", abfd, (long)flags);
static boolean
vms_bfd_copy_private_section_data (srcbfd, srcsec, dstbfd, dstsec)
- bfd *srcbfd;
- asection *srcsec;
- bfd *dstbfd;
- asection *dstsec;
+ bfd *srcbfd ATTRIBUTE_UNUSED;
+ asection *srcsec ATTRIBUTE_UNUSED;
+ bfd *dstbfd ATTRIBUTE_UNUSED;
+ asection *dstsec ATTRIBUTE_UNUSED;
{
#if VMS_DEBUG
vms_debug (1, "vms_bfd_copy_private_section_data(%p, %s, %p, %s)\n",
static boolean
vms_bfd_copy_private_symbol_data (ibfd, isym, obfd, osym)
- bfd *ibfd;
- asymbol *isym;
- bfd *obfd;
- asymbol *osym;
+ bfd *ibfd ATTRIBUTE_UNUSED;
+ asymbol *isym ATTRIBUTE_UNUSED;
+ bfd *obfd ATTRIBUTE_UNUSED;
+ asymbol *osym ATTRIBUTE_UNUSED;
{
#if VMS_DEBUG
vms_debug (1, "vms_bfd_copy_private_symbol_data(%p, %s, %p, %s)\n",
static char *
vms_core_file_failing_command (abfd)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
{
#if VMS_DEBUG
vms_debug (1, "vms_core_file_failing_command(%p)\n", abfd);
static int
vms_core_file_failing_signal (abfd)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
{
#if VMS_DEBUG
vms_debug (1, "vms_core_file_failing_signal(%p)\n", abfd);
static boolean
vms_core_file_matches_executable_p (abfd, bbfd)
- bfd *abfd;
- bfd *bbfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ bfd *bbfd ATTRIBUTE_UNUSED;
{
#if VMS_DEBUG
vms_debug (1, "vms_core_file_matches_executable_p(%p, %p)\n", abfd, bbfd);
static boolean
vms_slurp_armap (abfd)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
{
#if VMS_DEBUG
vms_debug (1, "vms_slurp_armap(%p)\n", abfd);
static boolean
vms_slurp_extended_name_table (abfd)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
{
#if VMS_DEBUG
vms_debug (1, "vms_slurp_extended_name_table(%p)\n", abfd);
static boolean
vms_construct_extended_name_table (abfd, tabloc, tablen, name)
- bfd *abfd;
- char **tabloc;
- bfd_size_type *tablen;
- const char **name;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ char **tabloc ATTRIBUTE_UNUSED;
+ bfd_size_type *tablen ATTRIBUTE_UNUSED;
+ const char **name ATTRIBUTE_UNUSED;
{
#if VMS_DEBUG
vms_debug (1, "vms_construct_extended_name_table(%p)\n", abfd);
static void
vms_truncate_arname (abfd, pathname, arhdr)
- bfd *abfd;
- CONST char *pathname;
- char *arhdr;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ CONST char *pathname ATTRIBUTE_UNUSED;
+ char *arhdr ATTRIBUTE_UNUSED;
{
#if VMS_DEBUG
vms_debug (1, "vms_truncate_arname(%p, %s, %s)\n", abfd, pathname, arhdr);
static boolean
vms_write_armap (arch, elength, map, orl_count, stridx)
- bfd *arch;
- unsigned int elength;
- struct orl *map;
- unsigned int orl_count;
- int stridx;
+ bfd *arch ATTRIBUTE_UNUSED;
+ unsigned int elength ATTRIBUTE_UNUSED;
+ struct orl *map ATTRIBUTE_UNUSED;
+ unsigned int orl_count ATTRIBUTE_UNUSED;
+ int stridx ATTRIBUTE_UNUSED;
{
#if VMS_DEBUG
vms_debug (1, "vms_write_armap(%p, %d, %p, %d %d)\n",
static PTR
vms_read_ar_hdr (abfd)
- bfd * abfd;
+ bfd * abfd ATTRIBUTE_UNUSED;
{
#if VMS_DEBUG
vms_debug (1, "vms_read_ar_hdr(%p)\n", abfd);
static bfd *
vms_openr_next_archived_file (arch, prev)
- bfd *arch;
- bfd *prev;
+ bfd *arch ATTRIBUTE_UNUSED;
+ bfd *prev ATTRIBUTE_UNUSED;
{
#if VMS_DEBUG
vms_debug (1, "vms_openr_next_archived_file(%p, %p)\n", arch, prev);
#endif
- return false;
+ return NULL;
}
static boolean
vms_update_armap_timestamp (abfd)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
{
#if VMS_DEBUG
vms_debug (1, "vms_update_armap_timestamp(%p)\n", abfd);
static void
vms_print_symbol (abfd, file, symbol, how)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
PTR file;
asymbol *symbol;
bfd_print_symbol_type how;
static void
vms_get_symbol_info (abfd, symbol, ret)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
asymbol *symbol;
symbol_info *ret;
{
static boolean
vms_bfd_is_local_label_name (abfd, name)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
const char *name;
{
#if VMS_DEBUG
static alent *
vms_get_lineno (abfd, symbol)
- bfd *abfd;
- asymbol *symbol;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asymbol *symbol ATTRIBUTE_UNUSED;
{
#if VMS_DEBUG
vms_debug (1, "vms_get_lineno(%p, %p)\n", abfd, symbol);
static boolean
vms_find_nearest_line (abfd, section, symbols, offset, file, func, line)
- bfd *abfd;
- asection *section;
- asymbol **symbols;
- bfd_vma offset;
- CONST char **file;
- CONST char **func;
- unsigned int *line;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asection *section ATTRIBUTE_UNUSED;
+ asymbol **symbols ATTRIBUTE_UNUSED;
+ bfd_vma offset ATTRIBUTE_UNUSED;
+ CONST char **file ATTRIBUTE_UNUSED;
+ CONST char **func ATTRIBUTE_UNUSED;
+ unsigned int *line ATTRIBUTE_UNUSED;
{
#if VMS_DEBUG
vms_debug (1, "vms_find_nearest_line(%p, %s, %p, %ld, <ret>, <ret>, <ret>)\n",
static asymbol *
vms_bfd_make_debug_symbol (abfd, ptr, size)
- bfd *abfd;
- void *ptr;
- unsigned long size;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ void *ptr ATTRIBUTE_UNUSED;
+ unsigned long size ATTRIBUTE_UNUSED;
{
#if VMS_DEBUG
vms_debug (1, "vms_bfd_make_debug_symbol(%p, %p, %ld)\n", abfd, ptr, size);
static long
vms_get_reloc_upper_bound (abfd, section)
- bfd *abfd;
- asection *section;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asection *section ATTRIBUTE_UNUSED;
{
#if VMS_DEBUG
vms_debug (1, "vms_get_reloc_upper_bound(%p, %s)\n", abfd, section->name);
static long
vms_canonicalize_reloc (abfd, section, location, symbols)
- bfd *abfd;
- asection *section;
- arelent **location;
- asymbol **symbols;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asection *section ATTRIBUTE_UNUSED;
+ arelent **location ATTRIBUTE_UNUSED;
+ asymbol **symbols ATTRIBUTE_UNUSED;
{
#if VMS_DEBUG
vms_debug (1, "vms_canonicalize_reloc(%p, %s, <ret>, <ret>)\n", abfd, section->name);
static bfd_reloc_status_type
reloc_nil (abfd, reloc, sym, data, sec, output_bfd, error_message)
- bfd *abfd;
- arelent *reloc;
- asymbol *sym;
- PTR data;
- asection *sec;
- bfd *output_bfd;
- char **error_message;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ arelent *reloc ATTRIBUTE_UNUSED;
+ asymbol *sym ATTRIBUTE_UNUSED;
+ PTR data ATTRIBUTE_UNUSED;
+ asection *sec ATTRIBUTE_UNUSED;
+ bfd *output_bfd ATTRIBUTE_UNUSED;
+ char **error_message ATTRIBUTE_UNUSED;
{
#if VMS_DEBUG
vms_debug (1, "reloc_nil(abfd %p, output_bfd %p)\n", abfd, output_bfd);
static const struct reloc_howto_struct *
vms_bfd_reloc_type_lookup (abfd, code)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
bfd_reloc_code_real_type code;
{
int alpha_type;
static boolean
vms_set_arch_mach (abfd, arch, mach)
bfd *abfd;
- enum bfd_architecture arch;
- unsigned long mach;
+ enum bfd_architecture arch ATTRIBUTE_UNUSED;
+ unsigned long mach ATTRIBUTE_UNUSED;
{
#if VMS_DEBUG
vms_debug (1, "vms_set_arch_mach(%p, %d, %ld)\n", abfd, arch, mach);
static int
vms_sizeof_headers (abfd, reloc)
- bfd *abfd;
- boolean reloc;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ boolean reloc ATTRIBUTE_UNUSED;
{
#if VMS_DEBUG
vms_debug (1, "vms_sizeof_headers(%p, %s)\n", abfd, (reloc)?"True":"False");
static bfd_byte *
vms_bfd_get_relocated_section_contents (abfd, link_info, link_order, data,
relocateable, symbols)
- bfd *abfd;
- struct bfd_link_info *link_info;
- struct bfd_link_order *link_order;
- bfd_byte *data;
- boolean relocateable;
- asymbol **symbols;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ struct bfd_link_info *link_info ATTRIBUTE_UNUSED;
+ struct bfd_link_order *link_order ATTRIBUTE_UNUSED;
+ bfd_byte *data ATTRIBUTE_UNUSED;
+ boolean relocateable ATTRIBUTE_UNUSED;
+ asymbol **symbols ATTRIBUTE_UNUSED;
{
#if VMS_DEBUG
vms_debug (1, "vms_bfd_get_relocated_section_contents(%p, %p, %p, %p, %s, %p)\n",
static boolean
vms_bfd_relax_section (abfd, section, link_info, again)
- bfd *abfd;
- asection *section;
- struct bfd_link_info *link_info;
- boolean *again;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asection *section ATTRIBUTE_UNUSED;
+ struct bfd_link_info *link_info ATTRIBUTE_UNUSED;
+ boolean *again ATTRIBUTE_UNUSED;
{
#if VMS_DEBUG
vms_debug (1, "vms_bfd_relax_section(%p, %s, %p, <ret>)\n",
static boolean
vms_bfd_gc_sections (abfd, link_info)
- bfd *abfd;
- struct bfd_link_info *link_info;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ struct bfd_link_info *link_info ATTRIBUTE_UNUSED;
{
#if VMS_DEBUG
vms_debug (1, "vms_bfd_gc_sections(%p, %p)\n", abfd, link_info);
static struct bfd_link_hash_table *
vms_bfd_link_hash_table_create (abfd)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
{
#if VMS_DEBUG
vms_debug (1, "vms_bfd_link_hash_table_create(%p)\n", abfd);
static boolean
vms_bfd_link_add_symbols (abfd, link_info)
- bfd *abfd;
- struct bfd_link_info *link_info;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ struct bfd_link_info *link_info ATTRIBUTE_UNUSED;
{
#if VMS_DEBUG
vms_debug (1, "vms_bfd_link_add_symbols(%p, %p)\n", abfd, link_info);
static boolean
vms_bfd_final_link (abfd, link_info)
- bfd *abfd;
- struct bfd_link_info *link_info;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ struct bfd_link_info *link_info ATTRIBUTE_UNUSED;
{
#if VMS_DEBUG
vms_debug (1, "vms_bfd_final_link(%p, %p)\n", abfd, link_info);
static boolean
vms_bfd_link_split_section (abfd, section)
- bfd *abfd;
- asection *section;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asection *section ATTRIBUTE_UNUSED;
{
#if VMS_DEBUG
vms_debug (1, "vms_bfd_link_split_section(%p, %s)\n", abfd, section->name);
static long
vms_get_dynamic_symtab_upper_bound (abfd)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
{
#if VMS_DEBUG
vms_debug (1, "vms_get_dynamic_symtab_upper_bound(%p)\n", abfd);
static boolean
vms_bfd_print_private_bfd_data (abfd, file)
- bfd *abfd;
- void *file;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ void *file ATTRIBUTE_UNUSED;
{
#if VMS_DEBUG
vms_debug (1, "vms_bfd_print_private_bfd_data(%p)\n", abfd);
static long
vms_canonicalize_dynamic_symtab (abfd, symbols)
- bfd *abfd;
- asymbol **symbols;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asymbol **symbols ATTRIBUTE_UNUSED;
{
#if VMS_DEBUG
vms_debug (1, "vms_canonicalize_dynamic_symtab(%p, <ret>)\n", abfd);
static long
vms_get_dynamic_reloc_upper_bound (abfd)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
{
#if VMS_DEBUG
vms_debug (1, "vms_get_dynamic_reloc_upper_bound(%p)\n", abfd);
static long
vms_canonicalize_dynamic_reloc (abfd, arel, symbols)
- bfd *abfd;
- arelent **arel;
- asymbol **symbols;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ arelent **arel ATTRIBUTE_UNUSED;
+ asymbol **symbols ATTRIBUTE_UNUSED;
{
#if VMS_DEBUG
vms_debug (1, "vms_canonicalize_dynamic_reloc(%p)\n", abfd);