* m68klinux.c: Fix formatting.
* m68knetbsd.c: Likewise.
* mipsbsd.c: Likewise.
* netbsd-core.c: Likewise.
* netbsd.h: Likewise.
* newsos3.c: Likewise.
* nlm32-alpha.c: Likewise.
* nlm32-i386.c: Likewise.
* nlm32-ppc.c: Likewise.
* nlm32-sparc.c: Likewise.
* nlmcode.h: Likewise.
* nlmswap.h: Likewise.
* nlm-target.h: Likewise.
* ns32knetbsd.c: Likewise.
+2000-12-12 Kazu Hirata <kazu@hxi.com>
+
+ * m68klinux.c: Fix formatting.
+ * m68knetbsd.c: Likewise.
+ * mipsbsd.c: Likewise.
+ * netbsd-core.c: Likewise.
+ * netbsd.h: Likewise.
+ * newsos3.c: Likewise.
+ * nlm32-alpha.c: Likewise.
+ * nlm32-i386.c: Likewise.
+ * nlm32-ppc.c: Likewise.
+ * nlm32-sparc.c: Likewise.
+ * nlmcode.h: Likewise.
+ * nlmswap.h: Likewise.
+ * nlm-target.h: Likewise.
+ * ns32knetbsd.c: Likewise.
+
2000-12-10 Fred Fish <fnf@be.com>
* elflink.h (elf_link_output_extsym): Don't complain about undefined
(h->root.root.root.string
+ sizeof PLT_REF_PREFIX - 1),
false, false, true);
- /* h2 does not follow indirect symbols. */
- h2 = linux_link_hash_lookup (linux_hash_table (info),
+ /* h2 does not follow indirect symbols. */
+ h2 = linux_link_hash_lookup (linux_hash_table (info),
(h->root.root.root.string
+ sizeof PLT_REF_PREFIX - 1),
false, false, false);
}
/* Quick and dirty way of stripping these symbols from the
- symtab. */
+ symtab. */
if (bfd_is_abs_section (h->root.root.u.def.section))
h->root.written = true;
}
if (output_bfd->xvec != &MY(vec))
return true;
- /* First find the fixups... */
+ /* First find the fixups... */
linux_link_hash_traverse (linux_hash_table (info),
linux_tally_symbols,
(PTR) info);
fixups_written = 0;
#ifdef LINUX_LINK_DEBUG
- printf ("Fixup table file offset: %x VMA: %x\n",
+ printf ("Fixup table file offset: %x VMA: %x\n",
os->filepos + s->output_offset,
os->vma + s->output_offset);
#endif
}
}
- h = linux_link_hash_lookup (linux_hash_table (info),
+ h = linux_link_hash_lookup (linux_hash_table (info),
"__BUILTIN_FIXUPS__",
false, false, false);
#define TARGET_IS_BIG_ENDIAN_P
/* Our m68k ports use either 4K or 8K pages, but object files always
- assume 8K page alignment so they will work on all m68k machines. */
+ assume 8K page alignment so they will work on all m68k machines. */
#define TARGET_PAGE_SIZE 0x2000
#define DEFAULT_ARCH bfd_arch_m68k
#include "libaout.h"
#define SET_ARCH_MACH(ABFD, EXEC) \
- MY(set_arch_mach)(ABFD, N_MACHTYPE (EXEC)); \
- MY(choose_reloc_size)(ABFD);
+ MY(set_arch_mach) (ABFD, N_MACHTYPE (EXEC)); \
+ MY(choose_reloc_size) (ABFD);
static void MY(set_arch_mach) PARAMS ((bfd *abfd, int machtype));
static void MY(choose_reloc_size) PARAMS ((bfd *abfd));
enum bfd_architecture arch;
long machine;
- /* Determine the architecture and machine type of the object file. */
+ /* Determine the architecture and machine type of the object file. */
switch (machtype) {
case M_MIPS1:
machine = 0;
break;
}
- bfd_set_arch_mach(abfd, arch, machine);
+ bfd_set_arch_mach(abfd, arch, machine);
}
/* Determine the size of a relocation entry, based on the architecture */
N_SET_MACHTYPE(*execp, M_UNKNOWN);
}
- MY(choose_reloc_size)(abfd);
+ MY(choose_reloc_size) (abfd);
WRITE_HEADERS(abfd, execp);
bfd *output_bfd;
{
bfd_vma relocation, pc;
-
- /* If this is a partial relocation, just continue. */
+
+ /* If this is a partial relocation, just continue. */
if (output_bfd != (bfd *)NULL)
return bfd_reloc_continue;
&& (symbol->flags & BSF_WEAK) == 0)
return bfd_reloc_undefined;
- /*
+ /*
* Work out which section the relocation is targetted at and the
* initial relocation command value.
*/
char **error_message ATTRIBUTE_UNUSED;
{
bfd_vma relocation;
-
- /* If this is a partial relocation, just continue. */
+
+ /* If this is a partial relocation, just continue. */
if (output_bfd != (bfd *)NULL)
return bfd_reloc_continue;
&& (symbol->flags & BSF_WEAK) == 0)
return bfd_reloc_undefined;
- /*
+ /*
* Work out which section the relocation is targetted at and the
* initial relocation command value.
*/
* own mapping of external reloc type values to howto entries.
*/
long
-MY(canonicalize_reloc)(abfd, section, relptr, symbols)
+MY(canonicalize_reloc) (abfd, section, relptr, symbols)
bfd *abfd;
sec_ptr section;
arelent **relptr;
unsigned int count, c;
extern reloc_howto_type NAME(aout,ext_howto_table)[];
- /* If we have already read in the relocation table, return the values. */
+ /* If we have already read in the relocation table, return the values. */
if (section->flags & SEC_CONSTRUCTOR) {
arelent_chain *chain = section->constructor_chain;
return section->reloc_count;
}
if (tblptr && section->reloc_count) {
- for (count = 0; count++ < section->reloc_count;)
+ for (count = 0; count++ < section->reloc_count;)
*relptr++ = tblptr++;
*relptr = 0;
return section->reloc_count;
}
- if (!NAME(aout,slurp_reloc_table)(abfd, section, symbols))
+ if (!NAME(aout,slurp_reloc_table) (abfd, section, symbols))
return -1;
tblptr = section->relocation;
/* fix up howto entries */
- for (count = 0; count++ < section->reloc_count;)
+ for (count = 0; count++ < section->reloc_count;)
{
c = tblptr->howto - NAME(aout,ext_howto_table);
tblptr->howto = &mips_howto_table_ext[c];
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
& aout_mips_big_vec,
-
+
(PTR) MY_backend_data
};
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
& aout_mips_little_vec,
-
+
(PTR) MY_backend_data
};
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfd.h"
#include "sysdep.h"
#include <sys/core.h>
/*
- * FIXME: On NetBSD/sparc CORE_FPU_OFFSET should be (sizeof(struct trapframe))
+ * FIXME: On NetBSD/sparc CORE_FPU_OFFSET should be (sizeof (struct trapframe))
*/
struct netbsd_core_struct {
offset += core.c_seghdrsize;
- asect = (asection *) bfd_zalloc (abfd, sizeof(asection));
+ asect = (asection *) bfd_zalloc (abfd, sizeof (asection));
if (asect == NULL) {
bfd_set_error(bfd_error_no_memory);
goto punt;
asect->name = ".reg";
asect->flags = SEC_ALLOC + SEC_HAS_CONTENTS;
#ifdef CORE_FPU_OFFSET
- /* Hackish... */
+ /* Hackish... */
asect->_raw_size = CORE_FPU_OFFSET;
asect2 = (asection *)bfd_zalloc (abfd,
sizeof (asection));
\f
/* If somebody calls any byte-swapping routines, shoot them. */
static void
-swap_abort()
+swap_abort ()
{
- abort(); /* This way doesn't require any declaration for ANSI to fuck up */
+ abort (); /* This way doesn't require any declaration for ANSI to fuck up */
}
#define NO_GET ((bfd_vma (*) PARAMS (( const bfd_byte *))) swap_abort )
#define NO_PUT ((void (*) PARAMS ((bfd_vma, bfd_byte *))) swap_abort )
bfd_false, bfd_false,
bfd_false, bfd_false
},
-
+
BFD_JUMP_TABLE_GENERIC (_bfd_generic),
BFD_JUMP_TABLE_COPY (_bfd_generic),
BFD_JUMP_TABLE_CORE (netbsd),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
NULL,
-
+
(PTR) 0 /* backend_data */
};
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA. */
-/* Check for our machine type (part of magic number). */
+/* Check for our machine type (part of magic number). */
#ifndef MACHTYPE_OK
#define MACHTYPE_OK(m) ((m) == DEFAULT_MID || (m) == M_UNKNOWN)
#endif
-/* This is the normal load address for executables. */
+/* This is the normal load address for executables. */
#define TEXT_START_ADDR TARGET_PAGE_SIZE
/* NetBSD ZMAGIC has its header in the text segment. */
#define N_HEADER_IN_TEXT(x) 1
-/* Determine if this is a shared library using the flags. */
+/* Determine if this is a shared library using the flags. */
#define N_SHARED_LIB(x) (N_DYNAMIC(x))
/* We have 6 bits of flags and 10 bits of machine ID. */
#define N_MACHTYPE(exec) \
- ((enum machine_type)(((exec).a_info >> 16) & 0x03ff))
+ ((enum machine_type) (((exec).a_info >> 16) & 0x03ff))
#define N_FLAGS(exec) \
(((exec).a_info >> 26) & 0x3f)
#define N_SET_INFO(exec, magic, type, flags) \
((exec).a_info = ((magic) & 0xffff) \
- | (((int)(type) & 0x3ff) << 16) \
+ | (((int) (type) & 0x3ff) << 16) \
| (((flags) & 0x3f) << 24))
#define N_SET_MACHTYPE(exec, machtype) \
((exec).a_info = \
- ((exec).a_info & 0xfb00ffff) | ((((int)(machtype))&0x3ff) << 16))
+ ((exec).a_info & 0xfb00ffff) | ((((int) (machtype))&0x3ff) << 16))
#define N_SET_FLAGS(exec, flags) \
((exec).a_info = \
((exec).a_info & 0x03ffffff) | ((flags & 0x03f) << 26))
#define MY(OP) CAT(newsos3_,OP)
#define TARGETNAME "a.out-newsos3"
#define ENTRY_CAN_BE_ZERO
-#define N_SHARED_LIB(x) 0 /* Avoids warning when compiled with -Wall. */
+#define N_SHARED_LIB(x) 0 /* Avoids warning when compiled with -Wall. */
#define DEFAULT_ARCH bfd_arch_m68k
#define TARGET_IS_BIG_ENDIAN_P
#define N_HEADER_IN_TEXT(x) 0
/* object_flags: mask of all file flags */
(HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS
| WP_TEXT),
-
+
/* section_flags: mask of all section flags */
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY |
- SEC_CODE | SEC_DATA),
+ SEC_CODE | SEC_DATA),
/* leading_symbol_char: is the first char of a user symbol
predictable, and if so what is it */
#else
NULL,
#endif
-
+
/* backend_data: */
(PTR) TARGET_BACKEND_DATA
};
/* object_flags: mask of all file flags */
(HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS
| WP_TEXT),
-
+
/* section_flags: mask of all section flags */
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY |
- SEC_DATA),
+ SEC_DATA),
/* leading_symbol_char: is the first char of a user symbol
predictable, and if so what is it */
#else
NULL,
#endif
-
+
/* backend_data: */
(PTR) TARGET_BACKEND_DATA
};
while (sym -> rcnt < rcount)
{
asection *section;
-
+
if (nlm_alpha_read_reloc (abfd, sym, §ion,
&nlm_relocs -> reloc)
== false)
arelent r;
len = strlen (sym->name);
- if ((bfd_write (&len, sizeof (bfd_byte), 1, abfd) != sizeof(bfd_byte))
+ if ((bfd_write (&len, sizeof (bfd_byte), 1, abfd) != sizeof (bfd_byte))
|| bfd_write (sym->name, len, 1, abfd) != len)
return false;
}
}
}
-
+
bfd_put_32 (abfd, val, temp);
if (bfd_write (temp, sizeof (temp), 1, abfd) != sizeof (temp))
return false;
while (sym -> rcnt < rcount)
{
asection *section;
-
+
if (nlm_i386_read_reloc (abfd, sym, §ion,
&nlm_relocs -> reloc)
== false)
unsigned char temp[NLM_TARGET_LONG_SIZE];
len = strlen (sym->name);
- if ((bfd_write (&len, sizeof (bfd_byte), 1, abfd) != sizeof(bfd_byte))
+ if ((bfd_write (&len, sizeof (bfd_byte), 1, abfd) != sizeof (bfd_byte))
|| bfd_write (sym->name, len, 1, abfd) != len)
return false;
bfd_put_32 (abfd, count, temp);
- if (bfd_write (temp, sizeof(temp), 1, abfd) != sizeof (temp))
+ if (bfd_write (temp, sizeof (temp), 1, abfd) != sizeof (temp))
return false;
for (i = 0; i < count; i++)
static reloc_howto_type nlm_powerpc_howto_table[] =
{
/* Standard 32 bit relocation. */
- HOWTO (0, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_POS", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
+ 0, /* special_function */
+ "R_POS", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
false), /* pcrel_offset */
/* 32 bit relocation, but store negative value. */
- HOWTO (1, /* type */
- 0, /* rightshift */
- -2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (1, /* type */
+ 0, /* rightshift */
+ -2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_NEG", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
+ 0, /* special_function */
+ "R_NEG", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
false), /* pcrel_offset */
/* 32 bit PC relative relocation. */
- HOWTO (2, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- true, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (2, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- 0, /* special_function */
- "R_REL", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
+ 0, /* special_function */
+ "R_REL", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* 16 bit TOC relative relocation. */
- HOWTO (3, /* type */
- 0, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (3, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- 0, /* special_function */
- "R_TOC", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0, /* special_function */
+ "R_TOC", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* I don't really know what this is. */
- HOWTO (4, /* type */
- 1, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (4, /* type */
+ 1, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_RTB", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
+ 0, /* special_function */
+ "R_RTB", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* External TOC relative symbol. */
- HOWTO (5, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (5, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_GL", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0, /* special_function */
+ "R_GL", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* Local TOC relative symbol. */
- HOWTO (6, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (6, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_TCL", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0, /* special_function */
+ "R_TCL", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
-
+
{ 7 },
-
+
/* Non modifiable absolute branch. */
- HOWTO (8, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 26, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (8, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 26, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_BA", /* name */
- true, /* partial_inplace */
- 0x3fffffc, /* src_mask */
- 0x3fffffc, /* dst_mask */
+ 0, /* special_function */
+ "R_BA", /* name */
+ true, /* partial_inplace */
+ 0x3fffffc, /* src_mask */
+ 0x3fffffc, /* dst_mask */
false), /* pcrel_offset */
-
+
{ 9 },
/* Non modifiable relative branch. */
- HOWTO (0xa, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 26, /* bitsize */
- true, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0xa, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 26, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- 0, /* special_function */
- "R_BR", /* name */
- true, /* partial_inplace */
- 0x3fffffc, /* src_mask */
- 0x3fffffc, /* dst_mask */
+ 0, /* special_function */
+ "R_BR", /* name */
+ true, /* partial_inplace */
+ 0x3fffffc, /* src_mask */
+ 0x3fffffc, /* dst_mask */
false), /* pcrel_offset */
-
+
{ 0xb },
/* Indirect load. */
- HOWTO (0xc, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0xc, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_RL", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0, /* special_function */
+ "R_RL", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* Load address. */
- HOWTO (0xd, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0xd, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_RLA", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0, /* special_function */
+ "R_RLA", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
-
+
{ 0xe },
-
+
/* Non-relocating reference. */
- HOWTO (0xf, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0xf, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_REF", /* name */
- false, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
+ 0, /* special_function */
+ "R_REF", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
false), /* pcrel_offset */
-
+
{ 0x10 },
{ 0x11 },
-
+
/* TOC relative indirect load. */
- HOWTO (0x12, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0x12, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_TRL", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0, /* special_function */
+ "R_TRL", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* TOC relative load address. */
- HOWTO (0x13, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0x13, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_TRLA", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0, /* special_function */
+ "R_TRLA", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* Modifiable relative branch. */
- HOWTO (0x14, /* type */
- 1, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0x14, /* type */
+ 1, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_RRTBI", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
+ 0, /* special_function */
+ "R_RRTBI", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* Modifiable absolute branch. */
- HOWTO (0x15, /* type */
- 1, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0x15, /* type */
+ 1, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_RRTBA", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
+ 0, /* special_function */
+ "R_RRTBA", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* Modifiable call absolute indirect. */
- HOWTO (0x16, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0x16, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_CAI", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0, /* special_function */
+ "R_CAI", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* Modifiable call relative. */
- HOWTO (0x17, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0x17, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_REL", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0, /* special_function */
+ "R_REL", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* Modifiable branch absolute. */
- HOWTO (0x18, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0x18, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_RBA", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0, /* special_function */
+ "R_RBA", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* Modifiable branch absolute. */
- HOWTO (0x19, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0x19, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_RBAC", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0, /* special_function */
+ "R_RBAC", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* Modifiable branch relative. */
- HOWTO (0x1a, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 26, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0x1a, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 26, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- 0, /* special_function */
- "R_REL", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0, /* special_function */
+ "R_REL", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* Modifiable branch absolute. */
- HOWTO (0x1b, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (0x1b, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_REL", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0, /* special_function */
+ "R_REL", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
false) /* pcrel_offset */
};
while (sym -> rcnt < rcount)
{
asection *section;
-
+
if (nlm_powerpc_read_reloc (abfd, sym, §ion,
&nlm_relocs -> reloc)
== false)
val -= nlm_get_text_low (abfd);
val |= NLM_HIBIT;
}
-
+
if (! bfd_is_und_section (bfd_get_section (sym)))
{
/* This is an internal relocation fixup. The second most
#endif
len = strlen (sym->name);
- if ((bfd_write (&len, sizeof (bfd_byte), 1, abfd) != sizeof(bfd_byte))
+ if ((bfd_write (&len, sizeof (bfd_byte), 1, abfd) != sizeof (bfd_byte))
|| bfd_write (sym->name, len, 1, abfd) != len)
return false;
bfd_put_32 (abfd, count, temp);
- if (bfd_write (temp, sizeof(temp), 1, abfd) != sizeof (temp))
+ if (bfd_write (temp, sizeof (temp), 1, abfd) != sizeof (temp))
return false;
for (i = 0; i < count; i++)
enum reloc_type
{
R_SPARC_NONE = 0,
- R_SPARC_8, R_SPARC_16, R_SPARC_32,
- R_SPARC_DISP8, R_SPARC_DISP16, R_SPARC_DISP32,
+ R_SPARC_8, R_SPARC_16, R_SPARC_32,
+ R_SPARC_DISP8, R_SPARC_DISP16, R_SPARC_DISP32,
R_SPARC_WDISP30, R_SPARC_WDISP22,
R_SPARC_HI22, R_SPARC_22,
R_SPARC_13, R_SPARC_LO10,
};
#endif
-static reloc_howto_type nlm32_sparc_howto_table[] =
+static reloc_howto_type nlm32_sparc_howto_table[] =
{
HOWTO(R_SPARC_NONE, 0,0, 0,false,0,complain_overflow_dont, 0,"R_SPARC_NONE", false,0,0x00000000,true),
HOWTO(R_SPARC_8, 0,0, 8,false,0,complain_overflow_bitfield,0,"R_SPARC_8", false,0,0x000000ff,true),
rel->howto = NULL;
for (index = 0;
- index < sizeof(nlm32_sparc_howto_table) / sizeof(reloc_howto_type);
+ index < sizeof (nlm32_sparc_howto_table) / sizeof (reloc_howto_type);
index++)
if (nlm32_sparc_howto_table[index].type == type) {
rel->howto = &nlm32_sparc_howto_table[index];
int type = -1;
reloc_howto_type *tmp;
-
for (index = 0;
- index < sizeof (nlm32_sparc_howto_table) / sizeof(reloc_howto_type);
+ index < sizeof (nlm32_sparc_howto_table) / sizeof (reloc_howto_type);
index++) {
tmp = &nlm32_sparc_howto_table[index];
}
}
if (type == -1)
- abort();
+ abort ();
/*
* Netware wants a list of relocs for each address.
#endif
bfd_put_32 (abfd, val, tmp_reloc.offset);
bfd_put_32 (abfd, rel->addend, tmp_reloc.addend);
- bfd_put_8 (abfd, (short)(rel->howto->type), tmp_reloc.type);
+ bfd_put_8 (abfd, (short) (rel->howto->type), tmp_reloc.type);
if (bfd_write (&tmp_reloc, 12, 1, abfd) != 12)
return false;
bfd_byte temp[NLM_TARGET_LONG_SIZE]; /* temporary 32-bit value */
unsigned char symlength; /* length of symbol name */
char *name;
-
+
/*
* First, read in the number of relocation
* entries for this symbol
*/
if (bfd_read ((PTR) temp, 4, 1, abfd) != 4)
return false;
-
+
rcount = bfd_get_32 (abfd, temp);
-
+
/*
* Next, read in the length of the symbol
*/
-
+
if (bfd_read ((PTR) &symlength, sizeof (symlength), 1, abfd)
!= sizeof (symlength))
return false;
name = bfd_alloc (abfd, symlength + 1);
if (name == NULL)
return false;
-
+
/*
* Then read in the symbol
*/
-
+
if (bfd_read (name, symlength, 1, abfd) != symlength)
return false;
name[symlength] = '\0';
sym -> symbol.flags = 0;
sym -> symbol.value = 0;
sym -> symbol.section = bfd_und_section_ptr;
-
+
/*
* Next, start reading in the relocs.
*/
-
+
nlm_relocs = ((struct nlm_relent *)
bfd_alloc (abfd, rcount * sizeof (struct nlm_relent)));
if (!nlm_relocs)
while (sym -> rcnt < rcount)
{
asection *section;
-
+
if (nlm_sparc_read_reloc (abfd, sym, §ion,
&nlm_relocs -> reloc)
== false)
unsigned char temp[NLM_TARGET_LONG_SIZE];
bfd_put_32 (abfd, count, temp);
- if (bfd_write (temp, sizeof(temp), 1, abfd) != sizeof (temp))
+ if (bfd_write (temp, sizeof (temp), 1, abfd) != sizeof (temp))
return false;
len = strlen (sym->name);
- if ((bfd_write (&len, sizeof (bfd_byte), 1, abfd) != sizeof(bfd_byte))
+ if ((bfd_write (&len, sizeof (bfd_byte), 1, abfd) != sizeof (bfd_byte))
|| bfd_write (sym->name, len, 1, abfd) != len)
return false;
#define nlm_write_object_contents nlmNAME(write_object_contents)
#define nlm_swap_fixed_header_in(abfd,src,dst) \
- (nlm_swap_fixed_header_in_func(abfd))(abfd,src,dst)
+ (nlm_swap_fixed_header_in_func(abfd)) (abfd,src,dst)
#define nlm_swap_fixed_header_out(abfd,src,dst) \
- (nlm_swap_fixed_header_out_func(abfd))(abfd,src,dst)
+ (nlm_swap_fixed_header_out_func(abfd)) (abfd,src,dst)
/* Forward declarations of static functions */
x_fxdhdr = NULL;
/* Check to see if we have an NLM file for this backend by matching
- the NLM signature. */
+ the NLM signature. */
signature = nlm_signature (abfd);
if (signature != NULL
return (NULL);
}
-/* Add a section to the bfd. */
+/* Add a section to the bfd. */
static boolean
add_bfd_section (abfd, name, offset, size, flags)
{
return (false);
}
- newsect->vma = 0; /* NLM's are relocatable. */
+ newsect->vma = 0; /* NLM's are relocatable. */
newsect->_raw_size = size;
newsect->filepos = offset;
newsect->flags = flags;
}
/* Read and swap in the variable length header. All the fields must
- exist in the NLM, and must exist in the order they are read here. */
+ exist in the NLM, and must exist in the order they are read here. */
static boolean
nlm_swap_variable_header_in (abfd)
{
unsigned char temp[NLM_TARGET_LONG_SIZE];
- /* Read the description length and text members. */
+ /* Read the description length and text members. */
if (bfd_read ((PTR) & nlm_variable_header (abfd)->descriptionLength,
sizeof (nlm_variable_header (abfd)->descriptionLength),
(bfd_size_type) nlm_variable_header (abfd)->descriptionLength + 1)
return (false);
- /* Read and convert the stackSize field. */
+ /* Read and convert the stackSize field. */
if (bfd_read ((PTR) temp, sizeof (temp), 1, abfd) != sizeof (temp))
return (false);
nlm_variable_header (abfd)->stackSize = get_word (abfd, (bfd_byte *) temp);
- /* Read and convert the reserved field. */
+ /* Read and convert the reserved field. */
if (bfd_read ((PTR) temp, sizeof (temp), 1, abfd) != sizeof (temp))
return (false);
nlm_variable_header (abfd)->reserved = get_word (abfd, (bfd_byte *) temp);
- /* Read the oldThreadName field. This field is a fixed length string. */
+ /* Read the oldThreadName field. This field is a fixed length string. */
if (bfd_read ((PTR) nlm_variable_header (abfd)->oldThreadName,
sizeof (nlm_variable_header (abfd)->oldThreadName),
sizeof (nlm_variable_header (abfd)->oldThreadName))
return (false);
- /* Read the screen name length and text members. */
+ /* Read the screen name length and text members. */
if (bfd_read ((PTR) & nlm_variable_header (abfd)->screenNameLength,
sizeof (nlm_variable_header (abfd)->screenNameLength),
(bfd_size_type) nlm_variable_header (abfd)->screenNameLength + 1)
return (false);
- /* Read the thread name length and text members. */
+ /* Read the thread name length and text members. */
if (bfd_read ((PTR) & nlm_variable_header (abfd)->threadNameLength,
sizeof (nlm_variable_header (abfd)->threadNameLength),
{
unsigned char temp[NLM_TARGET_LONG_SIZE];
- /* Write the description length and text members. */
+ /* Write the description length and text members. */
if (bfd_write ((PTR) & nlm_variable_header (abfd)->descriptionLength,
sizeof (nlm_variable_header (abfd)->descriptionLength),
(bfd_size_type) nlm_variable_header (abfd)->descriptionLength + 1)
return (false);
- /* Convert and write the stackSize field. */
+ /* Convert and write the stackSize field. */
put_word (abfd, (bfd_vma) nlm_variable_header (abfd)->stackSize,
(bfd_byte *) temp);
if (bfd_write ((PTR) temp, sizeof (temp), 1, abfd) != sizeof (temp))
return (false);
- /* Convert and write the reserved field. */
+ /* Convert and write the reserved field. */
put_word (abfd, (bfd_vma) nlm_variable_header (abfd)->reserved,
(bfd_byte *) temp);
if (bfd_write ((PTR) temp, sizeof (temp), 1, abfd) != sizeof (temp))
return (false);
- /* Write the oldThreadName field. This field is a fixed length string. */
+ /* Write the oldThreadName field. This field is a fixed length string. */
if (bfd_write ((PTR) nlm_variable_header (abfd)->oldThreadName,
sizeof (nlm_variable_header (abfd)->oldThreadName),
sizeof (nlm_variable_header (abfd)->oldThreadName))
return (false);
- /* Write the screen name length and text members. */
+ /* Write the screen name length and text members. */
if (bfd_write ((PTR) & nlm_variable_header (abfd)->screenNameLength,
sizeof (nlm_variable_header (abfd)->screenNameLength),
(bfd_size_type) nlm_variable_header (abfd)->screenNameLength + 1)
return (false);
- /* Write the thread name length and text members. */
+ /* Write the thread name length and text members. */
if (bfd_write ((PTR) & nlm_variable_header (abfd)->threadNameLength,
sizeof (nlm_variable_header (abfd)->threadNameLength),
of the auxiliary headers are, except by finding something that doesn't
look like a known auxiliary header. This means that the first new type
of auxiliary header added will break all existing tools that don't
- recognize it. */
+ recognize it. */
static boolean
nlm_swap_auxiliary_headers_in (abfd)
->copyrightMessageLength),
1, 1, abfd) != 1)
return (false);
- /* The copyright message is a variable length string. */
+ /* The copyright message is a variable length string. */
if (bfd_read ((PTR) nlm_copyright_header (abfd)->copyrightMessage,
nlm_copyright_header (abfd)->copyrightMessageLength + 1,
1, abfd) !=
return false;
}
-
/* Write out the copyright header if there is one. */
if (find_nonzero ((PTR) nlm_copyright_header (abfd),
sizeof (Nlm_Internal_Copyright_Header)))
nlm_copyright_header (abfd)->copyrightMessageLength;
if (bfd_write ((PTR) thdr.copyrightMessageLength, 1, 1, abfd) != 1)
return false;
- /* The copyright message is a variable length string. */
+ /* The copyright message is a variable length string. */
if (bfd_write ((PTR) nlm_copyright_header (abfd)->copyrightMessage,
nlm_copyright_header (abfd)->copyrightMessageLength + 1,
1, abfd) !=
Return the number of bytes required to hold the symtab vector, based on
the count plus 1, since we will NULL terminate the vector allocated based
- on this size. */
+ on this size. */
long
nlm_get_symtab_upper_bound (abfd)
}
/* Note that bfd_get_symcount is guaranteed to be zero if slurping the
- symbol table fails. */
+ symbol table fails. */
long
nlm_get_symtab (abfd, alocation)
Note that we allocate the initial bfd canonical symbol buffer based on a
one-to-one mapping of the NLM symbols to canonical symbols. We actually
use all the NLM symbols, so there will be no space left over at the end.
- When we have all the symbols, we build the caller's pointer vector. */
+ When we have all the symbols, we build the caller's pointer vector. */
abfd->symcount = 0;
i_fxdhdrp = nlm_fixed_header (abfd);
/* We use the bfd's symcount directly as the control count, so that early
termination of the loop leaves the symcount correct for the symbols that
- were read. */
+ were read. */
set_public_section_func = nlm_set_public_section_func (abfd);
symcount = i_fxdhdrp->numberOfPublics;
PTR));
/* Translate an NLM fixed length file header in external format into an NLM
- file header in internal format. */
+ file header in internal format. */
static void
nlm_swap_fixed_header_in (abfd, realsrc, dst)
}
/* Translate an NLM fixed length file header in internal format into
- an NLM file header in external format. */
+ an NLM file header in external format. */
static void
nlm_swap_fixed_header_out (abfd, src, realdst)
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define BYTES_IN_WORD 4
#undef TARGET_IS_BIG_ENDIAN_P
PARAMS((bfd *abfd AND
bfd_reloc_code_real_type code));
-
#include "netbsd.h"