certain operations */
boolean
-_bfd_dummy_new_section_hook (ignore, ignore_newsect)
- bfd *ignore;
- asection *ignore_newsect;
+DEFUN(_bfd_dummy_new_section_hook,(ignore, ignore_newsect),
+ bfd *ignore AND
+ asection *ignore_newsect)
{
return true;
}
boolean
-bfd_false (ignore)
- bfd *ignore;
+DEFUN(bfd_false ,(ignore),
+ bfd *ignore)
{
return false;
}
boolean
-bfd_true (ignore)
- bfd *ignore;
+DEFUN(bfd_true,(ignore),
+ bfd *ignore)
{
return true;
}
PTR
-bfd_nullvoidptr(ignore)
-bfd *ignore;
+DEFUN(bfd_nullvoidptr,(ignore),
+ bfd *ignore)
{
return (PTR)NULL;
}
int
-bfd_0(ignore)
-bfd *ignore;
+DEFUN(bfd_0,(ignore),
+ bfd *ignore)
{
return 0;
}
unsigned int
-bfd_0u(ignore)
-bfd *ignore;
+DEFUN(bfd_0u,(ignore),
+ bfd *ignore)
{
return 0;
}
void
-bfd_void(ignore)
-bfd *ignore;
+DEFUN(bfd_void,(ignore),
+ bfd *ignore)
{
}
boolean
-_bfd_dummy_core_file_matches_executable_p (ignore_core_bfd, ignore_exec_bfd)
- bfd *ignore_core_bfd;
-bfd *ignore_exec_bfd;
+DEFUN(_bfd_dummy_core_file_matches_executable_p,(ignore_core_bfd, ignore_exec_bfd),
+ bfd *ignore_core_bfd AND
+ bfd *ignore_exec_bfd)
{
bfd_error = invalid_operation;
return false;
/* of course you can't initialize a function to be the same as another, grr */
char *
-_bfd_dummy_core_file_failing_command (ignore_abfd)
- bfd *ignore_abfd;
+DEFUN(_bfd_dummy_core_file_failing_commandl(ignore_abfd),
+ bfd *ignore_abfd)
{
return (char *)NULL;
}
int
-_bfd_dummy_core_file_failing_signal (ignore_abfd)
- bfd *ignore_abfd;
+DEFUN(_bfd_dummy_core_file_failing_signal,(ignore_abfd),
+ bfd *ignore_abfd)
{
return 0;
}
bfd_target *
-_bfd_dummy_target (ignore_abfd)
- bfd *ignore_abfd;
+DEFUN(_bfd_dummy_target,(ignore_abfd),
+ bfd *ignore_abfd)
{
return 0;
}
#ifndef zalloc
char *
-zalloc (size)
- bfd_size_type size;
+DEFUN(zalloc,(size),
+ bfd_size_type size)
{
char *ptr = (char *) malloc ((int)size);
}
long
-bfd_tell (abfd)
- bfd *abfd;
+DEFUN(bfd_tell,(abfd),
+ bfd *abfd)
{
file_ptr ptr;
table_length). Updates free_ptr, table, table_length */
boolean
-bfd_add_to_string_table (table, new_string, table_length, free_ptr)
- char **table, **free_ptr;
- char *new_string;
- unsigned int *table_length;
+DEFUN(bfd_add_to_string_table,(table, new_string, table_length, free_ptr),
+ char **table AND
+ char **free_ptr AND
+ char *new_string AND
+ unsigned int *table_length)
{
size_t string_length = strlen (new_string) + 1; /* include null here */
char *base = *table;
Gprof them later and find out. */
unsigned int
-_do_getb16 (addr)
- register bfd_byte *addr;
+DEFUN(_do_getb16,(addr),
+ register bfd_byte *addr)
{
return (addr[0] << 8) | addr[1];
}
unsigned int
-_do_getl16 (addr)
- register bfd_byte *addr;
+DEFUN(_do_getl16,(addr),
+ register bfd_byte *addr)
{
return (addr[1] << 8) | addr[0];
}
void
-_do_putb16 (data, addr)
- int data; /* Actually short, but ansi C sucks */
- register bfd_byte *addr;
+DEFUN(_do_putb16,(data, addr),
+ int data AND
+ register bfd_byte *addr)
{
addr[0] = (bfd_byte)(data >> 8);
addr[1] = (bfd_byte )data;
}
void
-_do_putl16 (data, addr)
- int data; /* Actually short, but ansi C sucks */
- register bfd_byte *addr;
+DEFUN(_do_putl16,(data, addr),
+ int data AND
+ register bfd_byte *addr)
{
addr[0] = (bfd_byte )data;
addr[1] = (bfd_byte)(data >> 8);
}
unsigned int
-_do_getb32 (addr)
- register bfd_byte *addr;
+DEFUN(_do_getb32,(addr),
+ register bfd_byte *addr)
{
return ((((addr[0] << 8) | addr[1]) << 8) | addr[2]) << 8 | addr[3];
}
}
bfd_64_type
-_do_getb64(addr)
- register bfd_byte *addr;
+DEFUN(_do_getb64,(addr),
+ register bfd_byte *addr)
{
+#ifdef HOST_64_BIT
bfd_64_type low, high;
-#ifdef __GNUC__
+
high= ((((((((addr[0]) << 8) |
addr[1]) << 8) |
addr[2]) << 8) |
}
bfd_64_type
-_do_getl64 (addr)
- register bfd_byte *addr;
+DEFUN(do_getl64,(addr),
+ register bfd_byte *addr)
{
bfd_64_type low, high;
-#ifdef __GNUC__
+#ifdef HOST_64_BIT
high= (((((((addr[7] << 8) |
addr[6]) << 8) |
addr[5]) << 8) |
}
void
-_do_putb32 (data, addr)
- unsigned long data;
- register bfd_byte *addr;
+DEFUN(_do_putb32,(data, addr),
+ unsigned long data AND
+ register bfd_byte *addr)
{
addr[0] = (bfd_byte)(data >> 24);
addr[1] = (bfd_byte)(data >> 16);
}
void
-_do_putl32 (data, addr)
- unsigned long data;
- register bfd_byte *addr;
+DEFUN(_do_putl32,(data, addr),
+ unsigned long data AND
+ register bfd_byte *addr)
{
addr[0] = (bfd_byte)data;
addr[1] = (bfd_byte)(data >> 8);
addr[3] = (bfd_byte)(data >> 24);
}
void
-_do_putb64 (data, addr)
- bfd_64_type data;
- register bfd_byte *addr;
+DEFUN(_do_putb64,(data, addr),
+ bfd_64_type data AND
+ register bfd_byte *addr)
{
-#ifdef __GNUC__
- addr[0] = (bfd_byte)(data >> (7*8));
- addr[1] = (bfd_byte)(data >> (6*8));
- addr[2] = (bfd_byte)(data >> (5*8));
- addr[3] = (bfd_byte)(data >> (4*8));
- addr[4] = (bfd_byte)(data >> (3*8));
- addr[5] = (bfd_byte)(data >> (2*8));
- addr[6] = (bfd_byte)(data >> (1*8));
- addr[7] = (bfd_byte)(data >> (0*8));
+#ifdef HOST_64_BIT
+ addr[0] = (bfd_byte)(data >> (7*8));
+ addr[1] = (bfd_byte)(data >> (6*8));
+ addr[2] = (bfd_byte)(data >> (5*8));
+ addr[3] = (bfd_byte)(data >> (4*8));
+ addr[4] = (bfd_byte)(data >> (3*8));
+ addr[5] = (bfd_byte)(data >> (2*8));
+ addr[6] = (bfd_byte)(data >> (1*8));
+ addr[7] = (bfd_byte)(data >> (0*8));
#else
-BFD_FAIL();
+ BFD_FAIL();
#endif
}
void
-_do_putl64 (data, addr)
- bfd_64_type data;
- register bfd_byte *addr;
+DEFUN(_do_putl64,(data, addr),
+ bfd_64_type data AND
+ register bfd_byte *addr)
{
-#ifdef __GNUC__
- addr[7] = (bfd_byte)(data >> (7*8));
- addr[6] = (bfd_byte)(data >> (6*8));
- addr[5] = (bfd_byte)(data >> (5*8));
- addr[4] = (bfd_byte)(data >> (4*8));
- addr[3] = (bfd_byte)(data >> (3*8));
- addr[2] = (bfd_byte)(data >> (2*8));
- addr[1] = (bfd_byte)(data >> (1*8));
- addr[0] = (bfd_byte)(data >> (0*8));
+#ifdef HOST_64_BIT
+ addr[7] = (bfd_byte)(data >> (7*8));
+ addr[6] = (bfd_byte)(data >> (6*8));
+ addr[5] = (bfd_byte)(data >> (5*8));
+ addr[4] = (bfd_byte)(data >> (4*8));
+ addr[3] = (bfd_byte)(data >> (3*8));
+ addr[2] = (bfd_byte)(data >> (2*8));
+ addr[1] = (bfd_byte)(data >> (1*8));
+ addr[0] = (bfd_byte)(data >> (0*8));
#else
- BFD_FAIL();
+ BFD_FAIL();
#endif
}