s/boolean/bfd_boolean/ s/true/TRUE/ s/false/FALSE/. Simplify

comparisons of bfd_boolean vars with TRUE/FALSE.  Formatting.
This commit is contained in:
Alan Modra 2002-11-30 08:39:46 +00:00
parent 583d52d728
commit b34976b65a
431 changed files with 27178 additions and 25605 deletions

View File

@ -1,3 +1,64 @@
2002-11-30 Alan Modra <amodra@bigpond.net.au>
* bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
(enum bfd_boolean, boolean): Delete.
(bfd_boolean): Typedef to an int.
(FALSE, TRUE): Define.
* aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
of bfd_boolean vars with TRUE/FALSE. Formatting.
* bfd-in2.h, libbfd.h, libcoff.h: Regenerate
2002-11-28 Alan Modra <amodra@bigpond.net.au>
* elf-bfd.h: Replace occurrences of Elf32_Internal_* and

View File

@ -204,13 +204,13 @@ aix386_core_file_failing_signal (abfd)
return core_hdr (abfd)->cd_cursig;
}
static boolean
static bfd_boolean
aix386_core_file_matches_executable_p (core_bfd, exec_bfd)
bfd *core_bfd;
bfd *exec_bfd;
{
/* FIXME: We have no way of telling at this point. */
return true;
return TRUE;
}
/* If somebody calls any byte-swapping routines, shoot them. */

View File

@ -28,10 +28,14 @@
#include "sysdep.h"
#include "libbfd.h"
const bfd_target * xcoff64_core_p PARAMS ((bfd *));
boolean xcoff64_core_file_matches_executable_p PARAMS ((bfd *, bfd *));
char * xcoff64_core_file_failing_command PARAMS ((bfd *));
int xcoff64_core_file_failing_signal PARAMS ((bfd *));
const bfd_target *xcoff64_core_p
PARAMS ((bfd *));
bfd_boolean xcoff64_core_file_matches_executable_p
PARAMS ((bfd *, bfd *));
char *xcoff64_core_file_failing_command
PARAMS ((bfd *));
int xcoff64_core_file_failing_signal
PARAMS ((bfd *));
/* Aix 5.1 system include file. */
@ -62,11 +66,11 @@ xcoff64_core_p (abfd)
if (bfd_seek (abfd, 0, SEEK_SET) != 0)
goto xcoff64_core_p_error;
if (sizeof (struct core_dumpxx)
if (sizeof (struct core_dumpxx)
!= bfd_bread (&core, sizeof (struct core_dumpxx), abfd))
goto xcoff64_core_p_error;
if (bfd_stat (abfd, &statbuf) < 0)
if (bfd_stat (abfd, &statbuf) < 0)
goto xcoff64_core_p_error;
/* Sanity checks
@ -82,24 +86,24 @@ xcoff64_core_p (abfd)
See rs6000-core.c for comment on size of core
If there isn't enough of a real core file, bail. */
if ((CORE_VERSION_1 != (core.c_flag & CORE_VERSION_1))
|| (0 != core.c_entries)
|| (! (IS_PROC64 (&core.c_u.U_proc)))
|| ((CHECK_FILE_OFFSET (statbuf, core.c_fdsinfox)))
|| ((CHECK_FILE_OFFSET (statbuf, core.c_loader)))
|| ((CHECK_FILE_OFFSET (statbuf, core.c_loader + core.c_lsize)))
|| ((CHECK_FILE_OFFSET (statbuf, core.c_thr)))
|| ((CHECK_FILE_OFFSET (statbuf, core.c_segregion)))
|| ((CHECK_FILE_OFFSET (statbuf, core.c_stack)))
|| ((CHECK_FILE_OFFSET (statbuf, core.c_stack + core.c_size)))
|| ((CHECK_FILE_OFFSET (statbuf, core.c_data)))
|| ((CHECK_FILE_OFFSET (statbuf, core.c_data + core.c_datasize)))
|| (! (core.c_flag & UBLOCK_VALID))
|| (! (core.c_flag & LE_VALID)))
if ((CORE_VERSION_1 != (core.c_flag & CORE_VERSION_1))
|| (0 != core.c_entries)
|| (! (IS_PROC64 (&core.c_u.U_proc)))
|| ((CHECK_FILE_OFFSET (statbuf, core.c_fdsinfox)))
|| ((CHECK_FILE_OFFSET (statbuf, core.c_loader)))
|| ((CHECK_FILE_OFFSET (statbuf, core.c_loader + core.c_lsize)))
|| ((CHECK_FILE_OFFSET (statbuf, core.c_thr)))
|| ((CHECK_FILE_OFFSET (statbuf, core.c_segregion)))
|| ((CHECK_FILE_OFFSET (statbuf, core.c_stack)))
|| ((CHECK_FILE_OFFSET (statbuf, core.c_stack + core.c_size)))
|| ((CHECK_FILE_OFFSET (statbuf, core.c_data)))
|| ((CHECK_FILE_OFFSET (statbuf, core.c_data + core.c_datasize)))
|| (! (core.c_flag & UBLOCK_VALID))
|| (! (core.c_flag & LE_VALID)))
goto xcoff64_core_p_error;
/* Check for trucated stack or general truncating. */
if ((! (core.c_flag & USTACK_VALID))
if ((! (core.c_flag & USTACK_VALID))
|| (core.c_flag & CORE_TRUNC))
{
bfd_set_error (bfd_error_file_truncated);
@ -109,7 +113,7 @@ xcoff64_core_p (abfd)
new_core_hdr = (struct core_dumpxx *)
bfd_zalloc (abfd, sizeof (struct core_dumpxx));
if (NULL == new_core_hdr)
if (NULL == new_core_hdr)
return return_value;
memcpy (new_core_hdr, &core, sizeof (struct core_dumpxx));
@ -117,7 +121,7 @@ xcoff64_core_p (abfd)
/* .stack section. */
sec = bfd_make_section_anyway (abfd, ".stack");
if (NULL == sec)
if (NULL == sec)
return return_value;
sec->flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS;
@ -127,7 +131,7 @@ xcoff64_core_p (abfd)
/* .reg section for all registers. */
sec = bfd_make_section_anyway (abfd, ".reg");
if (NULL == sec)
if (NULL == sec)
return return_value;
sec->flags = SEC_HAS_CONTENTS | SEC_IN_MEMORY;
@ -138,7 +142,7 @@ xcoff64_core_p (abfd)
/* .ldinfo section.
To actually find out how long this section is in this particular
core dump would require going down the whole list of struct
core dump would require going down the whole list of struct
ld_info's. See if we can just fake it. */
sec = bfd_make_section_anyway (abfd, ".ldinfo");
if (NULL == sec)
@ -152,10 +156,10 @@ xcoff64_core_p (abfd)
/* AIX 4 adds data sections from loaded objects to the core file,
which can be found by examining ldinfo, and anonymously mmapped
regions. */
/* .data section from executable. */
sec = bfd_make_section_anyway (abfd, ".data");
if (NULL == sec)
if (NULL == sec)
return return_value;
sec->flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS;
@ -165,20 +169,20 @@ xcoff64_core_p (abfd)
/* .data sections from loaded objects. */
ld_offset = core.c_loader;
while (1)
while (1)
{
if (bfd_seek (abfd, ld_offset, SEEK_SET) != 0)
if (bfd_seek (abfd, ld_offset, SEEK_SET) != 0)
return return_value;
if (sizeof (struct __ld_info64) !=
bfd_bread (&ldinfo, sizeof (struct __ld_info64), abfd))
bfd_bread (&ldinfo, sizeof (struct __ld_info64), abfd))
return return_value;
if (ldinfo.ldinfo_core)
if (ldinfo.ldinfo_core)
{
sec = bfd_make_section_anyway (abfd, ".data");
if (NULL == sec)
if (NULL == sec)
return return_value;
sec->flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS;
@ -193,20 +197,20 @@ xcoff64_core_p (abfd)
}
/* .vmdata sections from anonymously mmapped regions. */
if (core.c_vmregions)
if (core.c_vmregions)
{
if (bfd_seek (abfd, core.c_vmm, SEEK_SET) != 0)
if (bfd_seek (abfd, core.c_vmm, SEEK_SET) != 0)
return return_value;
for (i = 0; i < core.c_vmregions; i++)
for (i = 0; i < core.c_vmregions; i++)
if (sizeof (struct vm_infox) !=
bfd_bread (&vminfo, sizeof (struct vm_infox), abfd))
bfd_bread (&vminfo, sizeof (struct vm_infox), abfd))
return return_value;
if (vminfo.vminfo_offset)
if (vminfo.vminfo_offset)
{
sec = bfd_make_section_anyway (abfd, ".vmdata");
if (NULL == sec)
if (NULL == sec)
return return_value;
sec->flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS;
@ -217,17 +221,17 @@ xcoff64_core_p (abfd)
}
return_value = abfd->xvec; /* This is garbage for now. */
xcoff64_core_p_error:
if (bfd_get_error () != bfd_error_system_call)
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_wrong_format);
return return_value;
}
/* Return `true' if given core is from the given executable. */
/* Return `TRUE' if given core is from the given executable. */
boolean
bfd_boolean
xcoff64_core_file_matches_executable_p (core_bfd, exec_bfd)
bfd *core_bfd;
bfd *exec_bfd;
@ -236,22 +240,22 @@ xcoff64_core_file_matches_executable_p (core_bfd, exec_bfd)
char *path, *s;
size_t alloc;
const char *str1, *str2;
boolean return_value = false;
bfd_boolean return_value = FALSE;
/* Get the header. */
if (bfd_seek (core_bfd, 0, SEEK_SET) != 0)
return return_value;
if (sizeof (struct core_dumpxx) !=
bfd_bread (&core, sizeof (struct core_dumpxx), core_bfd))
if (bfd_seek (core_bfd, 0, SEEK_SET) != 0)
return return_value;
if (bfd_seek (core_bfd, core.c_loader, SEEK_SET) != 0)
if (sizeof (struct core_dumpxx) !=
bfd_bread (&core, sizeof (struct core_dumpxx), core_bfd))
return return_value;
if (bfd_seek (core_bfd, core.c_loader, SEEK_SET) != 0)
return return_value;
alloc = 100;
path = bfd_malloc (alloc);
if (path == NULL)
if (path == NULL)
return return_value;
s = path;
@ -264,13 +268,13 @@ xcoff64_core_file_matches_executable_p (core_bfd, exec_bfd)
if (*s == '\0')
break;
++s;
if (s == path + alloc)
if (s == path + alloc)
{
char *n;
alloc *= 2;
n = bfd_realloc (path, alloc);
if (n == NULL)
if (n == NULL)
goto xcoff64_core_file_matches_executable_p_end_1;
s = n + (path - s);
@ -285,8 +289,8 @@ xcoff64_core_file_matches_executable_p (core_bfd, exec_bfd)
str1 = str1 != NULL ? str1 + 1 : path;
str2 = str2 != NULL ? str2 + 1 : exec_bfd->filename;
if (strcmp (str1, str2) == 0)
return_value = true;
if (strcmp (str1, str2) == 0)
return_value = TRUE;
xcoff64_core_file_matches_executable_p_end_1:
free (path);
@ -300,7 +304,7 @@ xcoff64_core_file_failing_command (abfd)
struct core_dumpxx *c = core_hdr (abfd);
char *return_value = 0;
if (NULL != c)
if (NULL != c)
return_value = c->c_u.U_proc.pi_comm;
return return_value;
@ -313,7 +317,7 @@ xcoff64_core_file_failing_signal (abfd)
struct core_dumpxx *c = core_hdr (abfd);
int return_value = 0;
if (NULL != c)
if (NULL != c)
return_value = c->c_signo;
return return_value;
@ -321,10 +325,14 @@ xcoff64_core_file_failing_signal (abfd)
#else /* AIX_5_CORE */
const bfd_target * xcoff64_core_p PARAMS ((bfd *));
boolean xcoff64_core_file_matches_executable_p PARAMS ((bfd *, bfd *));
char * xcoff64_core_file_failing_command PARAMS ((bfd *));
int xcoff64_core_file_failing_signal PARAMS ((bfd *));
const bfd_target *xcoff64_core_p
PARAMS ((bfd *));
bfd_boolean xcoff64_core_file_matches_executable_p
PARAMS ((bfd *, bfd *));
char *xcoff64_core_file_failing_command
PARAMS ((bfd *));
int xcoff64_core_file_failing_signal
PARAMS ((bfd *));
const bfd_target *
xcoff64_core_p (abfd)
@ -334,12 +342,12 @@ xcoff64_core_p (abfd)
return 0;
}
boolean
bfd_boolean
xcoff64_core_file_matches_executable_p (core_bfd, exec_bfd)
bfd *core_bfd ATTRIBUTE_UNUSED;
bfd *exec_bfd ATTRIBUTE_UNUSED;
{
return false;
return FALSE;
}
char *

View File

@ -32,19 +32,26 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Forward decl. */
extern const bfd_target a_out_adobe_vec;
static const bfd_target *aout_adobe_callback PARAMS ((bfd *));
extern boolean aout_32_slurp_symbol_table PARAMS ((bfd *abfd));
extern boolean aout_32_write_syms PARAMS ((bfd *));
static void aout_adobe_write_section PARAMS ((bfd *abfd, sec_ptr sect));
static const bfd_target * aout_adobe_object_p PARAMS ((bfd *));
static boolean aout_adobe_mkobject PARAMS ((bfd *));
static boolean aout_adobe_write_object_contents PARAMS ((bfd *));
static boolean aout_adobe_set_section_contents
static const bfd_target *aout_adobe_callback
PARAMS ((bfd *));
extern bfd_boolean aout_32_slurp_symbol_table
PARAMS ((bfd *abfd));
extern bfd_boolean aout_32_write_syms
PARAMS ((bfd *));
static void aout_adobe_write_section
PARAMS ((bfd *abfd, sec_ptr sect));
static const bfd_target * aout_adobe_object_p
PARAMS ((bfd *));
static bfd_boolean aout_adobe_mkobject
PARAMS ((bfd *));
static bfd_boolean aout_adobe_write_object_contents
PARAMS ((bfd *));
static bfd_boolean aout_adobe_set_section_contents
PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
static boolean aout_adobe_set_arch_mach
static bfd_boolean aout_adobe_set_arch_mach
PARAMS ((bfd *, enum bfd_architecture, unsigned long));
static int aout_adobe_sizeof_headers PARAMS ((bfd *, boolean));
static int aout_adobe_sizeof_headers
PARAMS ((bfd *, bfd_boolean));
/* Swaps the information in an executable header taken from a raw byte
stream memory image, into the internal exec_header structure. */
@ -271,7 +278,7 @@ struct bout_data_struct
struct internal_exec e;
};
static boolean
static bfd_boolean
aout_adobe_mkobject (abfd)
bfd *abfd;
{
@ -280,7 +287,7 @@ aout_adobe_mkobject (abfd)
rawptr = (struct bout_data_struct *) bfd_zalloc (abfd, amt);
if (rawptr == NULL)
return false;
return FALSE;
abfd->tdata.bout_data = rawptr;
exec_hdr (abfd) = &rawptr->e;
@ -291,10 +298,10 @@ aout_adobe_mkobject (abfd)
adata (abfd).segment_size = 1; /* Not applicable. */
adata (abfd).exec_bytes_size = EXEC_BYTES_SIZE;
return true;
return TRUE;
}
static boolean
static bfd_boolean
aout_adobe_write_object_contents (abfd)
bfd *abfd;
{
@ -342,7 +349,7 @@ aout_adobe_write_object_contents (abfd)
amt = EXEC_BYTES_SIZE;
if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0
|| bfd_bwrite ((PTR) &swapped_hdr, amt, abfd) != amt)
return false;
return FALSE;
/* Now write out the section information. Text first, data next, rest
afterward. */
@ -362,38 +369,38 @@ aout_adobe_write_object_contents (abfd)
/* Write final `sentinel` section header (with type of 0). */
amt = sizeof (*sentinel);
if (bfd_bwrite ((PTR) sentinel, amt, abfd) != amt)
return false;
return FALSE;
/* Now write out reloc info, followed by syms and strings. */
if (bfd_get_symcount (abfd) != 0)
{
if (bfd_seek (abfd, (file_ptr) (N_SYMOFF (*exec_hdr (abfd))), SEEK_SET)
!= 0)
return false;
return FALSE;
if (! aout_32_write_syms (abfd))
return false;
return FALSE;
if (bfd_seek (abfd, (file_ptr) (N_TRELOFF (*exec_hdr (abfd))), SEEK_SET)
!= 0)
return false;
return FALSE;
for (sect = abfd->sections; sect; sect = sect->next)
if (sect->flags & SEC_CODE)
if (!aout_32_squirt_out_relocs (abfd, sect))
return false;
return FALSE;
if (bfd_seek (abfd, (file_ptr) (N_DRELOFF (*exec_hdr (abfd))), SEEK_SET)
!= 0)
return false;
return FALSE;
for (sect = abfd->sections; sect; sect = sect->next)
if (sect->flags & SEC_DATA)
if (!aout_32_squirt_out_relocs (abfd, sect))
return false;
return FALSE;
}
return true;
return TRUE;
}
static void
@ -404,7 +411,7 @@ aout_adobe_write_section (abfd, sect)
/* FIXME XXX */
}
static boolean
static bfd_boolean
aout_adobe_set_section_contents (abfd, section, location, offset, count)
bfd *abfd;
asection *section;
@ -457,34 +464,34 @@ aout_adobe_set_section_contents (abfd, section, location, offset, count)
/* Regardless, once we know what we're doing, we might as well get
going. */
if (bfd_seek (abfd, section->filepos + offset, SEEK_SET) != 0)
return false;
return FALSE;
if (count == 0)
return true;
return TRUE;
return bfd_bwrite ((PTR) location, count, abfd) == count;
}
static boolean
static bfd_boolean
aout_adobe_set_arch_mach (abfd, arch, machine)
bfd *abfd;
enum bfd_architecture arch;
unsigned long machine;
{
if (! bfd_default_set_arch_mach (abfd, arch, machine))
return false;
return FALSE;
if (arch == bfd_arch_unknown
|| arch == bfd_arch_m68k)
return true;
return TRUE;
return false;
return FALSE;
}
static int
aout_adobe_sizeof_headers (ignore_abfd, ignore)
bfd *ignore_abfd ATTRIBUTE_UNUSED;
boolean ignore ATTRIBUTE_UNUSED;
bfd_boolean ignore ATTRIBUTE_UNUSED;
{
return sizeof (struct internal_exec);
}

View File

@ -1,5 +1,5 @@
/* BFD back-end for raw ARM a.out binaries.
Copyright 1994, 1995, 1997, 1998, 1999, 2000, 2001
Copyright 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
@ -54,7 +54,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "libaout.h"
#include "aout/aout64.h"
static boolean MY(write_object_contents)
static bfd_boolean MY(write_object_contents)
PARAMS ((bfd *));
static bfd_reloc_status_type MY(fix_pcrel_26_done)
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
@ -80,28 +80,28 @@ reloc_howto_type MY(howto_table)[] =
{
/* Type rs size bsz pcrel bitpos ovrf sf name part_inpl
readmask setmask pcdone. */
HOWTO (0, 0, 0, 8, false, 0, complain_overflow_bitfield, 0, "8", true,
0x000000ff, 0x000000ff, false),
HOWTO (1, 0, 1, 16, false, 0, complain_overflow_bitfield, 0, "16", true,
0x0000ffff, 0x0000ffff, false),
HOWTO (2, 0, 2, 32, false, 0, complain_overflow_bitfield, 0, "32", true,
0xffffffff, 0xffffffff, false),
HOWTO (3, 2, 2, 26, true, 0, complain_overflow_signed, MY(fix_pcrel_26),
"ARM26", true, 0x00ffffff, 0x00ffffff, true),
HOWTO (4, 0, 0, 8, true, 0, complain_overflow_signed, 0, "DISP8", true,
0x000000ff, 0x000000ff, true),
HOWTO (5, 0, 1, 16, true, 0, complain_overflow_signed, 0, "DISP16", true,
0x0000ffff, 0x0000ffff, true),
HOWTO (6, 0, 2, 32, true, 0, complain_overflow_signed, 0, "DISP32", true,
0xffffffff, 0xffffffff, true),
HOWTO (7, 2, 2, 26, false, 0, complain_overflow_signed,
MY(fix_pcrel_26_done), "ARM26D", true, 0x0, 0x0,
false),
HOWTO (0, 0, 0, 8, FALSE, 0, complain_overflow_bitfield, 0, "8", TRUE,
0x000000ff, 0x000000ff, FALSE),
HOWTO (1, 0, 1, 16, FALSE, 0, complain_overflow_bitfield, 0, "16", TRUE,
0x0000ffff, 0x0000ffff, FALSE),
HOWTO (2, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, 0, "32", TRUE,
0xffffffff, 0xffffffff, FALSE),
HOWTO (3, 2, 2, 26, TRUE, 0, complain_overflow_signed, MY(fix_pcrel_26),
"ARM26", TRUE, 0x00ffffff, 0x00ffffff, TRUE),
HOWTO (4, 0, 0, 8, TRUE, 0, complain_overflow_signed, 0, "DISP8", TRUE,
0x000000ff, 0x000000ff, TRUE),
HOWTO (5, 0, 1, 16, TRUE, 0, complain_overflow_signed, 0, "DISP16", TRUE,
0x0000ffff, 0x0000ffff, TRUE),
HOWTO (6, 0, 2, 32, TRUE, 0, complain_overflow_signed, 0, "DISP32", TRUE,
0xffffffff, 0xffffffff, TRUE),
HOWTO (7, 2, 2, 26, FALSE, 0, complain_overflow_signed,
MY(fix_pcrel_26_done), "ARM26D", TRUE, 0x0, 0x0,
FALSE),
EMPTY_HOWTO (-1),
HOWTO (9, 0, -1, 16, false, 0, complain_overflow_bitfield, 0, "NEG16", true,
0x0000ffff, 0x0000ffff, false),
HOWTO (10, 0, -2, 32, false, 0, complain_overflow_bitfield, 0, "NEG32", true,
0xffffffff, 0xffffffff, false)
HOWTO (9, 0, -1, 16, FALSE, 0, complain_overflow_bitfield, 0, "NEG16", TRUE,
0x0000ffff, 0x0000ffff, FALSE),
HOWTO (10, 0, -2, 32, FALSE, 0, complain_overflow_bitfield, 0, "NEG32", TRUE,
0xffffffff, 0xffffffff, FALSE)
};
#define RELOC_ARM_BITS_NEG_BIG ((unsigned int) 0x08)

View File

@ -1,5 +1,5 @@
/* BFD backend for CRIS a.out binaries.
Copyright 2000, 2001 Free Software Foundation, Inc.
Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
Contributed by Axis Communications AB.
Written by Hans-Peter Nilsson.
@ -76,7 +76,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define MY_exec_hdr_flags 1
#define MY_write_object_contents MY(write_object_contents)
static boolean MY(write_object_contents) PARAMS ((bfd *));
static bfd_boolean MY(write_object_contents) PARAMS ((bfd *));
/* Forward this, so we can use a pointer to it in PARAMS. */
struct reloc_ext_external;
@ -92,7 +92,7 @@ static void MY(swap_ext_reloc_in) PARAMS ((bfd *, struct
bfd_size_type));
#define MY_set_sizes MY(set_sizes)
static boolean MY(set_sizes) PARAMS ((bfd *));
static bfd_boolean MY(set_sizes) PARAMS ((bfd *));
/* To set back reloc_size to ext, we make MY(set_sizes) be called
through this construct. Note that MY_set_arch_mach is only called
@ -121,7 +121,7 @@ static boolean MY(set_sizes) PARAMS ((bfd *));
/* We need our own version to set header flags. */
static boolean
static bfd_boolean
MY(write_object_contents) (abfd)
bfd *abfd;
{
@ -143,7 +143,7 @@ MY(write_object_contents) (abfd)
WRITE_HEADERS (abfd, execp);
return true;
return TRUE;
}
/* We need our own for these reasons:
@ -279,7 +279,7 @@ MY(swap_ext_reloc_in) (abfd, bytes, cache_ptr, symbols, symcount)
"obj_reloc_entry_size (abfd) = RELOC_EXT_SIZE;", to avoid changing
NAME (aout, set_arch_mach) in aoutx. */
static boolean
static bfd_boolean
MY(set_sizes) (abfd)
bfd *abfd;
{
@ -297,7 +297,7 @@ MY(set_sizes) (abfd)
obj_reloc_entry_size (abfd) = RELOC_EXT_SIZE;
return true;
return TRUE;
}
/*

View File

@ -1,5 +1,5 @@
/* BFD back-end for a.out files encapsulated with COFF headers.
Copyright 1990, 1991, 1994, 1995, 2000, 2001
Copyright 1990, 1991, 1994, 1995, 2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@ -123,7 +123,7 @@ encap_real_callback (abfd)
Section contents have already been written. We write the
file header, symbols, and relocation. */
boolean
bfd_boolean
encap_write_object_contents (abfd)
bfd *abfd;
{
@ -230,7 +230,7 @@ encap_write_object_contents (abfd)
text_size -= N_TXTOFF (outheader);
WRITE_HEADERS(abfd, execp);
return true;
return TRUE;
}
#define MY_write_object_content encap_write_object_contents

View File

@ -35,7 +35,7 @@ MYNS(bfd_reloc_type_lookup)
PARAMS((bfd *abfd AND
bfd_reloc_code_real_type code));
boolean
bfd_boolean
MYNS(write_object_contents)
PARAMS((bfd *abfd));
@ -100,58 +100,58 @@ reloc_howto_type MY(howto_table)[] =
{
/* type rs size bsz pcrel bitpos ovrf sf name part_inpl readmask setmask pcdone */
/* ns32k immediate operands. */
HOWTO (BFD_RELOC_NS32K_IMM_8, 0, 0, 8, false, 0, complain_overflow_signed,
HOWTO (BFD_RELOC_NS32K_IMM_8, 0, 0, 8, FALSE, 0, complain_overflow_signed,
_bfd_ns32k_reloc_imm, "NS32K_IMM_8",
true, 0x000000ff,0x000000ff, false),
HOWTO (BFD_RELOC_NS32K_IMM_16, 0, 1, 16, false, 0, complain_overflow_signed,
TRUE, 0x000000ff,0x000000ff, FALSE),
HOWTO (BFD_RELOC_NS32K_IMM_16, 0, 1, 16, FALSE, 0, complain_overflow_signed,
_bfd_ns32k_reloc_imm, "NS32K_IMM_16",
true, 0x0000ffff,0x0000ffff, false),
HOWTO (BFD_RELOC_NS32K_IMM_32, 0, 2, 32, false, 0, complain_overflow_signed,
TRUE, 0x0000ffff,0x0000ffff, FALSE),
HOWTO (BFD_RELOC_NS32K_IMM_32, 0, 2, 32, FALSE, 0, complain_overflow_signed,
_bfd_ns32k_reloc_imm, "NS32K_IMM_32",
true, 0xffffffff,0xffffffff, false),
HOWTO (BFD_RELOC_NS32K_IMM_8_PCREL, 0, 0, 8, true, 0, complain_overflow_signed,
TRUE, 0xffffffff,0xffffffff, FALSE),
HOWTO (BFD_RELOC_NS32K_IMM_8_PCREL, 0, 0, 8, TRUE, 0, complain_overflow_signed,
_bfd_ns32k_reloc_imm, "PCREL_NS32K_IMM_8",
true, 0x000000ff, 0x000000ff, false),
HOWTO (BFD_RELOC_NS32K_IMM_16_PCREL, 0, 1, 16, true, 0, complain_overflow_signed,
TRUE, 0x000000ff, 0x000000ff, FALSE),
HOWTO (BFD_RELOC_NS32K_IMM_16_PCREL, 0, 1, 16, TRUE, 0, complain_overflow_signed,
_bfd_ns32k_reloc_imm, "PCREL_NS32K_IMM_16",
true, 0x0000ffff,0x0000ffff, false),
HOWTO (BFD_RELOC_NS32K_IMM_32_PCREL, 0, 2, 32, true, 0, complain_overflow_signed,
TRUE, 0x0000ffff,0x0000ffff, FALSE),
HOWTO (BFD_RELOC_NS32K_IMM_32_PCREL, 0, 2, 32, TRUE, 0, complain_overflow_signed,
_bfd_ns32k_reloc_imm, "PCREL_NS32K_IMM_32",
true, 0xffffffff,0xffffffff, false),
TRUE, 0xffffffff,0xffffffff, FALSE),
/* ns32k displacements. */
HOWTO (BFD_RELOC_NS32K_DISP_8, 0, 0, 7, false, 0, complain_overflow_signed,
HOWTO (BFD_RELOC_NS32K_DISP_8, 0, 0, 7, FALSE, 0, complain_overflow_signed,
_bfd_ns32k_reloc_disp, "NS32K_DISP_8",
true, 0x000000ff,0x000000ff, false),
HOWTO (BFD_RELOC_NS32K_DISP_16, 0, 1, 14, false, 0, complain_overflow_signed,
TRUE, 0x000000ff,0x000000ff, FALSE),
HOWTO (BFD_RELOC_NS32K_DISP_16, 0, 1, 14, FALSE, 0, complain_overflow_signed,
_bfd_ns32k_reloc_disp, "NS32K_DISP_16",
true, 0x0000ffff, 0x0000ffff, false),
HOWTO (BFD_RELOC_NS32K_DISP_32, 0, 2, 30, false, 0, complain_overflow_signed,
TRUE, 0x0000ffff, 0x0000ffff, FALSE),
HOWTO (BFD_RELOC_NS32K_DISP_32, 0, 2, 30, FALSE, 0, complain_overflow_signed,
_bfd_ns32k_reloc_disp, "NS32K_DISP_32",
true, 0xffffffff, 0xffffffff, false),
HOWTO (BFD_RELOC_NS32K_DISP_8_PCREL, 0, 0, 7, true, 0, complain_overflow_signed,
TRUE, 0xffffffff, 0xffffffff, FALSE),
HOWTO (BFD_RELOC_NS32K_DISP_8_PCREL, 0, 0, 7, TRUE, 0, complain_overflow_signed,
_bfd_ns32k_reloc_disp, "PCREL_NS32K_DISP_8",
true, 0x000000ff,0x000000ff, false),
HOWTO (BFD_RELOC_NS32K_DISP_16_PCREL, 0, 1, 14, true, 0, complain_overflow_signed,
TRUE, 0x000000ff,0x000000ff, FALSE),
HOWTO (BFD_RELOC_NS32K_DISP_16_PCREL, 0, 1, 14, TRUE, 0, complain_overflow_signed,
_bfd_ns32k_reloc_disp, "PCREL_NS32K_DISP_16",
true, 0x0000ffff,0x0000ffff, false),
HOWTO (BFD_RELOC_NS32K_DISP_32_PCREL, 0, 2, 30, true, 0, complain_overflow_signed,
TRUE, 0x0000ffff,0x0000ffff, FALSE),
HOWTO (BFD_RELOC_NS32K_DISP_32_PCREL, 0, 2, 30, TRUE, 0, complain_overflow_signed,
_bfd_ns32k_reloc_disp, "PCREL_NS32K_DISP_32",
true, 0xffffffff,0xffffffff, false),
TRUE, 0xffffffff,0xffffffff, FALSE),
/* Normal 2's complement. */
HOWTO (BFD_RELOC_8, 0, 0, 8, false, 0, complain_overflow_bitfield,0,
"8", true, 0x000000ff,0x000000ff, false),
HOWTO (BFD_RELOC_16, 0, 1, 16, false, 0, complain_overflow_bitfield,0,
"16", true, 0x0000ffff,0x0000ffff, false),
HOWTO (BFD_RELOC_32, 0, 2, 32, false, 0, complain_overflow_bitfield,0,
"32", true, 0xffffffff,0xffffffff, false),
HOWTO (BFD_RELOC_8_PCREL, 0, 0, 8, true, 0, complain_overflow_signed, 0,
"PCREL_8", true, 0x000000ff,0x000000ff, false),
HOWTO (BFD_RELOC_16_PCREL, 0, 1, 16, true, 0, complain_overflow_signed, 0,
"PCREL_16", true, 0x0000ffff,0x0000ffff, false),
HOWTO (BFD_RELOC_32_PCREL, 0, 2, 32, true, 0, complain_overflow_signed, 0,
"PCREL_32", true, 0xffffffff,0xffffffff, false),
HOWTO (BFD_RELOC_8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield,0,
"8", TRUE, 0x000000ff,0x000000ff, FALSE),
HOWTO (BFD_RELOC_16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield,0,
"16", TRUE, 0x0000ffff,0x0000ffff, FALSE),
HOWTO (BFD_RELOC_32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,0,
"32", TRUE, 0xffffffff,0xffffffff, FALSE),
HOWTO (BFD_RELOC_8_PCREL, 0, 0, 8, TRUE, 0, complain_overflow_signed, 0,
"PCREL_8", TRUE, 0x000000ff,0x000000ff, FALSE),
HOWTO (BFD_RELOC_16_PCREL, 0, 1, 16, TRUE, 0, complain_overflow_signed, 0,
"PCREL_16", TRUE, 0x0000ffff,0x0000ffff, FALSE),
HOWTO (BFD_RELOC_32_PCREL, 0, 2, 32, TRUE, 0, complain_overflow_signed, 0,
"PCREL_32", TRUE, 0xffffffff,0xffffffff, FALSE),
};
#define CTOR_TABLE_RELOC_HOWTO(BFD) (MY(howto_table) + 14)

View File

@ -201,21 +201,21 @@ MY(object_p) (abfd)
#ifndef MY_mkobject
static boolean MY(mkobject) PARAMS ((bfd *));
static bfd_boolean MY(mkobject) PARAMS ((bfd *));
static boolean
static bfd_boolean
MY(mkobject) (abfd)
bfd *abfd;
{
if (! NAME(aout,mkobject) (abfd))
return false;
return FALSE;
#if 0 /* Sizes get set in set_sizes callback, later, after we know
the architecture and machine. */
adata(abfd).page_size = TARGET_PAGE_SIZE;
adata(abfd).segment_size = SEGMENT_SIZE;
adata(abfd).exec_bytes_size = EXEC_BYTES_SIZE;
#endif
return true;
return TRUE;
}
#define MY_mkobject MY(mkobject)
#endif
@ -228,10 +228,10 @@ MY(mkobject) (abfd)
section contents, and copy_private_bfd_data is not called until
after the section contents have been set. */
static boolean MY_bfd_copy_private_section_data
static bfd_boolean MY_bfd_copy_private_section_data
PARAMS ((bfd *, asection *, bfd *, asection *));
static boolean
static bfd_boolean
MY_bfd_copy_private_section_data (ibfd, isec, obfd, osec)
bfd *ibfd;
asection *isec ATTRIBUTE_UNUSED;
@ -241,7 +241,7 @@ MY_bfd_copy_private_section_data (ibfd, isec, obfd, osec)
if (bfd_get_flavour (ibfd) == bfd_target_aout_flavour
&& bfd_get_flavour (obfd) == bfd_target_aout_flavour)
obj_aout_subformat (obfd) = obj_aout_subformat (ibfd);
return true;
return TRUE;
}
#endif
@ -251,9 +251,9 @@ MY_bfd_copy_private_section_data (ibfd, isec, obfd, osec)
file header, symbols, and relocation. */
#ifndef MY_write_object_contents
static boolean MY(write_object_contents) PARAMS ((bfd *));
static bfd_boolean MY(write_object_contents) PARAMS ((bfd *));
static boolean
static bfd_boolean
MY(write_object_contents) (abfd)
bfd *abfd;
{
@ -264,16 +264,16 @@ MY(write_object_contents) (abfd)
WRITE_HEADERS(abfd, execp);
return true;
return TRUE;
}
#define MY_write_object_contents MY(write_object_contents)
#endif
#ifndef MY_set_sizes
static boolean MY(set_sizes) PARAMS ((bfd *));
static bfd_boolean MY(set_sizes) PARAMS ((bfd *));
static boolean
static bfd_boolean
MY(set_sizes) (abfd)
bfd *abfd;
{
@ -287,7 +287,7 @@ MY(set_sizes) (abfd)
#endif
adata(abfd).exec_bytes_size = EXEC_BYTES_SIZE;
return true;
return TRUE;
}
#define MY_set_sizes MY(set_sizes)
#endif
@ -375,9 +375,9 @@ MY_final_link_callback (abfd, ptreloff, pdreloff, psymoff)
/* Final link routine. We need to use a call back to get the correct
offsets in the output file. */
static boolean MY_bfd_final_link PARAMS ((bfd *, struct bfd_link_info *));
static bfd_boolean MY_bfd_final_link PARAMS ((bfd *, struct bfd_link_info *));
static boolean
static bfd_boolean
MY_bfd_final_link (abfd, info)
bfd *abfd;
struct bfd_link_info *info;

View File

@ -56,18 +56,23 @@ static bfd_reloc_status_type tic30_aout_relocate_contents
static bfd_reloc_status_type tic30_aout_final_link_relocate
PARAMS ((reloc_howto_type *, bfd *, asection *, bfd_byte *, bfd_vma,
bfd_vma, bfd_vma));
static const bfd_target *tic30_aout_object_p PARAMS ((bfd *));
static boolean tic30_aout_write_object_contents PARAMS ((bfd *));
static boolean tic30_aout_set_sizes PARAMS ((bfd *));
static const bfd_target * tic30_aout_callback PARAMS ((bfd *));
static boolean MY_bfd_copy_private_section_data
static const bfd_target *tic30_aout_object_p
PARAMS ((bfd *));
static bfd_boolean tic30_aout_write_object_contents
PARAMS ((bfd *));
static bfd_boolean tic30_aout_set_sizes
PARAMS ((bfd *));
static const bfd_target * tic30_aout_callback
PARAMS ((bfd *));
static bfd_boolean MY_bfd_copy_private_section_data
PARAMS ((bfd *, asection *, bfd *, asection *));
static boolean MY_bfd_final_link PARAMS ((bfd *, struct bfd_link_info *));
static bfd_boolean MY_bfd_final_link
PARAMS ((bfd *, struct bfd_link_info *));
reloc_howto_type * tic30_aout_reloc_type_lookup
PARAMS ((bfd *, bfd_reloc_code_real_type));
enum machine_type tic30_aout_machine_type
PARAMS ((enum bfd_architecture, unsigned long, boolean *));
boolean tic30_aout_set_arch_mach
PARAMS ((enum bfd_architecture, unsigned long, bfd_boolean *));
bfd_boolean tic30_aout_set_arch_mach
PARAMS ((bfd *, enum bfd_architecture, unsigned long));
#define MY_reloc_howto(BFD, REL, IN, EX, PC) \
@ -146,16 +151,16 @@ static const struct aout_backend_data tic30_aout_backend_data =
reloc_howto_type tic30_aout_howto_table[] =
{
EMPTY_HOWTO (-1),
HOWTO (1, 2, 1, 16, false, 0, 0, tic30_aout_fix_16,
"16", false, 0x0000FFFF, 0x0000FFFF, false),
HOWTO (2, 2, 2, 24, false, 0, complain_overflow_bitfield, NULL,
"24", false, 0x00FFFFFF, 0x00FFFFFF, false),
HOWTO (3, 18, 3, 24, false, 0, complain_overflow_bitfield, NULL,
"LDP", false, 0x00FF0000, 0x000000FF, false),
HOWTO (4, 2, 4, 32, false, 0, complain_overflow_bitfield, tic30_aout_fix_32,
"32", false, 0xFFFFFFFF, 0xFFFFFFFF, false),
HOWTO (5, 2, 1, 16, true, 0, complain_overflow_signed,
tic30_aout_fix_pcrel_16, "PCREL", true, 0x0000FFFF, 0x0000FFFF, true),
HOWTO (1, 2, 1, 16, FALSE, 0, 0, tic30_aout_fix_16,
"16", FALSE, 0x0000FFFF, 0x0000FFFF, FALSE),
HOWTO (2, 2, 2, 24, FALSE, 0, complain_overflow_bitfield, NULL,
"24", FALSE, 0x00FFFFFF, 0x00FFFFFF, FALSE),
HOWTO (3, 18, 3, 24, FALSE, 0, complain_overflow_bitfield, NULL,
"LDP", FALSE, 0x00FF0000, 0x000000FF, FALSE),
HOWTO (4, 2, 4, 32, FALSE, 0, complain_overflow_bitfield, tic30_aout_fix_32,
"32", FALSE, 0xFFFFFFFF, 0xFFFFFFFF, FALSE),
HOWTO (5, 2, 1, 16, TRUE, 0, complain_overflow_signed,
tic30_aout_fix_pcrel_16, "PCREL", TRUE, 0x0000FFFF, 0x0000FFFF, TRUE),
EMPTY_HOWTO (-1),
EMPTY_HOWTO (-1),
EMPTY_HOWTO (-1),
@ -164,7 +169,7 @@ reloc_howto_type tic30_aout_howto_table[] =
};
extern reloc_howto_type *NAME (aout, reloc_type_lookup)
PARAMS ((bfd *, bfd_reloc_code_real_type));
PARAMS ((bfd *, bfd_reloc_code_real_type));
reloc_howto_type *
tic30_aout_reloc_type_lookup (abfd, code)
@ -420,7 +425,7 @@ tic30_aout_relocate_contents (howto, input_bfd, relocation, location)
bfd_byte *location;
{
bfd_vma x;
boolean overflow;
bfd_boolean overflow;
if (howto->size < 0)
relocation = -relocation;
@ -445,7 +450,7 @@ tic30_aout_relocate_contents (howto, input_bfd, relocation, location)
break;
}
overflow = false;
overflow = FALSE;
if (howto->complain_on_overflow != complain_overflow_dont)
{
@ -491,14 +496,14 @@ tic30_aout_relocate_contents (howto, input_bfd, relocation, location)
bfd_signed_vma reloc_signed_max = (1 << (howto->bitsize - 1)) - 1;
bfd_signed_vma reloc_signed_min = ~reloc_signed_max;
if (signed_check > reloc_signed_max || signed_check < reloc_signed_min)
overflow = true;
overflow = TRUE;
}
break;
case complain_overflow_unsigned:
{
bfd_vma reloc_unsigned_max = (((1 << (howto->bitsize - 1)) - 1) << 1) | 1;
if (check > reloc_unsigned_max)
overflow = true;
overflow = TRUE;
}
break;
case complain_overflow_bitfield:
@ -507,7 +512,7 @@ tic30_aout_relocate_contents (howto, input_bfd, relocation, location)
if ((check & ~reloc_bits) != 0
&& (((bfd_vma) signed_check & ~reloc_bits)
!= ((bfd_vma) -1 & ~reloc_bits)))
overflow = true;
overflow = TRUE;
}
break;
default:
@ -607,7 +612,7 @@ tic30_aout_object_p (abfd)
section contents, and copy_private_bfd_data is not called until
after the section contents have been set. */
static boolean
static bfd_boolean
MY_bfd_copy_private_section_data (ibfd, isec, obfd, osec)
bfd *ibfd;
asection *isec ATTRIBUTE_UNUSED;
@ -616,14 +621,14 @@ MY_bfd_copy_private_section_data (ibfd, isec, obfd, osec)
{
if (bfd_get_flavour (obfd) == bfd_target_aout_flavour)
obj_aout_subformat (obfd) = obj_aout_subformat (ibfd);
return true;
return TRUE;
}
/* Write an object file.
Section contents have already been written. We write the
file header, symbols, and relocation. */
static boolean
static bfd_boolean
tic30_aout_write_object_contents (abfd)
bfd *abfd;
{
@ -650,10 +655,10 @@ tic30_aout_write_object_contents (abfd)
{
bfd_size_type amt;
if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0)
return false;
return FALSE;
amt = adata (abfd).exec_bytes_size;
if (bfd_bwrite ((PTR) &exec_bytes, amt, abfd) != amt)
return false;
return FALSE;
}
/* Now write out reloc info, followed by syms and strings. */
@ -661,27 +666,27 @@ tic30_aout_write_object_contents (abfd)
&& bfd_get_symcount (abfd) != 0)
{
if (bfd_seek (abfd, (file_ptr) (N_SYMOFF (*execp)), SEEK_SET) != 0)
return false;
return FALSE;
if (!NAME (aout, write_syms) (abfd))
return false;
return FALSE;
}
if (bfd_seek (abfd, (file_ptr) (N_TRELOFF (*execp)), SEEK_SET) != 0)
return false;
return FALSE;
if (!NAME (aout, squirt_out_relocs) (abfd, obj_textsec (abfd)))
return false;
return FALSE;
if (bfd_seek (abfd, (file_ptr) (N_DRELOFF (*execp)), SEEK_SET) != 0)
return false;
return FALSE;
if (!NAME (aout, squirt_out_relocs) (abfd, obj_datasec (abfd)))
return false;
return FALSE;
}
return true;
return TRUE;
}
static boolean
static bfd_boolean
tic30_aout_set_sizes (abfd)
bfd *abfd;
{
@ -701,7 +706,7 @@ tic30_aout_set_sizes (abfd)
adata (abfd).exec_bytes_size = EXEC_BYTES_SIZE;
return true;
return TRUE;
}
#ifndef MY_final_link_callback
@ -732,7 +737,7 @@ MY_final_link_callback (abfd, ptreloff, pdreloff, psymoff)
/* Final link routine. We need to use a call back to get the correct
offsets in the output file. */
static boolean
static bfd_boolean
MY_bfd_final_link (abfd, info)
bfd *abfd;
struct bfd_link_info *info;
@ -800,40 +805,40 @@ enum machine_type
tic30_aout_machine_type (arch, machine, unknown)
enum bfd_architecture arch;
unsigned long machine ATTRIBUTE_UNUSED;
boolean *unknown;
bfd_boolean *unknown;
{
enum machine_type arch_flags;
arch_flags = M_UNKNOWN;
*unknown = true;
*unknown = TRUE;
switch (arch)
{
case bfd_arch_tic30:
*unknown = false;
*unknown = FALSE;
break;
default:
arch_flags = M_UNKNOWN;
}
if (arch_flags != M_UNKNOWN)
*unknown = false;
*unknown = FALSE;
return arch_flags;
}
boolean
bfd_boolean
tic30_aout_set_arch_mach (abfd, arch, machine)
bfd *abfd;
enum bfd_architecture arch;
unsigned long machine;
{
if (!bfd_default_set_arch_mach (abfd, arch, machine))
return false;
return FALSE;
if (arch != bfd_arch_unknown)
{
boolean unknown;
bfd_boolean unknown;
tic30_aout_machine_type (arch, machine, &unknown);
if (unknown)
return false;
return FALSE;
}
obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
return (*aout_backend_info (abfd)->set_sizes) (abfd);

View File

@ -75,15 +75,24 @@ The name put into the target vector.
#define sunos_write_object_contents aout_32_sunos4_write_object_contents
#endif
static boolean sunos_merge_private_bfd_data PARAMS ((bfd *, bfd *));
static void sunos_set_arch_mach PARAMS ((bfd *, enum machine_type));
static void choose_reloc_size PARAMS ((bfd *));
static boolean sunos_write_object_contents PARAMS ((bfd *));
static const bfd_target *sunos4_core_file_p PARAMS ((bfd *));
static char *sunos4_core_file_failing_command PARAMS ((bfd *));
static int sunos4_core_file_failing_signal PARAMS ((bfd *));
static boolean sunos4_core_file_matches_executable_p PARAMS ((bfd *, bfd *));
static boolean sunos4_set_sizes PARAMS ((bfd *));
static bfd_boolean sunos_merge_private_bfd_data
PARAMS ((bfd *, bfd *));
static void sunos_set_arch_mach
PARAMS ((bfd *, enum machine_type));
static void choose_reloc_size
PARAMS ((bfd *));
static bfd_boolean sunos_write_object_contents
PARAMS ((bfd *));
static const bfd_target *sunos4_core_file_p
PARAMS ((bfd *));
static char *sunos4_core_file_failing_command
PARAMS ((bfd *));
static int sunos4_core_file_failing_signal
PARAMS ((bfd *));
static bfd_boolean sunos4_core_file_matches_executable_p
PARAMS ((bfd *, bfd *));
static bfd_boolean sunos4_set_sizes
PARAMS ((bfd *));
/* Merge backend data into the output file.
This is necessary on sparclet-aout where we want the resultant machine
@ -91,13 +100,13 @@ static boolean sunos4_set_sizes PARAMS ((bfd *));
#define MY_bfd_merge_private_bfd_data sunos_merge_private_bfd_data
static boolean
static bfd_boolean
sunos_merge_private_bfd_data (ibfd, obfd)
bfd *ibfd, *obfd;
{
if (bfd_get_flavour (ibfd) != bfd_target_aout_flavour
|| bfd_get_flavour (obfd) != bfd_target_aout_flavour)
return true;
return TRUE;
if (bfd_get_arch (obfd) == bfd_arch_sparc)
{
@ -105,7 +114,7 @@ sunos_merge_private_bfd_data (ibfd, obfd)
bfd_set_arch_mach (obfd, bfd_arch_sparc, bfd_get_mach (ibfd));
}
return true;
return TRUE;
}
/* This is either sunos_32_set_arch_mach or sunos_64_set_arch_mach,
@ -207,7 +216,7 @@ choose_reloc_size (abfd)
aout_64_sunos4_write_object_contents or
aout_32_sunos4_write_object_contents, depending upon ARCH_SIZE. */
static boolean
static bfd_boolean
sunos_write_object_contents (abfd)
bfd *abfd;
{
@ -264,7 +273,7 @@ sunos_write_object_contents (abfd)
WRITE_HEADERS (abfd, execp);
return true;
return TRUE;
}
/* core files */
@ -731,7 +740,7 @@ sunos4_core_file_failing_signal (abfd)
return core_hdr (abfd)->hdr->c_signo;
}
static boolean
static bfd_boolean
sunos4_core_file_matches_executable_p (core_bfd, exec_bfd)
bfd *core_bfd;
bfd *exec_bfd;
@ -739,12 +748,12 @@ sunos4_core_file_matches_executable_p (core_bfd, exec_bfd)
if (core_bfd->xvec != exec_bfd->xvec)
{
bfd_set_error (bfd_error_system_call);
return false;
return FALSE;
}
/* Solaris core files do not include an aouthdr. */
if ((core_hdr (core_bfd)->hdr)->c_len == SOLARIS_BCP_CORE_LEN)
return true;
return TRUE;
return (memcmp ((char *) &((core_hdr (core_bfd)->hdr)->c_aouthdr),
(char *) exec_hdr (exec_bfd),
@ -752,24 +761,24 @@ sunos4_core_file_matches_executable_p (core_bfd, exec_bfd)
}
#define MY_set_sizes sunos4_set_sizes
static boolean
static bfd_boolean
sunos4_set_sizes (abfd)
bfd *abfd;
{
switch (bfd_get_arch (abfd))
{
default:
return false;
return FALSE;
case bfd_arch_sparc:
adata (abfd).page_size = 0x2000;
adata (abfd).segment_size = 0x2000;
adata (abfd).exec_bytes_size = EXEC_BYTES_SIZE;
return true;
return TRUE;
case bfd_arch_m68k:
adata (abfd).page_size = 0x2000;
adata (abfd).segment_size = 0x20000;
adata (abfd).exec_bytes_size = EXEC_BYTES_SIZE;
return true;
return TRUE;
}
}

File diff suppressed because it is too large Load Diff

View File

@ -160,17 +160,20 @@ struct ar_cache {
#define arch_eltdata(bfd) ((struct areltdata *) ((bfd)->arelt_data))
#define arch_hdr(bfd) ((struct ar_hdr *)arch_eltdata(bfd)->arch_header)
static char *get_extended_arelt_filename PARAMS ((bfd *arch,
const char *name));
static boolean do_slurp_bsd_armap PARAMS ((bfd *abfd));
static boolean do_slurp_coff_armap PARAMS ((bfd *abfd));
boolean bfd_elf64_archive_slurp_armap PARAMS ((bfd *abfd));
static const char *normalize PARAMS ((bfd *, const char *file));
static struct areltdata *bfd_ar_hdr_from_filesystem PARAMS ((bfd *abfd,
const char *,
bfd *member));
static char *get_extended_arelt_filename
PARAMS ((bfd *arch, const char *name));
static bfd_boolean do_slurp_bsd_armap
PARAMS ((bfd *abfd));
static bfd_boolean do_slurp_coff_armap
PARAMS ((bfd *abfd));
bfd_boolean bfd_elf64_archive_slurp_armap
PARAMS ((bfd *abfd));
static const char *normalize
PARAMS ((bfd *, const char *file));
static struct areltdata *bfd_ar_hdr_from_filesystem
PARAMS ((bfd *abfd, const char *, bfd *member));
boolean
bfd_boolean
_bfd_generic_mkarchive (abfd)
bfd *abfd;
{
@ -178,7 +181,7 @@ _bfd_generic_mkarchive (abfd)
abfd->tdata.aout_ar_data = (struct artdata *) bfd_zalloc (abfd, amt);
if (bfd_ardata (abfd) == NULL)
return false;
return FALSE;
bfd_ardata (abfd)->cache = NULL;
bfd_ardata (abfd)->archive_head = NULL;
@ -186,7 +189,7 @@ _bfd_generic_mkarchive (abfd)
bfd_ardata (abfd)->extended_names = NULL;
bfd_ardata (abfd)->tdata = NULL;
return true;
return TRUE;
}
/*
@ -247,21 +250,21 @@ FUNCTION
bfd_set_archive_head
SYNOPSIS
boolean bfd_set_archive_head(bfd *output, bfd *new_head);
bfd_boolean bfd_set_archive_head(bfd *output, bfd *new_head);
DESCRIPTION
Set the head of the chain of
BFDs contained in the archive @var{output} to @var{new_head}.
*/
boolean
bfd_boolean
bfd_set_archive_head (output_archive, new_head)
bfd *output_archive;
bfd *new_head;
{
output_archive->archive_head = new_head;
return true;
return TRUE;
}
bfd *
@ -280,7 +283,7 @@ _bfd_look_for_bfd_in_cache (arch_bfd, filepos)
}
/* Kind of stupid to call cons for each one, but we don't do too many */
boolean
bfd_boolean
_bfd_add_bfd_to_archive_cache (arch_bfd, filepos, new_elt)
bfd *arch_bfd, *new_elt;
file_ptr filepos;
@ -289,7 +292,7 @@ _bfd_add_bfd_to_archive_cache (arch_bfd, filepos, new_elt)
struct ar_cache *new_cache = (struct ar_cache *) bfd_zalloc (arch_bfd, amt);
if (new_cache == NULL)
return false;
return FALSE;
new_cache->ptr = filepos;
new_cache->arelt = new_elt;
@ -305,7 +308,7 @@ _bfd_add_bfd_to_archive_cache (arch_bfd, filepos, new_elt)
current->next = new_cache;
}
return true;
return TRUE;
}
/* The name begins with space. Hence the rest of the name is an index into
@ -664,10 +667,10 @@ bfd_generic_archive_p (abfd)
first = bfd_openr_next_archived_file (abfd, (bfd *) NULL);
if (first != NULL)
{
boolean fail;
bfd_boolean fail;
first->target_defaulted = false;
fail = false;
first->target_defaulted = FALSE;
fail = FALSE;
if (bfd_check_format (first, bfd_object)
&& first->xvec != abfd->xvec)
{
@ -707,9 +710,9 @@ bfd_generic_archive_p (abfd)
/* The size of the string count. */
#define BSD_STRING_COUNT_SIZE 4
/* Returns false on error, true otherwise */
/* Returns FALSE on error, TRUE otherwise */
static boolean
static bfd_boolean
do_slurp_bsd_armap (abfd)
bfd *abfd;
{
@ -723,13 +726,13 @@ do_slurp_bsd_armap (abfd)
mapdata = (struct areltdata *) _bfd_read_ar_hdr (abfd);
if (mapdata == NULL)
return false;
return FALSE;
parsed_size = mapdata->parsed_size;
bfd_release (abfd, (PTR) mapdata); /* Don't need it any more. */
raw_armap = (bfd_byte *) bfd_zalloc (abfd, parsed_size);
if (raw_armap == (bfd_byte *) NULL)
return false;
return FALSE;
if (bfd_bread ((PTR) raw_armap, parsed_size, abfd) != parsed_size)
{
@ -737,7 +740,7 @@ do_slurp_bsd_armap (abfd)
bfd_set_error (bfd_error_malformed_archive);
byebye:
bfd_release (abfd, (PTR) raw_armap);
return false;
return FALSE;
}
ardata->symdef_count = H_GET_32 (abfd, raw_armap) / BSD_SYMDEF_SIZE;
@ -758,7 +761,7 @@ do_slurp_bsd_armap (abfd)
amt = (bfd_size_type) ardata->symdef_count * sizeof (carsym);
ardata->symdefs = (carsym *) bfd_alloc (abfd, amt);
if (!ardata->symdefs)
return false;
return FALSE;
for (counter = 0, set = ardata->symdefs;
counter < ardata->symdef_count;
@ -774,13 +777,13 @@ do_slurp_bsd_armap (abfd)
/* FIXME, we should provide some way to free raw_ardata when
we are done using the strings from it. For now, it seems
to be allocated on an objalloc anyway... */
bfd_has_map (abfd) = true;
return true;
bfd_has_map (abfd) = TRUE;
return TRUE;
}
/* Returns false on error, true otherwise. */
/* Returns FALSE on error, TRUE otherwise. */
static boolean
static bfd_boolean
do_slurp_coff_armap (abfd)
bfd *abfd;
{
@ -799,7 +802,7 @@ do_slurp_coff_armap (abfd)
mapdata = (struct areltdata *) _bfd_read_ar_hdr (abfd);
if (mapdata == NULL)
return false;
return FALSE;
parsed_size = mapdata->parsed_size;
bfd_release (abfd, (PTR) mapdata); /* Don't need it any more. */
@ -807,7 +810,7 @@ do_slurp_coff_armap (abfd)
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_malformed_archive);
return false;
return FALSE;
}
/* It seems that all numeric information in a coff archive is always
in big endian format, nomatter the host or target. */
@ -840,7 +843,7 @@ do_slurp_coff_armap (abfd)
ardata->symdefs = (carsym *) bfd_zalloc (abfd, carsym_size + stringsize + 1);
if (ardata->symdefs == NULL)
return false;
return FALSE;
carsyms = ardata->symdefs;
stringbase = ((char *) ardata->symdefs) + carsym_size;
@ -872,7 +875,7 @@ do_slurp_coff_armap (abfd)
/* Pad to an even boundary if you have to. */
ardata->first_file_filepos += (ardata->first_file_filepos) % 2;
bfd_has_map (abfd) = true;
bfd_has_map (abfd) = TRUE;
bfd_release (abfd, (PTR) raw_armap);
/* Check for a second archive header (as used by PE). */
@ -893,19 +896,19 @@ do_slurp_coff_armap (abfd)
}
}
return true;
return TRUE;
release_raw_armap:
bfd_release (abfd, (PTR) raw_armap);
release_symdefs:
bfd_release (abfd, (PTR) (ardata)->symdefs);
return false;
return FALSE;
}
/* This routine can handle either coff-style or bsd-style armaps.
Returns false on error, true otherwise */
Returns FALSE on error, TRUE otherwise */
boolean
bfd_boolean
bfd_slurp_armap (abfd)
bfd *abfd;
{
@ -913,12 +916,12 @@ bfd_slurp_armap (abfd)
int i = bfd_bread ((PTR) nextname, (bfd_size_type) 16, abfd);
if (i == 0)
return true;
return TRUE;
if (i != 16)
return false;
return FALSE;
if (bfd_seek (abfd, (file_ptr) -16, SEEK_CUR) != 0)
return false;
return FALSE;
if (!strncmp (nextname, "__.SYMDEF ", 16)
|| !strncmp (nextname, "__.SYMDEF/ ", 16)) /* old Linux archives */
@ -932,22 +935,22 @@ bfd_slurp_armap (abfd)
return bfd_elf64_archive_slurp_armap (abfd);
#else
bfd_set_error (bfd_error_wrong_format);
return false;
return FALSE;
#endif
}
bfd_has_map (abfd) = false;
return true;
bfd_has_map (abfd) = FALSE;
return TRUE;
}
/* Returns false on error, true otherwise */
/* Returns FALSE on error, TRUE otherwise */
/* flavor 2 of a bsd armap, similar to bfd_slurp_bsd_armap except the
header is in a slightly different order and the map name is '/'.
This flavour is used by hp300hpux. */
#define HPUX_SYMDEF_COUNT_SIZE 2
boolean
bfd_boolean
bfd_slurp_bsd_armap_f2 (abfd)
bfd *abfd;
{
@ -963,13 +966,13 @@ bfd_slurp_bsd_armap_f2 (abfd)
int i = bfd_bread ((PTR) nextname, (bfd_size_type) 16, abfd);
if (i == 0)
return true;
return TRUE;
if (i != 16)
return false;
return FALSE;
/* The archive has at least 16 bytes in it. */
if (bfd_seek (abfd, (file_ptr) -16, SEEK_CUR) != 0)
return false;
return FALSE;
if (!strncmp (nextname, "__.SYMDEF ", 16)
|| !strncmp (nextname, "__.SYMDEF/ ", 16)) /* old Linux archives */
@ -977,13 +980,13 @@ bfd_slurp_bsd_armap_f2 (abfd)
if (strncmp (nextname, "/ ", 16))
{
bfd_has_map (abfd) = false;
return true;
bfd_has_map (abfd) = FALSE;
return TRUE;
}
mapdata = (struct areltdata *) _bfd_read_ar_hdr (abfd);
if (mapdata == NULL)
return false;
return FALSE;
amt = mapdata->parsed_size;
raw_armap = (bfd_byte *) bfd_zalloc (abfd, amt);
@ -991,7 +994,7 @@ bfd_slurp_bsd_armap_f2 (abfd)
{
byebye:
bfd_release (abfd, (PTR) mapdata);
return false;
return FALSE;
}
if (bfd_bread ((PTR) raw_armap, amt, abfd) != amt)
@ -1024,7 +1027,7 @@ bfd_slurp_bsd_armap_f2 (abfd)
amt = (bfd_size_type) ardata->symdef_count * BSD_SYMDEF_SIZE;
ardata->symdefs = (carsym *) bfd_alloc (abfd, amt);
if (!ardata->symdefs)
return false;
return FALSE;
for (counter = 0, set = ardata->symdefs;
counter < ardata->symdef_count;
@ -1040,8 +1043,8 @@ bfd_slurp_bsd_armap_f2 (abfd)
/* FIXME, we should provide some way to free raw_ardata when
we are done using the strings from it. For now, it seems
to be allocated on an objalloc anyway... */
bfd_has_map (abfd) = true;
return true;
bfd_has_map (abfd) = TRUE;
return TRUE;
}
/** Extended name table.
@ -1054,9 +1057,9 @@ bfd_slurp_bsd_armap_f2 (abfd)
element>. Index is the P.R. of an int (decimal). Data General have
extended the format by using the prefix // for the special element. */
/* Returns false on error, true otherwise. */
/* Returns FALSE on error, TRUE otherwise. */
boolean
bfd_boolean
_bfd_slurp_extended_name_table (abfd)
bfd *abfd;
{
@ -1065,23 +1068,23 @@ _bfd_slurp_extended_name_table (abfd)
bfd_size_type amt;
/* FIXME: Formatting sucks here, and in case of failure of BFD_READ,
we probably don't want to return true. */
we probably don't want to return TRUE. */
bfd_seek (abfd, bfd_ardata (abfd)->first_file_filepos, SEEK_SET);
if (bfd_bread ((PTR) nextname, (bfd_size_type) 16, abfd) == 16)
{
if (bfd_seek (abfd, (file_ptr) -16, SEEK_CUR) != 0)
return false;
return FALSE;
if (strncmp (nextname, "ARFILENAMES/ ", 16) != 0 &&
strncmp (nextname, "// ", 16) != 0)
{
bfd_ardata (abfd)->extended_names = NULL;
return true;
return TRUE;
}
namedata = (struct areltdata *) _bfd_read_ar_hdr (abfd);
if (namedata == NULL)
return false;
return FALSE;
amt = namedata->parsed_size;
bfd_ardata (abfd)->extended_names = bfd_zalloc (abfd, amt);
@ -1089,7 +1092,7 @@ _bfd_slurp_extended_name_table (abfd)
{
byebye:
bfd_release (abfd, (PTR) namedata);
return false;
return FALSE;
}
if (bfd_bread ((PTR) bfd_ardata (abfd)->extended_names, amt, abfd) != amt)
@ -1129,7 +1132,7 @@ _bfd_slurp_extended_name_table (abfd)
bfd_release (abfd, namedata);
#endif
}
return true;
return TRUE;
}
#ifdef VMS
@ -1199,7 +1202,7 @@ normalize (abfd, file)
/* Build a BFD style extended name table. */
boolean
bfd_boolean
_bfd_archive_bsd_construct_extended_name_table (abfd, tabloc, tablen, name)
bfd *abfd;
char **tabloc;
@ -1207,12 +1210,12 @@ _bfd_archive_bsd_construct_extended_name_table (abfd, tabloc, tablen, name)
const char **name;
{
*name = "ARFILENAMES/";
return _bfd_construct_extended_name_table (abfd, false, tabloc, tablen);
return _bfd_construct_extended_name_table (abfd, FALSE, tabloc, tablen);
}
/* Build an SVR4 style extended name table. */
boolean
bfd_boolean
_bfd_archive_coff_construct_extended_name_table (abfd, tabloc, tablen, name)
bfd *abfd;
char **tabloc;
@ -1220,21 +1223,21 @@ _bfd_archive_coff_construct_extended_name_table (abfd, tabloc, tablen, name)
const char **name;
{
*name = "//";
return _bfd_construct_extended_name_table (abfd, true, tabloc, tablen);
return _bfd_construct_extended_name_table (abfd, TRUE, tabloc, tablen);
}
/* Follows archive_head and produces an extended name table if
necessary. Returns (in tabloc) a pointer to an extended name
table, and in tablen the length of the table. If it makes an entry
it clobbers the filename so that the element may be written without
further massage. Returns true if it ran successfully, false if
further massage. Returns TRUE if it ran successfully, FALSE if
something went wrong. A successful return may still involve a
zero-length tablen! */
boolean
bfd_boolean
_bfd_construct_extended_name_table (abfd, trailing_slash, tabloc, tablen)
bfd *abfd;
boolean trailing_slash;
bfd_boolean trailing_slash;
char **tabloc;
bfd_size_type *tablen;
{
@ -1253,7 +1256,7 @@ _bfd_construct_extended_name_table (abfd, trailing_slash, tabloc, tablen)
normal = normalize (current, current->filename);
if (normal == NULL)
return false;
return FALSE;
thislen = strlen (normal);
@ -1289,11 +1292,11 @@ _bfd_construct_extended_name_table (abfd, trailing_slash, tabloc, tablen)
}
if (total_namelen == 0)
return true;
return TRUE;
*tabloc = bfd_zalloc (abfd, total_namelen);
if (*tabloc == NULL)
return false;
return FALSE;
*tablen = total_namelen;
strptr = *tabloc;
@ -1306,7 +1309,7 @@ _bfd_construct_extended_name_table (abfd, trailing_slash, tabloc, tablen)
normal = normalize (current, current->filename);
if (normal == NULL)
return false;
return FALSE;
thislen = strlen (normal);
if (thislen > maxname)
@ -1341,7 +1344,7 @@ _bfd_construct_extended_name_table (abfd, trailing_slash, tabloc, tablen)
}
}
return true;
return TRUE;
}
/** A couple of functions for creating ar_hdrs */
@ -1458,7 +1461,8 @@ bfd_ar_hdr_from_filesystem (abfd, filename, member)
a strong stomach to write this, and it does, but it takes even a
stronger stomach to try to code around such a thing! */
struct ar_hdr *bfd_special_undocumented_glue PARAMS ((bfd *, const char *));
struct ar_hdr *bfd_special_undocumented_glue
PARAMS ((bfd *, const char *));
struct ar_hdr *
bfd_special_undocumented_glue (abfd, filename)
@ -1669,7 +1673,7 @@ bfd_gnu_truncate_arname (abfd, pathname, arhdr)
/* The BFD is open for write and has its format set to bfd_archive. */
boolean
bfd_boolean
_bfd_write_archive_contents (arch)
bfd *arch;
{
@ -1677,8 +1681,9 @@ _bfd_write_archive_contents (arch)
char *etable = NULL;
bfd_size_type elength = 0;
const char *ename = NULL;
boolean makemap = bfd_has_map (arch);
boolean hasobjects = false; /* If no .o's, don't bother to make a map. */
bfd_boolean makemap = bfd_has_map (arch);
/* If no .o's, don't bother to make a map. */
bfd_boolean hasobjects = FALSE;
bfd_size_type wrote;
unsigned int i;
int tries;
@ -1696,14 +1701,14 @@ _bfd_write_archive_contents (arch)
if (bfd_write_p (current))
{
bfd_set_error (bfd_error_invalid_operation);
return false;
return FALSE;
}
if (!current->arelt_data)
{
current->arelt_data =
(PTR) bfd_ar_hdr_from_filesystem (arch, current->filename, current);
if (!current->arelt_data)
return false;
return FALSE;
/* Put in the file name. */
BFD_SEND (arch, _bfd_truncate_arname, (arch,
@ -1718,28 +1723,28 @@ _bfd_write_archive_contents (arch)
&& ((bfd_get_file_flags (current) & HAS_SYMS))
#endif
)
hasobjects = true;
hasobjects = TRUE;
}
}
if (!BFD_SEND (arch, _bfd_construct_extended_name_table,
(arch, &etable, &elength, &ename)))
return false;
return FALSE;
if (bfd_seek (arch, (file_ptr) 0, SEEK_SET) != 0)
return false;
return FALSE;
#ifdef GNU960
wrote = bfd_bwrite (BFD_GNU960_ARMAG (arch), (bfd_size_type) SARMAG, arch);
#else
wrote = bfd_bwrite (ARMAG, (bfd_size_type) SARMAG, arch);
#endif
if (wrote != SARMAG)
return false;
return FALSE;
if (makemap && hasobjects)
{
if (! _bfd_compute_and_write_armap (arch, (unsigned int) elength))
return false;
return FALSE;
}
if (elength != 0)
@ -1758,11 +1763,11 @@ _bfd_write_archive_contents (arch)
if ((bfd_bwrite ((PTR) &hdr, (bfd_size_type) sizeof (struct ar_hdr), arch)
!= sizeof (struct ar_hdr))
|| bfd_bwrite (etable, elength, arch) != elength)
return false;
return FALSE;
if ((elength % 2) == 1)
{
if (bfd_bwrite ("\012", (bfd_size_type) 1, arch) != 1)
return false;
return FALSE;
}
}
@ -1775,9 +1780,9 @@ _bfd_write_archive_contents (arch)
/* Write ar header. */
if (bfd_bwrite ((PTR) hdr, (bfd_size_type) sizeof (*hdr), arch)
!= sizeof (*hdr))
return false;
return FALSE;
if (bfd_seek (current, (file_ptr) 0, SEEK_SET) != 0)
return false;
return FALSE;
while (remaining)
{
unsigned int amt = DEFAULT_BUFFERSIZE;
@ -1788,16 +1793,16 @@ _bfd_write_archive_contents (arch)
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_malformed_archive);
return false;
return FALSE;
}
if (bfd_bwrite (buffer, (bfd_size_type) amt, arch) != amt)
return false;
return FALSE;
remaining -= amt;
}
if ((arelt_size (current) % 2) == 1)
{
if (bfd_bwrite ("\012", (bfd_size_type) 1, arch) != 1)
return false;
return FALSE;
}
}
@ -1820,12 +1825,12 @@ _bfd_write_archive_contents (arch)
while (++tries < 6);
}
return true;
return TRUE;
}
/* Note that the namidx for the first symbol is 0. */
boolean
bfd_boolean
_bfd_compute_and_write_armap (arch, elength)
bfd *arch;
unsigned int elength;
@ -1839,7 +1844,7 @@ _bfd_compute_and_write_armap (arch, elength)
int stridx = 0; /* string index */
asymbol **syms = NULL;
long syms_max = 0;
boolean ret;
bfd_boolean ret;
bfd_size_type amt;
/* Dunno if this is the best place for this info... */
@ -1968,10 +1973,10 @@ _bfd_compute_and_write_armap (arch, elength)
if (first_name != NULL)
bfd_release (arch, first_name);
return false;
return FALSE;
}
boolean
bfd_boolean
bsd_write_armap (arch, elength, map, orl_count, stridx)
bfd *arch;
unsigned int elength;
@ -2012,10 +2017,10 @@ bsd_write_armap (arch, elength, map, orl_count, stridx)
(((char *) (&hdr))[i]) = ' ';
if (bfd_bwrite ((PTR) &hdr, (bfd_size_type) sizeof (struct ar_hdr), arch)
!= sizeof (struct ar_hdr))
return false;
return FALSE;
H_PUT_32 (arch, ranlibsize, temp);
if (bfd_bwrite (temp, (bfd_size_type) sizeof (temp), arch) != sizeof (temp))
return false;
return FALSE;
for (count = 0; count < orl_count; count++)
{
@ -2037,19 +2042,19 @@ bsd_write_armap (arch, elength, map, orl_count, stridx)
H_PUT_32 (arch, firstreal, buf + BSD_SYMDEF_OFFSET_SIZE);
if (bfd_bwrite (buf, (bfd_size_type) BSD_SYMDEF_SIZE, arch)
!= BSD_SYMDEF_SIZE)
return false;
return FALSE;
}
/* Now write the strings themselves. */
H_PUT_32 (arch, stringsize, temp);
if (bfd_bwrite (temp, (bfd_size_type) sizeof (temp), arch) != sizeof (temp))
return false;
return FALSE;
for (count = 0; count < orl_count; count++)
{
size_t len = strlen (*map[count].name) + 1;
if (bfd_bwrite (*map[count].name, (bfd_size_type) len, arch) != len)
return false;
return FALSE;
}
/* The spec sez this should be a newline. But in order to be
@ -2057,19 +2062,19 @@ bsd_write_armap (arch, elength, map, orl_count, stridx)
if (padit)
{
if (bfd_bwrite ("", (bfd_size_type) 1, arch) != 1)
return false;
return FALSE;
}
return true;
return TRUE;
}
/* At the end of archive file handling, update the timestamp in the
file, so the linker will accept it.
Return true if the timestamp was OK, or an unusual problem happened.
Return false if we updated the timestamp. */
Return TRUE if the timestamp was OK, or an unusual problem happened.
Return FALSE if we updated the timestamp. */
boolean
bfd_boolean
_bfd_archive_bsd_update_armap_timestamp (arch)
bfd *arch;
{
@ -2085,11 +2090,11 @@ _bfd_archive_bsd_update_armap_timestamp (arch)
bfd_perror (_("Reading archive file mod timestamp"));
/* Can't read mod time for some reason. */
return true;
return TRUE;
}
if (archstat.st_mtime <= bfd_ardata (arch)->armap_timestamp)
/* OK by the linker's rules. */
return true;
return TRUE;
/* Update the timestamp. */
bfd_ardata (arch)->armap_timestamp = archstat.st_mtime + ARMAP_TIME_OFFSET;
@ -2111,11 +2116,11 @@ _bfd_archive_bsd_update_armap_timestamp (arch)
bfd_perror (_("Writing updated armap timestamp"));
/* Some error while writing. */
return true;
return TRUE;
}
/* We updated the timestamp successfully. */
return false;
return FALSE;
}
/* A coff armap looks like :
@ -2132,7 +2137,7 @@ _bfd_archive_bsd_update_armap_timestamp (arch)
symbol name n-1
*/
boolean
bfd_boolean
coff_write_armap (arch, elength, map, symbol_count, stridx)
bfd *arch;
unsigned int elength;
@ -2179,10 +2184,10 @@ coff_write_armap (arch, elength, map, symbol_count, stridx)
if (bfd_bwrite ((PTR) &hdr, (bfd_size_type) sizeof (struct ar_hdr), arch)
!= sizeof (struct ar_hdr))
return false;
return FALSE;
if (!bfd_write_bigendian_4byte_int (arch, symbol_count))
return false;
return FALSE;
/* Two passes, first write the file offsets for each symbol -
remembering that each offset is on a two byte boundary. */
@ -2200,7 +2205,7 @@ coff_write_armap (arch, elength, map, symbol_count, stridx)
while (count < symbol_count && map[count].u.abfd == current)
{
if (!bfd_write_bigendian_4byte_int (arch, archive_member_file_ptr))
return false;
return FALSE;
count++;
}
/* Add size of this archive entry. */
@ -2217,7 +2222,7 @@ coff_write_armap (arch, elength, map, symbol_count, stridx)
size_t len = strlen (*map[count].name) + 1;
if (bfd_bwrite (*map[count].name, (bfd_size_type) len, arch) != len)
return false;
return FALSE;
}
/* The spec sez this should be a newline. But in order to be
@ -2225,8 +2230,8 @@ coff_write_armap (arch, elength, map, symbol_count, stridx)
if (padit)
{
if (bfd_bwrite ("", (bfd_size_type) 1, arch) != 1)
return false;
return FALSE;
}
return true;
return TRUE;
}

View File

@ -1,5 +1,5 @@
/* MIPS-specific support for 64-bit ELF
Copyright 1996, 1997, 1998, 1999, 2000, 2001
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
Ian Lance Taylor, Cygnus Support
Linker support added by Mark Mitchell, CodeSourcery, LLC.
@ -31,13 +31,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Irix 6 defines a 64bit archive map format, so that they can
have archives more than 4 GB in size. */
boolean bfd_elf64_archive_slurp_armap PARAMS ((bfd *));
boolean bfd_elf64_archive_write_armap
bfd_boolean bfd_elf64_archive_slurp_armap PARAMS ((bfd *));
bfd_boolean bfd_elf64_archive_write_armap
PARAMS ((bfd *, unsigned int, struct orl *, unsigned int, int));
/* Read an Irix 6 armap. */
boolean
bfd_boolean
bfd_elf64_archive_slurp_armap (abfd)
bfd *abfd;
{
@ -58,12 +58,12 @@ bfd_elf64_archive_slurp_armap (abfd)
arhdrpos = bfd_tell (abfd);
i = bfd_bread ((PTR) nextname, (bfd_size_type) 16, abfd);
if (i == 0)
return true;
return TRUE;
if (i != 16)
return false;
return FALSE;
if (bfd_seek (abfd, (file_ptr) - 16, SEEK_CUR) != 0)
return false;
return FALSE;
/* Archives with traditional armaps are still permitted. */
if (strncmp (nextname, "/ ", 16) == 0)
@ -71,13 +71,13 @@ bfd_elf64_archive_slurp_armap (abfd)
if (strncmp (nextname, "/SYM64/ ", 16) != 0)
{
bfd_has_map (abfd) = false;
return true;
bfd_has_map (abfd) = FALSE;
return TRUE;
}
mapdata = (struct areltdata *) _bfd_read_ar_hdr (abfd);
if (mapdata == NULL)
return false;
return FALSE;
parsed_size = mapdata->parsed_size;
bfd_release (abfd, (PTR) mapdata);
@ -85,7 +85,7 @@ bfd_elf64_archive_slurp_armap (abfd)
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_malformed_archive);
return false;
return FALSE;
}
nsymz = bfd_getb64 (int_buf);
@ -97,7 +97,7 @@ bfd_elf64_archive_slurp_armap (abfd)
amt = carsym_size + stringsize + 1;
ardata->symdefs = (carsym *) bfd_zalloc (abfd, amt);
if (ardata->symdefs == NULL)
return false;
return FALSE;
carsyms = ardata->symdefs;
stringbase = ((char *) ardata->symdefs) + carsym_size;
@ -127,23 +127,23 @@ bfd_elf64_archive_slurp_armap (abfd)
/* Pad to an even boundary if you have to. */
ardata->first_file_filepos += (ardata->first_file_filepos) % 2;
bfd_has_map (abfd) = true;
bfd_has_map (abfd) = TRUE;
bfd_release (abfd, raw_armap);
return true;
return TRUE;
release_raw_armap:
bfd_release (abfd, raw_armap);
release_symdefs:
bfd_release (abfd, ardata->symdefs);
return false;
return FALSE;
}
/* Write out an Irix 6 armap. The Irix 6 tools are supposed to be
able to handle ordinary ELF armaps, but at least on Irix 6.2 the
linker crashes. */
boolean
bfd_boolean
bfd_elf64_archive_write_armap (arch, elength, map, symbol_count, stridx)
bfd *arch;
unsigned int elength;
@ -189,11 +189,11 @@ bfd_elf64_archive_write_armap (arch, elength, map, symbol_count, stridx)
if (bfd_bwrite ((PTR) &hdr, (bfd_size_type) sizeof (struct ar_hdr), arch)
!= sizeof (struct ar_hdr))
return false;
return FALSE;
bfd_putb64 ((bfd_vma) symbol_count, buf);
if (bfd_bwrite (buf, (bfd_size_type) 8, arch) != 8)
return false;
return FALSE;
/* Two passes, first write the file offsets for each symbol -
remembering that each offset is on a two byte boundary. */
@ -212,7 +212,7 @@ bfd_elf64_archive_write_armap (arch, elength, map, symbol_count, stridx)
{
bfd_putb64 ((bfd_vma) archive_member_file_ptr, buf);
if (bfd_bwrite (buf, (bfd_size_type) 8, arch) != 8)
return false;
return FALSE;
count++;
}
/* Add size of this archive entry */
@ -229,7 +229,7 @@ bfd_elf64_archive_write_armap (arch, elength, map, symbol_count, stridx)
size_t len = strlen (*map[count].name) + 1;
if (bfd_bwrite (*map[count].name, (bfd_size_type) len, arch) != len)
return false;
return FALSE;
}
/* The spec says that this should be padded to an 8 byte boundary.
@ -237,9 +237,9 @@ bfd_elf64_archive_write_armap (arch, elength, map, symbol_count, stridx)
while (padding != 0)
{
if (bfd_bwrite ("", (bfd_size_type) 1, arch) != 1)
return false;
return FALSE;
--padding;
}
return true;
return TRUE;
}

View File

@ -306,15 +306,15 @@ DESCRIPTION
. const char *arch_name;
. const char *printable_name;
. unsigned int section_align_power;
. {* True if this is the default machine for the architecture.
. {* TRUE if this is the default machine for the architecture.
. The default arch should be the first entry for an arch so that
. all the entries for that arch can be accessed via <<next>>. *}
. boolean the_default;
. bfd_boolean the_default;
. const struct bfd_arch_info * (*compatible)
. PARAMS ((const struct bfd_arch_info *a,
. const struct bfd_arch_info *b));
.
. boolean (*scan) PARAMS ((const struct bfd_arch_info *, const char *));
. bfd_boolean (*scan) PARAMS ((const struct bfd_arch_info *, const char *));
.
. const struct bfd_arch_info *next;
.}
@ -585,7 +585,7 @@ DESCRIPTION
*/
const bfd_arch_info_type bfd_default_arch_struct = {
32, 32, 8, bfd_arch_unknown, 0, "unknown", "unknown", 2, true,
32, 32, 8, bfd_arch_unknown, 0, "unknown", "unknown", 2, TRUE,
bfd_default_compatible,
bfd_default_scan,
0,
@ -615,7 +615,7 @@ INTERNAL_FUNCTION
bfd_default_set_arch_mach
SYNOPSIS
boolean bfd_default_set_arch_mach(bfd *abfd,
bfd_boolean bfd_default_set_arch_mach(bfd *abfd,
enum bfd_architecture arch,
unsigned long mach);
@ -626,7 +626,7 @@ DESCRIPTION
pointer.
*/
boolean
bfd_boolean
bfd_default_set_arch_mach (abfd, arch, mach)
bfd *abfd;
enum bfd_architecture arch;
@ -634,11 +634,11 @@ bfd_default_set_arch_mach (abfd, arch, mach)
{
abfd->arch_info = bfd_lookup_arch (arch, mach);
if (abfd->arch_info != NULL)
return true;
return TRUE;
abfd->arch_info = &bfd_default_arch_struct;
bfd_set_error (bfd_error_bad_value);
return false;
return FALSE;
}
/*
@ -755,14 +755,14 @@ INTERNAL_FUNCTION
bfd_default_scan
SYNOPSIS
boolean bfd_default_scan(const struct bfd_arch_info *info, const char *string);
bfd_boolean bfd_default_scan(const struct bfd_arch_info *info, const char *string);
DESCRIPTION
The default function for working out whether this is an
architecture hit and a machine hit.
*/
boolean
bfd_boolean
bfd_default_scan (info, string)
const bfd_arch_info_type *info;
const char *string;
@ -777,11 +777,11 @@ bfd_default_scan (info, string)
default architecture? */
if (strcasecmp (string, info->arch_name) == 0
&& info->the_default)
return true;
return TRUE;
/* Exact match of the machine name (PRINTABLE_NAME)? */
if (strcasecmp (string, info->printable_name) == 0)
return true;
return TRUE;
/* Given that printable_name contains no colon, attempt to match:
ARCH_NAME [ ":" ] PRINTABLE_NAME? */
@ -795,13 +795,13 @@ bfd_default_scan (info, string)
{
if (strcasecmp (string + strlen_arch_name + 1,
info->printable_name) == 0)
return true;
return TRUE;
}
else
{
if (strcasecmp (string + strlen_arch_name,
info->printable_name) == 0)
return true;
return TRUE;
}
}
}
@ -814,7 +814,7 @@ bfd_default_scan (info, string)
if (strncasecmp (string, info->printable_name, colon_index) == 0
&& strcasecmp (string + colon_index,
info->printable_name + colon_index + 1) == 0)
return true;
return TRUE;
}
/* Given that PRINTABLE_NAME has the form: <arch> ":" <mach>; Do not
@ -957,16 +957,16 @@ bfd_default_scan (info, string)
break;
default:
return false;
return FALSE;
}
if (arch != info->arch)
return false;
return FALSE;
if (number != info->mach)
return false;
return FALSE;
return true;
return TRUE;
}
/*

View File

@ -70,42 +70,27 @@ extern "C" {
/* Forward declaration. */
typedef struct _bfd bfd;
/* To squelch erroneous compiler warnings ("illegal pointer
combination") from the SVR3 compiler, we would like to typedef
boolean to int (it doesn't like functions which return boolean.
Making sure they are never implicitly declared to return int
doesn't seem to help). But this file is not configured based on
the host. */
/* General rules: functions which are boolean return true on success
and false on failure (unless they're a predicate). -- bfd.doc */
/* I'm sure this is going to break something and someone is going to
force me to change it. */
/* typedef enum boolean {false, true} boolean; */
/* Yup, SVR4 has a "typedef enum boolean" in <sys/types.h> -fnf */
/* It gets worse if the host also defines a true/false enum... -sts */
/* And even worse if your compiler has built-in boolean types... -law */
/* And even worse if your compiler provides a stdbool.h that conflicts
with these definitions... gcc 2.95 and later do. If so, it must
be included first. -drow */
#if defined (__GNUG__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 6))
#define TRUE_FALSE_ALREADY_DEFINED
#else
#if defined (__bool_true_false_are_defined)
/* We have <stdbool.h>. */
#define TRUE_FALSE_ALREADY_DEFINED
#endif
#endif
#ifdef MPW
/* Pre-emptive strike - get the file with the enum. */
#include <Types.h>
#define TRUE_FALSE_ALREADY_DEFINED
#endif /* MPW */
#ifndef TRUE_FALSE_ALREADY_DEFINED
typedef enum bfd_boolean {false, true} boolean;
#define BFD_TRUE_FALSE
#else
/* Use enum names that will appear nowhere else. */
typedef enum bfd_boolean {bfd_fffalse, bfd_tttrue} boolean;
/* Boolean type used in bfd. Too many systems define their own
versions of "boolean" for us to safely typedef a "boolean" of
our own. Using an enum for "bfd_boolean" has it's own set of
problems, with strange looking casts required to avoid warnings
on some older compilers. Thus we just use an int.
General rule: functions which are bfd_boolean return TRUE on
success and FALSE on failure (unless they're a predicate). */
typedef int bfd_boolean;
#undef FALSE
#undef TRUE
#define FALSE 0
#define TRUE 1
#if 0
/* Poison. */
#undef false
#undef true
#define false dont_use_false_in_bfd
#define true dont_use_true_in_bfd
#endif
/* Support for different sizes of target format ints and addresses.
@ -186,8 +171,10 @@ typedef unsigned long bfd_size_type;
typedef bfd_signed_vma file_ptr;
typedef bfd_vma ufile_ptr;
extern void bfd_sprintf_vma PARAMS ((bfd *, char *, bfd_vma));
extern void bfd_fprintf_vma PARAMS ((bfd *, PTR, bfd_vma));
extern void bfd_sprintf_vma
PARAMS ((bfd *, char *, bfd_vma));
extern void bfd_fprintf_vma
PARAMS ((bfd *, PTR, bfd_vma));
#define printf_vma(x) fprintf_vma(stdout,x)
#define bfd_printf_vma(abfd,x) bfd_fprintf_vma (abfd,stdout,x)
@ -263,7 +250,7 @@ bfd_format;
/* This flag indicates that the BFD contents are actually cached in
memory. If this is set, iostream points to a bfd_in_memory struct. */
#define BFD_IN_MEMORY 0x800
/* The sections in this BFD specify a memory page. */
#define HAS_LOAD_PAGE 0x1000
@ -345,9 +332,9 @@ typedef struct sec *sec_ptr;
#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0)
#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = (unsigned int)true), true)
#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),true)
#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),true)
#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE)
#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE)
#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE)
typedef struct stat stat_type;
@ -373,7 +360,8 @@ typedef struct _symbol_info
/* Get the name of a stabs type code. */
extern const char *bfd_get_stab_name PARAMS ((int));
extern const char *bfd_get_stab_name
PARAMS ((int));
/* Hash table routines. There is no way to free up a hash table. */
@ -406,23 +394,22 @@ struct bfd_hash_table
built each of which calls the function in the superclass. Thus
each function should be written to allocate a new block of memory
only if the argument is NULL. */
struct bfd_hash_entry *(*newfunc) PARAMS ((struct bfd_hash_entry *,
struct bfd_hash_table *,
const char *));
struct bfd_hash_entry *(*newfunc)
PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
/* An objalloc for this hash table. This is a struct objalloc *,
but we use PTR to avoid requiring the inclusion of objalloc.h. */
PTR memory;
};
/* Initialize a hash table. */
extern boolean bfd_hash_table_init
extern bfd_boolean bfd_hash_table_init
PARAMS ((struct bfd_hash_table *,
struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
struct bfd_hash_table *,
const char *)));
/* Initialize a hash table specifying a size. */
extern boolean bfd_hash_table_init_n
extern bfd_boolean bfd_hash_table_init_n
PARAMS ((struct bfd_hash_table *,
struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
struct bfd_hash_table *,
@ -430,15 +417,16 @@ extern boolean bfd_hash_table_init_n
unsigned int size));
/* Free up a hash table. */
extern void bfd_hash_table_free PARAMS ((struct bfd_hash_table *));
extern void bfd_hash_table_free
PARAMS ((struct bfd_hash_table *));
/* Look up a string in a hash table. If CREATE is true, a new entry
/* Look up a string in a hash table. If CREATE is TRUE, a new entry
will be created for this string if one does not already exist. The
COPY argument must be true if this routine should copy the string
COPY argument must be TRUE if this routine should copy the string
into newly allocated memory when adding an entry. */
extern struct bfd_hash_entry *bfd_hash_lookup
PARAMS ((struct bfd_hash_table *, const char *, boolean create,
boolean copy));
PARAMS ((struct bfd_hash_table *, const char *, bfd_boolean create,
bfd_boolean copy));
/* Replace an entry in a hash table. */
extern void bfd_hash_replace
@ -451,16 +439,16 @@ extern struct bfd_hash_entry *bfd_hash_newfunc
const char *));
/* Grab some space for a hash table entry. */
extern PTR bfd_hash_allocate PARAMS ((struct bfd_hash_table *,
unsigned int));
extern PTR bfd_hash_allocate
PARAMS ((struct bfd_hash_table *, unsigned int));
/* Traverse a hash table in a random order, calling a function on each
element. If the function returns false, the traversal stops. The
element. If the function returns FALSE, the traversal stops. The
INFO argument is passed to the function. */
extern void bfd_hash_traverse PARAMS ((struct bfd_hash_table *,
boolean (*) (struct bfd_hash_entry *,
PTR),
PTR info));
extern void bfd_hash_traverse
PARAMS ((struct bfd_hash_table *,
bfd_boolean (*) (struct bfd_hash_entry *, PTR),
PTR info));
#define COFF_SWAP_TABLE (PTR) &bfd_coff_std_swap_table
@ -469,12 +457,18 @@ extern void bfd_hash_traverse PARAMS ((struct bfd_hash_table *,
/* Direct I/O routines, for programs which know more about the object
file than BFD does. Use higher level routines if possible. */
extern bfd_size_type bfd_bread PARAMS ((PTR, bfd_size_type, bfd *));
extern bfd_size_type bfd_bwrite PARAMS ((const PTR, bfd_size_type, bfd *));
extern int bfd_seek PARAMS ((bfd *, file_ptr, int));
extern ufile_ptr bfd_tell PARAMS ((bfd *));
extern int bfd_flush PARAMS ((bfd *));
extern int bfd_stat PARAMS ((bfd *, struct stat *));
extern bfd_size_type bfd_bread
PARAMS ((PTR, bfd_size_type, bfd *));
extern bfd_size_type bfd_bwrite
PARAMS ((const PTR, bfd_size_type, bfd *));
extern int bfd_seek
PARAMS ((bfd *, file_ptr, int));
extern ufile_ptr bfd_tell
PARAMS ((bfd *));
extern int bfd_flush
PARAMS ((bfd *));
extern int bfd_stat
PARAMS ((bfd *, struct stat *));
/* Deprecated old routines. */
#if __GNUC__
@ -529,40 +523,61 @@ extern void warn_deprecated
#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char)
#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = (boolean) (bool)), true)
#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE)
extern boolean bfd_cache_close PARAMS ((bfd *abfd));
extern bfd_boolean bfd_cache_close
PARAMS ((bfd *abfd));
/* NB: This declaration should match the autogenerated one in libbfd.h. */
extern boolean bfd_record_phdr
PARAMS ((bfd *, unsigned long, boolean, flagword, boolean, bfd_vma,
boolean, boolean, unsigned int, struct sec **));
extern bfd_boolean bfd_record_phdr
PARAMS ((bfd *, unsigned long, bfd_boolean, flagword, bfd_boolean, bfd_vma,
bfd_boolean, bfd_boolean, unsigned int, struct sec **));
/* Byte swapping routines. */
bfd_vma bfd_getb64 PARAMS ((const unsigned char *));
bfd_vma bfd_getl64 PARAMS ((const unsigned char *));
bfd_signed_vma bfd_getb_signed_64 PARAMS ((const unsigned char *));
bfd_signed_vma bfd_getl_signed_64 PARAMS ((const unsigned char *));
bfd_vma bfd_getb32 PARAMS ((const unsigned char *));
bfd_vma bfd_getl32 PARAMS ((const unsigned char *));
bfd_signed_vma bfd_getb_signed_32 PARAMS ((const unsigned char *));
bfd_signed_vma bfd_getl_signed_32 PARAMS ((const unsigned char *));
bfd_vma bfd_getb16 PARAMS ((const unsigned char *));
bfd_vma bfd_getl16 PARAMS ((const unsigned char *));
bfd_signed_vma bfd_getb_signed_16 PARAMS ((const unsigned char *));
bfd_signed_vma bfd_getl_signed_16 PARAMS ((const unsigned char *));
void bfd_putb64 PARAMS ((bfd_vma, unsigned char *));
void bfd_putl64 PARAMS ((bfd_vma, unsigned char *));
void bfd_putb32 PARAMS ((bfd_vma, unsigned char *));
void bfd_putl32 PARAMS ((bfd_vma, unsigned char *));
void bfd_putb16 PARAMS ((bfd_vma, unsigned char *));
void bfd_putl16 PARAMS ((bfd_vma, unsigned char *));
bfd_vma bfd_getb64
PARAMS ((const unsigned char *));
bfd_vma bfd_getl64
PARAMS ((const unsigned char *));
bfd_signed_vma bfd_getb_signed_64
PARAMS ((const unsigned char *));
bfd_signed_vma bfd_getl_signed_64
PARAMS ((const unsigned char *));
bfd_vma bfd_getb32
PARAMS ((const unsigned char *));
bfd_vma bfd_getl32
PARAMS ((const unsigned char *));
bfd_signed_vma bfd_getb_signed_32
PARAMS ((const unsigned char *));
bfd_signed_vma bfd_getl_signed_32
PARAMS ((const unsigned char *));
bfd_vma bfd_getb16
PARAMS ((const unsigned char *));
bfd_vma bfd_getl16
PARAMS ((const unsigned char *));
bfd_signed_vma bfd_getb_signed_16
PARAMS ((const unsigned char *));
bfd_signed_vma bfd_getl_signed_16
PARAMS ((const unsigned char *));
void bfd_putb64
PARAMS ((bfd_vma, unsigned char *));
void bfd_putl64
PARAMS ((bfd_vma, unsigned char *));
void bfd_putb32
PARAMS ((bfd_vma, unsigned char *));
void bfd_putl32
PARAMS ((bfd_vma, unsigned char *));
void bfd_putb16
PARAMS ((bfd_vma, unsigned char *));
void bfd_putl16
PARAMS ((bfd_vma, unsigned char *));
/* Byte swapping routines which take size and endiannes as arguments. */
bfd_vma bfd_get_bits PARAMS ((bfd_byte *, int, boolean));
void bfd_put_bits PARAMS ((bfd_vma, bfd_byte *, int, boolean));
bfd_vma bfd_get_bits
PARAMS ((bfd_byte *, int, bfd_boolean));
void bfd_put_bits
PARAMS ((bfd_vma, bfd_byte *, int, bfd_boolean));
/* Externally visible ECOFF routines. */
@ -575,9 +590,11 @@ struct bfd_link_info;
struct bfd_link_hash_entry;
struct bfd_elf_version_tree;
#endif
extern bfd_vma bfd_ecoff_get_gp_value PARAMS ((bfd * abfd));
extern boolean bfd_ecoff_set_gp_value PARAMS ((bfd *abfd, bfd_vma gp_value));
extern boolean bfd_ecoff_set_regmasks
extern bfd_vma bfd_ecoff_get_gp_value
PARAMS ((bfd * abfd));
extern bfd_boolean bfd_ecoff_set_gp_value
PARAMS ((bfd *abfd, bfd_vma gp_value));
extern bfd_boolean bfd_ecoff_set_regmasks
PARAMS ((bfd *abfd, unsigned long gprmask, unsigned long fprmask,
unsigned long *cprmask));
extern PTR bfd_ecoff_debug_init
@ -588,39 +605,39 @@ extern void bfd_ecoff_debug_free
PARAMS ((PTR handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
const struct ecoff_debug_swap *output_swap,
struct bfd_link_info *));
extern boolean bfd_ecoff_debug_accumulate
extern bfd_boolean bfd_ecoff_debug_accumulate
PARAMS ((PTR handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
const struct ecoff_debug_swap *output_swap,
bfd *input_bfd, struct ecoff_debug_info *input_debug,
const struct ecoff_debug_swap *input_swap,
struct bfd_link_info *));
extern boolean bfd_ecoff_debug_accumulate_other
extern bfd_boolean bfd_ecoff_debug_accumulate_other
PARAMS ((PTR handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
const struct ecoff_debug_swap *output_swap, bfd *input_bfd,
struct bfd_link_info *));
extern boolean bfd_ecoff_debug_externals
extern bfd_boolean bfd_ecoff_debug_externals
PARAMS ((bfd *abfd, struct ecoff_debug_info *debug,
const struct ecoff_debug_swap *swap,
boolean relocateable,
boolean (*get_extr) (struct symbol_cache_entry *,
bfd_boolean relocateable,
bfd_boolean (*get_extr) (struct symbol_cache_entry *,
struct ecoff_extr *),
void (*set_index) (struct symbol_cache_entry *,
bfd_size_type)));
extern boolean bfd_ecoff_debug_one_external
extern bfd_boolean bfd_ecoff_debug_one_external
PARAMS ((bfd *abfd, struct ecoff_debug_info *debug,
const struct ecoff_debug_swap *swap,
const char *name, struct ecoff_extr *esym));
extern bfd_size_type bfd_ecoff_debug_size
PARAMS ((bfd *abfd, struct ecoff_debug_info *debug,
const struct ecoff_debug_swap *swap));
extern boolean bfd_ecoff_write_debug
extern bfd_boolean bfd_ecoff_write_debug
PARAMS ((bfd *abfd, struct ecoff_debug_info *debug,
const struct ecoff_debug_swap *swap, file_ptr where));
extern boolean bfd_ecoff_write_accumulated_debug
extern bfd_boolean bfd_ecoff_write_accumulated_debug
PARAMS ((PTR handle, bfd *abfd, struct ecoff_debug_info *debug,
const struct ecoff_debug_swap *swap,
struct bfd_link_info *info, file_ptr where));
extern boolean bfd_mips_ecoff_create_embedded_relocs
extern bfd_boolean bfd_mips_ecoff_create_embedded_relocs
PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *,
char **));
@ -633,36 +650,40 @@ struct bfd_link_needed_list
const char *name;
};
extern boolean bfd_elf32_record_link_assignment
PARAMS ((bfd *, struct bfd_link_info *, const char *, boolean));
extern boolean bfd_elf64_record_link_assignment
PARAMS ((bfd *, struct bfd_link_info *, const char *, boolean));
extern bfd_boolean bfd_elf32_record_link_assignment
PARAMS ((bfd *, struct bfd_link_info *, const char *, bfd_boolean));
extern bfd_boolean bfd_elf64_record_link_assignment
PARAMS ((bfd *, struct bfd_link_info *, const char *, bfd_boolean));
extern struct bfd_link_needed_list *bfd_elf_get_needed_list
PARAMS ((bfd *, struct bfd_link_info *));
extern boolean bfd_elf_get_bfd_needed_list
extern bfd_boolean bfd_elf_get_bfd_needed_list
PARAMS ((bfd *, struct bfd_link_needed_list **));
extern boolean bfd_elf32_size_dynamic_sections
extern bfd_boolean bfd_elf32_size_dynamic_sections
PARAMS ((bfd *, const char *, const char *, const char *,
const char * const *, struct bfd_link_info *, struct sec **,
struct bfd_elf_version_tree *));
extern boolean bfd_elf64_size_dynamic_sections
extern bfd_boolean bfd_elf64_size_dynamic_sections
PARAMS ((bfd *, const char *, const char *, const char *,
const char * const *, struct bfd_link_info *, struct sec **,
struct bfd_elf_version_tree *));
extern void bfd_elf_set_dt_needed_name PARAMS ((bfd *, const char *));
extern void bfd_elf_set_dt_needed_soname PARAMS ((bfd *, const char *));
extern const char *bfd_elf_get_dt_soname PARAMS ((bfd *));
extern void bfd_elf_set_dt_needed_name
PARAMS ((bfd *, const char *));
extern void bfd_elf_set_dt_needed_soname
PARAMS ((bfd *, const char *));
extern const char *bfd_elf_get_dt_soname
PARAMS ((bfd *));
extern struct bfd_link_needed_list *bfd_elf_get_runpath_list
PARAMS ((bfd *, struct bfd_link_info *));
extern boolean bfd_elf32_discard_info
extern bfd_boolean bfd_elf32_discard_info
PARAMS ((bfd *, struct bfd_link_info *));
extern boolean bfd_elf64_discard_info
extern bfd_boolean bfd_elf64_discard_info
PARAMS ((bfd *, struct bfd_link_info *));
/* Return an upper bound on the number of bytes required to store a
copy of ABFD's program header table entries. Return -1 if an error
occurs; bfd_get_error will return an appropriate code. */
extern long bfd_get_elf_phdr_upper_bound PARAMS ((bfd *abfd));
extern long bfd_get_elf_phdr_upper_bound
PARAMS ((bfd *abfd));
/* Copy ABFD's program header table entries to *PHDRS. The entries
will be stored as an array of Elf_Internal_Phdr structures, as
@ -671,18 +692,21 @@ extern long bfd_get_elf_phdr_upper_bound PARAMS ((bfd *abfd));
Return the number of program header table entries read, or -1 if an
error occurs; bfd_get_error will return an appropriate code. */
extern int bfd_get_elf_phdrs PARAMS ((bfd *abfd, void *phdrs));
extern int bfd_get_elf_phdrs
PARAMS ((bfd *abfd, void *phdrs));
/* Return the arch_size field of an elf bfd, or -1 if not elf. */
extern int bfd_get_arch_size PARAMS ((bfd *));
extern int bfd_get_arch_size
PARAMS ((bfd *));
/* Return true if address "naturally" sign extends, or -1 if not elf. */
extern int bfd_get_sign_extend_vma PARAMS ((bfd *));
/* Return TRUE if address "naturally" sign extends, or -1 if not elf. */
extern int bfd_get_sign_extend_vma
PARAMS ((bfd *));
extern boolean bfd_m68k_elf32_create_embedded_relocs
extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs
PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *,
char **));
extern boolean bfd_mips_elf32_create_embedded_relocs
extern bfd_boolean bfd_mips_elf32_create_embedded_relocs
PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *,
char **));
@ -690,19 +714,19 @@ extern boolean bfd_mips_elf32_create_embedded_relocs
extern struct bfd_link_needed_list *bfd_sunos_get_needed_list
PARAMS ((bfd *, struct bfd_link_info *));
extern boolean bfd_sunos_record_link_assignment
extern bfd_boolean bfd_sunos_record_link_assignment
PARAMS ((bfd *, struct bfd_link_info *, const char *));
extern boolean bfd_sunos_size_dynamic_sections
extern bfd_boolean bfd_sunos_size_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *, struct sec **, struct sec **,
struct sec **));
/* Linux shared library support routines for the linker. */
extern boolean bfd_i386linux_size_dynamic_sections
extern bfd_boolean bfd_i386linux_size_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *));
extern boolean bfd_m68klinux_size_dynamic_sections
extern bfd_boolean bfd_m68klinux_size_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *));
extern boolean bfd_sparclinux_size_dynamic_sections
extern bfd_boolean bfd_sparclinux_size_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *));
/* mmap hacks */
@ -725,34 +749,37 @@ typedef struct _bfd_window
}
bfd_window;
extern void bfd_init_window PARAMS ((bfd_window *));
extern void bfd_free_window PARAMS ((bfd_window *));
extern boolean bfd_get_file_window
PARAMS ((bfd *, file_ptr, bfd_size_type, bfd_window *, boolean));
extern void bfd_init_window
PARAMS ((bfd_window *));
extern void bfd_free_window
PARAMS ((bfd_window *));
extern bfd_boolean bfd_get_file_window
PARAMS ((bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean));
/* XCOFF support routines for the linker. */
extern boolean bfd_xcoff_link_record_set
extern bfd_boolean bfd_xcoff_link_record_set
PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *,
bfd_size_type));
extern boolean bfd_xcoff_import_symbol
extern bfd_boolean bfd_xcoff_import_symbol
PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *,
bfd_vma, const char *, const char *, const char *, unsigned int));
extern boolean bfd_xcoff_export_symbol
extern bfd_boolean bfd_xcoff_export_symbol
PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *));
extern boolean bfd_xcoff_link_count_reloc
extern bfd_boolean bfd_xcoff_link_count_reloc
PARAMS ((bfd *, struct bfd_link_info *, const char *));
extern boolean bfd_xcoff_record_link_assignment
extern bfd_boolean bfd_xcoff_record_link_assignment
PARAMS ((bfd *, struct bfd_link_info *, const char *));
extern boolean bfd_xcoff_size_dynamic_sections
extern bfd_boolean bfd_xcoff_size_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *, const char *, const char *,
unsigned long, unsigned long, unsigned long, boolean,
int, boolean, boolean, struct sec **, boolean));
extern boolean bfd_xcoff_link_generate_rtinit
PARAMS ((bfd *, const char *, const char *, boolean));
unsigned long, unsigned long, unsigned long, bfd_boolean,
int, bfd_boolean, bfd_boolean, struct sec **, bfd_boolean));
extern bfd_boolean bfd_xcoff_link_generate_rtinit
PARAMS ((bfd *, const char *, const char *, bfd_boolean));
/* XCOFF support routines for ar. */
extern boolean bfd_xcoff_ar_archive_set_magic PARAMS ((bfd *, char *));
extern bfd_boolean bfd_xcoff_ar_archive_set_magic
PARAMS ((bfd *, char *));
/* Externally visible COFF routines. */
@ -761,50 +788,50 @@ struct internal_syment;
union internal_auxent;
#endif
extern boolean bfd_coff_get_syment
extern bfd_boolean bfd_coff_get_syment
PARAMS ((bfd *, struct symbol_cache_entry *, struct internal_syment *));
extern boolean bfd_coff_get_auxent
extern bfd_boolean bfd_coff_get_auxent
PARAMS ((bfd *, struct symbol_cache_entry *, int, union internal_auxent *));
extern boolean bfd_coff_set_symbol_class
extern bfd_boolean bfd_coff_set_symbol_class
PARAMS ((bfd *, struct symbol_cache_entry *, unsigned int));
extern boolean bfd_m68k_coff_create_embedded_relocs
extern bfd_boolean bfd_m68k_coff_create_embedded_relocs
PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *,
char **));
/* ARM Interworking support. Called from linker. */
extern boolean bfd_arm_allocate_interworking_sections
extern bfd_boolean bfd_arm_allocate_interworking_sections
PARAMS ((struct bfd_link_info *));
extern boolean bfd_arm_process_before_allocation
extern bfd_boolean bfd_arm_process_before_allocation
PARAMS ((bfd *, struct bfd_link_info *, int));
extern boolean bfd_arm_get_bfd_for_interworking
extern bfd_boolean bfd_arm_get_bfd_for_interworking
PARAMS ((bfd *, struct bfd_link_info *));
/* PE ARM Interworking support. Called from linker. */
extern boolean bfd_arm_pe_allocate_interworking_sections
extern bfd_boolean bfd_arm_pe_allocate_interworking_sections
PARAMS ((struct bfd_link_info *));
extern boolean bfd_arm_pe_process_before_allocation
extern bfd_boolean bfd_arm_pe_process_before_allocation
PARAMS ((bfd *, struct bfd_link_info *, int));
extern boolean bfd_arm_pe_get_bfd_for_interworking
extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking
PARAMS ((bfd *, struct bfd_link_info *));
/* ELF ARM Interworking support. Called from linker. */
extern boolean bfd_elf32_arm_allocate_interworking_sections
extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections
PARAMS ((struct bfd_link_info *));
extern boolean bfd_elf32_arm_process_before_allocation
extern bfd_boolean bfd_elf32_arm_process_before_allocation
PARAMS ((bfd *, struct bfd_link_info *, int));
extern boolean bfd_elf32_arm_get_bfd_for_interworking
extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking
PARAMS ((bfd *, struct bfd_link_info *));
extern boolean bfd_elf32_arm_add_glue_sections_to_bfd
extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd
PARAMS ((bfd *, struct bfd_link_info *));
/* TI COFF load page support. */

File diff suppressed because it is too large Load Diff

View File

@ -53,12 +53,12 @@ CODE_FRAGMENT
.
. {* Is the file descriptor being cached? That is, can it be closed as
. needed, and re-opened when accessed later? *}
. boolean cacheable;
. bfd_boolean cacheable;
.
. {* Marks whether there was a default target specified when the
. BFD was opened. This is used to select which matching algorithm
. to use to choose the back end. *}
. boolean target_defaulted;
. bfd_boolean target_defaulted;
.
. {* The caching routines use these to maintain a
. least-recently-used list of BFDs. *}
@ -69,13 +69,13 @@ CODE_FRAGMENT
. ufile_ptr where;
.
. {* ... and here: (``once'' means at least once). *}
. boolean opened_once;
. bfd_boolean opened_once;
.
. {* Set if we have a locally maintained mtime value, rather than
. getting it from the file each time. *}
. boolean mtime_set;
. bfd_boolean mtime_set;
.
. {* File modified time, if mtime_set is true. *}
. {* File modified time, if mtime_set is TRUE. *}
. long mtime;
.
. {* Reserved for an unimplemented file locking extension. *}
@ -104,7 +104,7 @@ CODE_FRAGMENT
.
. {* Remember when output has begun, to stop strange things
. from happening. *}
. boolean output_has_begun;
. bfd_boolean output_has_begun;
.
. {* A hash table for section names. *}
. struct bfd_hash_table section_htab;
@ -139,7 +139,7 @@ CODE_FRAGMENT
. struct _bfd *my_archive; {* The containing archive BFD. *}
. struct _bfd *next; {* The next BFD in the archive. *}
. struct _bfd *archive_head; {* The first BFD in the archive. *}
. boolean has_armap;
. bfd_boolean has_armap;
.
. {* A chain of BFD structures involved in a link. *}
. struct _bfd *link_next;
@ -659,7 +659,7 @@ FUNCTION
bfd_set_file_flags
SYNOPSIS
boolean bfd_set_file_flags(bfd *abfd, flagword flags);
bfd_boolean bfd_set_file_flags(bfd *abfd, flagword flags);
DESCRIPTION
Set the flag word in the BFD @var{abfd} to the value @var{flags}.
@ -674,7 +674,7 @@ DESCRIPTION
*/
boolean
bfd_boolean
bfd_set_file_flags (abfd, flags)
bfd *abfd;
flagword flags;
@ -682,23 +682,23 @@ bfd_set_file_flags (abfd, flags)
if (abfd->format != bfd_object)
{
bfd_set_error (bfd_error_wrong_format);
return false;
return FALSE;
}
if (bfd_read_p (abfd))
{
bfd_set_error (bfd_error_invalid_operation);
return false;
return FALSE;
}
bfd_get_file_flags (abfd) = flags;
if ((flags & bfd_applicable_file_flags (abfd)) != flags)
{
bfd_set_error (bfd_error_invalid_operation);
return false;
return FALSE;
}
return true;
return TRUE;
}
void
@ -810,22 +810,22 @@ FUNCTION
bfd_set_start_address
SYNOPSIS
boolean bfd_set_start_address(bfd *abfd, bfd_vma vma);
bfd_boolean bfd_set_start_address(bfd *abfd, bfd_vma vma);
DESCRIPTION
Make @var{vma} the entry point of output BFD @var{abfd}.
RETURNS
Returns <<true>> on success, <<false>> otherwise.
Returns <<TRUE>> on success, <<FALSE>> otherwise.
*/
boolean
bfd_boolean
bfd_set_start_address (abfd, vma)
bfd *abfd;
bfd_vma vma;
{
abfd->start_address = vma;
return true;
return TRUE;
}
/*
@ -1013,11 +1013,11 @@ FUNCTION
bfd_copy_private_bfd_data
SYNOPSIS
boolean bfd_copy_private_bfd_data(bfd *ibfd, bfd *obfd);
bfd_boolean bfd_copy_private_bfd_data(bfd *ibfd, bfd *obfd);
DESCRIPTION
Copy private BFD information from the BFD @var{ibfd} to the
the BFD @var{obfd}. Return <<true>> on success, <<false>> on error.
the BFD @var{obfd}. Return <<TRUE>> on success, <<FALSE>> on error.
Possible error returns are:
o <<bfd_error_no_memory>> -
@ -1034,12 +1034,12 @@ FUNCTION
bfd_merge_private_bfd_data
SYNOPSIS
boolean bfd_merge_private_bfd_data(bfd *ibfd, bfd *obfd);
bfd_boolean bfd_merge_private_bfd_data(bfd *ibfd, bfd *obfd);
DESCRIPTION
Merge private BFD information from the BFD @var{ibfd} to the
the output file BFD @var{obfd} when linking. Return <<true>>
on success, <<false>> on error. Possible error returns are:
the output file BFD @var{obfd} when linking. Return <<TRUE>>
on success, <<FALSE>> on error. Possible error returns are:
o <<bfd_error_no_memory>> -
Not enough memory exists to create private data for @var{obfd}.
@ -1055,11 +1055,11 @@ FUNCTION
bfd_set_private_flags
SYNOPSIS
boolean bfd_set_private_flags(bfd *abfd, flagword flags);
bfd_boolean bfd_set_private_flags(bfd *abfd, flagword flags);
DESCRIPTION
Set private BFD flag information in the BFD @var{abfd}.
Return <<true>> on success, <<false>> on error. Possible error
Return <<TRUE>> on success, <<FALSE>> on error. Possible error
returns are:
o <<bfd_error_no_memory>> -
@ -1152,7 +1152,7 @@ DESCRIPTION
.extern bfd_byte *bfd_get_relocated_section_contents
. PARAMS ((bfd *, struct bfd_link_info *,
. struct bfd_link_order *, bfd_byte *,
. boolean, asymbol **));
. bfd_boolean, asymbol **));
.
*/
@ -1164,12 +1164,12 @@ bfd_get_relocated_section_contents (abfd, link_info, link_order, data,
struct bfd_link_info *link_info;
struct bfd_link_order *link_order;
bfd_byte *data;
boolean relocateable;
bfd_boolean relocateable;
asymbol **symbols;
{
bfd *abfd2;
bfd_byte *(*fn) PARAMS ((bfd *, struct bfd_link_info *,
struct bfd_link_order *, bfd_byte *, boolean,
struct bfd_link_order *, bfd_byte *, bfd_boolean,
asymbol **));
if (link_order->type == bfd_indirect_link_order)
@ -1188,17 +1188,17 @@ bfd_get_relocated_section_contents (abfd, link_info, link_order, data,
/* Record information about an ELF program header. */
boolean
bfd_boolean
bfd_record_phdr (abfd, type, flags_valid, flags, at_valid, at,
includes_filehdr, includes_phdrs, count, secs)
bfd *abfd;
unsigned long type;
boolean flags_valid;
bfd_boolean flags_valid;
flagword flags;
boolean at_valid;
bfd_boolean at_valid;
bfd_vma at;
boolean includes_filehdr;
boolean includes_phdrs;
bfd_boolean includes_filehdr;
bfd_boolean includes_phdrs;
unsigned int count;
asection **secs;
{
@ -1206,13 +1206,13 @@ bfd_record_phdr (abfd, type, flags_valid, flags, at_valid, at,
bfd_size_type amt;
if (bfd_get_flavour (abfd) != bfd_target_elf_flavour)
return true;
return TRUE;
amt = sizeof (struct elf_segment_map);
amt += ((bfd_size_type) count - 1) * sizeof (asection *);
m = (struct elf_segment_map *) bfd_alloc (abfd, amt);
if (m == NULL)
return false;
return FALSE;
m->next = NULL;
m->p_type = type;
@ -1230,7 +1230,7 @@ bfd_record_phdr (abfd, type, flags_valid, flags, at_valid, at,
;
*pm = m;
return true;
return TRUE;
}
void
@ -1262,7 +1262,7 @@ FUNCTION
bfd_alt_mach_code
SYNOPSIS
boolean bfd_alt_mach_code(bfd *abfd, int alternative);
bfd_boolean bfd_alt_mach_code(bfd *abfd, int alternative);
DESCRIPTION
@ -1273,7 +1273,7 @@ DESCRIPTION
machine codes.
*/
boolean
bfd_boolean
bfd_alt_mach_code (abfd, alternative)
bfd *abfd;
int alternative;
@ -1291,25 +1291,25 @@ bfd_alt_mach_code (abfd, alternative)
case 1:
code = get_elf_backend_data (abfd)->elf_machine_alt1;
if (code == 0)
return false;
return FALSE;
break;
case 2:
code = get_elf_backend_data (abfd)->elf_machine_alt2;
if (code == 0)
return false;
return FALSE;
break;
default:
return false;
return FALSE;
}
elf_elfheader (abfd)->e_machine = code;
return true;
return TRUE;
}
return false;
return FALSE;
}
/*
@ -1334,7 +1334,7 @@ FUNCTION
bfd_preserve_save
SYNOPSIS
boolean bfd_preserve_save (bfd *, struct bfd_preserve *);
bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *);
DESCRIPTION
When testing an object for compatibility with a particular
@ -1349,7 +1349,7 @@ DESCRIPTION
*/
boolean
bfd_boolean
bfd_preserve_save (abfd, preserve)
bfd *abfd;
struct bfd_preserve *preserve;
@ -1363,7 +1363,7 @@ bfd_preserve_save (abfd, preserve)
preserve->section_htab = abfd->section_htab;
if (! bfd_hash_table_init (&abfd->section_htab, bfd_section_hash_newfunc))
return false;
return FALSE;
abfd->tdata.any = NULL;
abfd->arch_info = &bfd_default_arch_struct;
@ -1372,7 +1372,7 @@ bfd_preserve_save (abfd, preserve)
abfd->section_tail = &abfd->sections;
abfd->section_count = 0;
return true;
return TRUE;
}
/*

View File

@ -107,13 +107,13 @@ bfd_free_window (windowp)
static int ok_to_map = 1;
boolean
bfd_boolean
bfd_get_file_window (abfd, offset, size, windowp, writable)
bfd *abfd;
file_ptr offset;
bfd_size_type size;
bfd_window *windowp;
boolean writable;
bfd_boolean writable;
{
static size_t pagesize;
bfd_window_internal *i = windowp->i;
@ -137,7 +137,7 @@ bfd_get_file_window (abfd, offset, size, windowp, writable)
bfd_zmalloc ((bfd_size_type) sizeof (bfd_window_internal)));
windowp->i = i;
if (i == 0)
return false;
return FALSE;
i->data = 0;
}
#ifdef HAVE_MMAP
@ -189,7 +189,7 @@ bfd_get_file_window (abfd, offset, size, windowp, writable)
windowp->data = 0;
if (debug_windows)
fprintf (stderr, "\t\tmmap failed!\n");
return false;
return FALSE;
}
if (debug_windows)
fprintf (stderr, "\n\tmapped %ld at %p, offset is %ld\n",
@ -198,7 +198,7 @@ bfd_get_file_window (abfd, offset, size, windowp, writable)
windowp->data = (PTR) ((bfd_byte *) i->data + offset2);
windowp->size = size;
i->mapped = 1;
return true;
return TRUE;
}
else if (debug_windows)
{
@ -229,14 +229,14 @@ bfd_get_file_window (abfd, offset, size, windowp, writable)
if (i->data == NULL)
{
if (size_to_alloc == 0)
return true;
return false;
return TRUE;
return FALSE;
}
if (bfd_seek (abfd, offset, SEEK_SET) != 0)
return false;
return FALSE;
i->size = bfd_bread (i->data, size, abfd);
if (i->size != size)
return false;
return FALSE;
i->mapped = 0;
#ifdef HAVE_MPROTECT
if (!writable)
@ -249,7 +249,7 @@ bfd_get_file_window (abfd, offset, size, windowp, writable)
#endif
windowp->data = i->data;
windowp->size = i->size;
return true;
return TRUE;
}
#endif /* USE_MMAP */

View File

@ -41,17 +41,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
a start symbol, an end symbol, and an absolute length symbol. */
#define BIN_SYMS 3
static boolean binary_mkobject PARAMS ((bfd *));
static bfd_boolean binary_mkobject PARAMS ((bfd *));
static const bfd_target *binary_object_p PARAMS ((bfd *));
static boolean binary_get_section_contents
static bfd_boolean binary_get_section_contents
PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
static long binary_get_symtab_upper_bound PARAMS ((bfd *));
static char *mangle_name PARAMS ((bfd *, char *));
static long binary_get_symtab PARAMS ((bfd *, asymbol **));
static void binary_get_symbol_info PARAMS ((bfd *, asymbol *, symbol_info *));
static boolean binary_set_section_contents
static bfd_boolean binary_set_section_contents
PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
static int binary_sizeof_headers PARAMS ((bfd *, boolean));
static int binary_sizeof_headers PARAMS ((bfd *, bfd_boolean));
/* Set by external programs - specifies the BFD architecture
to use when creating binary BFDs. */
@ -59,11 +59,11 @@ enum bfd_architecture bfd_external_binary_architecture = bfd_arch_unknown;
/* Create a binary object. Invoked via bfd_set_format. */
static boolean
static bfd_boolean
binary_mkobject (abfd)
bfd *abfd ATTRIBUTE_UNUSED;
{
return true;
return TRUE;
}
/* Any file may be considered to be a binary file, provided the target
@ -119,7 +119,7 @@ binary_object_p (abfd)
/* Get contents of the only section. */
static boolean
static bfd_boolean
binary_get_section_contents (abfd, section, location, offset, count)
bfd *abfd;
asection *section ATTRIBUTE_UNUSED;
@ -129,8 +129,8 @@ binary_get_section_contents (abfd, section, location, offset, count)
{
if (bfd_seek (abfd, offset, SEEK_SET) != 0
|| bfd_bread (location, count, abfd) != count)
return false;
return true;
return FALSE;
return TRUE;
}
/* Return the amount of memory needed to read the symbol table. */
@ -185,7 +185,7 @@ binary_get_symtab (abfd, alocation)
syms = (asymbol *) bfd_alloc (abfd, amt);
if (syms == NULL)
return (long) false;
return 0;
/* Start symbol. */
syms[0].the_bfd = abfd;
@ -250,7 +250,7 @@ binary_get_symbol_info (ignore_abfd, symbol, ret)
/* Write section contents of a binary file. */
static boolean
static bfd_boolean
binary_set_section_contents (abfd, sec, data, offset, size)
bfd *abfd;
asection *sec;
@ -259,18 +259,18 @@ binary_set_section_contents (abfd, sec, data, offset, size)
bfd_size_type size;
{
if (size == 0)
return true;
return TRUE;
if (! abfd->output_has_begun)
{
boolean found_low;
bfd_boolean found_low;
bfd_vma low;
asection *s;
/* The lowest section LMA sets the virtual address of the start
of the file. We use this to set the file position of all the
sections. */
found_low = false;
found_low = FALSE;
low = 0;
for (s = abfd->sections; s != NULL; s = s->next)
if (((s->flags
@ -280,7 +280,7 @@ binary_set_section_contents (abfd, sec, data, offset, size)
&& (! found_low || s->lma < low))
{
low = s->lma;
found_low = true;
found_low = TRUE;
}
for (s = abfd->sections; s != NULL; s = s->next)
@ -308,16 +308,16 @@ binary_set_section_contents (abfd, sec, data, offset, size)
(unsigned long) s->filepos);
}
abfd->output_has_begun = true;
abfd->output_has_begun = TRUE;
}
/* We don't want to output anything for a section that is neither
loaded nor allocated. The contents of such a section are not
meaningful in the binary format. */
if ((sec->flags & (SEC_LOAD | SEC_ALLOC)) == 0)
return true;
return TRUE;
if ((sec->flags & SEC_NEVER_LOAD) != 0)
return true;
return TRUE;
return _bfd_generic_set_section_contents (abfd, sec, data, offset, size);
}
@ -327,7 +327,7 @@ binary_set_section_contents (abfd, sec, data, offset, size)
static int
binary_sizeof_headers (abfd, exec)
bfd *abfd ATTRIBUTE_UNUSED;
boolean exec ATTRIBUTE_UNUSED;
bfd_boolean exec ATTRIBUTE_UNUSED;
{
return 0;
}

View File

@ -30,30 +30,59 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "aout/stab_gnu.h"
#include "libaout.h" /* BFD a.out internal data structures. */
static int aligncode PARAMS ((bfd *abfd, asection *input_section, arelent *r, unsigned int shrink));
static void perform_slip PARAMS ((bfd *abfd, unsigned int slip, asection *input_section, bfd_vma value));
static boolean b_out_squirt_out_relocs PARAMS ((bfd *abfd, asection *section));
static const bfd_target * b_out_callback PARAMS ((bfd *));
static bfd_reloc_status_type calljx_callback PARAMS ((bfd *, struct bfd_link_info *, arelent *, PTR src, PTR dst, asection *));
static bfd_reloc_status_type callj_callback PARAMS ((bfd *, struct bfd_link_info *, arelent *, PTR data, unsigned int srcidx, unsigned int dstidx, asection *, boolean));
static bfd_vma get_value PARAMS ((arelent *, struct bfd_link_info *, asection *));
static int abs32code PARAMS ((bfd *, asection *, arelent *, unsigned int, struct bfd_link_info *));
static boolean b_out_bfd_relax_section PARAMS ((bfd *, asection *, struct bfd_link_info *, boolean *));
static bfd_byte * b_out_bfd_get_relocated_section_contents PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *, boolean, asymbol **));
static int b_out_sizeof_headers PARAMS ((bfd *, boolean));
static boolean b_out_set_arch_mach PARAMS ((bfd *, enum bfd_architecture, unsigned long));
static boolean b_out_set_section_contents PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
static long b_out_get_reloc_upper_bound PARAMS ((bfd *, sec_ptr));
static long b_out_canonicalize_reloc PARAMS ((bfd *, sec_ptr, arelent **, asymbol **));
static boolean b_out_slurp_reloc_table PARAMS ((bfd *, sec_ptr, asymbol **));
static reloc_howto_type * b_out_bfd_reloc_type_lookup PARAMS ((bfd *, bfd_reloc_code_real_type));
static boolean b_out_write_object_contents PARAMS ((bfd *));
static int b_out_symbol_cmp PARAMS ((const void *, const void *));
static boolean b_out_mkobject PARAMS ((bfd *));
static const bfd_target * b_out_object_p PARAMS ((bfd *));
static int aligncode
PARAMS ((bfd *abfd, asection *input_section, arelent *r,
unsigned int shrink));
static void perform_slip
PARAMS ((bfd *abfd, unsigned int slip, asection *input_section,
bfd_vma value));
static bfd_boolean b_out_squirt_out_relocs
PARAMS ((bfd *abfd, asection *section));
static const bfd_target *b_out_callback
PARAMS ((bfd *));
static bfd_reloc_status_type calljx_callback
PARAMS ((bfd *, struct bfd_link_info *, arelent *, PTR src, PTR dst,
asection *));
static bfd_reloc_status_type callj_callback
PARAMS ((bfd *, struct bfd_link_info *, arelent *, PTR data,
unsigned int srcidx, unsigned int dstidx, asection *, bfd_boolean));
static bfd_vma get_value
PARAMS ((arelent *, struct bfd_link_info *, asection *));
static int abs32code
PARAMS ((bfd *, asection *, arelent *, unsigned int,
struct bfd_link_info *));
static bfd_boolean b_out_bfd_relax_section
PARAMS ((bfd *, asection *, struct bfd_link_info *, bfd_boolean *));
static bfd_byte *b_out_bfd_get_relocated_section_contents
PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *,
bfd_boolean, asymbol **));
static int b_out_sizeof_headers
PARAMS ((bfd *, bfd_boolean));
static bfd_boolean b_out_set_arch_mach
PARAMS ((bfd *, enum bfd_architecture, unsigned long));
static bfd_boolean b_out_set_section_contents
PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
static long b_out_get_reloc_upper_bound
PARAMS ((bfd *, sec_ptr));
static long b_out_canonicalize_reloc
PARAMS ((bfd *, sec_ptr, arelent **, asymbol **));
static bfd_boolean b_out_slurp_reloc_table
PARAMS ((bfd *, sec_ptr, asymbol **));
static reloc_howto_type *b_out_bfd_reloc_type_lookup
PARAMS ((bfd *, bfd_reloc_code_real_type));
static bfd_boolean b_out_write_object_contents
PARAMS ((bfd *));
static int b_out_symbol_cmp
PARAMS ((const void *, const void *));
static bfd_boolean b_out_mkobject
PARAMS ((bfd *));
static const bfd_target *b_out_object_p
PARAMS ((bfd *));
void bout_swap_exec_header_in PARAMS ((bfd *, struct external_exec *, struct internal_exec *));
void bout_swap_exec_header_out PARAMS ((bfd *, struct internal_exec *, struct external_exec *));
void bout_swap_exec_header_in
PARAMS ((bfd *, struct external_exec *, struct internal_exec *));
void bout_swap_exec_header_out
PARAMS ((bfd *, struct internal_exec *, struct external_exec *));
/* Swaps the information in an executable header taken from a raw byte
stream memory image, into the internal exec_header structure. */
@ -201,7 +230,7 @@ struct bout_data_struct
struct internal_exec e;
};
static boolean
static bfd_boolean
b_out_mkobject (abfd)
bfd *abfd;
{
@ -210,7 +239,7 @@ b_out_mkobject (abfd)
rawptr = (struct bout_data_struct *) bfd_zalloc (abfd, amt);
if (rawptr == NULL)
return false;
return FALSE;
abfd->tdata.bout_data = rawptr;
exec_hdr (abfd) = &rawptr->e;
@ -219,7 +248,7 @@ b_out_mkobject (abfd)
obj_datasec (abfd) = (asection *) NULL;
obj_bsssec (abfd) = (asection *) NULL;
return true;
return TRUE;
}
static int
@ -253,7 +282,7 @@ b_out_symbol_cmp (a_ptr, b_ptr)
return 0;
}
static boolean
static bfd_boolean
b_out_write_object_contents (abfd)
bfd *abfd;
{
@ -261,7 +290,7 @@ b_out_write_object_contents (abfd)
bfd_size_type amt;
if (! aout_32_make_sections (abfd))
return false;
return FALSE;
exec_hdr (abfd)->a_info = BMAGIC;
@ -287,7 +316,7 @@ b_out_write_object_contents (abfd)
amt = EXEC_BYTES_SIZE;
if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0
|| bfd_bwrite ((PTR) &swapped_hdr, amt, abfd) != amt)
return false;
return FALSE;
/* Now write out reloc info, followed by syms and strings */
if (bfd_get_symcount (abfd) != 0)
@ -319,23 +348,25 @@ b_out_write_object_contents (abfd)
/* Back to your regularly scheduled program. */
if (bfd_seek (abfd, (file_ptr) (N_SYMOFF(*exec_hdr(abfd))), SEEK_SET)
!= 0)
return false;
return FALSE;
if (! aout_32_write_syms (abfd))
return false;
return FALSE;
if (bfd_seek (abfd, (file_ptr) (N_TROFF(*exec_hdr(abfd))), SEEK_SET)
!= 0)
return false;
return FALSE;
if (!b_out_squirt_out_relocs (abfd, obj_textsec (abfd))) return false;
if (!b_out_squirt_out_relocs (abfd, obj_textsec (abfd)))
return FALSE;
if (bfd_seek (abfd, (file_ptr) (N_DROFF(*exec_hdr(abfd))), SEEK_SET)
!= 0)
return false;
return FALSE;
if (!b_out_squirt_out_relocs (abfd, obj_datasec (abfd))) return false;
if (!b_out_squirt_out_relocs (abfd, obj_datasec (abfd)))
return FALSE;
}
return true;
return TRUE;
}
/* Some reloc hackery. */
@ -400,7 +431,7 @@ callj_callback (abfd, link_info, reloc_entry, data, srcidx, dstidx,
unsigned int srcidx;
unsigned int dstidx;
asection *input_section;
boolean shrinking;
bfd_boolean shrinking;
{
int word = bfd_get_32 (abfd, (bfd_byte *) data + srcidx);
asymbol *symbol_in = *(reloc_entry->sym_ptr_ptr);
@ -467,33 +498,33 @@ callj_callback (abfd, link_info, reloc_entry, data, srcidx, dstidx,
#define ALIGNER 10
#define ALIGNDONE 11
static reloc_howto_type howto_reloc_callj =
HOWTO(CALLJ, 0, 2, 24, true, 0, complain_overflow_signed, 0,"callj", true, 0x00ffffff, 0x00ffffff,false);
HOWTO(CALLJ, 0, 2, 24, TRUE, 0, complain_overflow_signed, 0,"callj", TRUE, 0x00ffffff, 0x00ffffff,FALSE);
static reloc_howto_type howto_reloc_abs32 =
HOWTO(ABS32, 0, 2, 32, false, 0, complain_overflow_bitfield,0,"abs32", true, 0xffffffff,0xffffffff,false);
HOWTO(ABS32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,0,"abs32", TRUE, 0xffffffff,0xffffffff,FALSE);
static reloc_howto_type howto_reloc_pcrel24 =
HOWTO(PCREL24, 0, 2, 24, true, 0, complain_overflow_signed,0,"pcrel24", true, 0x00ffffff,0x00ffffff,false);
HOWTO(PCREL24, 0, 2, 24, TRUE, 0, complain_overflow_signed,0,"pcrel24", TRUE, 0x00ffffff,0x00ffffff,FALSE);
static reloc_howto_type howto_reloc_pcrel13 =
HOWTO(PCREL13, 0, 2, 13, true, 0, complain_overflow_signed,0,"pcrel13", true, 0x00001fff,0x00001fff,false);
HOWTO(PCREL13, 0, 2, 13, TRUE, 0, complain_overflow_signed,0,"pcrel13", TRUE, 0x00001fff,0x00001fff,FALSE);
static reloc_howto_type howto_reloc_abs32codeshrunk =
HOWTO(ABS32CODE_SHRUNK, 0, 2, 24, true, 0, complain_overflow_signed, 0,"callx->callj", true, 0x00ffffff, 0x00ffffff,false);
HOWTO(ABS32CODE_SHRUNK, 0, 2, 24, TRUE, 0, complain_overflow_signed, 0,"callx->callj", TRUE, 0x00ffffff, 0x00ffffff,FALSE);
static reloc_howto_type howto_reloc_abs32code =
HOWTO(ABS32CODE, 0, 2, 32, false, 0, complain_overflow_bitfield,0,"callx", true, 0xffffffff,0xffffffff,false);
HOWTO(ABS32CODE, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,0,"callx", TRUE, 0xffffffff,0xffffffff,FALSE);
static reloc_howto_type howto_align_table[] = {
HOWTO (ALIGNER, 0, 0x1, 0, false, 0, complain_overflow_dont, 0, "align16", false, 0, 0, false),
HOWTO (ALIGNER, 0, 0x3, 0, false, 0, complain_overflow_dont, 0, "align32", false, 0, 0, false),
HOWTO (ALIGNER, 0, 0x7, 0, false, 0, complain_overflow_dont, 0, "align64", false, 0, 0, false),
HOWTO (ALIGNER, 0, 0xf, 0, false, 0, complain_overflow_dont, 0, "align128", false, 0, 0, false),
HOWTO (ALIGNER, 0, 0x1, 0, FALSE, 0, complain_overflow_dont, 0, "align16", FALSE, 0, 0, FALSE),
HOWTO (ALIGNER, 0, 0x3, 0, FALSE, 0, complain_overflow_dont, 0, "align32", FALSE, 0, 0, FALSE),
HOWTO (ALIGNER, 0, 0x7, 0, FALSE, 0, complain_overflow_dont, 0, "align64", FALSE, 0, 0, FALSE),
HOWTO (ALIGNER, 0, 0xf, 0, FALSE, 0, complain_overflow_dont, 0, "align128", FALSE, 0, 0, FALSE),
};
static reloc_howto_type howto_done_align_table[] = {
HOWTO (ALIGNDONE, 0x1, 0x1, 0, false, 0, complain_overflow_dont, 0, "donealign16", false, 0, 0, false),
HOWTO (ALIGNDONE, 0x3, 0x3, 0, false, 0, complain_overflow_dont, 0, "donealign32", false, 0, 0, false),
HOWTO (ALIGNDONE, 0x7, 0x7, 0, false, 0, complain_overflow_dont, 0, "donealign64", false, 0, 0, false),
HOWTO (ALIGNDONE, 0xf, 0xf, 0, false, 0, complain_overflow_dont, 0, "donealign128", false, 0, 0, false),
HOWTO (ALIGNDONE, 0x1, 0x1, 0, FALSE, 0, complain_overflow_dont, 0, "donealign16", FALSE, 0, 0, FALSE),
HOWTO (ALIGNDONE, 0x3, 0x3, 0, FALSE, 0, complain_overflow_dont, 0, "donealign32", FALSE, 0, 0, FALSE),
HOWTO (ALIGNDONE, 0x7, 0x7, 0, FALSE, 0, complain_overflow_dont, 0, "donealign64", FALSE, 0, 0, FALSE),
HOWTO (ALIGNDONE, 0xf, 0xf, 0, FALSE, 0, complain_overflow_dont, 0, "donealign128", FALSE, 0, 0, FALSE),
};
static reloc_howto_type *
@ -517,7 +548,7 @@ b_out_bfd_reloc_type_lookup (abfd, code)
/* Allocate enough room for all the reloc entries, plus pointers to them all. */
static boolean
static bfd_boolean
b_out_slurp_reloc_table (abfd, asect, symbols)
bfd *abfd;
sec_ptr asect;
@ -536,10 +567,10 @@ b_out_slurp_reloc_table (abfd, asect, symbols)
arelent *reloc_cache;
if (asect->relocation)
return true;
return TRUE;
if (!aout_32_slurp_symbol_table (abfd))
return false;
return FALSE;
if (asect == obj_datasec (abfd))
{
@ -560,16 +591,16 @@ b_out_slurp_reloc_table (abfd, asect, symbols)
}
bfd_set_error (bfd_error_invalid_operation);
return false;
return FALSE;
doit:
if (bfd_seek (abfd, asect->rel_filepos, SEEK_SET) != 0)
return false;
return FALSE;
count = reloc_size / sizeof (struct relocation_info);
relocs = (struct relocation_info *) bfd_malloc (reloc_size);
if (!relocs && reloc_size != 0)
return false;
return FALSE;
amt = ((bfd_size_type) count + 1) * sizeof (arelent);
reloc_cache = (arelent *) bfd_malloc (amt);
@ -577,7 +608,7 @@ b_out_slurp_reloc_table (abfd, asect, symbols)
{
if (relocs != NULL)
free (relocs);
return false;
return FALSE;
}
if (bfd_bread ((PTR) relocs, reloc_size, abfd) != reloc_size)
@ -585,7 +616,7 @@ b_out_slurp_reloc_table (abfd, asect, symbols)
free (reloc_cache);
if (relocs != NULL)
free (relocs);
return false;
return FALSE;
}
if (bfd_header_big_endian (abfd))
@ -740,10 +771,10 @@ b_out_slurp_reloc_table (abfd, asect, symbols)
asect->relocation = reloc_cache;
asect->reloc_count = count;
return true;
return TRUE;
}
static boolean
static bfd_boolean
b_out_squirt_out_relocs (abfd, section)
bfd *abfd;
asection *section;
@ -759,13 +790,13 @@ b_out_squirt_out_relocs (abfd, section)
int extern_mask, pcrel_mask, len_2, callj_mask;
if (count == 0)
return true;
return TRUE;
generic = section->orelocation;
natsize = (bfd_size_type) count * sizeof (struct relocation_info);
native = ((struct relocation_info *) bfd_malloc (natsize));
if (!native && natsize != 0)
return false;
return FALSE;
if (bfd_header_big_endian (abfd))
{
@ -870,12 +901,12 @@ b_out_squirt_out_relocs (abfd, section)
if (bfd_bwrite ((PTR) native, natsize, abfd) != natsize)
{
free ((PTR)native);
return false;
return FALSE;
}
free ((PTR)native);
return true;
return TRUE;
}
/* This is stupid. This function should be a boolean predicate. */
@ -948,7 +979,7 @@ b_out_get_reloc_upper_bound (abfd, asect)
}
static boolean
static bfd_boolean
b_out_set_section_contents (abfd, section, location, offset, count)
bfd *abfd;
asection *section;
@ -960,7 +991,7 @@ b_out_set_section_contents (abfd, section, location, offset, count)
{
/* Set by bfd.c handler. */
if (! aout_32_make_sections (abfd))
return false;
return FALSE;
obj_textsec (abfd)->filepos = sizeof (struct internal_exec);
obj_datasec(abfd)->filepos = obj_textsec(abfd)->filepos
@ -969,15 +1000,15 @@ b_out_set_section_contents (abfd, section, location, offset, count)
/* Regardless, once we know what we're doing, we might as well get going. */
if (bfd_seek (abfd, section->filepos + offset, SEEK_SET) != 0)
return false;
return FALSE;
if (count == 0)
return true;
return TRUE;
return bfd_bwrite ((PTR) location, count, abfd) == count;
}
static boolean
static bfd_boolean
b_out_set_arch_mach (abfd, arch, machine)
bfd *abfd;
enum bfd_architecture arch;
@ -986,7 +1017,7 @@ b_out_set_arch_mach (abfd, arch, machine)
bfd_default_set_arch_mach(abfd, arch, machine);
if (arch == bfd_arch_unknown) /* Unknown machine arch is OK. */
return true;
return TRUE;
if (arch == bfd_arch_i960) /* i960 default is OK. */
switch (machine)
@ -1000,18 +1031,18 @@ b_out_set_arch_mach (abfd, arch, machine)
case bfd_mach_i960_jx:
case bfd_mach_i960_hx:
case 0:
return true;
return TRUE;
default:
return false;
return FALSE;
}
return false;
return FALSE;
}
static int
b_out_sizeof_headers (ignore_abfd, ignore)
bfd *ignore_abfd ATTRIBUTE_UNUSED;
boolean ignore ATTRIBUTE_UNUSED;
bfd_boolean ignore ATTRIBUTE_UNUSED;
{
return sizeof (struct internal_exec);
}
@ -1040,7 +1071,7 @@ get_value (reloc, link_info, input_section)
generic symbols. */
h = bfd_wrapped_link_hash_lookup (input_section->owner, link_info,
bfd_asymbol_name (symbol),
false, false, true);
FALSE, FALSE, TRUE);
if (h != (struct bfd_link_hash_entry *) NULL
&& (h->type == bfd_link_hash_defined
|| h->type == bfd_link_hash_defweak))
@ -1053,7 +1084,7 @@ get_value (reloc, link_info, input_section)
if (! ((*link_info->callbacks->undefined_symbol)
(link_info, bfd_asymbol_name (symbol),
input_section->owner, input_section, reloc->address,
true)))
TRUE)))
abort ();
value = 0;
}
@ -1192,12 +1223,12 @@ aligncode (abfd, input_section, r, shrink)
return shrink;
}
static boolean
static bfd_boolean
b_out_bfd_relax_section (abfd, i, link_info, again)
bfd *abfd;
asection *i;
struct bfd_link_info *link_info;
boolean *again;
bfd_boolean *again;
{
/* Get enough memory to hold the stuff. */
bfd *input_bfd = i->owner;
@ -1208,11 +1239,11 @@ b_out_bfd_relax_section (abfd, i, link_info, again)
input_section);
if (reloc_size < 0)
return false;
return FALSE;
/* We only run this relaxation once. It might work to run it
multiple times, but it hasn't been tested. */
*again = false;
*again = FALSE;
if (reloc_size)
{
@ -1258,11 +1289,11 @@ b_out_bfd_relax_section (abfd, i, link_info, again)
if (reloc_vector != NULL)
free (reloc_vector);
return true;
return TRUE;
error_return:
if (reloc_vector != NULL)
free (reloc_vector);
return false;
return FALSE;
}
static bfd_byte *
@ -1272,7 +1303,7 @@ b_out_bfd_get_relocated_section_contents (output_bfd, link_info, link_order,
struct bfd_link_info *link_info;
struct bfd_link_order *link_order;
bfd_byte *data;
boolean relocateable;
bfd_boolean relocateable;
asymbol **symbols;
{
/* Get enough memory to hold the stuff. */
@ -1300,11 +1331,11 @@ b_out_bfd_get_relocated_section_contents (output_bfd, link_info, link_order,
input_section->reloc_done = 1;
/* Read in the section. */
BFD_ASSERT (true == bfd_get_section_contents (input_bfd,
input_section,
data,
(bfd_vma) 0,
input_section->_raw_size));
BFD_ASSERT (bfd_get_section_contents (input_bfd,
input_section,
data,
(bfd_vma) 0,
input_section->_raw_size));
reloc_count = bfd_canonicalize_reloc (input_bfd,
input_section,
@ -1366,7 +1397,7 @@ b_out_bfd_get_relocated_section_contents (output_bfd, link_info, link_order,
case CALLJ:
callj_callback (input_bfd, link_info, reloc, data,
src_address, dst_address, input_section,
false);
FALSE);
src_address += 4;
dst_address += 4;
break;
@ -1383,7 +1414,7 @@ b_out_bfd_get_relocated_section_contents (output_bfd, link_info, link_order,
callj will reach, so do the right thing. */
callj_callback (input_bfd, link_info, reloc, data,
src_address + 4, dst_address, input_section,
true);
TRUE);
dst_address += 4;
src_address += 8;
break;

View File

@ -42,8 +42,8 @@ SECTION
static void insert PARAMS ((bfd *));
static void snip PARAMS ((bfd *));
static boolean close_one PARAMS ((void));
static boolean bfd_cache_delete PARAMS ((bfd *));
static bfd_boolean close_one PARAMS ((void));
static bfd_boolean bfd_cache_delete PARAMS ((bfd *));
/*
INTERNAL_FUNCTION
@ -133,7 +133,7 @@ snip (abfd)
/* We need to open a new file, and the cache is full. Find the least
recently used cacheable BFD and close it. */
static boolean
static bfd_boolean
close_one ()
{
register bfd *kill;
@ -157,7 +157,7 @@ close_one ()
if (kill == NULL)
{
/* There are no open cacheable BFD's. */
return true;
return TRUE;
}
kill->where = ftell ((FILE *) kill->iostream);
@ -167,17 +167,17 @@ close_one ()
/* Close a BFD and remove it from the cache. */
static boolean
static bfd_boolean
bfd_cache_delete (abfd)
bfd *abfd;
{
boolean ret;
bfd_boolean ret;
if (fclose ((FILE *) abfd->iostream) == 0)
ret = true;
ret = TRUE;
else
{
ret = false;
ret = FALSE;
bfd_set_error (bfd_error_system_call);
}
@ -194,13 +194,13 @@ INTERNAL_FUNCTION
bfd_cache_init
SYNOPSIS
boolean bfd_cache_init (bfd *abfd);
bfd_boolean bfd_cache_init (bfd *abfd);
DESCRIPTION
Add a newly opened BFD to the cache.
*/
boolean
bfd_boolean
bfd_cache_init (abfd)
bfd *abfd;
{
@ -208,11 +208,11 @@ bfd_cache_init (abfd)
if (open_files >= BFD_CACHE_MAX_OPEN)
{
if (! close_one ())
return false;
return FALSE;
}
insert (abfd);
++open_files;
return true;
return TRUE;
}
/*
@ -220,24 +220,24 @@ INTERNAL_FUNCTION
bfd_cache_close
SYNOPSIS
boolean bfd_cache_close (bfd *abfd);
bfd_boolean bfd_cache_close (bfd *abfd);
DESCRIPTION
Remove the BFD @var{abfd} from the cache. If the attached file is open,
then close it too.
RETURNS
<<false>> is returned if closing the file fails, <<true>> is
<<FALSE>> is returned if closing the file fails, <<TRUE>> is
returned if all is well.
*/
boolean
bfd_boolean
bfd_cache_close (abfd)
bfd *abfd;
{
if (abfd->iostream == NULL
|| (abfd->flags & BFD_IN_MEMORY) != 0)
return true;
return TRUE;
return bfd_cache_delete (abfd);
}
@ -261,7 +261,7 @@ FILE *
bfd_open_file (abfd)
bfd *abfd;
{
abfd->cacheable = true; /* Allow it to be closed later. */
abfd->cacheable = TRUE; /* Allow it to be closed later. */
if (open_files >= BFD_CACHE_MAX_OPEN)
{
@ -312,7 +312,7 @@ bfd_open_file (abfd)
unlink (abfd->filename);
#endif
abfd->iostream = (PTR) fopen (abfd->filename, FOPEN_WUB);
abfd->opened_once = true;
abfd->opened_once = TRUE;
}
break;
}

View File

@ -75,7 +75,7 @@ static const bfd_target *cisco_core_file_validate PARAMS ((bfd *, int));
static const bfd_target *cisco_core_file_p PARAMS ((bfd *));
char *cisco_core_file_failing_command PARAMS ((bfd *));
int cisco_core_file_failing_signal PARAMS ((bfd *));
boolean cisco_core_file_matches_executable_p PARAMS ((bfd *, bfd *));
bfd_boolean cisco_core_file_matches_executable_p PARAMS ((bfd *, bfd *));
/* Examine the file for a crash info struct at the offset given by
CRASH_INFO_LOC. */
@ -318,12 +318,12 @@ cisco_core_file_failing_signal (abfd)
return abfd->tdata.cisco_core_data->sig;
}
boolean
bfd_boolean
cisco_core_file_matches_executable_p (core_bfd, exec_bfd)
bfd *core_bfd ATTRIBUTE_UNUSED;
bfd *exec_bfd ATTRIBUTE_UNUSED;
{
return true;
return TRUE;
}
extern const bfd_target cisco_core_little_vec;

View File

@ -31,12 +31,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
static long get_symbol_value PARAMS ((asymbol *));
static bfd_reloc_status_type a29k_reloc
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static boolean coff_a29k_relocate_section
static bfd_boolean coff_a29k_relocate_section
PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
struct internal_reloc *, struct internal_syment *, asection **));
static boolean coff_a29k_adjust_symndx
static bfd_boolean coff_a29k_adjust_symndx
PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *,
struct internal_reloc *, boolean *));
struct internal_reloc *, bfd_boolean *));
static void reloc_processing
PARAMS ((arelent *, struct internal_reloc *, asymbol **, bfd *, asection *));
@ -82,7 +82,7 @@ a29k_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
{
/* The consth relocation comes in two parts, we have to remember
the state between calls, in these variables. */
static boolean part1_consth_active = false;
static bfd_boolean part1_consth_active = FALSE;
static unsigned long part1_consth_value;
unsigned long insn;
unsigned long sym_value;
@ -107,7 +107,7 @@ a29k_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
/* Keep the state machine happy in case we're called again. */
if (r_type == R_IHIHALF)
{
part1_consth_active = true;
part1_consth_active = TRUE;
part1_consth_value = 0;
}
return bfd_reloc_undefined;
@ -115,7 +115,7 @@ a29k_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
if ((part1_consth_active) && (r_type != R_IHCONST))
{
part1_consth_active = false;
part1_consth_active = FALSE;
*error_message = (char *) _("Missing IHCONST");
return bfd_reloc_dangerous;
@ -167,7 +167,7 @@ a29k_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
insn = bfd_get_32 (abfd, hit_data);
/* consth, part 1
Just get the symbol value that is referenced. */
part1_consth_active = true;
part1_consth_active = TRUE;
part1_consth_value = sym_value + reloc_entry->addend;
/* Don't modify insn until R_IHCONST. */
break;
@ -186,7 +186,7 @@ a29k_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
unsigned_value += part1_consth_value;
unsigned_value = unsigned_value >> 16;
insn = INSERT_HWORD(insn, unsigned_value);
part1_consth_active = false;
part1_consth_active = FALSE;
bfd_put_32 (abfd, (bfd_vma) insn, hit_data);
break;
case R_BYTE:
@ -219,7 +219,7 @@ a29k_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
/*FIXME: I'm not real sure about this table. */
static reloc_howto_type howto_table[] =
{
{R_ABS, 0, 3, 32, false, 0, complain_overflow_bitfield,a29k_reloc,"ABS", true, 0xffffffff,0xffffffff, false},
{R_ABS, 0, 3, 32, FALSE, 0, complain_overflow_bitfield,a29k_reloc,"ABS", TRUE, 0xffffffff,0xffffffff, FALSE},
EMPTY_HOWTO (1),
EMPTY_HOWTO (2),
EMPTY_HOWTO (3),
@ -243,14 +243,14 @@ static reloc_howto_type howto_table[] =
EMPTY_HOWTO (21),
EMPTY_HOWTO (22),
EMPTY_HOWTO (23),
{R_IREL, 0, 3, 32, true, 0, complain_overflow_signed,a29k_reloc,"IREL", true, 0xffffffff,0xffffffff, false},
{R_IABS, 0, 3, 32, false, 0, complain_overflow_bitfield, a29k_reloc,"IABS", true, 0xffffffff,0xffffffff, false},
{R_ILOHALF, 0, 3, 16, true, 0, complain_overflow_signed, a29k_reloc,"ILOHALF", true, 0x0000ffff,0x0000ffff, false},
{R_IHIHALF, 0, 3, 16, true, 16, complain_overflow_signed, a29k_reloc,"IHIHALF", true, 0xffff0000,0xffff0000, false},
{R_IHCONST, 0, 3, 16, true, 0, complain_overflow_signed, a29k_reloc,"IHCONST", true, 0xffff0000,0xffff0000, false},
{R_BYTE, 0, 0, 8, false, 0, complain_overflow_bitfield, a29k_reloc,"BYTE", true, 0x000000ff,0x000000ff, false},
{R_HWORD, 0, 1, 16, false, 0, complain_overflow_bitfield, a29k_reloc,"HWORD", true, 0x0000ffff,0x0000ffff, false},
{R_WORD, 0, 2, 32, false, 0, complain_overflow_bitfield, a29k_reloc,"WORD", true, 0xffffffff,0xffffffff, false},
{R_IREL, 0, 3, 32, TRUE, 0, complain_overflow_signed,a29k_reloc,"IREL", TRUE, 0xffffffff,0xffffffff, FALSE},
{R_IABS, 0, 3, 32, FALSE, 0, complain_overflow_bitfield, a29k_reloc,"IABS", TRUE, 0xffffffff,0xffffffff, FALSE},
{R_ILOHALF, 0, 3, 16, TRUE, 0, complain_overflow_signed, a29k_reloc,"ILOHALF", TRUE, 0x0000ffff,0x0000ffff, FALSE},
{R_IHIHALF, 0, 3, 16, TRUE, 16, complain_overflow_signed, a29k_reloc,"IHIHALF", TRUE, 0xffff0000,0xffff0000, FALSE},
{R_IHCONST, 0, 3, 16, TRUE, 0, complain_overflow_signed, a29k_reloc,"IHCONST", TRUE, 0xffff0000,0xffff0000, FALSE},
{R_BYTE, 0, 0, 8, FALSE, 0, complain_overflow_bitfield, a29k_reloc,"BYTE", TRUE, 0x000000ff,0x000000ff, FALSE},
{R_HWORD, 0, 1, 16, FALSE, 0, complain_overflow_bitfield, a29k_reloc,"HWORD", TRUE, 0x0000ffff,0x0000ffff, FALSE},
{R_WORD, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, a29k_reloc,"WORD", TRUE, 0xffffffff,0xffffffff, FALSE},
};
#define BADMAG(x) A29KBADMAG(x)
@ -310,7 +310,7 @@ reloc_processing (relent,reloc, symbols, abfd, section)
/* The reloc processing routine for the optimized COFF linker. */
static boolean
static bfd_boolean
coff_a29k_relocate_section (output_bfd, info, input_bfd, input_section,
contents, relocs, syms, sections)
bfd *output_bfd ATTRIBUTE_UNUSED;
@ -324,16 +324,16 @@ coff_a29k_relocate_section (output_bfd, info, input_bfd, input_section,
{
struct internal_reloc *rel;
struct internal_reloc *relend;
boolean hihalf;
bfd_boolean hihalf;
bfd_vma hihalf_val;
/* If we are performing a relocateable link, we don't need to do a
thing. The caller will take care of adjusting the reloc
addresses and symbol indices. */
if (info->relocateable)
return true;
return TRUE;
hihalf = false;
hihalf = FALSE;
hihalf_val = 0;
rel = relocs;
@ -346,7 +346,7 @@ coff_a29k_relocate_section (output_bfd, info, input_bfd, input_section,
struct internal_syment *sym;
asection *sec;
bfd_vma val;
boolean overflow;
bfd_boolean overflow;
unsigned long insn;
long signed_value;
unsigned long unsigned_value;
@ -397,8 +397,8 @@ coff_a29k_relocate_section (output_bfd, info, input_bfd, input_section,
{
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd, input_section,
rel->r_vaddr - input_section->vma, true)))
return false;
rel->r_vaddr - input_section->vma, TRUE)))
return FALSE;
}
}
@ -407,18 +407,18 @@ coff_a29k_relocate_section (output_bfd, info, input_bfd, input_section,
if (! ((*info->callbacks->reloc_dangerous)
(info, _("missing IHCONST reloc"), input_bfd,
input_section, rel->r_vaddr - input_section->vma)))
return false;
hihalf = false;
return FALSE;
hihalf = FALSE;
}
}
overflow = false;
overflow = FALSE;
switch (rel->r_type)
{
default:
bfd_set_error (bfd_error_bad_value);
return false;
return FALSE;
case R_IREL:
insn = bfd_get_32 (input_bfd, loc);
@ -465,7 +465,7 @@ coff_a29k_relocate_section (output_bfd, info, input_bfd, input_section,
+ (rel->r_vaddr - input_section->vma));
if (signed_value > 0x1ffff || signed_value < - 0x20000)
{
overflow = true;
overflow = TRUE;
signed_value = 0;
}
}
@ -487,7 +487,7 @@ coff_a29k_relocate_section (output_bfd, info, input_bfd, input_section,
case R_IHIHALF:
/* Save the value for the R_IHCONST reloc. */
hihalf = true;
hihalf = TRUE;
hihalf_val = val;
break;
@ -497,7 +497,7 @@ coff_a29k_relocate_section (output_bfd, info, input_bfd, input_section,
if (! ((*info->callbacks->reloc_dangerous)
(info, _("missing IHIHALF reloc"), input_bfd,
input_section, rel->r_vaddr - input_section->vma)))
return false;
return FALSE;
hihalf_val = 0;
}
@ -507,7 +507,7 @@ coff_a29k_relocate_section (output_bfd, info, input_bfd, input_section,
insn = INSERT_HWORD (insn, unsigned_value);
bfd_put_32 (input_bfd, (bfd_vma) insn, loc);
hihalf = false;
hihalf = FALSE;
break;
@ -517,7 +517,7 @@ coff_a29k_relocate_section (output_bfd, info, input_bfd, input_section,
rstat = _bfd_relocate_contents (howto_table + rel->r_type,
input_bfd, val, loc);
if (rstat == bfd_reloc_overflow)
overflow = true;
overflow = TRUE;
else if (rstat != bfd_reloc_ok)
abort ();
break;
@ -548,11 +548,11 @@ coff_a29k_relocate_section (output_bfd, info, input_bfd, input_section,
(info, name, howto_table[rel->r_type].name, (bfd_vma) 0,
input_bfd, input_section,
rel->r_vaddr - input_section->vma)))
return false;
return FALSE;
}
}
return true;
return TRUE;
}
#define coff_relocate_section coff_a29k_relocate_section
@ -560,20 +560,20 @@ coff_a29k_relocate_section (output_bfd, info, input_bfd, input_section,
/* We don't want to change the symndx of a R_IHCONST reloc, since it
is actually an addend, not a symbol index at all. */
static boolean
static bfd_boolean
coff_a29k_adjust_symndx (obfd, info, ibfd, sec, irel, adjustedp)
bfd *obfd ATTRIBUTE_UNUSED;
struct bfd_link_info *info ATTRIBUTE_UNUSED;
bfd *ibfd ATTRIBUTE_UNUSED;
asection *sec ATTRIBUTE_UNUSED;
struct internal_reloc *irel;
boolean *adjustedp;
bfd_boolean *adjustedp;
{
if (irel->r_type == R_IHCONST)
*adjustedp = true;
*adjustedp = TRUE;
else
*adjustedp = false;
return true;
*adjustedp = FALSE;
return TRUE;
}
#define coff_adjust_symndx coff_a29k_adjust_symndx

View File

@ -35,36 +35,40 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Prototypes for static functions. */
static const bfd_target *alpha_ecoff_object_p PARAMS ((bfd *));
static boolean alpha_ecoff_bad_format_hook PARAMS ((bfd *abfd, PTR filehdr));
static PTR alpha_ecoff_mkobject_hook PARAMS ((bfd *, PTR filehdr, PTR aouthdr));
static void alpha_ecoff_swap_reloc_in PARAMS ((bfd *, PTR,
struct internal_reloc *));
static void alpha_ecoff_swap_reloc_out PARAMS ((bfd *,
const struct internal_reloc *,
PTR));
static void alpha_adjust_reloc_in PARAMS ((bfd *,
const struct internal_reloc *,
arelent *));
static void alpha_adjust_reloc_out PARAMS ((bfd *, const arelent *,
struct internal_reloc *));
static const bfd_target *alpha_ecoff_object_p
PARAMS ((bfd *));
static bfd_boolean alpha_ecoff_bad_format_hook
PARAMS ((bfd *abfd, PTR filehdr));
static PTR alpha_ecoff_mkobject_hook
PARAMS ((bfd *, PTR filehdr, PTR aouthdr));
static void alpha_ecoff_swap_reloc_in
PARAMS ((bfd *, PTR, struct internal_reloc *));
static void alpha_ecoff_swap_reloc_out
PARAMS ((bfd *, const struct internal_reloc *, PTR));
static void alpha_adjust_reloc_in
PARAMS ((bfd *, const struct internal_reloc *, arelent *));
static void alpha_adjust_reloc_out
PARAMS ((bfd *, const arelent *, struct internal_reloc *));
static reloc_howto_type *alpha_bfd_reloc_type_lookup
PARAMS ((bfd *, bfd_reloc_code_real_type));
PARAMS ((bfd *, bfd_reloc_code_real_type));
static bfd_byte *alpha_ecoff_get_relocated_section_contents
PARAMS ((bfd *abfd, struct bfd_link_info *, struct bfd_link_order *,
bfd_byte *data, boolean relocateable, asymbol **symbols));
bfd_byte *data, bfd_boolean relocateable, asymbol **symbols));
static bfd_vma alpha_convert_external_reloc
PARAMS ((bfd *, struct bfd_link_info *, bfd *, struct external_reloc *,
struct ecoff_link_hash_entry *));
static boolean alpha_relocate_section PARAMS ((bfd *, struct bfd_link_info *,
bfd *, asection *,
bfd_byte *, PTR));
static boolean alpha_adjust_headers
static bfd_boolean alpha_relocate_section
PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, PTR));
static bfd_boolean alpha_adjust_headers
PARAMS ((bfd *, struct internal_filehdr *, struct internal_aouthdr *));
static PTR alpha_ecoff_read_ar_hdr PARAMS ((bfd *));
static bfd *alpha_ecoff_get_elt_at_filepos PARAMS ((bfd *, file_ptr));
static bfd *alpha_ecoff_openr_next_archived_file PARAMS ((bfd *, bfd *));
static bfd *alpha_ecoff_get_elt_at_index PARAMS ((bfd *, symindex));
static PTR alpha_ecoff_read_ar_hdr
PARAMS ((bfd *));
static bfd *alpha_ecoff_get_elt_at_filepos
PARAMS ((bfd *, file_ptr));
static bfd *alpha_ecoff_openr_next_archived_file
PARAMS ((bfd *, bfd *));
static bfd *alpha_ecoff_get_elt_at_index
PARAMS ((bfd *, symindex));
/* ECOFF has COFF sections, but the debugging information is stored in
a completely different format. ECOFF targets use some of the
@ -122,9 +126,8 @@ static bfd *alpha_ecoff_get_elt_at_index PARAMS ((bfd *, symindex));
/* How to process the various reloc types. */
static bfd_reloc_status_type
reloc_nil PARAMS ((bfd *, arelent *, asymbol *, PTR,
asection *, bfd *, char **));
static bfd_reloc_status_type reloc_nil
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static bfd_reloc_status_type
reloc_nil (abfd, reloc, sym, data, sec, output_bfd, error_message)
@ -152,45 +155,45 @@ static reloc_howto_type alpha_howto_table[] =
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */
true, /* pc_relative */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
reloc_nil, /* special_function */
"IGNORE", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
true), /* pcrel_offset */
TRUE), /* pcrel_offset */
/* A 32 bit reference to a symbol. */
HOWTO (ALPHA_R_REFLONG, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
0, /* special_function */
"REFLONG", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
/* A 64 bit reference to a symbol. */
HOWTO (ALPHA_R_REFQUAD, /* type */
0, /* rightshift */
4, /* size (0 = byte, 1 = short, 2 = long) */
64, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
0, /* special_function */
"REFQUAD", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
MINUS_ONE, /* src_mask */
MINUS_ONE, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
/* A 32 bit GP relative offset. This is just like REFLONG except
that when the value is used the value of the gp register will be
@ -199,15 +202,15 @@ static reloc_howto_type alpha_howto_table[] =
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
0, /* special_function */
"GPREL32", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
/* Used for an instruction that refers to memory off the GP
register. The offset is 16 bits of the 32 bit instruction. This
@ -216,15 +219,15 @@ static reloc_howto_type alpha_howto_table[] =
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
0, /* special_function */
"LITERAL", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
/* This reloc only appears immediately following a LITERAL reloc.
It identifies a use of the literal. It seems that the linker can
@ -239,15 +242,15 @@ static reloc_howto_type alpha_howto_table[] =
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
reloc_nil, /* special_function */
"LITUSE", /* name */
false, /* partial_inplace */
FALSE, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
/* Load the gp register. This is always used for a ldah instruction
which loads the upper 16 bits of the gp register. The next reloc
@ -264,15 +267,15 @@ static reloc_howto_type alpha_howto_table[] =
16, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
true, /* pc_relative */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
reloc_nil, /* special_function */
"GPDISP", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
true), /* pcrel_offset */
TRUE), /* pcrel_offset */
/* A 21 bit branch. The native assembler generates these for
branches within the text segment, and also fills in the PC
@ -281,90 +284,90 @@ static reloc_howto_type alpha_howto_table[] =
2, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
21, /* bitsize */
true, /* pc_relative */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
0, /* special_function */
"BRADDR", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0x1fffff, /* src_mask */
0x1fffff, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
/* A hint for a jump to a register. */
HOWTO (ALPHA_R_HINT, /* type */
2, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
14, /* bitsize */
true, /* pc_relative */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
0, /* special_function */
"HINT", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0x3fff, /* src_mask */
0x3fff, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
/* 16 bit PC relative offset. */
HOWTO (ALPHA_R_SREL16, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
true, /* pc_relative */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
0, /* special_function */
"SREL16", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
/* 32 bit PC relative offset. */
HOWTO (ALPHA_R_SREL32, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
true, /* pc_relative */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
0, /* special_function */
"SREL32", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
/* A 64 bit PC relative offset. */
HOWTO (ALPHA_R_SREL64, /* type */
0, /* rightshift */
4, /* size (0 = byte, 1 = short, 2 = long) */
64, /* bitsize */
true, /* pc_relative */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
0, /* special_function */
"SREL64", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
MINUS_ONE, /* src_mask */
MINUS_ONE, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
/* Push a value on the reloc evaluation stack. */
HOWTO (ALPHA_R_OP_PUSH, /* type */
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
0, /* special_function */
"OP_PUSH", /* name */
false, /* partial_inplace */
FALSE, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
/* Store the value from the stack at the given address. Store it in
a bitfield of size r_size starting at bit position r_offset. */
@ -372,15 +375,15 @@ static reloc_howto_type alpha_howto_table[] =
0, /* rightshift */
4, /* size (0 = byte, 1 = short, 2 = long) */
64, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
0, /* special_function */
"OP_STORE", /* name */
false, /* partial_inplace */
FALSE, /* partial_inplace */
0, /* src_mask */
MINUS_ONE, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
/* Subtract the reloc address from the value on the top of the
relocation stack. */
@ -388,15 +391,15 @@ static reloc_howto_type alpha_howto_table[] =
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
0, /* special_function */
"OP_PSUB", /* name */
false, /* partial_inplace */
FALSE, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
/* Shift the value on the top of the relocation stack right by the
given value. */
@ -404,30 +407,30 @@ static reloc_howto_type alpha_howto_table[] =
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
0, /* special_function */
"OP_PRSHIFT", /* name */
false, /* partial_inplace */
FALSE, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
/* Adjust the GP value for a new range in the object file. */
HOWTO (ALPHA_R_GPVALUE, /* type */
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
0, /* special_function */
"GPVALUE", /* name */
false, /* partial_inplace */
FALSE, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
false) /* pcrel_offset */
FALSE) /* pcrel_offset */
};
/* Recognize an Alpha ECOFF file. */
@ -471,7 +474,7 @@ alpha_ecoff_object_p (abfd)
/* See whether the magic number matches. */
static boolean
static bfd_boolean
alpha_ecoff_bad_format_hook (abfd, filehdr)
bfd *abfd ATTRIBUTE_UNUSED;
PTR filehdr;
@ -479,9 +482,9 @@ alpha_ecoff_bad_format_hook (abfd, filehdr)
struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
if (ALPHA_ECOFF_BADMAG (*internal_f))
return false;
return FALSE;
return true;
return TRUE;
}
/* This is a hook called by coff_real_object_p to create any backend
@ -755,7 +758,7 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order,
struct bfd_link_info *link_info;
struct bfd_link_order *link_order;
bfd_byte *data;
boolean relocateable;
bfd_boolean relocateable;
asymbol **symbols;
{
bfd *input_bfd = link_order->u.indirect.section->owner;
@ -765,7 +768,7 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order,
long reloc_count;
bfd *output_bfd = relocateable ? abfd : (bfd *) NULL;
bfd_vma gp;
boolean gp_undefined;
bfd_boolean gp_undefined;
bfd_vma stack[RELOC_STACKSIZE];
int tos = 0;
@ -781,7 +784,7 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order,
/* The section size is not going to change. */
input_section->_cooked_size = input_section->_raw_size;
input_section->reloc_done = true;
input_section->reloc_done = TRUE;
reloc_count = bfd_canonicalize_reloc (input_bfd, input_section,
reloc_vector, symbols);
@ -791,7 +794,7 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order,
goto successful_return;
/* Get the GP value for the output BFD. */
gp_undefined = false;
gp_undefined = FALSE;
gp = _bfd_get_gp_value (abfd);
if (gp == 0)
{
@ -819,11 +822,11 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order,
{
struct bfd_link_hash_entry *h;
h = bfd_link_hash_lookup (link_info->hash, "_gp", false, false,
true);
h = bfd_link_hash_lookup (link_info->hash, "_gp", FALSE, FALSE,
TRUE);
if (h == (struct bfd_link_hash_entry *) NULL
|| h->type != bfd_link_hash_defined)
gp_undefined = true;
gp_undefined = TRUE;
else
{
gp = (h->u.def.value
@ -1111,7 +1114,7 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order,
case ALPHA_R_GPVALUE:
/* I really don't know if this does the right thing. */
gp = rel->addend;
gp_undefined = false;
gp_undefined = FALSE;
break;
default:
@ -1134,7 +1137,7 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order,
case bfd_reloc_undefined:
if (! ((*link_info->callbacks->undefined_symbol)
(link_info, bfd_asymbol_name (*rel->sym_ptr_ptr),
input_bfd, input_section, rel->address, true)))
input_bfd, input_section, rel->address, TRUE)))
goto error_return;
break;
case bfd_reloc_dangerous:
@ -1365,7 +1368,7 @@ alpha_convert_external_reloc (output_bfd, info, input_bfd, ext_rel, h)
quite similar to get_relocated_section_contents. Perhaps they
could be combined somehow. */
static boolean
static bfd_boolean
alpha_relocate_section (output_bfd, info, input_bfd, input_section,
contents, external_relocs)
bfd *output_bfd;
@ -1378,7 +1381,7 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
asection **symndx_to_section, *lita_sec;
struct ecoff_link_hash_entry **sym_hashes;
bfd_vma gp;
boolean gp_undefined;
bfd_boolean gp_undefined;
bfd_vma stack[RELOC_STACKSIZE];
int tos = 0;
struct external_reloc *ext_rel;
@ -1394,7 +1397,7 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
amt = NUM_RELOC_SECTIONS * sizeof (asection *);
symndx_to_section = (asection **) bfd_alloc (input_bfd, amt);
if (!symndx_to_section)
return false;
return FALSE;
symndx_to_section[RELOC_SECTION_NONE] = NULL;
symndx_to_section[RELOC_SECTION_TEXT] =
@ -1485,7 +1488,7 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
_("using multiple gp values"),
(char *) NULL, output_bfd,
(asection *) NULL, (bfd_vma) 0);
ecoff_data (output_bfd)->issued_multiple_gp_warning = true;
ecoff_data (output_bfd)->issued_multiple_gp_warning = TRUE;
}
if (lita_vma < gp - 0x8000)
gp = lita_vma + lita_size - 0x8000;
@ -1515,9 +1518,9 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
int r_extern;
int r_offset;
int r_size;
boolean relocatep;
boolean adjust_addrp;
boolean gp_usedp;
bfd_boolean relocatep;
bfd_boolean adjust_addrp;
bfd_boolean gp_usedp;
bfd_vma addend;
r_vaddr = H_GET_64 (input_bfd, ext_rel->r_vaddr);
@ -1532,9 +1535,9 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
r_size = ((ext_rel->r_bits[3] & RELOC_BITS3_SIZE_LITTLE)
>> RELOC_BITS3_SIZE_SH_LITTLE);
relocatep = false;
adjust_addrp = true;
gp_usedp = false;
relocatep = FALSE;
adjust_addrp = TRUE;
gp_usedp = FALSE;
addend = 0;
switch (r_type)
@ -1552,13 +1555,13 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
if (info->relocateable)
H_PUT_64 (input_bfd, input_section->output_offset + r_vaddr,
ext_rel->r_vaddr);
adjust_addrp = false;
adjust_addrp = FALSE;
break;
case ALPHA_R_REFLONG:
case ALPHA_R_REFQUAD:
case ALPHA_R_HINT:
relocatep = true;
relocatep = TRUE;
break;
case ALPHA_R_BRADDR:
@ -1567,7 +1570,7 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
case ALPHA_R_SREL64:
if (r_extern)
addend += - (r_vaddr + 4);
relocatep = true;
relocatep = TRUE;
break;
case ALPHA_R_GPREL32:
@ -1575,9 +1578,9 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
bit offset from the current GP value. We must adjust it
by the different between the original GP value and the
current GP value. */
relocatep = true;
relocatep = TRUE;
addend = ecoff_data (input_bfd)->gp - gp;
gp_usedp = true;
gp_usedp = TRUE;
break;
case ALPHA_R_LITERAL:
@ -1608,9 +1611,9 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
|| ((insn >> 26) & 0x3f) == 0x28);
}
relocatep = true;
relocatep = TRUE;
addend = ecoff_data (input_bfd)->gp - gp;
gp_usedp = true;
gp_usedp = TRUE;
break;
case ALPHA_R_LITUSE:
@ -1674,7 +1677,7 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_put_32 (input_bfd, (bfd_vma) insn2,
contents + r_vaddr - input_section->vma + r_symndx);
gp_usedp = true;
gp_usedp = TRUE;
}
break;
@ -1717,8 +1720,8 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
relocated. */
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd,
input_section, (bfd_vma) 0, true)))
return false;
input_section, (bfd_vma) 0, TRUE)))
return FALSE;
addend = 0;
}
}
@ -1734,7 +1737,7 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
if (! ((*info->callbacks->unattached_reloc)
(info, h->root.root.string, input_bfd,
input_section, (bfd_vma) 0)))
return false;
return FALSE;
}
addend = alpha_convert_external_reloc (output_bfd, info,
@ -1774,7 +1777,7 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
}
}
adjust_addrp = false;
adjust_addrp = FALSE;
break;
case ALPHA_R_OP_STORE:
@ -1811,7 +1814,7 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
case ALPHA_R_GPVALUE:
/* I really don't know if this does the right thing. */
gp = ecoff_data (input_bfd)->gp + r_symndx;
gp_undefined = false;
gp_undefined = FALSE;
break;
}
@ -1861,7 +1864,7 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
if (! ((*info->callbacks->unattached_reloc)
(info, h->root.root.string, input_bfd,
input_section, r_vaddr - input_section->vma)))
return false;
return FALSE;
}
relocation = alpha_convert_external_reloc (output_bfd,
@ -1918,8 +1921,8 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd,
input_section,
r_vaddr - input_section->vma, true)))
return false;
r_vaddr - input_section->vma, TRUE)))
return FALSE;
relocation = 0;
}
}
@ -1965,7 +1968,7 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
(info, name, alpha_howto_table[r_type].name,
(bfd_vma) 0, input_bfd, input_section,
r_vaddr - input_section->vma)))
return false;
return FALSE;
}
break;
}
@ -1988,24 +1991,24 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
if (! ((*info->callbacks->reloc_dangerous)
(info, _("GP relative relocation used when GP not defined"),
input_bfd, input_section, r_vaddr - input_section->vma)))
return false;
return FALSE;
/* Only give the error once per link. */
gp = 4;
_bfd_set_gp_value (output_bfd, gp);
gp_undefined = false;
gp_undefined = FALSE;
}
}
if (tos != 0)
abort ();
return true;
return TRUE;
}
/* Do final adjustments to the filehdr and the aouthdr. This routine
sets the dynamic bits in the file header. */
static boolean
static bfd_boolean
alpha_adjust_headers (abfd, fhdr, ahdr)
bfd *abfd;
struct internal_filehdr *fhdr;
@ -2015,7 +2018,7 @@ alpha_adjust_headers (abfd, fhdr, ahdr)
fhdr->f_flags |= F_ALPHA_CALL_SHARED;
else if ((abfd->flags & DYNAMIC) != 0)
fhdr->f_flags |= F_ALPHA_SHARABLE;
return true;
return TRUE;
}
/* Archive handling. In OSF/1 (or Digital Unix) v3.2, Digital
@ -2185,7 +2188,7 @@ alpha_ecoff_get_elt_at_filepos (archive, filepos)
bim->size = size;
bim->buffer = buf;
nbfd->mtime_set = true;
nbfd->mtime_set = TRUE;
nbfd->mtime = strtol (hdr->ar_date, (char **) NULL, 10);
nbfd->flags |= BFD_IN_MEMORY;
@ -2262,7 +2265,7 @@ static const struct ecoff_backend_data alpha_ecoff_backend_data =
(unsigned (*) PARAMS ((bfd *,PTR,PTR))) bfd_void, /* reloc_out */
alpha_ecoff_swap_filehdr_out, alpha_ecoff_swap_aouthdr_out,
alpha_ecoff_swap_scnhdr_out,
FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, FILNMLEN, true, false, 4, false, 2,
FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, FILNMLEN, TRUE, FALSE, 4, FALSE, 2,
alpha_ecoff_swap_filehdr_in, alpha_ecoff_swap_aouthdr_in,
alpha_ecoff_swap_scnhdr_in, NULL,
alpha_ecoff_bad_format_hook, _bfd_ecoff_set_arch_mach_hook,
@ -2278,10 +2281,10 @@ static const struct ecoff_backend_data alpha_ecoff_backend_data =
/* The page boundary used to align sections in a demand-paged
executable file. E.g., 0x1000. */
0x2000,
/* True if the .rdata section is part of the text segment, as on the
Alpha. False if .rdata is part of the data segment, as on the
/* TRUE if the .rdata section is part of the text segment, as on the
Alpha. FALSE if .rdata is part of the data segment, as on the
MIPS. */
true,
TRUE,
/* Bitsize of constructor entries. */
64,
/* Reloc to use for constructor entries. */

View File

@ -1,5 +1,5 @@
/* BFD back-end for Apollo 68000 COFF binaries.
Copyright 1990, 1991, 1992, 1993, 1994, 1999, 2000, 2001
Copyright 1990, 1991, 1992, 1993, 1994, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
By Troy Rollo (troy@cbme.unsw.edu.au)
Based on m68k standard COFF version Written by Cygnus Support.
@ -34,13 +34,13 @@ extern reloc_howto_type apollocoff_howto_table[];
#else
reloc_howto_type apollocoff_howto_table[] =
{
HOWTO (R_RELBYTE, 0, 0, 8, false, 0, complain_overflow_bitfield, 0, "8", true, 0x000000ff,0x000000ff, false),
HOWTO (R_RELWORD, 0, 1, 16, false, 0, complain_overflow_bitfield, 0, "16", true, 0x0000ffff,0x0000ffff, false),
HOWTO (R_RELLONG, 0, 2, 32, false, 0, complain_overflow_bitfield, 0, "32", true, 0xffffffff,0xffffffff, false),
HOWTO (R_PCRBYTE, 0, 0, 8, true, 0, complain_overflow_signed, 0, "DISP8", true, 0x000000ff,0x000000ff, false),
HOWTO (R_PCRWORD, 0, 1, 16, true, 0, complain_overflow_signed, 0, "DISP16", true, 0x0000ffff,0x0000ffff, false),
HOWTO (R_PCRLONG, 0, 2, 32, true, 0, complain_overflow_signed, 0, "DISP32", true, 0xffffffff,0xffffffff, false),
HOWTO (R_RELLONG_NEG, 0, -2, 32, false, 0, complain_overflow_bitfield, 0, "-32", true, 0xffffffff,0xffffffff, false),
HOWTO (R_RELBYTE, 0, 0, 8, FALSE, 0, complain_overflow_bitfield, 0, "8", TRUE, 0x000000ff,0x000000ff, FALSE),
HOWTO (R_RELWORD, 0, 1, 16, FALSE, 0, complain_overflow_bitfield, 0, "16", TRUE, 0x0000ffff,0x0000ffff, FALSE),
HOWTO (R_RELLONG, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, 0, "32", TRUE, 0xffffffff,0xffffffff, FALSE),
HOWTO (R_PCRBYTE, 0, 0, 8, TRUE, 0, complain_overflow_signed, 0, "DISP8", TRUE, 0x000000ff,0x000000ff, FALSE),
HOWTO (R_PCRWORD, 0, 1, 16, TRUE, 0, complain_overflow_signed, 0, "DISP16", TRUE, 0x0000ffff,0x0000ffff, FALSE),
HOWTO (R_PCRLONG, 0, 2, 32, TRUE, 0, complain_overflow_signed, 0, "DISP32", TRUE, 0xffffffff,0xffffffff, FALSE),
HOWTO (R_RELLONG_NEG, 0, -2, 32, FALSE, 0, complain_overflow_bitfield, 0, "-32", TRUE, 0xffffffff,0xffffffff, FALSE),
};
#endif /* not ONLY_DECLARE_RELOCS */

View File

@ -80,7 +80,7 @@ typedef unsigned long int insn32;
typedef unsigned short int insn16;
/* Forward declarations for stupid compilers. */
static boolean coff_arm_relocate_section
static bfd_boolean coff_arm_relocate_section
PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
struct internal_reloc *, struct internal_syment *, asection **));
static bfd_reloc_status_type aoutarm_fix_pcrel_26_done
@ -99,9 +99,9 @@ static bfd_reloc_status_type coff_thumb_pcrel_12
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static bfd_reloc_status_type coff_arm_reloc
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static boolean coff_arm_adjust_symndx
static bfd_boolean coff_arm_adjust_symndx
PARAMS ((bfd *, struct bfd_link_info *, bfd *,
asection *, struct internal_reloc *, boolean *));
asection *, struct internal_reloc *, bfd_boolean *));
static reloc_howto_type * coff_arm_rtype_to_howto
PARAMS ((bfd *, asection *, struct internal_reloc *,
struct coff_link_hash_entry *, struct internal_syment *,
@ -125,19 +125,19 @@ static void record_thumb_to_arm_glue
PARAMS ((struct bfd_link_info *, struct coff_link_hash_entry *));
#endif
#endif
static boolean coff_arm_merge_private_bfd_data
static bfd_boolean coff_arm_merge_private_bfd_data
PARAMS ((bfd *, bfd *));
static boolean coff_arm_print_private_bfd_data
static bfd_boolean coff_arm_print_private_bfd_data
PARAMS ((bfd *, PTR));
static boolean _bfd_coff_arm_set_private_flags
static bfd_boolean _bfd_coff_arm_set_private_flags
PARAMS ((bfd *, flagword));
static boolean coff_arm_copy_private_bfd_data
static bfd_boolean coff_arm_copy_private_bfd_data
PARAMS ((bfd *, bfd *));
static boolean coff_arm_is_local_label_name
static bfd_boolean coff_arm_is_local_label_name
PARAMS ((bfd *, const char *));
static boolean coff_arm_link_output_has_begun
static bfd_boolean coff_arm_link_output_has_begun
PARAMS ((bfd *, struct coff_final_link_info *));
static boolean coff_arm_final_link_postscript
static bfd_boolean coff_arm_final_link_postscript
PARAMS ((bfd *, struct coff_final_link_info *));
static void arm_emit_base_file_entry
PARAMS ((struct bfd_link_info *, bfd *, asection *, bfd_vma));
@ -224,7 +224,7 @@ coff_arm_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
#endif
#ifndef PCRELOFFSET
#define PCRELOFFSET true
#define PCRELOFFSET TRUE
#endif
/* These most certainly belong somewhere else. Just had to get rid of
@ -269,12 +269,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
0,
2,
32,
false,
FALSE,
0,
complain_overflow_bitfield,
coff_arm_reloc,
"ARM_32",
true,
TRUE,
0xffffffff,
0xffffffff,
PCRELOFFSET),
@ -282,12 +282,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
0,
2,
32,
false,
FALSE,
0,
complain_overflow_bitfield,
coff_arm_reloc,
"ARM_RVA32",
true,
TRUE,
0xffffffff,
0xffffffff,
PCRELOFFSET),
@ -295,12 +295,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
2,
2,
24,
true,
TRUE,
0,
complain_overflow_signed,
aoutarm_fix_pcrel_26 ,
"ARM_26",
false,
FALSE,
0x00ffffff,
0x00ffffff,
PCRELOFFSET),
@ -308,12 +308,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
1,
1,
11,
true,
TRUE,
0,
complain_overflow_signed,
coff_thumb_pcrel_12 ,
"ARM_THUMB12",
false,
FALSE,
0x000007ff,
0x000007ff,
PCRELOFFSET),
@ -321,15 +321,15 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
2,
2,
24,
false,
FALSE,
0,
complain_overflow_dont,
aoutarm_fix_pcrel_26_done,
"ARM_26D",
true,
TRUE,
0x00ffffff,
0x0,
false),
FALSE),
EMPTY_HOWTO (-1),
EMPTY_HOWTO (-1),
EMPTY_HOWTO (-1),
@ -342,12 +342,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
0,
1,
16,
false,
FALSE,
0,
complain_overflow_bitfield,
coff_arm_reloc,
"ARM_16",
true,
TRUE,
0x0000ffff,
0x0000ffff,
PCRELOFFSET),
@ -355,26 +355,26 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
0,
2,
32,
false,
FALSE,
0,
complain_overflow_bitfield,
coff_arm_reloc,
"ARM_32",
true,
TRUE,
0xffffffff,
0xffffffff,
PCRELOFFSET),
#else /* not ARM_WINCE */
HOWTO (ARM_8, /* type */
HOWTO (ARM_8, /* type */
0, /* rightshift */
0, /* size */
8, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
coff_arm_reloc, /* special_function */
coff_arm_reloc, /* special_function */
"ARM_8", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0x000000ff, /* src_mask */
0x000000ff, /* dst_mask */
PCRELOFFSET /* pcrel_offset */),
@ -382,12 +382,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
0,
1,
16,
false,
FALSE,
0,
complain_overflow_bitfield,
coff_arm_reloc,
"ARM_16",
true,
TRUE,
0x0000ffff,
0x0000ffff,
PCRELOFFSET),
@ -395,12 +395,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
0,
2,
32,
false,
FALSE,
0,
complain_overflow_bitfield,
coff_arm_reloc,
"ARM_32",
true,
TRUE,
0xffffffff,
0xffffffff,
PCRELOFFSET),
@ -408,12 +408,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
2,
2,
24,
true,
TRUE,
0,
complain_overflow_signed,
aoutarm_fix_pcrel_26 ,
"ARM_26",
false,
FALSE,
0x00ffffff,
0x00ffffff,
PCRELOFFSET),
@ -421,92 +421,92 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
0,
0,
8,
true,
TRUE,
0,
complain_overflow_signed,
coff_arm_reloc,
"ARM_DISP8",
true,
TRUE,
0x000000ff,
0x000000ff,
true),
TRUE),
HOWTO (ARM_DISP16,
0,
1,
16,
true,
TRUE,
0,
complain_overflow_signed,
coff_arm_reloc,
"ARM_DISP16",
true,
TRUE,
0x0000ffff,
0x0000ffff,
true),
TRUE),
HOWTO (ARM_DISP32,
0,
2,
32,
true,
TRUE,
0,
complain_overflow_signed,
coff_arm_reloc,
"ARM_DISP32",
true,
TRUE,
0xffffffff,
0xffffffff,
true),
TRUE),
HOWTO (ARM_26D,
2,
2,
24,
false,
FALSE,
0,
complain_overflow_dont,
aoutarm_fix_pcrel_26_done,
"ARM_26D",
true,
TRUE,
0x00ffffff,
0x0,
false),
FALSE),
/* 8 is unused */
EMPTY_HOWTO (-1),
HOWTO (ARM_NEG16,
0,
-1,
16,
false,
FALSE,
0,
complain_overflow_bitfield,
coff_arm_reloc,
"ARM_NEG16",
true,
TRUE,
0x0000ffff,
0x0000ffff,
false),
FALSE),
HOWTO (ARM_NEG32,
0,
-2,
32,
false,
FALSE,
0,
complain_overflow_bitfield,
coff_arm_reloc,
"ARM_NEG32",
true,
TRUE,
0xffffffff,
0xffffffff,
false),
FALSE),
HOWTO (ARM_RVA32,
0,
2,
32,
false,
FALSE,
0,
complain_overflow_bitfield,
coff_arm_reloc,
"ARM_RVA32",
true,
TRUE,
0xffffffff,
0xffffffff,
PCRELOFFSET),
@ -514,12 +514,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
1,
1,
8,
true,
TRUE,
0,
complain_overflow_signed,
coff_thumb_pcrel_9 ,
"ARM_THUMB9",
false,
FALSE,
0x000000ff,
0x000000ff,
PCRELOFFSET),
@ -527,12 +527,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
1,
1,
11,
true,
TRUE,
0,
complain_overflow_signed,
coff_thumb_pcrel_12 ,
"ARM_THUMB12",
false,
FALSE,
0x000007ff,
0x000007ff,
PCRELOFFSET),
@ -540,12 +540,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
1,
2,
22,
true,
TRUE,
0,
complain_overflow_signed,
coff_thumb_pcrel_23 ,
"ARM_THUMB23",
false,
FALSE,
0x07ff07ff,
0x07ff07ff,
PCRELOFFSET)
@ -555,11 +555,11 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
#define NUM_RELOCS NUM_ELEM (aoutarm_std_reloc_howto)
#ifdef COFF_WITH_PE
static boolean in_reloc_p PARAMS ((bfd *, reloc_howto_type *));
/* Return true if this relocation should
static bfd_boolean in_reloc_p PARAMS ((bfd *, reloc_howto_type *));
/* Return TRUE if this relocation should
appear in the output .reloc section. */
static boolean
static bfd_boolean
in_reloc_p (abfd, howto)
bfd * abfd ATTRIBUTE_UNUSED;
reloc_howto_type * howto;
@ -1059,7 +1059,7 @@ find_thumb_glue (info, name, input_bfd)
sprintf (tmp_name, THUMB2ARM_GLUE_ENTRY_NAME, name);
myh = coff_link_hash_lookup
(coff_hash_table (info), tmp_name, false, false, true);
(coff_hash_table (info), tmp_name, FALSE, FALSE, TRUE);
if (myh == NULL)
/* xgettext:c-format */
@ -1089,7 +1089,7 @@ find_arm_glue (info, name, input_bfd)
sprintf (tmp_name, ARM2THUMB_GLUE_ENTRY_NAME, name);
myh = coff_link_hash_lookup
(coff_hash_table (info), tmp_name, false, false, true);
(coff_hash_table (info), tmp_name, FALSE, FALSE, TRUE);
if (myh == NULL)
/* xgettext:c-format */
@ -1188,7 +1188,7 @@ static const insn32 t2a6_bx_insn = 0xe12fff1e;
ARM/Thumb builds. It is only the code marked THUMBEXTENSION that
is different from the original. */
static boolean
static bfd_boolean
coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
contents, relocs, syms, sections)
bfd *output_bfd;
@ -1244,7 +1244,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
howto = coff_rtype_to_howto (input_bfd, input_section, rel, h,
sym, &addend);
if (howto == NULL)
return false;
return FALSE;
/* The relocation_section function will skip pcrel_offset relocs
when doing a relocateable link. However, we want to convert
@ -1264,15 +1264,15 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
2,
2,
24,
true,
TRUE,
0,
complain_overflow_signed,
aoutarm_fix_pcrel_26 ,
"ARM_26",
false,
FALSE,
0x00ffffff,
0x00ffffff,
false);
FALSE);
addend -= rel->r_vaddr - input_section->vma;
howto = &fake_arm26_reloc;
@ -1365,7 +1365,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
myh = find_arm_glue (info, name, input_bfd);
if (myh == NULL)
return false;
return FALSE;
globals = coff_arm_hash_table (info);
@ -1458,7 +1458,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
myh = find_thumb_glue (info, name, input_bfd);
if (myh == NULL)
return false;
return FALSE;
globals = coff_arm_hash_table (info);
@ -1596,8 +1596,8 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
{
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd, input_section,
rel->r_vaddr - input_section->vma, true)))
return false;
rel->r_vaddr - input_section->vma, TRUE)))
return FALSE;
}
}
@ -1631,18 +1631,18 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
rstat = bfd_reloc_outofrange;
else
{
bfd_vma relocation = val + addend;
int size = bfd_get_reloc_size (howto);
boolean overflow = false;
bfd_byte * location = contents + address;
bfd_vma x = bfd_get_32 (input_bfd, location);
bfd_vma src_mask = 0x007FFFFE;
bfd_signed_vma reloc_signed_max = (1 << (howto->bitsize - 1)) - 1;
bfd_signed_vma reloc_signed_min = ~reloc_signed_max;
bfd_vma check;
bfd_signed_vma signed_check;
bfd_vma add;
bfd_signed_vma signed_add;
bfd_vma relocation = val + addend;
int size = bfd_get_reloc_size (howto);
bfd_boolean overflow = FALSE;
bfd_byte *location = contents + address;
bfd_vma x = bfd_get_32 (input_bfd, location);
bfd_vma src_mask = 0x007FFFFE;
bfd_signed_vma reloc_signed_max = (1 << (howto->bitsize - 1)) - 1;
bfd_signed_vma reloc_signed_min = ~reloc_signed_max;
bfd_vma check;
bfd_signed_vma signed_check;
bfd_vma add;
bfd_signed_vma signed_add;
BFD_ASSERT (size == 4);
@ -1699,7 +1699,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
/* Assumes two's complement. */
if ( signed_check > reloc_signed_max
|| signed_check < reloc_signed_min)
overflow = true;
overflow = TRUE;
/* Put the relocation into the correct bits.
For a BLX instruction, make sure that the relocation is rounded up
@ -1746,13 +1746,13 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
/* Determine if we need to set the bottom bit of a relocated address
because the address is the address of a Thumb code symbol. */
int patchit = false;
int patchit = FALSE;
if (h != NULL
&& ( h->class == C_THUMBSTATFUNC
|| h->class == C_THUMBEXTFUNC))
{
patchit = true;
patchit = TRUE;
}
else if (sym != NULL
&& sym->n_scnum > N_UNDEF)
@ -1761,7 +1761,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
if ( sym->n_sclass == C_THUMBSTATFUNC
|| sym->n_sclass == C_THUMBEXTFUNC)
patchit = true;
patchit = TRUE;
}
if (patchit)
@ -1786,7 +1786,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_archive_filename (input_bfd),
(unsigned long) rel->r_vaddr,
bfd_get_section_name (input_bfd, input_section));
return false;
return FALSE;
case bfd_reloc_overflow:
{
const char *name;
@ -1800,23 +1800,23 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
{
name = _bfd_coff_internal_syment_name (input_bfd, sym, buf);
if (name == NULL)
return false;
return FALSE;
}
if (! ((*info->callbacks->reloc_overflow)
(info, name, howto->name, (bfd_vma) 0, input_bfd,
input_section, rel->r_vaddr - input_section->vma)))
return false;
return FALSE;
}
}
}
return true;
return TRUE;
}
#ifndef COFF_IMAGE_WITH_PE
boolean
bfd_boolean
bfd_arm_allocate_interworking_sections (info)
struct bfd_link_info * info;
{
@ -1869,7 +1869,7 @@ bfd_arm_allocate_interworking_sections (info)
s->contents = foo;
}
return true;
return TRUE;
}
static void
@ -1904,7 +1904,7 @@ record_arm_to_thumb_glue (info, h)
sprintf (tmp_name, ARM2THUMB_GLUE_ENTRY_NAME, name);
myh = coff_link_hash_lookup
(coff_hash_table (info), tmp_name, false, false, true);
(coff_hash_table (info), tmp_name, FALSE, FALSE, TRUE);
if (myh != NULL)
{
@ -1919,7 +1919,7 @@ record_arm_to_thumb_glue (info, h)
bh = NULL;
val = globals->arm_glue_size + 1;
bfd_coff_link_add_one_symbol (info, globals->bfd_of_glue_owner, tmp_name,
BSF_GLOBAL, s, val, NULL, true, false, &bh);
BSF_GLOBAL, s, val, NULL, TRUE, FALSE, &bh);
free (tmp_name);
@ -1961,7 +1961,7 @@ record_thumb_to_arm_glue (info, h)
sprintf (tmp_name, THUMB2ARM_GLUE_ENTRY_NAME, name);
myh = coff_link_hash_lookup
(coff_hash_table (info), tmp_name, false, false, true);
(coff_hash_table (info), tmp_name, FALSE, FALSE, TRUE);
if (myh != NULL)
{
@ -1972,7 +1972,7 @@ record_thumb_to_arm_glue (info, h)
bh = NULL;
val = globals->thumb_glue_size + 1;
bfd_coff_link_add_one_symbol (info, globals->bfd_of_glue_owner, tmp_name,
BSF_GLOBAL, s, val, NULL, true, false, &bh);
BSF_GLOBAL, s, val, NULL, TRUE, FALSE, &bh);
/* If we mark it 'thumb', the disassembler will do a better job. */
myh = (struct coff_link_hash_entry *) bh;
@ -1995,7 +1995,7 @@ record_thumb_to_arm_glue (info, h)
bh = NULL;
val = globals->thumb_glue_size + (globals->support_old_code ? 8 : 4);
bfd_coff_link_add_one_symbol (info, globals->bfd_of_glue_owner, tmp_name,
BSF_LOCAL, s, val, NULL, true, false, &bh);
BSF_LOCAL, s, val, NULL, TRUE, FALSE, &bh);
free (tmp_name);
@ -2009,7 +2009,7 @@ record_thumb_to_arm_glue (info, h)
This function is called from the linker scripts in ld/emultempl/
{armcoff/pe}.em */
boolean
bfd_boolean
bfd_arm_get_bfd_for_interworking (abfd, info)
bfd * abfd;
struct bfd_link_info * info;
@ -2021,14 +2021,14 @@ bfd_arm_get_bfd_for_interworking (abfd, info)
/* If we are only performing a partial link do not bother
getting a bfd to hold the glue. */
if (info->relocateable)
return true;
return TRUE;
globals = coff_arm_hash_table (info);
BFD_ASSERT (globals != NULL);
if (globals->bfd_of_glue_owner != NULL)
return true;
return TRUE;
sec = bfd_get_section_by_name (abfd, ARM2THUMB_GLUE_SECTION_NAME);
@ -2041,7 +2041,7 @@ bfd_arm_get_bfd_for_interworking (abfd, info)
if (sec == NULL
|| ! bfd_set_section_flags (abfd, sec, flags)
|| ! bfd_set_section_alignment (abfd, sec, 2))
return false;
return FALSE;
}
sec = bfd_get_section_by_name (abfd, THUMB2ARM_GLUE_SECTION_NAME);
@ -2055,16 +2055,16 @@ bfd_arm_get_bfd_for_interworking (abfd, info)
if (sec == NULL
|| ! bfd_set_section_flags (abfd, sec, flags)
|| ! bfd_set_section_alignment (abfd, sec, 2))
return false;
return FALSE;
}
/* Save the bfd for later use. */
globals->bfd_of_glue_owner = abfd;
return true;
return TRUE;
}
boolean
bfd_boolean
bfd_arm_process_before_allocation (abfd, info, support_old_code)
bfd * abfd;
struct bfd_link_info * info;
@ -2076,7 +2076,7 @@ bfd_arm_process_before_allocation (abfd, info, support_old_code)
/* If we are only performing a partial link do not bother
to construct any glue. */
if (info->relocateable)
return true;
return TRUE;
/* Here we have a bfd that is to be included on the link. We have a hook
to do reloc rummaging, before section sizes are nailed down. */
@ -2094,7 +2094,7 @@ bfd_arm_process_before_allocation (abfd, info, support_old_code)
sec = abfd->sections;
if (sec == NULL)
return true;
return TRUE;
for (; sec != NULL; sec = sec->next)
{
@ -2178,7 +2178,7 @@ bfd_arm_process_before_allocation (abfd, info, support_old_code)
}
}
return true;
return TRUE;
}
#endif /* ! defined (COFF_IMAGE_WITH_PE) */
@ -2198,14 +2198,14 @@ bfd_arm_process_before_allocation (abfd, info, support_old_code)
/* When doing a relocateable link, we want to convert ARM26 relocs
into ARM26D relocs. */
static boolean
static bfd_boolean
coff_arm_adjust_symndx (obfd, info, ibfd, sec, irel, adjustedp)
bfd *obfd ATTRIBUTE_UNUSED;
struct bfd_link_info *info ATTRIBUTE_UNUSED;
bfd *ibfd;
asection *sec;
struct internal_reloc *irel;
boolean *adjustedp;
bfd_boolean *adjustedp;
{
if (irel->r_type == 3)
{
@ -2218,8 +2218,8 @@ coff_arm_adjust_symndx (obfd, info, ibfd, sec, irel, adjustedp)
&& h->root.u.def.section->output_section == sec->output_section)
irel->r_type = 7;
}
*adjustedp = false;
return true;
*adjustedp = FALSE;
return TRUE;
}
/* Called when merging the private data areas of two BFDs.
@ -2227,7 +2227,7 @@ coff_arm_adjust_symndx (obfd, info, ibfd, sec, irel, adjustedp)
attempting to merge binaries compiled for different ARM
targets, eg different CPUs or differents APCS's. */
static boolean
static bfd_boolean
coff_arm_merge_private_bfd_data (ibfd, obfd)
bfd * ibfd;
bfd * obfd;
@ -2235,14 +2235,14 @@ coff_arm_merge_private_bfd_data (ibfd, obfd)
BFD_ASSERT (ibfd != NULL && obfd != NULL);
if (ibfd == obfd)
return true;
return TRUE;
/* If the two formats are different we cannot merge anything.
This is not an error, since it is permissable to change the
input and output formats. */
if ( ibfd->xvec->flavour != bfd_target_coff_flavour
|| obfd->xvec->flavour != bfd_target_coff_flavour)
return true;
return TRUE;
/* Verify that the APCS is the same for the two BFDs */
if (APCS_SET (ibfd))
@ -2260,7 +2260,7 @@ coff_arm_merge_private_bfd_data (ibfd, obfd)
);
bfd_set_error (bfd_error_wrong_format);
return false;
return FALSE;
}
if (APCS_FLOAT_FLAG (obfd) != APCS_FLOAT_FLAG (ibfd))
@ -2278,7 +2278,7 @@ coff_arm_merge_private_bfd_data (ibfd, obfd)
bfd_get_filename (obfd));
bfd_set_error (bfd_error_wrong_format);
return false;
return FALSE;
}
if (PIC_FLAG (obfd) != PIC_FLAG (ibfd))
@ -2295,7 +2295,7 @@ coff_arm_merge_private_bfd_data (ibfd, obfd)
bfd_get_filename (obfd));
bfd_set_error (bfd_error_wrong_format);
return false;
return FALSE;
}
}
else
@ -2334,12 +2334,12 @@ coff_arm_merge_private_bfd_data (ibfd, obfd)
}
}
return true;
return TRUE;
}
/* Display the flags field. */
static boolean
static bfd_boolean
coff_arm_print_private_bfd_data (abfd, ptr)
bfd * abfd;
PTR ptr;
@ -2376,7 +2376,7 @@ coff_arm_print_private_bfd_data (abfd, ptr)
fputc ('\n', file);
return true;
return TRUE;
}
/* Copies the given flags into the coff_tdata.flags field.
@ -2386,7 +2386,7 @@ coff_arm_print_private_bfd_data (abfd, ptr)
Note: Although this function is static, it is explicitly
called from both coffcode.h and peicode.h. */
static boolean
static bfd_boolean
_bfd_coff_arm_set_private_flags (abfd, flags)
bfd * abfd;
flagword flags;
@ -2404,7 +2404,7 @@ _bfd_coff_arm_set_private_flags (abfd, flags)
|| (APCS_FLOAT_FLAG (abfd) != (flags & F_APCS_FLOAT))
|| (PIC_FLAG (abfd) != (flags & F_PIC))
))
return false;
return FALSE;
flag |= (flags & (F_APCS_FLOAT | F_PIC));
@ -2431,13 +2431,13 @@ _bfd_coff_arm_set_private_flags (abfd, flags)
SET_INTERWORK_FLAG (abfd, flag);
return true;
return TRUE;
}
/* Copy the important parts of the target specific data
from one instance of a BFD to another. */
static boolean
static bfd_boolean
coff_arm_copy_private_bfd_data (src, dest)
bfd * src;
bfd * dest;
@ -2445,12 +2445,12 @@ coff_arm_copy_private_bfd_data (src, dest)
BFD_ASSERT (src != NULL && dest != NULL);
if (src == dest)
return true;
return TRUE;
/* If the destination is not in the same format as the source, do not do
the copy. */
if (src->xvec != dest->xvec)
return true;
return TRUE;
/* copy the flags field */
if (APCS_SET (src))
@ -2459,13 +2459,13 @@ coff_arm_copy_private_bfd_data (src, dest)
{
/* If the src and dest have different APCS flag bits set, fail. */
if (APCS_26_FLAG (dest) != APCS_26_FLAG (src))
return false;
return FALSE;
if (APCS_FLOAT_FLAG (dest) != APCS_FLOAT_FLAG (src))
return false;
return FALSE;
if (PIC_FLAG (dest) != PIC_FLAG (src))
return false;
return FALSE;
}
else
SET_APCS_FLAGS (dest, APCS_26_FLAG (src) | APCS_FLOAT_FLAG (src)
@ -2498,7 +2498,7 @@ Warning: Clearing the interworking flag of %s because non-interworking code in %
}
}
return true;
return TRUE;
}
/* Note: the definitions here of LOCAL_LABEL_PREFIX and USER_LABEL_PREIFX
@ -2513,7 +2513,7 @@ Warning: Clearing the interworking flag of %s because non-interworking code in %
non-local.
b) Allow other prefixes than ".", e.g. an empty prefix would cause all
labels of the form Lxxx to be stripped. */
static boolean
static bfd_boolean
coff_arm_is_local_label_name (abfd, name)
bfd * abfd ATTRIBUTE_UNUSED;
const char * name;
@ -2522,7 +2522,7 @@ coff_arm_is_local_label_name (abfd, name)
if (USER_LABEL_PREFIX[0] != 0)
{
if (strncmp (name, USER_LABEL_PREFIX, strlen (USER_LABEL_PREFIX)) == 0)
return false;
return FALSE;
}
#endif
@ -2535,7 +2535,7 @@ coff_arm_is_local_label_name (abfd, name)
size_t len = strlen (LOCAL_LABEL_PREFIX);
if (strncmp (name, LOCAL_LABEL_PREFIX, len) != 0)
return false;
return FALSE;
/* Perform the checks below for the rest of the name. */
name += len;
@ -2553,7 +2553,7 @@ coff_arm_is_local_label_name (abfd, name)
krk@cygnus.com */
static boolean
static bfd_boolean
coff_arm_link_output_has_begun (sub, info)
bfd * sub;
struct coff_final_link_info * info;
@ -2562,7 +2562,7 @@ coff_arm_link_output_has_begun (sub, info)
|| sub == coff_arm_hash_table (info->info)->bfd_of_glue_owner);
}
static boolean
static bfd_boolean
coff_arm_final_link_postscript (abfd, pfinfo)
bfd * abfd ATTRIBUTE_UNUSED;
struct coff_final_link_info * pfinfo;
@ -2576,12 +2576,12 @@ coff_arm_final_link_postscript (abfd, pfinfo)
if (globals->bfd_of_glue_owner != NULL)
{
if (! _bfd_coff_link_input_bfd (pfinfo, globals->bfd_of_glue_owner))
return false;
return FALSE;
globals->bfd_of_glue_owner->output_has_begun = true;
globals->bfd_of_glue_owner->output_has_begun = TRUE;
}
return true;
return TRUE;
}
#include "coffcode.h"

View File

@ -1,5 +1,5 @@
/* BFD back-end for Apple M68K COFF A/UX 3.x files.
Copyright 1996, 1997, 2000 Free Software Foundation, Inc.
Copyright 1996, 1997, 2000, 2002 Free Software Foundation, Inc.
Written by Richard Henderson <rth@tamu.edu>.
This file is part of BFD, the Binary File Descriptor library.
@ -40,9 +40,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfd.h"
#include "sysdep.h"
static boolean coff_m68k_aux_link_add_one_symbol
static bfd_boolean coff_m68k_aux_link_add_one_symbol
PARAMS ((struct bfd_link_info *, bfd *, const char *, flagword,
asection *, bfd_vma, const char *, boolean, boolean,
asection *, bfd_vma, const char *, bfd_boolean, bfd_boolean,
struct bfd_link_hash_entry **));
#define coff_link_add_one_symbol coff_m68k_aux_link_add_one_symbol
@ -56,7 +56,7 @@ static boolean coff_m68k_aux_link_add_one_symbol
shared libraries work here, but can work if you are careful with
what you include in the shared object. */
static boolean
static bfd_boolean
coff_m68k_aux_link_add_one_symbol (info, abfd, name, flags, section, value,
string, copy, collect, hashp)
struct bfd_link_info *info;
@ -66,8 +66,8 @@ coff_m68k_aux_link_add_one_symbol (info, abfd, name, flags, section, value,
asection *section;
bfd_vma value;
const char *string;
boolean copy;
boolean collect;
bfd_boolean copy;
bfd_boolean collect;
struct bfd_link_hash_entry **hashp;
{
struct bfd_link_hash_entry *h;
@ -86,21 +86,21 @@ coff_m68k_aux_link_add_one_symbol (info, abfd, name, flags, section, value,
}
else
{
h = bfd_link_hash_lookup (info->hash, name, true, copy, false);
h = bfd_link_hash_lookup (info->hash, name, TRUE, copy, FALSE);
if (h == NULL)
{
if (hashp != NULL)
*hashp = NULL;
return false;
return FALSE;
}
}
if (info->notice_hash != (struct bfd_hash_table *) NULL
&& (bfd_hash_lookup (info->notice_hash, name, false, false)
&& (bfd_hash_lookup (info->notice_hash, name, FALSE, FALSE)
!= (struct bfd_hash_entry *) NULL))
{
if (! (*info->callbacks->notice) (info, name, abfd, section, value))
return false;
return FALSE;
}
if (hashp != (struct bfd_link_hash_entry **) NULL)
@ -121,10 +121,10 @@ coff_m68k_aux_link_add_one_symbol (info, abfd, name, flags, section, value,
{
h->u.def.section = section;
h->u.def.value = value;
return true;
return TRUE;
}
else if (bfd_is_abs_section (section) && !bfd_is_abs_section (msec))
return true;
return TRUE;
}
}

View File

@ -62,21 +62,31 @@ static struct bfd_hash_entry *
funcvec_hash_newfunc
PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
static boolean
static bfd_boolean
funcvec_hash_table_init
PARAMS ((struct funcvec_hash_table *, bfd *,
struct bfd_hash_entry *(*) PARAMS ((struct bfd_hash_entry *,
struct bfd_hash_table *,
const char *))));
struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
struct bfd_hash_table *,
const char *)));
static bfd_reloc_status_type special PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static int select_reloc PARAMS ((reloc_howto_type *));
static void rtype2howto PARAMS ((arelent *, struct internal_reloc *));
static void reloc_processing PARAMS ((arelent *, struct internal_reloc *, asymbol **, bfd *, asection *));
static boolean h8300_symbol_address_p PARAMS ((bfd *, asection *, bfd_vma));
static int h8300_reloc16_estimate PARAMS ((bfd *, asection *, arelent *, unsigned int, struct bfd_link_info *));
static void h8300_reloc16_extra_cases PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *, arelent *, bfd_byte *, unsigned int *, unsigned int *));
static boolean h8300_bfd_link_add_symbols PARAMS ((bfd *, struct bfd_link_info *));
static bfd_reloc_status_type special
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static int select_reloc
PARAMS ((reloc_howto_type *));
static void rtype2howto
PARAMS ((arelent *, struct internal_reloc *));
static void reloc_processing
PARAMS ((arelent *, struct internal_reloc *, asymbol **, bfd *, asection *));
static bfd_boolean h8300_symbol_address_p
PARAMS ((bfd *, asection *, bfd_vma));
static int h8300_reloc16_estimate
PARAMS ((bfd *, asection *, arelent *, unsigned int,
struct bfd_link_info *));
static void h8300_reloc16_extra_cases
PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *, arelent *,
bfd_byte *, unsigned int *, unsigned int *));
static bfd_boolean h8300_bfd_link_add_symbols
PARAMS ((bfd *, struct bfd_link_info *));
/* To lookup a value in the function vector hash table. */
#define funcvec_hash_lookup(table, string, create, copy) \
@ -159,13 +169,13 @@ funcvec_hash_newfunc (entry, gen_table, string)
/* Initialize the function vector hash table. */
static boolean
static bfd_boolean
funcvec_hash_table_init (table, abfd, newfunc)
struct funcvec_hash_table *table;
bfd *abfd;
struct bfd_hash_entry *(*newfunc) PARAMS ((struct bfd_hash_entry *,
struct bfd_hash_table *,
const char *));
struct bfd_hash_entry *(*newfunc)
PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *,
const char *));
{
/* Initialize our local fields, then call the generic initialization
routine. */
@ -232,37 +242,37 @@ special (abfd, reloc_entry, symbol, data, input_section, output_bfd,
}
static reloc_howto_type howto_table[] = {
HOWTO (R_RELBYTE, 0, 0, 8, false, 0, complain_overflow_bitfield, special, "8", false, 0x000000ff, 0x000000ff, false),
HOWTO (R_RELWORD, 0, 1, 16, false, 0, complain_overflow_bitfield, special, "16", false, 0x0000ffff, 0x0000ffff, false),
HOWTO (R_RELLONG, 0, 2, 32, false, 0, complain_overflow_bitfield, special, "32", false, 0xffffffff, 0xffffffff, false),
HOWTO (R_PCRBYTE, 0, 0, 8, true, 0, complain_overflow_signed, special, "DISP8", false, 0x000000ff, 0x000000ff, true),
HOWTO (R_PCRWORD, 0, 1, 16, true, 0, complain_overflow_signed, special, "DISP16", false, 0x0000ffff, 0x0000ffff, true),
HOWTO (R_PCRLONG, 0, 2, 32, true, 0, complain_overflow_signed, special, "DISP32", false, 0xffffffff, 0xffffffff, true),
HOWTO (R_MOV16B1, 0, 1, 16, false, 0, complain_overflow_bitfield, special, "relaxable mov.b:16", false, 0x0000ffff, 0x0000ffff, false),
HOWTO (R_MOV16B2, 0, 1, 8, false, 0, complain_overflow_bitfield, special, "relaxed mov.b:16", false, 0x000000ff, 0x000000ff, false),
HOWTO (R_JMP1, 0, 1, 16, false, 0, complain_overflow_bitfield, special, "16/pcrel", false, 0x0000ffff, 0x0000ffff, false),
HOWTO (R_JMP2, 0, 0, 8, false, 0, complain_overflow_bitfield, special, "pcrecl/16", false, 0x000000ff, 0x000000ff, false),
HOWTO (R_JMPL1, 0, 2, 32, false, 0, complain_overflow_bitfield, special, "24/pcrell", false, 0x00ffffff, 0x00ffffff, false),
HOWTO (R_JMPL2, 0, 0, 8, false, 0, complain_overflow_bitfield, special, "pc8/24", false, 0x000000ff, 0x000000ff, false),
HOWTO (R_MOV24B1, 0, 1, 32, false, 0, complain_overflow_bitfield, special, "relaxable mov.b:24", false, 0xffffffff, 0xffffffff, false),
HOWTO (R_MOV24B2, 0, 1, 8, false, 0, complain_overflow_bitfield, special, "relaxed mov.b:24", false, 0x0000ffff, 0x0000ffff, false),
HOWTO (R_RELBYTE, 0, 0, 8, FALSE, 0, complain_overflow_bitfield, special, "8", FALSE, 0x000000ff, 0x000000ff, FALSE),
HOWTO (R_RELWORD, 0, 1, 16, FALSE, 0, complain_overflow_bitfield, special, "16", FALSE, 0x0000ffff, 0x0000ffff, FALSE),
HOWTO (R_RELLONG, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, special, "32", FALSE, 0xffffffff, 0xffffffff, FALSE),
HOWTO (R_PCRBYTE, 0, 0, 8, TRUE, 0, complain_overflow_signed, special, "DISP8", FALSE, 0x000000ff, 0x000000ff, TRUE),
HOWTO (R_PCRWORD, 0, 1, 16, TRUE, 0, complain_overflow_signed, special, "DISP16", FALSE, 0x0000ffff, 0x0000ffff, TRUE),
HOWTO (R_PCRLONG, 0, 2, 32, TRUE, 0, complain_overflow_signed, special, "DISP32", FALSE, 0xffffffff, 0xffffffff, TRUE),
HOWTO (R_MOV16B1, 0, 1, 16, FALSE, 0, complain_overflow_bitfield, special, "relaxable mov.b:16", FALSE, 0x0000ffff, 0x0000ffff, FALSE),
HOWTO (R_MOV16B2, 0, 1, 8, FALSE, 0, complain_overflow_bitfield, special, "relaxed mov.b:16", FALSE, 0x000000ff, 0x000000ff, FALSE),
HOWTO (R_JMP1, 0, 1, 16, FALSE, 0, complain_overflow_bitfield, special, "16/pcrel", FALSE, 0x0000ffff, 0x0000ffff, FALSE),
HOWTO (R_JMP2, 0, 0, 8, FALSE, 0, complain_overflow_bitfield, special, "pcrecl/16", FALSE, 0x000000ff, 0x000000ff, FALSE),
HOWTO (R_JMPL1, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, special, "24/pcrell", FALSE, 0x00ffffff, 0x00ffffff, FALSE),
HOWTO (R_JMPL2, 0, 0, 8, FALSE, 0, complain_overflow_bitfield, special, "pc8/24", FALSE, 0x000000ff, 0x000000ff, FALSE),
HOWTO (R_MOV24B1, 0, 1, 32, FALSE, 0, complain_overflow_bitfield, special, "relaxable mov.b:24", FALSE, 0xffffffff, 0xffffffff, FALSE),
HOWTO (R_MOV24B2, 0, 1, 8, FALSE, 0, complain_overflow_bitfield, special, "relaxed mov.b:24", FALSE, 0x0000ffff, 0x0000ffff, FALSE),
/* An indirect reference to a function. This causes the function's address
to be added to the function vector in lo-mem and puts the address of
the function vector's entry in the jsr instruction. */
HOWTO (R_MEM_INDIRECT, 0, 0, 8, false, 0, complain_overflow_bitfield, special, "8/indirect", false, 0x000000ff, 0x000000ff, false),
HOWTO (R_MEM_INDIRECT, 0, 0, 8, FALSE, 0, complain_overflow_bitfield, special, "8/indirect", FALSE, 0x000000ff, 0x000000ff, FALSE),
/* Internal reloc for relaxing. This is created when a 16bit pc-relative
branch is turned into an 8bit pc-relative branch. */
HOWTO (R_PCRWORD_B, 0, 0, 8, true, 0, complain_overflow_bitfield, special, "relaxed bCC:16", false, 0x000000ff, 0x000000ff, false),
HOWTO (R_PCRWORD_B, 0, 0, 8, TRUE, 0, complain_overflow_bitfield, special, "relaxed bCC:16", FALSE, 0x000000ff, 0x000000ff, FALSE),
HOWTO (R_MOVL1, 0, 2, 32, false, 0, complain_overflow_bitfield,special, "32/24 relaxable move", false, 0xffffffff, 0xffffffff, false),
HOWTO (R_MOVL1, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,special, "32/24 relaxable move", FALSE, 0xffffffff, 0xffffffff, FALSE),
HOWTO (R_MOVL2, 0, 1, 16, false, 0, complain_overflow_bitfield, special, "32/24 relaxed move", false, 0x0000ffff, 0x0000ffff, false),
HOWTO (R_MOVL2, 0, 1, 16, FALSE, 0, complain_overflow_bitfield, special, "32/24 relaxed move", FALSE, 0x0000ffff, 0x0000ffff, FALSE),
HOWTO (R_BCC_INV, 0, 0, 8, true, 0, complain_overflow_signed, special, "DISP8 inverted", false, 0x000000ff, 0x000000ff, true),
HOWTO (R_BCC_INV, 0, 0, 8, TRUE, 0, complain_overflow_signed, special, "DISP8 inverted", FALSE, 0x000000ff, 0x000000ff, TRUE),
HOWTO (R_JMP_DEL, 0, 0, 8, true, 0, complain_overflow_signed, special, "Deleted jump", false, 0x000000ff, 0x000000ff, true),
HOWTO (R_JMP_DEL, 0, 0, 8, TRUE, 0, complain_overflow_signed, special, "Deleted jump", FALSE, 0x000000ff, 0x000000ff, TRUE),
};
/* Turn a howto into a reloc number. */
@ -401,7 +411,7 @@ reloc_processing (relent, reloc, symbols, abfd, section)
#endif
}
static boolean
static bfd_boolean
h8300_symbol_address_p (abfd, input_section, address)
bfd *abfd;
asection *input_section;
@ -421,10 +431,10 @@ h8300_symbol_address_p (abfd, input_section, address)
&& (input_section->output_section->vma
+ input_section->output_offset
+ p->value) == address)
return true;
return TRUE;
s++;
}
return false;
return FALSE;
}
/* If RELOC represents a relaxable instruction/reloc, change it into
@ -505,7 +515,7 @@ h8300_reloc16_estimate (abfd, input_section, reloc, shrink, link_info)
Only perform this optimisation for jumps (code 0x5a) not
subroutine calls, as otherwise it could transform:
mov.w r0,r0
beq .L1
jsr @_bar
@ -516,7 +526,7 @@ h8300_reloc16_estimate (abfd, input_section, reloc, shrink, link_info)
bne _bar
rts
_bar: rts
which changes the call (jsr) into a branch (bne). */
if (code == 0x5a
&& gap <= 126
@ -1131,7 +1141,7 @@ h8300_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
}
ftab = h8300_coff_hash_table (link_info)->funcvec_hash_table;
h = funcvec_hash_lookup (ftab, name, false, false);
h = funcvec_hash_lookup (ftab, name, FALSE, FALSE);
/* This shouldn't ever happen. If it does that means we've got
data corruption of some kind. Aborting seems like a reasonable
@ -1196,7 +1206,7 @@ h8300_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
from this BFD to the bfd linker hash table. It may add a few
selected static symbols to the bfd linker hash table. */
static boolean
static bfd_boolean
h8300_bfd_link_add_symbols (abfd, info)
bfd *abfd;
struct bfd_link_info *info;
@ -1222,21 +1232,21 @@ h8300_bfd_link_add_symbols (abfd, info)
|| ! bfd_set_section_flags (abfd,
h8300_coff_hash_table(info)->vectors_sec,
flags))
return false;
return FALSE;
/* Also create the vector hash table. */
amt = sizeof (struct funcvec_hash_table);
funcvec_hash_table = (struct funcvec_hash_table *) bfd_alloc (abfd, amt);
if (!funcvec_hash_table)
return false;
return FALSE;
/* And initialize the funcvec hash table. */
if (!funcvec_hash_table_init (funcvec_hash_table, abfd,
funcvec_hash_newfunc))
{
bfd_release (abfd, funcvec_hash_table);
return false;
return FALSE;
}
/* Store away a pointer to the funcvec hash table. */
@ -1264,7 +1274,7 @@ h8300_bfd_link_add_symbols (abfd, info)
relocs = (arelent **) bfd_malloc ((bfd_size_type) reloc_size);
if (!relocs)
return false;
return FALSE;
/* The symbols should have been read in by _bfd_generic link_add_symbols
call abovec, so we can cheat and use the pointer to them that was
@ -1313,17 +1323,17 @@ h8300_bfd_link_add_symbols (abfd, info)
/* Look this symbol up in the function vector hash table. */
ftab = h8300_coff_hash_table (info)->funcvec_hash_table;
h = funcvec_hash_lookup (ftab, name, false, false);
h = funcvec_hash_lookup (ftab, name, FALSE, FALSE);
/* If this symbol isn't already in the hash table, add
it and bump up the size of the hash table. */
if (h == NULL)
{
h = funcvec_hash_lookup (ftab, name, true, true);
h = funcvec_hash_lookup (ftab, name, TRUE, TRUE);
if (h == NULL)
{
free (relocs);
return false;
return FALSE;
}
/* Bump the size of the vectors section. Each vector
@ -1354,7 +1364,7 @@ h8300_bfd_link_add_symbols (abfd, info)
sec->contents = bfd_malloc (sec->_raw_size);
}
return true;
return TRUE;
}
#define coff_reloc16_extra_cases h8300_reloc16_extra_cases

View File

@ -1,5 +1,5 @@
/* BFD back-end for Hitachi H8/500 COFF binaries.
Copyright 1993, 1994, 1995, 1997, 1999, 2000, 2001
Copyright 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
Contributed by Cygnus Support.
Written by Steve Chamberlain, <sac@cygnus.com>.
@ -36,38 +36,38 @@ static void extra_case PARAMS ((bfd *, struct bfd_link_info *, struct bfd_
#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (1)
static reloc_howto_type r_imm8 =
HOWTO (R_H8500_IMM8, 0, 1, 8, false, 0,
complain_overflow_bitfield, 0, "r_imm8", true, 0x000000ff, 0x000000ff, false);
HOWTO (R_H8500_IMM8, 0, 1, 8, FALSE, 0,
complain_overflow_bitfield, 0, "r_imm8", TRUE, 0x000000ff, 0x000000ff, FALSE);
static reloc_howto_type r_imm16 =
HOWTO (R_H8500_IMM16, 0, 1, 16, false, 0,
complain_overflow_bitfield, 0, "r_imm16", true, 0x0000ffff, 0x0000ffff, false);
HOWTO (R_H8500_IMM16, 0, 1, 16, FALSE, 0,
complain_overflow_bitfield, 0, "r_imm16", TRUE, 0x0000ffff, 0x0000ffff, FALSE);
static reloc_howto_type r_imm24 =
HOWTO (R_H8500_IMM24, 0, 1, 24, false, 0,
complain_overflow_bitfield, 0, "r_imm24", true, 0x00ffffff, 0x00ffffff, false);
HOWTO (R_H8500_IMM24, 0, 1, 24, FALSE, 0,
complain_overflow_bitfield, 0, "r_imm24", TRUE, 0x00ffffff, 0x00ffffff, FALSE);
static reloc_howto_type r_imm32 =
HOWTO (R_H8500_IMM32, 0, 1, 32, false, 0,
complain_overflow_bitfield, 0, "r_imm32", true, 0xffffffff, 0xffffffff, false);
HOWTO (R_H8500_IMM32, 0, 1, 32, FALSE, 0,
complain_overflow_bitfield, 0, "r_imm32", TRUE, 0xffffffff, 0xffffffff, FALSE);
static reloc_howto_type r_high8 =
HOWTO (R_H8500_HIGH8, 0, 1, 8, false, 0,
complain_overflow_dont, 0, "r_high8", true, 0x000000ff, 0x000000ff, false);
HOWTO (R_H8500_HIGH8, 0, 1, 8, FALSE, 0,
complain_overflow_dont, 0, "r_high8", TRUE, 0x000000ff, 0x000000ff, FALSE);
static reloc_howto_type r_low16 =
HOWTO (R_H8500_LOW16, 0, 1, 16, false, 0,
complain_overflow_dont, 0, "r_low16", true, 0x0000ffff, 0x0000ffff, false);
HOWTO (R_H8500_LOW16, 0, 1, 16, FALSE, 0,
complain_overflow_dont, 0, "r_low16", TRUE, 0x0000ffff, 0x0000ffff, FALSE);
static reloc_howto_type r_pcrel8 =
HOWTO (R_H8500_PCREL8, 0, 1, 8, true, 0, complain_overflow_signed, 0, "r_pcrel8", true, 0, 0, true);
HOWTO (R_H8500_PCREL8, 0, 1, 8, TRUE, 0, complain_overflow_signed, 0, "r_pcrel8", TRUE, 0, 0, TRUE);
static reloc_howto_type r_pcrel16 =
HOWTO (R_H8500_PCREL16, 0, 1, 16, true, 0, complain_overflow_signed, 0, "r_pcrel16", true, 0, 0, true);
HOWTO (R_H8500_PCREL16, 0, 1, 16, TRUE, 0, complain_overflow_signed, 0, "r_pcrel16", TRUE, 0, 0, TRUE);
static reloc_howto_type r_high16 =
HOWTO (R_H8500_HIGH16, 0, 1, 8, false, 0,
complain_overflow_dont, 0, "r_high16", true, 0x000ffff, 0x0000ffff, false);
HOWTO (R_H8500_HIGH16, 0, 1, 8, FALSE, 0,
complain_overflow_dont, 0, "r_high16", TRUE, 0x000ffff, 0x0000ffff, FALSE);
/* Turn a howto into a reloc number. */

View File

@ -179,12 +179,12 @@ coff_i386_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
}
#ifdef COFF_WITH_PE
/* Return true if this relocation should appear in the output .reloc
/* Return TRUE if this relocation should appear in the output .reloc
section. */
static boolean in_reloc_p PARAMS ((bfd *, reloc_howto_type *));
static bfd_boolean in_reloc_p PARAMS ((bfd *, reloc_howto_type *));
static boolean in_reloc_p (abfd, howto)
static bfd_boolean in_reloc_p (abfd, howto)
bfd * abfd ATTRIBUTE_UNUSED;
reloc_howto_type *howto;
{
@ -193,7 +193,7 @@ static boolean in_reloc_p (abfd, howto)
#endif /* COFF_WITH_PE */
#ifndef PCRELOFFSET
#define PCRELOFFSET false
#define PCRELOFFSET FALSE
#endif
static reloc_howto_type howto_table[] =
@ -208,29 +208,29 @@ static reloc_howto_type howto_table[] =
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
coff_i386_reloc, /* special_function */
"dir32", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
true), /* pcrel_offset */
TRUE), /* pcrel_offset */
/* PE IMAGE_REL_I386_DIR32NB relocation (7). */
HOWTO (R_IMAGEBASE, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
coff_i386_reloc, /* special_function */
"rva32", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
EMPTY_HOWTO (010),
EMPTY_HOWTO (011),
EMPTY_HOWTO (012),
@ -243,12 +243,12 @@ static reloc_howto_type howto_table[] =
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
coff_i386_reloc, /* special_function */
"8", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0x000000ff, /* src_mask */
0x000000ff, /* dst_mask */
PCRELOFFSET), /* pcrel_offset */
@ -257,12 +257,12 @@ static reloc_howto_type howto_table[] =
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
coff_i386_reloc, /* special_function */
"16", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0x0000ffff, /* src_mask */
0x0000ffff, /* dst_mask */
PCRELOFFSET), /* pcrel_offset */
@ -271,12 +271,12 @@ static reloc_howto_type howto_table[] =
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
coff_i386_reloc, /* special_function */
"32", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
PCRELOFFSET), /* pcrel_offset */
@ -285,12 +285,12 @@ static reloc_howto_type howto_table[] =
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */
true, /* pc_relative */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
coff_i386_reloc, /* special_function */
"DISP8", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0x000000ff, /* src_mask */
0x000000ff, /* dst_mask */
PCRELOFFSET), /* pcrel_offset */
@ -299,12 +299,12 @@ static reloc_howto_type howto_table[] =
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
true, /* pc_relative */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
coff_i386_reloc, /* special_function */
"DISP16", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0x0000ffff, /* src_mask */
0x0000ffff, /* dst_mask */
PCRELOFFSET), /* pcrel_offset */
@ -313,12 +313,12 @@ static reloc_howto_type howto_table[] =
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
true, /* pc_relative */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
coff_i386_reloc, /* special_function */
"DISP32", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
PCRELOFFSET) /* pcrel_offset */
@ -388,11 +388,11 @@ static reloc_howto_type howto_table[] =
and the regular routine is that we don't want to do anything for a
relocateable link. */
static boolean coff_pe_i386_relocate_section
static bfd_boolean coff_pe_i386_relocate_section
PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
struct internal_reloc *, struct internal_syment *, asection **));
static boolean
static bfd_boolean
coff_pe_i386_relocate_section (output_bfd, info, input_bfd,
input_section, contents, relocs, syms,
sections)
@ -406,7 +406,7 @@ coff_pe_i386_relocate_section (output_bfd, info, input_bfd,
asection **sections;
{
if (info->relocateable)
return true;
return TRUE;
return _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd,
input_section, contents,
@ -539,15 +539,16 @@ coff_i386_reloc_type_lookup (abfd, code)
a leading dot for local labels, so if TARGET_UNDERSCORE is defined
we treat all symbols starting with L as local. */
static boolean coff_i386_is_local_label_name PARAMS ((bfd *, const char *));
static bfd_boolean coff_i386_is_local_label_name
PARAMS ((bfd *, const char *));
static boolean
static bfd_boolean
coff_i386_is_local_label_name (abfd, name)
bfd *abfd;
const char *name;
{
if (name[0] == 'L')
return true;
return TRUE;
return _bfd_coff_is_local_label_name (abfd, name);
}

View File

@ -1,5 +1,5 @@
/* BFD back-end for Intel 860 COFF files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1999, 2000, 2001
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
Created mostly by substituting "860" for "386" in coff-i386.c
Harry Dolan <dolan@ssd.intel.com>, October 1995
@ -136,7 +136,7 @@ coff_i860_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
}
#ifndef PCRELOFFSET
#define PCRELOFFSET false
#define PCRELOFFSET FALSE
#endif
static reloc_howto_type howto_table[] =
@ -151,29 +151,29 @@ static reloc_howto_type howto_table[] =
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
coff_i860_reloc, /* special_function */
"dir32", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
true), /* pcrel_offset */
TRUE), /* pcrel_offset */
/* {7}, */
HOWTO (R_IMAGEBASE, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
coff_i860_reloc, /* special_function */
"rva32", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
EMPTY_HOWTO (010),
EMPTY_HOWTO (011),
EMPTY_HOWTO (012),
@ -185,12 +185,12 @@ static reloc_howto_type howto_table[] =
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
coff_i860_reloc, /* special_function */
"8", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0x000000ff, /* src_mask */
0x000000ff, /* dst_mask */
PCRELOFFSET), /* pcrel_offset */
@ -198,12 +198,12 @@ static reloc_howto_type howto_table[] =
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
coff_i860_reloc, /* special_function */
"16", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0x0000ffff, /* src_mask */
0x0000ffff, /* dst_mask */
PCRELOFFSET), /* pcrel_offset */
@ -211,12 +211,12 @@ static reloc_howto_type howto_table[] =
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
coff_i860_reloc, /* special_function */
"32", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
PCRELOFFSET), /* pcrel_offset */
@ -224,12 +224,12 @@ static reloc_howto_type howto_table[] =
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */
true, /* pc_relative */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
coff_i860_reloc, /* special_function */
"DISP8", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0x000000ff, /* src_mask */
0x000000ff, /* dst_mask */
PCRELOFFSET), /* pcrel_offset */
@ -237,12 +237,12 @@ static reloc_howto_type howto_table[] =
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
true, /* pc_relative */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
coff_i860_reloc, /* special_function */
"DISP16", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0x0000ffff, /* src_mask */
0x0000ffff, /* dst_mask */
PCRELOFFSET), /* pcrel_offset */
@ -250,12 +250,12 @@ static reloc_howto_type howto_table[] =
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
true, /* pc_relative */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
coff_i860_reloc, /* special_function */
"DISP32", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
PCRELOFFSET) /* pcrel_offset */

View File

@ -1,6 +1,6 @@
/* BFD back-end for Intel 960 COFF files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1997, 1999, 2000, 2001
Free Software Foundation, Inc.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1997, 1999, 2000, 2001,
2002 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@ -29,21 +29,22 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "coff/internal.h"
#include "libcoff.h" /* to allow easier abstraction-breaking */
static boolean coff_i960_is_local_label_name PARAMS ((bfd *, const char *));
static bfd_boolean coff_i960_is_local_label_name
PARAMS ((bfd *, const char *));
static bfd_reloc_status_type optcall_callback
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static bfd_reloc_status_type coff_i960_relocate
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static reloc_howto_type *coff_i960_reloc_type_lookup
PARAMS ((bfd *, bfd_reloc_code_real_type));
static boolean coff_i960_start_final_link
static bfd_boolean coff_i960_start_final_link
PARAMS ((bfd *, struct bfd_link_info *));
static boolean coff_i960_relocate_section
static bfd_boolean coff_i960_relocate_section
PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
struct internal_reloc *, struct internal_syment *, asection **));
static boolean coff_i960_adjust_symndx
static bfd_boolean coff_i960_adjust_symndx
PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *,
struct internal_reloc *, boolean *));
struct internal_reloc *, bfd_boolean *));
#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (3)
#define COFF_ALIGN_IN_SECTION_HEADER 1
@ -59,7 +60,7 @@ static boolean coff_i960_adjust_symndx
/* This set of local label names is taken from gas. */
static boolean
static bfd_boolean
coff_i960_is_local_label_name (abfd, name)
bfd *abfd ATTRIBUTE_UNUSED;
const char *name;
@ -266,15 +267,15 @@ coff_i960_relocate (abfd, reloc_entry, symbol, data, input_section,
}
static reloc_howto_type howto_rellong =
HOWTO ((unsigned int) R_RELLONG, 0, 2, 32,false, 0,
complain_overflow_bitfield, coff_i960_relocate,"rellong", true,
HOWTO ((unsigned int) R_RELLONG, 0, 2, 32,FALSE, 0,
complain_overflow_bitfield, coff_i960_relocate,"rellong", TRUE,
0xffffffff, 0xffffffff, 0);
static reloc_howto_type howto_iprmed =
HOWTO (R_IPRMED, 0, 2, 24,true,0, complain_overflow_signed,
coff_i960_relocate, "iprmed ", true, 0x00ffffff, 0x00ffffff, 0);
HOWTO (R_IPRMED, 0, 2, 24,TRUE,0, complain_overflow_signed,
coff_i960_relocate, "iprmed ", TRUE, 0x00ffffff, 0x00ffffff, 0);
static reloc_howto_type howto_optcall =
HOWTO (R_OPTCALL, 0,2,24,true,0, complain_overflow_signed,
optcall_callback, "optcall", true, 0x00ffffff, 0x00ffffff, 0);
HOWTO (R_OPTCALL, 0,2,24,TRUE,0, complain_overflow_signed,
optcall_callback, "optcall", TRUE, 0x00ffffff, 0x00ffffff, 0);
static reloc_howto_type *
coff_i960_reloc_type_lookup (abfd, code)
@ -318,7 +319,7 @@ coff_i960_reloc_type_lookup (abfd, code)
called at the start of the linking process, and it creates the
necessary symbols. */
static boolean
static bfd_boolean
coff_i960_start_final_link (abfd, info)
bfd *abfd;
struct bfd_link_info *info;
@ -328,14 +329,14 @@ coff_i960_start_final_link (abfd, info)
bfd_byte *esym;
if (! info->relocateable)
return true;
return TRUE;
esym = (bfd_byte *) bfd_malloc (symesz);
if (esym == NULL)
return false;
return FALSE;
if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0)
return false;
return FALSE;
for (o = abfd->sections; o != NULL; o = o->next)
{
@ -353,7 +354,7 @@ coff_i960_start_final_link (abfd, info)
if (bfd_bwrite (esym, symesz, abfd) != symesz)
{
free (esym);
return false;
return FALSE;
}
obj_raw_syment_count (abfd) += 1;
@ -361,12 +362,12 @@ coff_i960_start_final_link (abfd, info)
free (esym);
return true;
return TRUE;
}
/* The reloc processing routine for the optimized COFF linker. */
static boolean
static bfd_boolean
coff_i960_relocate_section (output_bfd, info, input_bfd, input_section,
contents, relocs, syms, sections)
bfd *output_bfd ATTRIBUTE_UNUSED;
@ -392,7 +393,7 @@ coff_i960_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_vma val;
reloc_howto_type *howto;
bfd_reloc_status_type rstat = bfd_reloc_ok;
boolean done;
bfd_boolean done;
symndx = rel->r_symndx;
@ -419,7 +420,7 @@ coff_i960_relocate_section (output_bfd, info, input_bfd, input_section,
case 27: howto = &howto_optcall; break;
default:
bfd_set_error (bfd_error_bad_value);
return false;
return FALSE;
}
val = 0;
@ -458,12 +459,12 @@ coff_i960_relocate_section (output_bfd, info, input_bfd, input_section,
{
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd, input_section,
rel->r_vaddr - input_section->vma, true)))
return false;
rel->r_vaddr - input_section->vma, TRUE)))
return FALSE;
}
}
done = false;
done = FALSE;
if (howto->type == R_OPTCALL && ! info->relocateable && symndx != -1)
{
@ -485,7 +486,7 @@ coff_i960_relocate_section (output_bfd, info, input_bfd, input_section,
_("uncertain calling convention for non-COFF symbol"),
input_bfd, input_section,
rel->r_vaddr - input_section->vma)))
return false;
return FALSE;
break;
case C_LEAFSTAT:
case C_LEAFEXT:
@ -521,7 +522,7 @@ coff_i960_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_put_32 (input_bfd,
(bfd_vma) word,
contents + (rel->r_vaddr - input_section->vma));
done = true;
done = TRUE;
}
break;
case C_SCALL:
@ -559,47 +560,47 @@ coff_i960_relocate_section (output_bfd, info, input_bfd, input_section,
{
name = _bfd_coff_internal_syment_name (input_bfd, sym, buf);
if (name == NULL)
return false;
return FALSE;
}
if (! ((*info->callbacks->reloc_overflow)
(info, name, howto->name, (bfd_vma) 0, input_bfd,
input_section, rel->r_vaddr - input_section->vma)))
return false;
return FALSE;
}
}
}
return true;
return TRUE;
}
/* Adjust the symbol index of any reloc against a global symbol to
instead be a reloc against the internal symbol we created specially
for the section. */
static boolean
static bfd_boolean
coff_i960_adjust_symndx (obfd, info, ibfd, sec, irel, adjustedp)
bfd *obfd ATTRIBUTE_UNUSED;
struct bfd_link_info *info ATTRIBUTE_UNUSED;
bfd *ibfd;
asection *sec ATTRIBUTE_UNUSED;
struct internal_reloc *irel;
boolean *adjustedp;
bfd_boolean *adjustedp;
{
struct coff_link_hash_entry *h;
*adjustedp = false;
*adjustedp = FALSE;
h = obj_coff_sym_hashes (ibfd)[irel->r_symndx];
if (h == NULL
|| (h->root.type != bfd_link_hash_defined
&& h->root.type != bfd_link_hash_defweak))
return true;
return TRUE;
irel->r_symndx = h->root.u.def.section->output_section->target_index - 1;
*adjustedp = true;
*adjustedp = TRUE;
return true;
return TRUE;
}
#define coff_bfd_is_local_label_name coff_i960_is_local_label_name

View File

@ -1,5 +1,5 @@
/* BFD back-end for HP/Intel IA-64 COFF files.
Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Contributed by David Mosberger <davidm@hpl.hp.com>
This file is part of BFD, the Binary File Descriptor library.
@ -49,17 +49,17 @@ static reloc_howto_type howto_table[] =
(cache_ptr)->howto = howto_table + (dst)->r_type;
#ifdef COFF_WITH_PE
/* Return true if this relocation should
/* Return TRUE if this relocation should
appear in the output .reloc section. */
static boolean in_reloc_p PARAMS ((bfd *, reloc_howto_type *));
static bfd_boolean in_reloc_p PARAMS ((bfd *, reloc_howto_type *));
static boolean
static bfd_boolean
in_reloc_p(abfd, howto)
bfd * abfd ATTRIBUTE_UNUSED;
reloc_howto_type *howto ATTRIBUTE_UNUSED;
{
return 0; /* We don't do relocs for now... */
return FALSE; /* We don't do relocs for now... */
}
#endif

View File

@ -1,6 +1,6 @@
/* BFD back-end for Motorola 68000 COFF binaries.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1999,
2000, 2001
2000, 2001, 2002
Free Software Foundation, Inc.
Written by Cygnus Support.
@ -67,19 +67,20 @@ static reloc_howto_type *m68kcoff_common_addend_rtype_to_howto
#define RELOC_SPECIAL_FN m68kcoff_common_addend_special_fn
#endif
static boolean m68k_coff_is_local_label_name PARAMS ((bfd *, const char *));
static bfd_boolean m68k_coff_is_local_label_name
PARAMS ((bfd *, const char *));
/* On the delta, a symbol starting with L% is local. We won't see
such a symbol on other platforms, so it should be safe to always
consider it local here. */
static boolean
static bfd_boolean
m68k_coff_is_local_label_name (abfd, name)
bfd *abfd;
const char *name;
{
if (name[0] == 'L' && name[1] == '%')
return true;
return TRUE;
return _bfd_coff_is_local_label_name (abfd, name);
}
@ -100,13 +101,13 @@ static
#endif
reloc_howto_type m68kcoff_howto_table[] =
{
HOWTO (R_RELBYTE, 0, 0, 8, false, 0, complain_overflow_bitfield, RELOC_SPECIAL_FN, "8", true, 0x000000ff,0x000000ff, false),
HOWTO (R_RELWORD, 0, 1, 16, false, 0, complain_overflow_bitfield, RELOC_SPECIAL_FN, "16", true, 0x0000ffff,0x0000ffff, false),
HOWTO (R_RELLONG, 0, 2, 32, false, 0, complain_overflow_bitfield, RELOC_SPECIAL_FN, "32", true, 0xffffffff,0xffffffff, false),
HOWTO (R_PCRBYTE, 0, 0, 8, true, 0, complain_overflow_signed, RELOC_SPECIAL_FN, "DISP8", true, 0x000000ff,0x000000ff, false),
HOWTO (R_PCRWORD, 0, 1, 16, true, 0, complain_overflow_signed, RELOC_SPECIAL_FN, "DISP16", true, 0x0000ffff,0x0000ffff, false),
HOWTO (R_PCRLONG, 0, 2, 32, true, 0, complain_overflow_signed, RELOC_SPECIAL_FN, "DISP32", true, 0xffffffff,0xffffffff, false),
HOWTO (R_RELLONG_NEG, 0, -2, 32, false, 0, complain_overflow_bitfield, RELOC_SPECIAL_FN, "-32", true, 0xffffffff,0xffffffff, false),
HOWTO (R_RELBYTE, 0, 0, 8, FALSE, 0, complain_overflow_bitfield, RELOC_SPECIAL_FN, "8", TRUE, 0x000000ff,0x000000ff, FALSE),
HOWTO (R_RELWORD, 0, 1, 16, FALSE, 0, complain_overflow_bitfield, RELOC_SPECIAL_FN, "16", TRUE, 0x0000ffff,0x0000ffff, FALSE),
HOWTO (R_RELLONG, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, RELOC_SPECIAL_FN, "32", TRUE, 0xffffffff,0xffffffff, FALSE),
HOWTO (R_PCRBYTE, 0, 0, 8, TRUE, 0, complain_overflow_signed, RELOC_SPECIAL_FN, "DISP8", TRUE, 0x000000ff,0x000000ff, FALSE),
HOWTO (R_PCRWORD, 0, 1, 16, TRUE, 0, complain_overflow_signed, RELOC_SPECIAL_FN, "DISP16", TRUE, 0x0000ffff,0x0000ffff, FALSE),
HOWTO (R_PCRLONG, 0, 2, 32, TRUE, 0, complain_overflow_signed, RELOC_SPECIAL_FN, "DISP32", TRUE, 0xffffffff,0xffffffff, FALSE),
HOWTO (R_RELLONG_NEG, 0, -2, 32, FALSE, 0, complain_overflow_bitfield, RELOC_SPECIAL_FN, "-32", TRUE, 0xffffffff,0xffffffff, FALSE),
};
#endif /* not ONLY_DECLARE_RELOCS */
@ -430,7 +431,7 @@ m68kcoff_common_addend_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
after the add_symbols entry point has been called for all the
objects, and before the final_link entry point is called. */
boolean
bfd_boolean
bfd_m68k_coff_create_embedded_relocs (abfd, info, datasec, relsec, errmsg)
bfd *abfd;
struct bfd_link_info *info;
@ -449,19 +450,19 @@ bfd_m68k_coff_create_embedded_relocs (abfd, info, datasec, relsec, errmsg)
*errmsg = NULL;
if (datasec->reloc_count == 0)
return true;
return TRUE;
extsyms = obj_coff_external_syms (abfd);
symesz = bfd_coff_symesz (abfd);
irel = _bfd_coff_read_internal_relocs (abfd, datasec, true, NULL, false,
irel = _bfd_coff_read_internal_relocs (abfd, datasec, TRUE, NULL, FALSE,
NULL);
irelend = irel + datasec->reloc_count;
amt = (bfd_size_type) datasec->reloc_count * 12;
relsec->contents = (bfd_byte *) bfd_alloc (abfd, amt);
if (relsec->contents == NULL)
return false;
return FALSE;
p = relsec->contents;
@ -480,7 +481,7 @@ bfd_m68k_coff_create_embedded_relocs (abfd, info, datasec, relsec, errmsg)
{
*errmsg = _("unsupported reloc type");
bfd_set_error (bfd_error_bad_value);
return false;
return FALSE;
}
if (irel->r_symndx == -1)
@ -512,7 +513,7 @@ bfd_m68k_coff_create_embedded_relocs (abfd, info, datasec, relsec, errmsg)
strncpy (p + 4, targetsec->output_section->name, 8);
}
return true;
return TRUE;
}
#endif /* neither ONLY_DECLARE_RELOCS not STATIC_RELOCS */

View File

@ -1,6 +1,6 @@
/* BFD back-end for Motorola 88000 COFF "Binary Compatability Standard" files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1997, 1998, 1999, 2000,
2001
2001, 2002
Free Software Foundation, Inc.
Written by Cygnus Support.
@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "coff/internal.h"
#include "libcoff.h"
static boolean m88k_is_local_label_name PARAMS ((bfd *, const char *));
static bfd_boolean m88k_is_local_label_name PARAMS ((bfd *, const char *));
static bfd_reloc_status_type m88k_special_reloc
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static void rtype2howto PARAMS ((arelent *, struct internal_reloc *));
@ -44,7 +44,7 @@ static void reloc_processing
#define coff_bfd_is_local_label_name m88k_is_local_label_name
static boolean
static bfd_boolean
m88k_is_local_label_name (abfd, name)
bfd *abfd ATTRIBUTE_UNUSED;
const char *name;
@ -152,85 +152,85 @@ static reloc_howto_type howto_table[] =
02, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
true, /* pc_relative */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
m88k_special_reloc, /* special_function */
"PCR16L", /* name */
false, /* partial_inplace */
FALSE, /* partial_inplace */
0x0000ffff, /* src_mask */
0x0000ffff, /* dst_mask */
true), /* pcrel_offset */
TRUE), /* pcrel_offset */
HOWTO (R_PCR26L, /* type */
02, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
26, /* bitsize */
true, /* pc_relative */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
m88k_special_reloc, /* special_function */
"PCR26L", /* name */
false, /* partial_inplace */
FALSE, /* partial_inplace */
0x03ffffff, /* src_mask */
0x03ffffff, /* dst_mask */
true), /* pcrel_offset */
TRUE), /* pcrel_offset */
HOWTO (R_VRT16, /* type */
00, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
m88k_special_reloc, /* special_function */
"VRT16", /* name */
false, /* partial_inplace */
FALSE, /* partial_inplace */
0x0000ffff, /* src_mask */
0x0000ffff, /* dst_mask */
true), /* pcrel_offset */
TRUE), /* pcrel_offset */
HOWTO (R_HVRT16, /* type */
16, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
m88k_special_reloc, /* special_function */
"HVRT16", /* name */
false, /* partial_inplace */
FALSE, /* partial_inplace */
0x0000ffff, /* src_mask */
0x0000ffff, /* dst_mask */
true), /* pcrel_offset */
TRUE), /* pcrel_offset */
HOWTO (R_LVRT16, /* type */
00, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
m88k_special_reloc, /* special_function */
"LVRT16", /* name */
false, /* partial_inplace */
FALSE, /* partial_inplace */
0x0000ffff, /* src_mask */
0x0000ffff, /* dst_mask */
true), /* pcrel_offset */
TRUE), /* pcrel_offset */
HOWTO (R_VRT32, /* type */
00, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
m88k_special_reloc, /* special_function */
"VRT32", /* name */
false, /* partial_inplace */
FALSE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
true), /* pcrel_offset */
TRUE), /* pcrel_offset */
};
/* Code to turn an external r_type into a pointer to an entry in the

View File

@ -37,25 +37,26 @@ Boston, MA 02111-1307, USA. */
/* This file is compiled more than once, but we only compile the
final_link routine once. */
extern boolean mcore_bfd_coff_final_link
extern bfd_boolean mcore_bfd_coff_final_link
PARAMS ((bfd *, struct bfd_link_info *));
#if 0
static struct bfd_link_hash_table * coff_mcore_link_hash_table_create
static struct bfd_link_hash_table *coff_mcore_link_hash_table_create
PARAMS ((bfd *));
#endif
static bfd_reloc_status_type mcore_coff_unsupported_reloc
static bfd_reloc_status_type mcore_coff_unsupported_reloc
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static boolean coff_mcore_relocate_section
static bfd_boolean coff_mcore_relocate_section
PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
struct internal_reloc *, struct internal_syment *, asection **));
static reloc_howto_type * mcore_coff_reloc_type_lookup
static reloc_howto_type *mcore_coff_reloc_type_lookup
PARAMS ((bfd *, bfd_reloc_code_real_type));
static reloc_howto_type * coff_mcore_rtype_to_howto
static reloc_howto_type *coff_mcore_rtype_to_howto
PARAMS ((bfd *, asection *, struct internal_reloc *,
struct coff_link_hash_entry *, struct internal_syment *, bfd_vma *));
struct coff_link_hash_entry *, struct internal_syment *,
bfd_vma *));
static void mcore_emit_base_file_entry
PARAMS ((struct bfd_link_info *, bfd *, asection *, bfd_vma));
static boolean in_reloc_p PARAMS ((bfd *, reloc_howto_type *));
static bfd_boolean in_reloc_p PARAMS ((bfd *, reloc_howto_type *));
/* The NT loader points the toc register to &toc + 32768, in order to
use the complete range of a 16-bit displacement. We have to adjust
@ -77,29 +78,29 @@ static reloc_howto_type mcore_coff_howto_table[] =
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* dont complain_on_overflow */
NULL, /* special_function */
"ABSOLUTE", /* name */
false, /* partial_inplace */
FALSE, /* partial_inplace */
0x00, /* src_mask */
0x00, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
HOWTO (IMAGE_REL_MCORE_ADDR32,/* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
NULL, /* special_function */
"ADDR32", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
/* 8 bits + 2 zero bits; jmpi/jsri/lrw instructions.
Should not appear in object files. */
@ -107,15 +108,15 @@ static reloc_howto_type mcore_coff_howto_table[] =
2, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */
true, /* pc_relative */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
mcore_coff_unsupported_reloc, /* special_function */
"IMM8BY4", /* name */
false, /* partial_inplace */
FALSE, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
true), /* pcrel_offset */
TRUE), /* pcrel_offset */
/* bsr/bt/bf/br instructions; 11 bits + 1 zero bit
Span 2k instructions == 4k bytes.
@ -124,45 +125,45 @@ static reloc_howto_type mcore_coff_howto_table[] =
1, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
11, /* bitsize */
true, /* pc_relative */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
NULL, /* special_function */
"IMM11BY2", /* name */
false, /* partial_inplace */
FALSE, /* partial_inplace */
0x0, /* src_mask */
0x7ff, /* dst_mask */
true), /* pcrel_offset */
TRUE), /* pcrel_offset */
/* 4 bits + 1 zero bit; 'loopt' instruction only; unsupported. */
HOWTO (IMAGE_REL_MCORE_PCREL_IMM4BY2, /* type */
1, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
4, /* bitsize */
true, /* pc_relative */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
mcore_coff_unsupported_reloc, /* special_function */
"IMM4BY2", /* name */
false, /* partial_inplace */
FALSE, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
true), /* pcrel_offset */
TRUE), /* pcrel_offset */
/* 32-bit pc-relative. Eventually this will help support PIC code. */
HOWTO (IMAGE_REL_MCORE_PCREL_32,/* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
true, /* pc_relative */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
NULL, /* special_function */
"PCREL_32", /* name */
false, /* partial_inplace */
FALSE, /* partial_inplace */
0x0, /* src_mask */
0xffffffff, /* dst_mask */
true), /* pcrel_offset */
TRUE), /* pcrel_offset */
/* Like PCREL_IMM11BY2, this relocation indicates that there is a
'jsri' at the specified address. There is a separate relocation
@ -175,29 +176,29 @@ static reloc_howto_type mcore_coff_howto_table[] =
1, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
11, /* bitsize */
true, /* pc_relative */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
NULL, /* special_function */
"JSR_IMM11BY2", /* name */
false, /* partial_inplace */
FALSE, /* partial_inplace */
0x0, /* src_mask */
0x7ff, /* dst_mask */
true), /* pcrel_offset */
TRUE), /* pcrel_offset */
HOWTO (IMAGE_REL_MCORE_RVA, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
NULL, /* special_function */
"MCORE_RVA", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
true) /* pcrel_offset */
TRUE) /* pcrel_offset */
};
/* Extend the coff_link_hash_table structure with a few M*Core specific fields.
@ -358,10 +359,10 @@ coff_mcore_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
return howto;
}
/* Return true if this relocation should appear in the output .reloc section.
/* Return TRUE if this relocation should appear in the output .reloc section.
This function is referenced in pe_mkobject in peicode.h. */
static boolean
static bfd_boolean
in_reloc_p (abfd, howto)
bfd * abfd ATTRIBUTE_UNUSED;
reloc_howto_type * howto;
@ -370,7 +371,7 @@ in_reloc_p (abfd, howto)
}
/* The reloc processing routine for the optimized COFF linker. */
static boolean
static bfd_boolean
coff_mcore_relocate_section (output_bfd, info, input_bfd, input_section,
contents, relocs, syms, sections)
bfd * output_bfd;
@ -384,14 +385,14 @@ coff_mcore_relocate_section (output_bfd, info, input_bfd, input_section,
{
struct internal_reloc * rel;
struct internal_reloc * relend;
boolean hihalf;
bfd_boolean hihalf;
bfd_vma hihalf_val;
/* If we are performing a relocateable link, we don't need to do a
thing. The caller will take care of adjusting the reloc
addresses and symbol indices. */
if (info->relocateable)
return true;
return TRUE;
/* Check if we have the same endianess */
if ( input_bfd->xvec->byteorder != output_bfd->xvec->byteorder
@ -404,10 +405,10 @@ coff_mcore_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_big_endian (output_bfd) ? _("big endian") : _("little endian"));
bfd_set_error (bfd_error_wrong_format);
return false;
return FALSE;
}
hihalf = false;
hihalf = FALSE;
hihalf_val = 0;
rel = relocs;
@ -446,7 +447,7 @@ coff_mcore_relocate_section (output_bfd, info, input_bfd, input_section,
howto = bfd_coff_rtype_to_howto (input_bfd, input_section, rel, h,
sym, & addend);
if (howto == NULL)
return false;
return FALSE;
val = 0;
@ -492,8 +493,8 @@ coff_mcore_relocate_section (output_bfd, info, input_bfd, input_section,
{
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd, input_section,
rel->r_vaddr - input_section->vma, true)))
return false;
rel->r_vaddr - input_section->vma, TRUE)))
return FALSE;
}
my_name = h->root.root.string;
@ -508,7 +509,7 @@ coff_mcore_relocate_section (output_bfd, info, input_bfd, input_section,
_bfd_error_handler (_("%s: unsupported relocation type 0x%02x"),
bfd_archive_filename (input_bfd), r_type);
bfd_set_error (bfd_error_bad_value);
return false;
return FALSE;
case IMAGE_REL_MCORE_ABSOLUTE:
fprintf (stderr,
@ -560,11 +561,11 @@ coff_mcore_relocate_section (output_bfd, info, input_bfd, input_section,
(info, my_name, howto->name,
(bfd_vma) 0, input_bfd,
input_section, rel->r_vaddr - input_section->vma)))
return false;
return FALSE;
}
}
return true;
return TRUE;
}
/* Tailor coffcode.h -- macro heaven. */

View File

@ -35,85 +35,50 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Prototypes for static functions. */
static boolean mips_ecoff_bad_format_hook PARAMS ((bfd *abfd, PTR filehdr));
static void mips_ecoff_swap_reloc_in PARAMS ((bfd *, PTR,
struct internal_reloc *));
static void mips_ecoff_swap_reloc_out PARAMS ((bfd *,
const struct internal_reloc *,
PTR));
static void mips_adjust_reloc_in PARAMS ((bfd *,
const struct internal_reloc *,
arelent *));
static void mips_adjust_reloc_out PARAMS ((bfd *, const arelent *,
struct internal_reloc *));
static bfd_reloc_status_type mips_generic_reloc PARAMS ((bfd *abfd,
arelent *reloc,
asymbol *symbol,
PTR data,
asection *section,
bfd *output_bfd,
char **error));
static bfd_reloc_status_type mips_refhi_reloc PARAMS ((bfd *abfd,
arelent *reloc,
asymbol *symbol,
PTR data,
asection *section,
bfd *output_bfd,
char **error));
static bfd_reloc_status_type mips_reflo_reloc PARAMS ((bfd *abfd,
arelent *reloc,
asymbol *symbol,
PTR data,
asection *section,
bfd *output_bfd,
char **error));
static bfd_reloc_status_type mips_gprel_reloc PARAMS ((bfd *abfd,
arelent *reloc,
asymbol *symbol,
PTR data,
asection *section,
bfd *output_bfd,
char **error));
static bfd_reloc_status_type mips_relhi_reloc PARAMS ((bfd *abfd,
arelent *reloc,
asymbol *symbol,
PTR data,
asection *section,
bfd *output_bfd,
char **error));
static bfd_reloc_status_type mips_rello_reloc PARAMS ((bfd *abfd,
arelent *reloc,
asymbol *symbol,
PTR data,
asection *section,
bfd *output_bfd,
char **error));
static bfd_reloc_status_type mips_switch_reloc PARAMS ((bfd *abfd,
arelent *reloc,
asymbol *symbol,
PTR data,
asection *section,
bfd *output_bfd,
char **error));
static void mips_relocate_hi PARAMS ((struct internal_reloc *refhi,
struct internal_reloc *reflo,
bfd *input_bfd,
asection *input_section,
bfd_byte *contents,
size_t adjust,
bfd_vma relocation,
boolean pcrel));
static boolean mips_relocate_section PARAMS ((bfd *, struct bfd_link_info *,
bfd *, asection *,
bfd_byte *, PTR));
static boolean mips_read_relocs PARAMS ((bfd *, asection *));
static boolean mips_relax_section PARAMS ((bfd *, asection *,
struct bfd_link_info *,
boolean *));
static boolean mips_relax_pcrel16 PARAMS ((struct bfd_link_info *, bfd *,
asection *,
struct ecoff_link_hash_entry *,
bfd_byte *, bfd_vma));
static bfd_boolean mips_ecoff_bad_format_hook
PARAMS ((bfd *abfd, PTR filehdr));
static void mips_ecoff_swap_reloc_in
PARAMS ((bfd *, PTR, struct internal_reloc *));
static void mips_ecoff_swap_reloc_out
PARAMS ((bfd *, const struct internal_reloc *, PTR));
static void mips_adjust_reloc_in
PARAMS ((bfd *, const struct internal_reloc *, arelent *));
static void mips_adjust_reloc_out
PARAMS ((bfd *, const arelent *, struct internal_reloc *));
static bfd_reloc_status_type mips_generic_reloc
PARAMS ((bfd *abfd, arelent *reloc, asymbol *symbol, PTR data,
asection *section, bfd *output_bfd, char **error));
static bfd_reloc_status_type mips_refhi_reloc
PARAMS ((bfd *abfd, arelent *reloc, asymbol *symbol, PTR data,
asection *section, bfd *output_bfd, char **error));
static bfd_reloc_status_type mips_reflo_reloc
PARAMS ((bfd *abfd, arelent *reloc, asymbol *symbol, PTR data,
asection *section, bfd *output_bfd, char **error));
static bfd_reloc_status_type mips_gprel_reloc
PARAMS ((bfd *abfd, arelent *reloc, asymbol *symbol, PTR data,
asection *section, bfd *output_bfd, char **error));
static bfd_reloc_status_type mips_relhi_reloc
PARAMS ((bfd *abfd, arelent *reloc, asymbol *symbol, PTR data,
asection *section, bfd *output_bfd, char **error));
static bfd_reloc_status_type mips_rello_reloc
PARAMS ((bfd *abfd, arelent *reloc, asymbol *symbol, PTR data,
asection *section, bfd *output_bfd, char **error));
static bfd_reloc_status_type mips_switch_reloc
PARAMS ((bfd *abfd, arelent *reloc, asymbol *symbol, PTR data,
asection *section, bfd *output_bfd, char **error));
static void mips_relocate_hi
PARAMS ((struct internal_reloc *refhi, struct internal_reloc *reflo,
bfd *input_bfd, asection *input_section, bfd_byte *contents,
size_t adjust, bfd_vma relocation, bfd_boolean pcrel));
static bfd_boolean mips_relocate_section
PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, PTR));
static bfd_boolean mips_read_relocs
PARAMS ((bfd *, asection *));
static bfd_boolean mips_relax_section
PARAMS ((bfd *, asection *, struct bfd_link_info *, bfd_boolean *));
static bfd_boolean mips_relax_pcrel16
PARAMS ((struct bfd_link_info *, bfd *, asection *,
struct ecoff_link_hash_entry *, bfd_byte *, bfd_vma));
static reloc_howto_type *mips_bfd_reloc_type_lookup
PARAMS ((bfd *, bfd_reloc_code_real_type));
@ -152,52 +117,52 @@ static reloc_howto_type mips_howto_table[] =
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
0, /* special_function */
"IGNORE", /* name */
false, /* partial_inplace */
FALSE, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
/* A 16 bit reference to a symbol, normally from a data section. */
HOWTO (MIPS_R_REFHALF, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
mips_generic_reloc, /* special_function */
"REFHALF", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
/* A 32 bit reference to a symbol, normally from a data section. */
HOWTO (MIPS_R_REFWORD, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
mips_generic_reloc, /* special_function */
"REFWORD", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
/* A 26 bit absolute jump address. */
HOWTO (MIPS_R_JMPADDR, /* type */
2, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
26, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
/* This needs complex overflow
@ -205,10 +170,10 @@ static reloc_howto_type mips_howto_table[] =
bits must match the PC. */
mips_generic_reloc, /* special_function */
"JMPADDR", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0x3ffffff, /* src_mask */
0x3ffffff, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
/* The high 16 bits of a symbol value. Handled by the function
mips_refhi_reloc. */
@ -216,30 +181,30 @@ static reloc_howto_type mips_howto_table[] =
16, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
mips_refhi_reloc, /* special_function */
"REFHI", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
/* The low 16 bits of a symbol value. */
HOWTO (MIPS_R_REFLO, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
mips_reflo_reloc, /* special_function */
"REFLO", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
/* A reference to an offset from the gp register. Handled by the
function mips_gprel_reloc. */
@ -247,15 +212,15 @@ static reloc_howto_type mips_howto_table[] =
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
mips_gprel_reloc, /* special_function */
"GPREL", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
/* A reference to a literal using an offset from the gp register.
Handled by the function mips_gprel_reloc. */
@ -263,15 +228,15 @@ static reloc_howto_type mips_howto_table[] =
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
mips_gprel_reloc, /* special_function */
"LITERAL", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
EMPTY_HOWTO (8),
EMPTY_HOWTO (9),
@ -286,15 +251,15 @@ static reloc_howto_type mips_howto_table[] =
2, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
true, /* pc_relative */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
mips_generic_reloc, /* special_function */
"PCREL16", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
true), /* pcrel_offset */
TRUE), /* pcrel_offset */
/* This reloc is a Cygnus extension used when generating position
independent code for embedded systems. It represents the high 16
@ -307,15 +272,15 @@ static reloc_howto_type mips_howto_table[] =
16, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
true, /* pc_relative */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
mips_relhi_reloc, /* special_function */
"RELHI", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
true), /* pcrel_offset */
TRUE), /* pcrel_offset */
/* This reloc is a Cygnus extension used when generating position
independent code for embedded systems. It represents the low 16
@ -324,15 +289,15 @@ static reloc_howto_type mips_howto_table[] =
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
true, /* pc_relative */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
mips_rello_reloc, /* special_function */
"RELLO", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
true), /* pcrel_offset */
TRUE), /* pcrel_offset */
EMPTY_HOWTO (15),
EMPTY_HOWTO (16),
@ -352,15 +317,15 @@ static reloc_howto_type mips_howto_table[] =
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
true, /* pc_relative */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
mips_switch_reloc, /* special_function */
"SWITCH", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
true) /* pcrel_offset */
TRUE) /* pcrel_offset */
};
#define MIPS_HOWTO_COUNT \
@ -384,7 +349,7 @@ static reloc_howto_type mips_howto_table[] =
/* See whether the magic number matches. */
static boolean
static bfd_boolean
mips_ecoff_bad_format_hook (abfd, filehdr)
bfd *abfd;
PTR filehdr;
@ -395,7 +360,7 @@ mips_ecoff_bad_format_hook (abfd, filehdr)
{
case MIPS_MAGIC_1:
/* I don't know what endianness this implies. */
return true;
return TRUE;
case MIPS_MAGIC_BIG:
case MIPS_MAGIC_BIG2:
@ -408,7 +373,7 @@ mips_ecoff_bad_format_hook (abfd, filehdr)
return bfd_little_endian (abfd);
default:
return false;
return FALSE;
}
}
@ -793,7 +758,7 @@ mips_gprel_reloc (abfd,
bfd *output_bfd;
char **error_message;
{
boolean relocateable;
bfd_boolean relocateable;
bfd_vma gp;
bfd_vma relocation;
unsigned long val;
@ -812,10 +777,10 @@ mips_gprel_reloc (abfd,
}
if (output_bfd != (bfd *) NULL)
relocateable = true;
relocateable = TRUE;
else
{
relocateable = false;
relocateable = FALSE;
output_bfd = symbol->section->output_section->owner;
}
@ -1185,7 +1150,7 @@ mips_relocate_hi (refhi, reflo, input_bfd, input_section, contents, adjust,
bfd_byte *contents;
size_t adjust;
bfd_vma relocation;
boolean pcrel;
bfd_boolean pcrel;
{
unsigned long insn;
unsigned long val;
@ -1229,7 +1194,7 @@ mips_relocate_hi (refhi, reflo, input_bfd, input_section, contents, adjust,
/* Relocate a section while linking a MIPS ECOFF file. */
static boolean
static bfd_boolean
mips_relocate_section (output_bfd, info, input_bfd, input_section,
contents, external_relocs)
bfd *output_bfd;
@ -1242,13 +1207,13 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
asection **symndx_to_section;
struct ecoff_link_hash_entry **sym_hashes;
bfd_vma gp;
boolean gp_undefined;
bfd_boolean gp_undefined;
size_t adjust;
long *offsets;
struct external_reloc *ext_rel;
struct external_reloc *ext_rel_end;
unsigned int i;
boolean got_lo;
bfd_boolean got_lo;
struct internal_reloc lo_int_rel;
bfd_size_type amt;
@ -1264,7 +1229,7 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
amt = NUM_RELOC_SECTIONS * sizeof (asection *);
symndx_to_section = (asection **) bfd_alloc (input_bfd, amt);
if (!symndx_to_section)
return false;
return FALSE;
symndx_to_section[RELOC_SECTION_NONE] = NULL;
symndx_to_section[RELOC_SECTION_TEXT] =
@ -1299,11 +1264,11 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
gp = _bfd_get_gp_value (output_bfd);
if (gp == 0)
gp_undefined = true;
gp_undefined = TRUE;
else
gp_undefined = false;
gp_undefined = FALSE;
got_lo = false;
got_lo = FALSE;
adjust = 0;
@ -1317,7 +1282,7 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
for (i = 0; ext_rel < ext_rel_end; ext_rel++, i++)
{
struct internal_reloc int_rel;
boolean use_lo = false;
bfd_boolean use_lo = FALSE;
bfd_vma addend;
reloc_howto_type *howto;
struct ecoff_link_hash_entry *h = NULL;
@ -1330,7 +1295,7 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
else
{
int_rel = lo_int_rel;
got_lo = false;
got_lo = FALSE;
}
BFD_ASSERT (int_rel.r_type
@ -1365,9 +1330,9 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
&& int_rel.r_extern == lo_int_rel.r_extern
&& int_rel.r_symndx == lo_int_rel.r_symndx)
{
use_lo = true;
use_lo = TRUE;
if (lo_ext_rel == ext_rel + 1)
got_lo = true;
got_lo = TRUE;
}
}
@ -1432,11 +1397,11 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
(info, _("GP relative relocation used when GP not defined"),
input_bfd, input_section,
int_rel.r_vaddr - input_section->vma)))
return false;
return FALSE;
/* Only give the error once per link. */
gp = 4;
_bfd_set_gp_value (output_bfd, gp);
gp_undefined = false;
gp_undefined = FALSE;
}
if (! int_rel.r_extern)
{
@ -1511,7 +1476,7 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
+ (int_rel.r_vaddr
- input_section->vma)
+ adjust)))
return false;
return FALSE;
/* We must adjust everything else up a notch. */
adjust += PCREL16_EXPANSION_ADJUSTMENT;
@ -1694,7 +1659,7 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
(info, h->root.root.string, input_bfd,
input_section,
int_rel.r_vaddr - input_section->vma)))
return false;
return FALSE;
int_rel.r_symndx = 0;
}
relocation = 0;
@ -1778,8 +1743,8 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd,
input_section,
int_rel.r_vaddr - input_section->vma, true)))
return false;
int_rel.r_vaddr - input_section->vma, TRUE)))
return FALSE;
relocation = 0;
}
}
@ -1860,19 +1825,19 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
(info, name, howto->name, (bfd_vma) 0,
input_bfd, input_section,
int_rel.r_vaddr - input_section->vma)))
return false;
return FALSE;
}
break;
}
}
}
return true;
return TRUE;
}
/* Read in the relocs for a section. */
static boolean
static bfd_boolean
mips_read_relocs (abfd, sec)
bfd *abfd;
asection *sec;
@ -1886,7 +1851,7 @@ mips_read_relocs (abfd, sec)
amt = sizeof (struct ecoff_section_tdata);
sec->used_by_bfd = (PTR) bfd_alloc (abfd, amt);
if (sec->used_by_bfd == NULL)
return false;
return FALSE;
section_tdata = ecoff_section_data (abfd, sec);
section_tdata->external_relocs = NULL;
@ -1900,14 +1865,14 @@ mips_read_relocs (abfd, sec)
amt *= sec->reloc_count;
section_tdata->external_relocs = (PTR) bfd_alloc (abfd, amt);
if (section_tdata->external_relocs == NULL && amt != 0)
return false;
return FALSE;
if (bfd_seek (abfd, sec->rel_filepos, SEEK_SET) != 0
|| bfd_bread (section_tdata->external_relocs, amt, abfd) != amt)
return false;
return FALSE;
}
return true;
return TRUE;
}
/* Relax a section when linking a MIPS ECOFF file. This is used for
@ -1934,12 +1899,12 @@ mips_read_relocs (abfd, sec)
routine and the mips_relocate_section routine is the table of
offsets. */
static boolean
static bfd_boolean
mips_relax_section (abfd, sec, info, again)
bfd *abfd;
asection *sec;
struct bfd_link_info *info;
boolean *again;
bfd_boolean *again;
{
struct ecoff_section_tdata *section_tdata;
bfd_byte *contents = NULL;
@ -1949,21 +1914,21 @@ mips_relax_section (abfd, sec, info, again)
unsigned int i;
/* Assume we are not going to need another pass. */
*again = false;
*again = FALSE;
/* If we are not generating an ECOFF file, this is much too
confusing to deal with. */
if (info->hash->creator->flavour != bfd_get_flavour (abfd))
return true;
return TRUE;
/* If there are no relocs, there is nothing to do. */
if (sec->reloc_count == 0)
return true;
return TRUE;
/* We are only interested in PC relative relocs, and why would there
ever be one from anything but the .text section? */
if (strcmp (bfd_get_section_name (abfd, sec), ".text") != 0)
return true;
return TRUE;
/* Read in the relocs, if we haven't already got them. */
section_tdata = ecoff_section_data (abfd, sec);
@ -2108,7 +2073,7 @@ mips_relax_section (abfd, sec, info, again)
symbols in the object file following this location. */
sec->_cooked_size += PCREL16_EXPANSION_ADJUSTMENT;
*again = true;
*again = TRUE;
if (offsets == (long *) NULL)
{
@ -2306,12 +2271,12 @@ mips_relax_section (abfd, sec, info, again)
if (contents != (bfd_byte *) NULL && ! info->keep_memory)
free (contents);
return true;
return TRUE;
error_return:
if (contents != (bfd_byte *) NULL && ! info->keep_memory)
free (contents);
return false;
return FALSE;
}
/* This routine is called from mips_relocate_section when a PC
@ -2319,7 +2284,7 @@ mips_relax_section (abfd, sec, info, again)
It handles all the details of the expansion, including resolving
the reloc. */
static boolean
static bfd_boolean
mips_relax_pcrel16 (info, input_bfd, input_section, h, location, address)
struct bfd_link_info *info ATTRIBUTE_UNUSED;
bfd *input_bfd;
@ -2356,7 +2321,7 @@ mips_relax_pcrel16 (info, input_bfd, input_section, h, location, address)
bfd_put_32 (input_bfd,
(bfd_vma) 0x0020f809, location + 16); /* jalr $at */
return true;
return TRUE;
}
/* Given a .sdata section and a .rel.sdata in-memory section, store
@ -2368,7 +2333,7 @@ mips_relax_pcrel16 (info, input_bfd, input_section, h, location, address)
function presumes that the object was compiled using
-membedded-pic. */
boolean
bfd_boolean
bfd_mips_ecoff_create_embedded_relocs (abfd, info, datasec, relsec, errmsg)
bfd *abfd;
struct bfd_link_info *info;
@ -2388,17 +2353,17 @@ bfd_mips_ecoff_create_embedded_relocs (abfd, info, datasec, relsec, errmsg)
*errmsg = NULL;
if (datasec->reloc_count == 0)
return true;
return TRUE;
sym_hashes = ecoff_data (abfd)->sym_hashes;
if (! mips_read_relocs (abfd, datasec))
return false;
return FALSE;
amt = (bfd_size_type) datasec->reloc_count * 4;
relsec->contents = (bfd_byte *) bfd_alloc (abfd, amt);
if (relsec->contents == NULL)
return false;
return FALSE;
p = relsec->contents;
@ -2408,7 +2373,7 @@ bfd_mips_ecoff_create_embedded_relocs (abfd, info, datasec, relsec, errmsg)
for (; ext_rel < ext_rel_end; ext_rel++, p += 4)
{
struct internal_reloc int_rel;
boolean text_relative;
bfd_boolean text_relative;
mips_ecoff_swap_reloc_in (abfd, (PTR) ext_rel, &int_rel);
@ -2428,7 +2393,7 @@ bfd_mips_ecoff_create_embedded_relocs (abfd, info, datasec, relsec, errmsg)
{
*errmsg = _("unsupported reloc type");
bfd_set_error (bfd_error_bad_value);
return false;
return FALSE;
}
if (int_rel.r_extern)
@ -2444,28 +2409,28 @@ bfd_mips_ecoff_create_embedded_relocs (abfd, info, datasec, relsec, errmsg)
if ((h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak)
&& (h->root.u.def.section->flags & SEC_CODE) != 0)
text_relative = true;
text_relative = TRUE;
else
text_relative = false;
text_relative = FALSE;
}
else
{
switch (int_rel.r_symndx)
{
case RELOC_SECTION_TEXT:
text_relative = true;
text_relative = TRUE;
break;
case RELOC_SECTION_SDATA:
case RELOC_SECTION_SBSS:
case RELOC_SECTION_LIT8:
text_relative = false;
text_relative = FALSE;
break;
default:
/* No other sections should appear in -membedded-pic
code. */
*errmsg = _("reloc against unsupported section");
bfd_set_error (bfd_error_bad_value);
return false;
return FALSE;
}
}
@ -2473,7 +2438,7 @@ bfd_mips_ecoff_create_embedded_relocs (abfd, info, datasec, relsec, errmsg)
{
*errmsg = _("reloc not properly aligned");
bfd_set_error (bfd_error_bad_value);
return false;
return FALSE;
}
bfd_put_32 (abfd,
@ -2482,7 +2447,7 @@ bfd_mips_ecoff_create_embedded_relocs (abfd, info, datasec, relsec, errmsg)
p);
}
return true;
return TRUE;
}
/* This is the ECOFF backend structure. The backend field of the
@ -2501,7 +2466,7 @@ static const struct ecoff_backend_data mips_ecoff_backend_data =
(unsigned (*) PARAMS ((bfd *,PTR,PTR))) bfd_void, /* reloc_out */
mips_ecoff_swap_filehdr_out, mips_ecoff_swap_aouthdr_out,
mips_ecoff_swap_scnhdr_out,
FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, FILNMLEN, true, false, 4, false, 2,
FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, FILNMLEN, TRUE, FALSE, 4, FALSE, 2,
mips_ecoff_swap_filehdr_in, mips_ecoff_swap_aouthdr_in,
mips_ecoff_swap_scnhdr_in, NULL,
mips_ecoff_bad_format_hook, _bfd_ecoff_set_arch_mach_hook,
@ -2517,10 +2482,10 @@ static const struct ecoff_backend_data mips_ecoff_backend_data =
/* The page boundary used to align sections in a demand-paged
executable file. E.g., 0x1000. */
0x1000,
/* True if the .rdata section is part of the text segment, as on the
Alpha. False if .rdata is part of the data segment, as on the
/* TRUE if the .rdata section is part of the text segment, as on the
Alpha. FALSE if .rdata is part of the data segment, as on the
MIPS. */
false,
FALSE,
/* Bitsize of constructor entries. */
32,
/* Reloc to use for constructor entries. */

View File

@ -27,11 +27,18 @@
#include "coff/internal.h"
#include "libcoff.h"
static long get_symbol_value PARAMS ((asymbol *));
static bfd_reloc_status_type or32_reloc PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static boolean coff_or32_relocate_section PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, struct internal_reloc *, struct internal_syment *, asection **));
static boolean coff_or32_adjust_symndx PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, struct internal_reloc *, boolean *));
static void reloc_processing PARAMS ((arelent *, struct internal_reloc *, asymbol **, bfd *, asection *));
static long get_symbol_value
PARAMS ((asymbol *));
static bfd_reloc_status_type or32_reloc
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static bfd_boolean coff_or32_relocate_section
PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
struct internal_reloc *, struct internal_syment *, asection **));
static bfd_boolean coff_or32_adjust_symndx
PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *,
struct internal_reloc *, bfd_boolean *));
static void reloc_processing
PARAMS ((arelent *, struct internal_reloc *, asymbol **, bfd *, asection *));
#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (2)
@ -52,14 +59,14 @@ static void reloc_processing PARAMS ((arelent *, str
/* Provided the symbol, returns the value reffed. */
static long
get_symbol_value (symbol)
get_symbol_value (symbol)
asymbol *symbol;
{
{
long relocation = 0;
if (bfd_is_com_section (symbol->section))
relocation = 0;
else
relocation = 0;
else
relocation = symbol->value +
symbol->section->output_section->vma +
symbol->section->output_offset;
@ -82,7 +89,7 @@ or32_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
{
/* The consth relocation comes in two parts, we have to remember
the state between calls, in these variables. */
static boolean part1_consth_active = false;
static bfd_boolean part1_consth_active = FALSE;
static unsigned long part1_consth_value;
unsigned long insn;
@ -93,10 +100,10 @@ or32_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
unsigned long addr = reloc_entry->address ; /*+ input_section->vma*/
bfd_byte *hit_data =addr + (bfd_byte *)(data);
r_type = reloc_entry->howto->type;
if (output_bfd)
if (output_bfd)
{
/* Partial linking - do nothing. */
reloc_entry->address += input_section->output_offset;
@ -107,18 +114,18 @@ or32_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
&& bfd_is_und_section (symbol_in->section))
{
/* Keep the state machine happy in case we're called again. */
if (r_type == R_IHIHALF)
if (r_type == R_IHIHALF)
{
part1_consth_active = true;
part1_consth_active = TRUE;
part1_consth_value = 0;
}
return bfd_reloc_undefined;
}
if ((part1_consth_active) && (r_type != R_IHCONST))
if ((part1_consth_active) && (r_type != R_IHCONST))
{
part1_consth_active = false;
part1_consth_active = FALSE;
*error_message = (char *) "Missing IHCONST";
return bfd_reloc_dangerous;
@ -126,10 +133,10 @@ or32_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
sym_value = get_symbol_value (symbol_in);
switch (r_type)
switch (r_type)
{
case R_IREL:
insn = bfd_get_32(abfd, hit_data);
case R_IREL:
insn = bfd_get_32(abfd, hit_data);
/* Take the value in the field and sign extend it. */
signed_value = EXTRACT_JUMPTARG (insn);
@ -146,8 +153,8 @@ or32_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
{ /* Absolute jmp/call. */
insn |= (1<<24); /* Make it absolute. */
/* FIXME: Should we change r_type to R_IABS. */
}
else
}
else
#endif
{
/* Relative jmp/call, so subtract from the value the
@ -155,39 +162,39 @@ or32_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
signed_value -= (reloc_entry->address
+ input_section->output_section->vma
+ input_section->output_offset);
if (signed_value > 0x7ffffff || signed_value < -0x8000000)
if (signed_value > 0x7ffffff || signed_value < -0x8000000)
return bfd_reloc_overflow;
}
signed_value >>= 2;
insn = INSERT_JUMPTARG (insn, signed_value);
bfd_put_32 (abfd, insn, hit_data);
bfd_put_32 (abfd, insn, hit_data);
break;
case R_ILOHALF:
insn = bfd_get_32 (abfd, hit_data);
case R_ILOHALF:
insn = bfd_get_32 (abfd, hit_data);
unsigned_value = EXTRACT_HWORD (insn);
unsigned_value += sym_value + reloc_entry->addend;
insn = INSERT_HWORD (insn, unsigned_value);
bfd_put_32 (abfd, insn, hit_data);
bfd_put_32 (abfd, insn, hit_data);
break;
case R_IHIHALF:
insn = bfd_get_32 (abfd, hit_data);
insn = bfd_get_32 (abfd, hit_data);
/* consth, part 1
/* consth, part 1
Just get the symbol value that is referenced. */
part1_consth_active = true;
part1_consth_active = TRUE;
part1_consth_value = sym_value + reloc_entry->addend;
/* Don't modify insn until R_IHCONST. */
break;
case R_IHCONST:
insn = bfd_get_32 (abfd, hit_data);
case R_IHCONST:
insn = bfd_get_32 (abfd, hit_data);
/* consth, part 2
/* consth, part 2
Now relocate the reference. */
if (! part1_consth_active)
if (! part1_consth_active)
{
*error_message = (char *) "Missing IHIHALF";
return bfd_reloc_dangerous;
@ -199,29 +206,29 @@ or32_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
unsigned_value += part1_consth_value;
unsigned_value = unsigned_value >> 16;
insn = INSERT_HWORD (insn, unsigned_value);
part1_consth_active = false;
bfd_put_32 (abfd, insn, hit_data);
part1_consth_active = FALSE;
bfd_put_32 (abfd, insn, hit_data);
break;
case R_BYTE:
insn = bfd_get_8 (abfd, hit_data);
unsigned_value = insn + sym_value + reloc_entry->addend;
insn = bfd_get_8 (abfd, hit_data);
unsigned_value = insn + sym_value + reloc_entry->addend;
if (unsigned_value & 0xffffff00)
return bfd_reloc_overflow;
bfd_put_8 (abfd, unsigned_value, hit_data);
bfd_put_8 (abfd, unsigned_value, hit_data);
break;
case R_HWORD:
insn = bfd_get_16 (abfd, hit_data);
unsigned_value = insn + sym_value + reloc_entry->addend;
insn = bfd_get_16 (abfd, hit_data);
unsigned_value = insn + sym_value + reloc_entry->addend;
if (unsigned_value & 0xffff0000)
return bfd_reloc_overflow;
bfd_put_16 (abfd, insn, hit_data);
bfd_put_16 (abfd, insn, hit_data);
break;
case R_WORD:
insn = bfd_get_32 (abfd, hit_data);
insn += sym_value + reloc_entry->addend;
insn = bfd_get_32 (abfd, hit_data);
insn += sym_value + reloc_entry->addend;
bfd_put_32 (abfd, insn, hit_data);
break;
@ -242,14 +249,14 @@ or32_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
complain_on_overflow
special_function
relocation name
partial_inplace
partial_inplace
src_mask
*/
/* FIXME: I'm not real sure about this table. */
static reloc_howto_type howto_table[] =
static reloc_howto_type howto_table[] =
{
{ R_ABS, 0, 3, 32, false, 0, complain_overflow_bitfield, or32_reloc, "ABS", true, 0xffffffff,0xffffffff, false },
{ R_ABS, 0, 3, 32, FALSE, 0, complain_overflow_bitfield, or32_reloc, "ABS", TRUE, 0xffffffff,0xffffffff, FALSE },
EMPTY_HOWTO (1),
EMPTY_HOWTO (2),
EMPTY_HOWTO (3),
@ -273,14 +280,14 @@ static reloc_howto_type howto_table[] =
EMPTY_HOWTO (21),
EMPTY_HOWTO (22),
EMPTY_HOWTO (23),
{ R_IREL, 0, 3, 32, true, 0, complain_overflow_signed, or32_reloc, "IREL", true, 0xffffffff,0xffffffff, false },
{ R_IABS, 0, 3, 32, false, 0, complain_overflow_bitfield, or32_reloc, "IABS", true, 0xffffffff,0xffffffff, false },
{ R_ILOHALF, 0, 3, 16, true, 0, complain_overflow_signed, or32_reloc, "ILOHALF", true, 0x0000ffff,0x0000ffff, false },
{ R_IHIHALF, 0, 3, 16, true, 16,complain_overflow_signed, or32_reloc, "IHIHALF", true, 0xffff0000,0xffff0000, false },
{ R_IHCONST, 0, 3, 16, true, 0, complain_overflow_signed, or32_reloc, "IHCONST", true, 0xffff0000,0xffff0000, false },
{ R_BYTE, 0, 0, 8, false, 0, complain_overflow_bitfield, or32_reloc, "BYTE", true, 0x000000ff,0x000000ff, false },
{ R_HWORD, 0, 1, 16, false, 0, complain_overflow_bitfield, or32_reloc, "HWORD", true, 0x0000ffff,0x0000ffff, false },
{ R_WORD, 0, 2, 32, false, 0, complain_overflow_bitfield, or32_reloc, "WORD", true, 0xffffffff,0xffffffff, false },
{ R_IREL, 0, 3, 32, TRUE, 0, complain_overflow_signed, or32_reloc, "IREL", TRUE, 0xffffffff,0xffffffff, FALSE },
{ R_IABS, 0, 3, 32, FALSE, 0, complain_overflow_bitfield, or32_reloc, "IABS", TRUE, 0xffffffff,0xffffffff, FALSE },
{ R_ILOHALF, 0, 3, 16, TRUE, 0, complain_overflow_signed, or32_reloc, "ILOHALF", TRUE, 0x0000ffff,0x0000ffff, FALSE },
{ R_IHIHALF, 0, 3, 16, TRUE, 16,complain_overflow_signed, or32_reloc, "IHIHALF", TRUE, 0xffff0000,0xffff0000, FALSE },
{ R_IHCONST, 0, 3, 16, TRUE, 0, complain_overflow_signed, or32_reloc, "IHCONST", TRUE, 0xffff0000,0xffff0000, FALSE },
{ R_BYTE, 0, 0, 8, FALSE, 0, complain_overflow_bitfield, or32_reloc, "BYTE", TRUE, 0x000000ff,0x000000ff, FALSE },
{ R_HWORD, 0, 1, 16, FALSE, 0, complain_overflow_bitfield, or32_reloc, "HWORD", TRUE, 0x0000ffff,0x0000ffff, FALSE },
{ R_WORD, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, or32_reloc, "WORD", TRUE, 0xffffffff,0xffffffff, FALSE },
};
#define BADMAG(x) OR32BADMAG (x)
@ -298,11 +305,11 @@ reloc_processing (relent,reloc, symbols, abfd, section)
{
static bfd_vma ihihalf_vaddr = (bfd_vma) -1;
relent->address = reloc->r_vaddr;
relent->address = reloc->r_vaddr;
relent->howto = howto_table + reloc->r_type;
if (reloc->r_type == R_IHCONST)
{
if (reloc->r_type == R_IHCONST)
{
/* The address of an R_IHCONST should always be the address of
the immediately preceding R_IHIHALF. relocs generated by gas
are correct, but relocs generated by High C are different (I
@ -336,7 +343,7 @@ reloc_processing (relent,reloc, symbols, abfd, section)
/* The reloc processing routine for the optimized COFF linker. */
static boolean
static bfd_boolean
coff_or32_relocate_section (output_bfd, info, input_bfd, input_section,
contents, relocs, syms, sections)
bfd *output_bfd ATTRIBUTE_UNUSED;
@ -350,16 +357,16 @@ coff_or32_relocate_section (output_bfd, info, input_bfd, input_section,
{
struct internal_reloc *rel;
struct internal_reloc *relend;
boolean hihalf;
bfd_boolean hihalf;
bfd_vma hihalf_val;
/* If we are performing a relocateable link, we don't need to do a
thing. The caller will take care of adjusting the reloc
addresses and symbol indices. */
if (info->relocateable)
return true;
return TRUE;
hihalf = false;
hihalf = FALSE;
hihalf_val = 0;
rel = relocs;
@ -373,7 +380,7 @@ coff_or32_relocate_section (output_bfd, info, input_bfd, input_section,
struct internal_syment *sym;
asection *sec;
bfd_vma val;
boolean overflow;
bfd_boolean overflow;
unsigned long insn;
long signed_value;
unsigned long unsigned_value;
@ -424,8 +431,8 @@ coff_or32_relocate_section (output_bfd, info, input_bfd, input_section,
{
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd, input_section,
rel->r_vaddr - input_section->vma, true)))
return false;
rel->r_vaddr - input_section->vma, TRUE)))
return FALSE;
}
}
@ -434,18 +441,18 @@ coff_or32_relocate_section (output_bfd, info, input_bfd, input_section,
if (! ((*info->callbacks->reloc_dangerous)
(info, "missing IHCONST reloc", input_bfd,
input_section, rel->r_vaddr - input_section->vma)))
return false;
hihalf = false;
return FALSE;
hihalf = FALSE;
}
}
overflow = false;
overflow = FALSE;
switch (rel->r_type)
{
default:
bfd_set_error (bfd_error_bad_value);
return false;
return FALSE;
case R_IREL:
insn = bfd_get_32 (input_bfd, loc);
@ -473,7 +480,7 @@ coff_or32_relocate_section (output_bfd, info, input_bfd, input_section,
+ (rel->r_vaddr - input_section->vma));
if (signed_value > 0x7ffffff || signed_value < - 0x8000000)
{
overflow = true;
overflow = TRUE;
signed_value = 0;
}
}
@ -495,7 +502,7 @@ coff_or32_relocate_section (output_bfd, info, input_bfd, input_section,
case R_IHIHALF:
/* Save the value for the R_IHCONST reloc. */
hihalf = true;
hihalf = TRUE;
hihalf_val = val;
break;
@ -505,7 +512,7 @@ coff_or32_relocate_section (output_bfd, info, input_bfd, input_section,
if (! ((*info->callbacks->reloc_dangerous)
(info, "missing IHIHALF reloc", input_bfd,
input_section, rel->r_vaddr - input_section->vma)))
return false;
return FALSE;
hihalf_val = 0;
}
@ -515,7 +522,7 @@ coff_or32_relocate_section (output_bfd, info, input_bfd, input_section,
insn = INSERT_HWORD (insn, unsigned_value);
bfd_put_32 (input_bfd, (bfd_vma) insn, loc);
hihalf = false;
hihalf = FALSE;
break;
case R_BYTE:
@ -524,7 +531,7 @@ coff_or32_relocate_section (output_bfd, info, input_bfd, input_section,
rstat = _bfd_relocate_contents (howto_table + rel->r_type,
input_bfd, val, loc);
if (rstat == bfd_reloc_overflow)
overflow = true;
overflow = TRUE;
else if (rstat != bfd_reloc_ok)
abort ();
break;
@ -555,11 +562,11 @@ coff_or32_relocate_section (output_bfd, info, input_bfd, input_section,
(info, name, howto_table[rel->r_type].name, (bfd_vma) 0,
input_bfd, input_section,
rel->r_vaddr - input_section->vma)))
return false;
return FALSE;
}
}
}
return true;
return TRUE;
}
#define coff_relocate_section coff_or32_relocate_section
@ -567,20 +574,20 @@ coff_or32_relocate_section (output_bfd, info, input_bfd, input_section,
/* We don't want to change the symndx of a R_IHCONST reloc, since it
is actually an addend, not a symbol index at all. */
static boolean
static bfd_boolean
coff_or32_adjust_symndx (obfd, info, ibfd, sec, irel, adjustedp)
bfd *obfd ATTRIBUTE_UNUSED;
struct bfd_link_info *info ATTRIBUTE_UNUSED;
bfd *ibfd ATTRIBUTE_UNUSED;
asection *sec ATTRIBUTE_UNUSED;
struct internal_reloc *irel;
boolean *adjustedp;
bfd_boolean *adjustedp;
{
if (irel->r_type == R_IHCONST)
*adjustedp = true;
*adjustedp = TRUE;
else
*adjustedp = false;
return true;
*adjustedp = FALSE;
return TRUE;
}
#define coff_adjust_symndx coff_or32_adjust_symndx
@ -599,7 +606,7 @@ const bfd_target or32coff_big_vec =
HAS_SYMS | HAS_LOCALS | WP_TEXT),
(SEC_HAS_CONTENTS | SEC_ALLOC | /* Section flags. */
SEC_LOAD | SEC_RELOC |
SEC_LOAD | SEC_RELOC |
SEC_READONLY ),
'_', /* Leading underscore. */
'/', /* ar_pad_char. */
@ -615,7 +622,7 @@ const bfd_target or32coff_big_vec =
bfd_getb32, bfd_getb_signed_32, bfd_putb32,
bfd_getb16, bfd_getb_signed_16, bfd_putb16,
{
{
_bfd_dummy_target,
coff_object_p,
bfd_generic_archive_p,
@ -643,7 +650,7 @@ const bfd_target or32coff_big_vec =
BFD_JUMP_TABLE_WRITE (coff),
BFD_JUMP_TABLE_LINK (coff),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
/* Alternative_target. */
#ifdef TARGET_LITTLE_SYM
& TARGET_LITTLE_SYM,

View File

@ -54,7 +54,7 @@ Boston, MA 02111-1307, USA. */
/* This file is compiled more than once, but we only compile the
final_link routine once. */
extern boolean ppc_bfd_coff_final_link
extern bfd_boolean ppc_bfd_coff_final_link
PARAMS ((bfd *, struct bfd_link_info *));
extern void dump_toc PARAMS ((PTR));
@ -128,14 +128,14 @@ struct ppc_coff_link_hash_table
static struct bfd_hash_entry *ppc_coff_link_hash_newfunc
PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *,
const char *));
static boolean ppc_coff_link_hash_table_init
static bfd_boolean ppc_coff_link_hash_table_init
PARAMS ((struct ppc_coff_link_hash_table *, bfd *,
struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
struct bfd_hash_table *,
const char *)));
static struct bfd_link_hash_table *ppc_coff_link_hash_table_create
PARAMS ((bfd *));
static boolean coff_ppc_relocate_section
static bfd_boolean coff_ppc_relocate_section
PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
struct internal_reloc *, struct internal_syment *, asection **));
static reloc_howto_type *coff_ppc_rtype_to_howto
@ -184,7 +184,7 @@ ppc_coff_link_hash_newfunc (entry, table, string)
/* Initialize a PE linker hash table. */
static boolean
static bfd_boolean
ppc_coff_link_hash_table_init (table, abfd, newfunc)
struct ppc_coff_link_hash_table *table;
bfd *abfd;
@ -385,7 +385,7 @@ static bfd_reloc_status_type ppc_imglue_reloc PARAMS ((bfd *abfd,
bfd *output_bfd,
char **error));
static boolean in_reloc_p PARAMS((bfd *abfd, reloc_howto_type *howto));
static bfd_boolean in_reloc_p PARAMS((bfd *abfd, reloc_howto_type *howto));
/* FIXME: It'll take a while to get through all of these. I only need a few to
get us started, so those I'll make sure work. Those marked FIXME are either
@ -433,15 +433,15 @@ static reloc_howto_type ppc_coff_howto_table[] =
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* dont complain_on_overflow */
0, /* special_function */
"ABSOLUTE", /* name */
false, /* partial_inplace */
FALSE, /* partial_inplace */
0x00, /* src_mask */
0x00, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
/* IMAGE_REL_PPC_ADDR64 0x0001 64-bit address */
/* Unused: */
@ -449,15 +449,15 @@ static reloc_howto_type ppc_coff_howto_table[] =
0, /* rightshift */
3, /* size (0 = byte, 1 = short, 2 = long) */
64, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
0, /* special_function */
"ADDR64", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
MINUS_ONE, /* src_mask */
MINUS_ONE, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
/* IMAGE_REL_PPC_ADDR32 0x0002 32-bit address */
/* Used: */
@ -465,15 +465,15 @@ static reloc_howto_type ppc_coff_howto_table[] =
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
0, /* special_function */
"ADDR32", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
/* IMAGE_REL_PPC_ADDR24 0x0003 26-bit address, shifted left 2 (branch absolute) */
/* the LI field is in bit 6 through bit 29 is 24 bits, + 2 for the shift */
@ -484,15 +484,15 @@ static reloc_howto_type ppc_coff_howto_table[] =
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
26, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
0, /* special_function */
"ADDR24", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0x07fffffc, /* src_mask */
0x07fffffc, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
/* IMAGE_REL_PPC_ADDR16 0x0004 16-bit address */
/* Used: */
@ -500,15 +500,15 @@ static reloc_howto_type ppc_coff_howto_table[] =
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
0, /* special_function */
"ADDR16", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
/* IMAGE_REL_PPC_ADDR14 0x0005 */
/* 16-bit address, shifted left 2 (load doubleword) */
@ -518,15 +518,15 @@ static reloc_howto_type ppc_coff_howto_table[] =
1, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
0, /* special_function */
"ADDR16", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
/* IMAGE_REL_PPC_REL24 0x0006 */
/* 26-bit PC-relative offset, shifted left 2 (branch relative) */
@ -535,15 +535,15 @@ static reloc_howto_type ppc_coff_howto_table[] =
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
26, /* bitsize */
true, /* pc_relative */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
0, /* special_function */
"REL24", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0x3fffffc, /* src_mask */
0x3fffffc, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
/* IMAGE_REL_PPC_REL14 0x0007 */
/* 16-bit PC-relative offset, shifted left 2 (br cond relative) */
@ -554,15 +554,15 @@ static reloc_howto_type ppc_coff_howto_table[] =
1, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
0, /* special_function */
"ADDR16", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
true), /* pcrel_offset */
TRUE), /* pcrel_offset */
/* IMAGE_REL_PPC_TOCREL16 0x0008 */
/* 16-bit offset from TOC base */
@ -571,15 +571,15 @@ static reloc_howto_type ppc_coff_howto_table[] =
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
ppc_toc16_reloc, /* special_function */
"TOCREL16", /* name */
false, /* partial_inplace */
FALSE, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
/* IMAGE_REL_PPC_TOCREL14 0x0009 */
/* 16-bit offset from TOC base, shifted left 2 (load doubleword) */
@ -588,15 +588,15 @@ static reloc_howto_type ppc_coff_howto_table[] =
1, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
0, /* special_function */
"TOCREL14", /* name */
false, /* partial_inplace */
FALSE, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
/* IMAGE_REL_PPC_ADDR32NB 0x000A */
/* 32-bit addr w/ image base */
@ -605,15 +605,15 @@ static reloc_howto_type ppc_coff_howto_table[] =
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
0, /* special_function */
"ADDR32NB", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
/* IMAGE_REL_PPC_SECREL 0x000B */
/* va of containing section (as in an image sectionhdr) */
@ -622,15 +622,15 @@ static reloc_howto_type ppc_coff_howto_table[] =
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
ppc_secrel_reloc, /* special_function */
"SECREL", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
true), /* pcrel_offset */
TRUE), /* pcrel_offset */
/* IMAGE_REL_PPC_SECTION 0x000C */
/* sectionheader number */
@ -639,15 +639,15 @@ static reloc_howto_type ppc_coff_howto_table[] =
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
ppc_section_reloc, /* special_function */
"SECTION", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
true), /* pcrel_offset */
TRUE), /* pcrel_offset */
/* IMAGE_REL_PPC_IFGLUE 0x000D */
/* substitute TOC restore instruction iff symbol is glue code */
@ -656,15 +656,15 @@ static reloc_howto_type ppc_coff_howto_table[] =
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
0, /* special_function */
"IFGLUE", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
/* IMAGE_REL_PPC_IMGLUE 0x000E */
/* symbol is glue code; virtual address is TOC restore instruction */
@ -673,15 +673,15 @@ static reloc_howto_type ppc_coff_howto_table[] =
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
ppc_imglue_reloc, /* special_function */
"IMGLUE", /* name */
false, /* partial_inplace */
FALSE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
/* IMAGE_REL_PPC_SECREL16 0x000F */
/* va of containing section (limited to 16 bits) */
@ -690,15 +690,15 @@ static reloc_howto_type ppc_coff_howto_table[] =
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
0, /* special_function */
"SECREL16", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
true), /* pcrel_offset */
TRUE), /* pcrel_offset */
/* IMAGE_REL_PPC_REFHI 0x0010 */
/* Unused: */
@ -706,15 +706,15 @@ static reloc_howto_type ppc_coff_howto_table[] =
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
ppc_refhi_reloc, /* special_function */
"REFHI", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
/* IMAGE_REL_PPC_REFLO 0x0011 */
/* Unused: */
@ -722,15 +722,15 @@ static reloc_howto_type ppc_coff_howto_table[] =
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
ppc_refhi_reloc, /* special_function */
"REFLO", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
/* IMAGE_REL_PPC_PAIR 0x0012 */
/* Unused: */
@ -738,15 +738,15 @@ static reloc_howto_type ppc_coff_howto_table[] =
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
ppc_pair_reloc, /* special_function */
"PAIR", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
/* IMAGE_REL_PPC_TOCREL16_DEFN 0x0013 */
/* 16-bit offset from TOC base, without causing a definition */
@ -755,15 +755,15 @@ static reloc_howto_type ppc_coff_howto_table[] =
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
0, /* special_function */
"TOCREL16, TOCDEFN", /* name */
false, /* partial_inplace */
FALSE, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
};
@ -884,13 +884,13 @@ record_toc (toc_section, our_toc_offset, cat, name)
#ifdef COFF_IMAGE_WITH_PE
static boolean ppc_record_toc_entry
static bfd_boolean ppc_record_toc_entry
PARAMS ((bfd *, struct bfd_link_info *, asection *, int, enum toc_type));
static void ppc_mark_symbol_as_glue
PARAMS ((bfd *, int, struct internal_reloc *));
/* record a toc offset against a symbol */
static boolean
static bfd_boolean
ppc_record_toc_entry(abfd, info, sec, sym, toc_kind)
bfd *abfd;
struct bfd_link_info *info ATTRIBUTE_UNUSED;
@ -922,7 +922,7 @@ ppc_record_toc_entry(abfd, info, sec, sym, toc_kind)
amt = (bfd_size_type) obj_raw_syment_count (abfd) * sizeof (int);
local_syms = (int *) bfd_zalloc (abfd, amt);
if (local_syms == 0)
return false;
return FALSE;
obj_coff_local_toc_table (abfd) = local_syms;
for (i = 0; i < obj_raw_syment_count (abfd); ++i)
{
@ -940,7 +940,7 @@ ppc_record_toc_entry(abfd, info, sec, sym, toc_kind)
{
(*_bfd_error_handler) (_("TOC overflow"));
bfd_set_error (bfd_error_file_too_big);
return false;
return FALSE;
}
}
}
@ -960,12 +960,12 @@ ppc_record_toc_entry(abfd, info, sec, sym, toc_kind)
{
(*_bfd_error_handler) (_("TOC overflow"));
bfd_set_error (bfd_error_file_too_big);
return false;
return FALSE;
}
}
}
return true;
return TRUE;
}
/* record a toc offset against a symbol */
@ -989,10 +989,10 @@ ppc_mark_symbol_as_glue(abfd, sym, rel)
#endif /* COFF_IMAGE_WITH_PE */
/* Return true if this relocation should
/* Return TRUE if this relocation should
appear in the output .reloc section. */
static boolean in_reloc_p(abfd, howto)
static bfd_boolean in_reloc_p(abfd, howto)
bfd * abfd ATTRIBUTE_UNUSED;
reloc_howto_type *howto;
{
@ -1030,7 +1030,7 @@ pe_ppc_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
{
/* the consth relocation comes in two parts, we have to remember
the state between calls, in these variables */
static boolean part1_consth_active = false;
static bfd_boolean part1_consth_active = FALSE;
static unsigned long part1_consth_value;
unsigned long sym_value;
@ -1052,7 +1052,7 @@ pe_ppc_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
/* Keep the state machine happy in case we're called again */
if (r_type == IMAGE_REL_PPC_REFHI)
{
part1_consth_active = true;
part1_consth_active = TRUE;
part1_consth_value = 0;
}
return(bfd_reloc_undefined);
@ -1060,7 +1060,7 @@ pe_ppc_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
if ((part1_consth_active) && (r_type != IMAGE_REL_PPC_PAIR))
{
part1_consth_active = false;
part1_consth_active = FALSE;
*error_message = (char *) _("Missing PAIR");
return(bfd_reloc_dangerous);
}
@ -1074,7 +1074,7 @@ pe_ppc_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
/* The reloc processing routine for the optimized COFF linker. */
static boolean
static bfd_boolean
coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
contents, relocs, syms, sections)
bfd *output_bfd;
@ -1088,7 +1088,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
{
struct internal_reloc *rel;
struct internal_reloc *relend;
boolean hihalf;
bfd_boolean hihalf;
bfd_vma hihalf_val;
asection *toc_section = 0;
bfd_vma relocation;
@ -1098,9 +1098,9 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
thing. The caller will take care of adjusting the reloc
addresses and symbol indices. */
if (info->relocateable)
return true;
return TRUE;
hihalf = false;
hihalf = FALSE;
hihalf_val = 0;
rel = relocs;
@ -1182,8 +1182,8 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
{
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.root.string, input_bfd, input_section,
rel->r_vaddr - input_section->vma, true)))
return false;
rel->r_vaddr - input_section->vma, TRUE)))
return FALSE;
}
}
@ -1197,7 +1197,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
(_("%s: unsupported relocation type 0x%02x"),
bfd_archive_filename (input_bfd), r_type);
bfd_set_error (bfd_error_bad_value);
return false;
return FALSE;
case IMAGE_REL_PPC_TOCREL16:
{
bfd_signed_vma our_toc_offset;
@ -1224,7 +1224,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
* the 1 bit to tell us if we've written this particular toc
* entry out.
*/
fixit = false;
fixit = FALSE;
if (h == 0)
{ /* it is a file local symbol */
int *local_toc_table;
@ -1254,7 +1254,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
toc_section->contents + our_toc_offset);
MARK_AS_WRITTEN(local_toc_table[symndx]);
fixit = true;
fixit = TRUE;
}
}
else
@ -1291,7 +1291,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_archive_filename (input_bfd), name,
(unsigned long) our_toc_offset);
bfd_set_error (bfd_error_bad_value);
return false;
return FALSE;
}
record_toc (toc_section, our_toc_offset, pub,
@ -1317,7 +1317,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
MARK_AS_WRITTEN(h->toc_offset);
/* The tricky part is that this is the address that */
/* needs a .reloc entry for it */
fixit = true;
fixit = TRUE;
}
}
@ -1348,7 +1348,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_archive_filename (input_bfd),
(unsigned long) toc_section->_raw_size);
bfd_set_error (bfd_error_bad_value);
return false;
return FALSE;
}
/* Now we know the relocation for this toc reference */
@ -1423,7 +1423,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
(_("%s: Out of order IMGLUE reloc for %s"),
bfd_archive_filename (input_bfd), my_name);
bfd_set_error (bfd_error_bad_value);
return false;
return FALSE;
}
case IMAGE_REL_PPC_ADDR32NB:
@ -1438,7 +1438,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
struct coff_link_hash_entry *myh;
myh = coff_link_hash_lookup (coff_hash_table (info),
"__idata5_magic__",
false, false, true);
FALSE, FALSE, TRUE);
first_thunk_address = myh->root.u.def.value +
sec->output_section->vma +
sec->output_offset -
@ -1447,12 +1447,12 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
idata5offset = myh->root.u.def.value;
myh = coff_link_hash_lookup (coff_hash_table (info),
"__idata6_magic__",
false, false, true);
FALSE, FALSE, TRUE);
thunk_size = myh->root.u.def.value - idata5offset;
myh = coff_link_hash_lookup (coff_hash_table (info),
"__idata4_magic__",
false, false, true);
FALSE, FALSE, TRUE);
import_table_size = myh->root.u.def.value;
}
@ -1479,7 +1479,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
myh = coff_link_hash_lookup (coff_hash_table (info),
target,
false, false, true);
FALSE, FALSE, TRUE);
if (myh == 0)
{
/* Missing magic cookies. Something is very wrong. */
@ -1493,7 +1493,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
int idata5offset;
myh = coff_link_hash_lookup (coff_hash_table (info),
"__idata5_magic__",
false, false, true);
FALSE, FALSE, TRUE);
first_thunk_address = myh->root.u.def.value +
sec->output_section->vma +
sec->output_offset -
@ -1502,12 +1502,12 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
idata5offset = myh->root.u.def.value;
myh = coff_link_hash_lookup (coff_hash_table (info),
"__idata6_magic__",
false, false, true);
FALSE, FALSE, TRUE);
thunk_size = myh->root.u.def.value - idata5offset;
myh = coff_link_hash_lookup (coff_hash_table (info),
"__idata4_magic__",
false, false, true);
FALSE, FALSE, TRUE);
import_table_size = myh->root.u.def.value;
}
}
@ -1596,14 +1596,14 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
(bfd_vma) 0, input_bfd,
input_section, rel->r_vaddr - input_section->vma)))
{
return false;
return FALSE;
}
}
}
}
return true;
return TRUE;
}
#ifdef COFF_IMAGE_WITH_PE
@ -1677,7 +1677,7 @@ dump_toc (vfile)
fprintf (file, "\n");
}
boolean
bfd_boolean
ppc_allocate_toc_section (info)
struct bfd_link_info *info ATTRIBUTE_UNUSED;
{
@ -1687,7 +1687,7 @@ ppc_allocate_toc_section (info)
static char test_char = '1';
if ( global_toc_size == 0 ) /* FIXME: does this get me in trouble? */
return true;
return TRUE;
if (bfd_of_toc_owner == 0)
{
@ -1709,10 +1709,10 @@ ppc_allocate_toc_section (info)
s->_raw_size = s->_cooked_size = global_toc_size;
s->contents = foo;
return true;
return TRUE;
}
boolean
bfd_boolean
ppc_process_before_allocation (abfd, info)
bfd *abfd;
struct bfd_link_info *info;
@ -1730,7 +1730,7 @@ ppc_process_before_allocation (abfd, info)
if (sec == 0)
{
return true;
return TRUE;
}
for (; sec != 0; sec = sec->next)
@ -1749,7 +1749,7 @@ ppc_process_before_allocation (abfd, info)
{
unsigned short r_type = EXTRACT_TYPE (rel->r_type);
unsigned short r_flags = EXTRACT_FLAGS(rel->r_type);
boolean ok = true;
bfd_boolean ok = TRUE;
DUMP_RELOC2(ppc_coff_howto_table[r_type].name, rel);
@ -1762,7 +1762,7 @@ ppc_process_before_allocation (abfd, info)
ok = ppc_record_toc_entry(abfd, info, sec,
rel->r_symndx, default_toc);
if (!ok)
return false;
return FALSE;
break;
case IMAGE_REL_PPC_IMGLUE:
ppc_mark_symbol_as_glue(abfd, rel->r_symndx, rel);
@ -1773,7 +1773,7 @@ ppc_process_before_allocation (abfd, info)
}
}
return true;
return TRUE;
}
#endif
@ -2278,17 +2278,17 @@ ppc_coff_swap_sym_in_hook (abfd, ext1, in1)
#ifndef COFF_IMAGE_WITH_PE
static boolean ppc_do_last PARAMS ((bfd *));
static bfd_boolean ppc_do_last PARAMS ((bfd *));
static bfd *ppc_get_last PARAMS ((void));
static boolean
static bfd_boolean
ppc_do_last (abfd)
bfd *abfd;
{
if (abfd == bfd_of_toc_owner)
return true;
return TRUE;
else
return false;
return FALSE;
}
static bfd *
@ -2311,14 +2311,14 @@ ppc_get_last()
/* Do the final link step. */
boolean
bfd_boolean
ppc_bfd_coff_final_link (abfd, info)
bfd *abfd;
struct bfd_link_info *info;
{
bfd_size_type symesz;
struct coff_final_link_info finfo;
boolean debug_merge_allocated;
bfd_boolean debug_merge_allocated;
asection *o;
struct bfd_link_order *p;
bfd_size_type max_sym_count;
@ -2351,7 +2351,7 @@ ppc_bfd_coff_final_link (abfd, info)
finfo.contents = NULL;
finfo.external_relocs = NULL;
finfo.internal_relocs = NULL;
debug_merge_allocated = false;
debug_merge_allocated = FALSE;
coff_data (abfd)->link_info = info;
@ -2361,13 +2361,13 @@ ppc_bfd_coff_final_link (abfd, info)
if (! coff_debug_merge_hash_table_init (&finfo.debug_merge))
goto error_return;
debug_merge_allocated = true;
debug_merge_allocated = TRUE;
/* Compute the file positions for all the sections. */
if (! abfd->output_has_begun)
{
if (! bfd_coff_compute_section_file_positions (abfd))
return false;
return FALSE;
}
/* Count the line numbers and relocation entries required for the
@ -2395,7 +2395,7 @@ ppc_bfd_coff_final_link (abfd, info)
link. This will normally be every section. We need
to do this so that we can identify any sections which
the linker has decided to not include. */
sec->linker_mark = true;
sec->linker_mark = TRUE;
if (info->strip == strip_none
|| info->strip == strip_some)
@ -2509,7 +2509,7 @@ ppc_bfd_coff_final_link (abfd, info)
{
bfd_size_type sz;
sub->output_has_begun = false;
sub->output_has_begun = FALSE;
sz = obj_raw_syment_count (sub);
if (sz > max_sym_count)
max_sym_count = sz;
@ -2575,7 +2575,7 @@ ppc_bfd_coff_final_link (abfd, info)
{
if (! _bfd_coff_link_input_bfd (&finfo, sub))
goto error_return;
sub->output_has_begun = true;
sub->output_has_begun = TRUE;
}
}
else if (p->type == bfd_section_reloc_link_order
@ -2600,14 +2600,14 @@ ppc_bfd_coff_final_link (abfd, info)
if (! _bfd_coff_link_input_bfd (&finfo, last_one))
goto error_return;
}
last_one->output_has_begun = true;
last_one->output_has_begun = TRUE;
}
#endif
/* Free up the buffers used by _bfd_coff_link_input_bfd. */
coff_debug_merge_hash_table_free (&finfo.debug_merge);
debug_merge_allocated = false;
debug_merge_allocated = FALSE;
if (finfo.internal_syms != NULL)
{
@ -2659,11 +2659,11 @@ ppc_bfd_coff_final_link (abfd, info)
pos = obj_sym_filepos (abfd) + finfo.last_file_index * symesz;
if (bfd_seek (abfd, pos, SEEK_SET) != 0
|| bfd_bwrite (finfo.outsyms, symesz, abfd) != symesz)
return false;
return FALSE;
}
/* Write out the global symbols. */
finfo.failed = false;
finfo.failed = FALSE;
coff_link_hash_traverse (coff_hash_table (info), _bfd_coff_write_global_sym,
(PTR) &finfo);
if (finfo.failed)
@ -2740,7 +2740,7 @@ ppc_bfd_coff_final_link (abfd, info)
if (coff_hash_table (info)->stab_info != NULL)
{
if (! _bfd_write_stab_strings (abfd, &coff_hash_table (info)->stab_info))
return false;
return FALSE;
}
/* Write out the string table. */
@ -2750,7 +2750,7 @@ ppc_bfd_coff_final_link (abfd, info)
pos = obj_sym_filepos (abfd) + obj_raw_syment_count (abfd) * symesz;
if (bfd_seek (abfd, pos, SEEK_SET) != 0)
return false;
return FALSE;
#if STRING_SIZE_SIZE == 4
H_PUT_32 (abfd,
@ -2762,10 +2762,10 @@ ppc_bfd_coff_final_link (abfd, info)
if (bfd_bwrite (strbuf, (bfd_size_type) STRING_SIZE_SIZE, abfd)
!= STRING_SIZE_SIZE)
return false;
return FALSE;
if (! _bfd_stringtab_emit (abfd, finfo.strtab))
return false;
return FALSE;
}
_bfd_stringtab_free (finfo.strtab);
@ -2774,7 +2774,7 @@ ppc_bfd_coff_final_link (abfd, info)
not try to write out the symbols. */
bfd_get_symcount (abfd) = 0;
return true;
return TRUE;
error_return:
if (debug_merge_allocated)
@ -2812,7 +2812,7 @@ ppc_bfd_coff_final_link (abfd, info)
free (finfo.internal_relocs);
if (external_relocs != NULL)
free (external_relocs);
return false;
return FALSE;
}
#endif

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
/* BFD back-end for Sparc COFF files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2001
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
Written by Cygnus Support.
@ -103,30 +103,30 @@ bfd_coff_generic_reloc (abfd, reloc_entry, symbol, data, input_section,
static reloc_howto_type coff_sparc_howto_table[] =
{
HOWTO(R_SPARC_NONE, 0,0, 0,false,0,complain_overflow_dont, bfd_coff_generic_reloc,"R_SPARC_NONE", false,0,0x00000000,true),
HOWTO(R_SPARC_8, 0,0, 8,false,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_8", false,0,0x000000ff,true),
HOWTO(R_SPARC_16, 0,1,16,false,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_16", false,0,0x0000ffff,true),
HOWTO(R_SPARC_32, 0,2,32,false,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_32", false,0,0xffffffff,true),
HOWTO(R_SPARC_DISP8, 0,0, 8,true, 0,complain_overflow_signed, bfd_coff_generic_reloc,"R_SPARC_DISP8", false,0,0x000000ff,true),
HOWTO(R_SPARC_DISP16, 0,1,16,true, 0,complain_overflow_signed, bfd_coff_generic_reloc,"R_SPARC_DISP16", false,0,0x0000ffff,true),
HOWTO(R_SPARC_DISP32, 0,2,32,true, 0,complain_overflow_signed, bfd_coff_generic_reloc,"R_SPARC_DISP32", false,0,0x00ffffff,true),
HOWTO(R_SPARC_WDISP30, 2,2,30,true, 0,complain_overflow_signed, bfd_coff_generic_reloc,"R_SPARC_WDISP30", false,0,0x3fffffff,true),
HOWTO(R_SPARC_WDISP22, 2,2,22,true, 0,complain_overflow_signed, bfd_coff_generic_reloc,"R_SPARC_WDISP22", false,0,0x003fffff,true),
HOWTO(R_SPARC_HI22, 10,2,22,false,0,complain_overflow_dont, bfd_coff_generic_reloc,"R_SPARC_HI22", false,0,0x003fffff,true),
HOWTO(R_SPARC_22, 0,2,22,false,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_22", false,0,0x003fffff,true),
HOWTO(R_SPARC_13, 0,2,13,false,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_13", false,0,0x00001fff,true),
HOWTO(R_SPARC_LO10, 0,2,10,false,0,complain_overflow_dont, bfd_coff_generic_reloc,"R_SPARC_LO10", false,0,0x000003ff,true),
HOWTO(R_SPARC_GOT10, 0,2,10,false,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_GOT10", false,0,0x000003ff,true),
HOWTO(R_SPARC_GOT13, 0,2,13,false,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_GOT13", false,0,0x00001fff,true),
HOWTO(R_SPARC_GOT22, 10,2,22,false,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_GOT22", false,0,0x003fffff,true),
HOWTO(R_SPARC_PC10, 0,2,10,false,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_PC10", false,0,0x000003ff,true),
HOWTO(R_SPARC_PC22, 0,2,22,false,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_PC22", false,0,0x003fffff,true),
HOWTO(R_SPARC_WPLT30, 0,0,00,false,0,complain_overflow_dont, bfd_coff_generic_reloc,"R_SPARC_WPLT30", false,0,0x00000000,true),
HOWTO(R_SPARC_COPY, 0,0,00,false,0,complain_overflow_dont, bfd_coff_generic_reloc,"R_SPARC_COPY", false,0,0x00000000,true),
HOWTO(R_SPARC_GLOB_DAT,0,0,00,false,0,complain_overflow_dont, bfd_coff_generic_reloc,"R_SPARC_GLOB_DAT",false,0,0x00000000,true),
HOWTO(R_SPARC_JMP_SLOT,0,0,00,false,0,complain_overflow_dont, bfd_coff_generic_reloc,"R_SPARC_JMP_SLOT",false,0,0x00000000,true),
HOWTO(R_SPARC_RELATIVE,0,0,00,false,0,complain_overflow_dont, bfd_coff_generic_reloc,"R_SPARC_RELATIVE",false,0,0x00000000,true),
HOWTO(R_SPARC_UA32, 0,0,00,false,0,complain_overflow_dont, bfd_coff_generic_reloc,"R_SPARC_UA32", false,0,0x00000000,true),
HOWTO(R_SPARC_NONE, 0,0, 0,FALSE,0,complain_overflow_dont, bfd_coff_generic_reloc,"R_SPARC_NONE", FALSE,0,0x00000000,TRUE),
HOWTO(R_SPARC_8, 0,0, 8,FALSE,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_8", FALSE,0,0x000000ff,TRUE),
HOWTO(R_SPARC_16, 0,1,16,FALSE,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_16", FALSE,0,0x0000ffff,TRUE),
HOWTO(R_SPARC_32, 0,2,32,FALSE,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_32", FALSE,0,0xffffffff,TRUE),
HOWTO(R_SPARC_DISP8, 0,0, 8,TRUE, 0,complain_overflow_signed, bfd_coff_generic_reloc,"R_SPARC_DISP8", FALSE,0,0x000000ff,TRUE),
HOWTO(R_SPARC_DISP16, 0,1,16,TRUE, 0,complain_overflow_signed, bfd_coff_generic_reloc,"R_SPARC_DISP16", FALSE,0,0x0000ffff,TRUE),
HOWTO(R_SPARC_DISP32, 0,2,32,TRUE, 0,complain_overflow_signed, bfd_coff_generic_reloc,"R_SPARC_DISP32", FALSE,0,0x00ffffff,TRUE),
HOWTO(R_SPARC_WDISP30, 2,2,30,TRUE, 0,complain_overflow_signed, bfd_coff_generic_reloc,"R_SPARC_WDISP30", FALSE,0,0x3fffffff,TRUE),
HOWTO(R_SPARC_WDISP22, 2,2,22,TRUE, 0,complain_overflow_signed, bfd_coff_generic_reloc,"R_SPARC_WDISP22", FALSE,0,0x003fffff,TRUE),
HOWTO(R_SPARC_HI22, 10,2,22,FALSE,0,complain_overflow_dont, bfd_coff_generic_reloc,"R_SPARC_HI22", FALSE,0,0x003fffff,TRUE),
HOWTO(R_SPARC_22, 0,2,22,FALSE,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_22", FALSE,0,0x003fffff,TRUE),
HOWTO(R_SPARC_13, 0,2,13,FALSE,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_13", FALSE,0,0x00001fff,TRUE),
HOWTO(R_SPARC_LO10, 0,2,10,FALSE,0,complain_overflow_dont, bfd_coff_generic_reloc,"R_SPARC_LO10", FALSE,0,0x000003ff,TRUE),
HOWTO(R_SPARC_GOT10, 0,2,10,FALSE,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_GOT10", FALSE,0,0x000003ff,TRUE),
HOWTO(R_SPARC_GOT13, 0,2,13,FALSE,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_GOT13", FALSE,0,0x00001fff,TRUE),
HOWTO(R_SPARC_GOT22, 10,2,22,FALSE,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_GOT22", FALSE,0,0x003fffff,TRUE),
HOWTO(R_SPARC_PC10, 0,2,10,FALSE,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_PC10", FALSE,0,0x000003ff,TRUE),
HOWTO(R_SPARC_PC22, 0,2,22,FALSE,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_PC22", FALSE,0,0x003fffff,TRUE),
HOWTO(R_SPARC_WPLT30, 0,0,00,FALSE,0,complain_overflow_dont, bfd_coff_generic_reloc,"R_SPARC_WPLT30", FALSE,0,0x00000000,TRUE),
HOWTO(R_SPARC_COPY, 0,0,00,FALSE,0,complain_overflow_dont, bfd_coff_generic_reloc,"R_SPARC_COPY", FALSE,0,0x00000000,TRUE),
HOWTO(R_SPARC_GLOB_DAT,0,0,00,FALSE,0,complain_overflow_dont, bfd_coff_generic_reloc,"R_SPARC_GLOB_DAT",FALSE,0,0x00000000,TRUE),
HOWTO(R_SPARC_JMP_SLOT,0,0,00,FALSE,0,complain_overflow_dont, bfd_coff_generic_reloc,"R_SPARC_JMP_SLOT",FALSE,0,0x00000000,TRUE),
HOWTO(R_SPARC_RELATIVE,0,0,00,FALSE,0,complain_overflow_dont, bfd_coff_generic_reloc,"R_SPARC_RELATIVE",FALSE,0,0x00000000,TRUE),
HOWTO(R_SPARC_UA32, 0,0,00,FALSE,0,complain_overflow_dont, bfd_coff_generic_reloc,"R_SPARC_UA32", FALSE,0,0x00000000,TRUE),
};
struct coff_reloc_map {

View File

@ -1,5 +1,5 @@
/* BFD back-end for Intel 386 COFF files (DJGPP variant with a stub).
Copyright 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
Copyright 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Written by Robert Hoehne.
This file is part of BFD, the Binary File Descriptor library.
@ -93,7 +93,7 @@ create_go32_stub PARAMS ((bfd *));
#define COFF_ADJUST_AUX_OUT_PRE adjust_aux_out_pre
#define COFF_ADJUST_AUX_OUT_POST adjust_aux_out_post
static boolean
static bfd_boolean
go32_stubbed_coff_bfd_copy_private_bfd_data PARAMS ((bfd *, bfd *));
#define coff_bfd_copy_private_bfd_data go32_stubbed_coff_bfd_copy_private_bfd_data
@ -392,22 +392,22 @@ stub_end:
/* If ibfd was a stubbed coff image, copy the stub from that bfd
to the new obfd. */
static boolean
static bfd_boolean
go32_stubbed_coff_bfd_copy_private_bfd_data (ibfd, obfd)
bfd *ibfd;
bfd *obfd;
{
/* Check if both are the same targets. */
if (ibfd->xvec != obfd->xvec)
return true;
return TRUE;
/* Check if both have a valid stub. */
if (bfd_coff_go32stub (ibfd) == NULL
|| bfd_coff_go32stub (obfd) == NULL)
return true;
return TRUE;
/* Now copy the stub. */
memcpy (bfd_coff_go32stub (obfd), bfd_coff_go32stub (ibfd), STUBSIZE);
return true;
return TRUE;
}

View File

@ -1,5 +1,5 @@
/* BFD back-end for TMS320C30 coff binaries.
Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au)
This file is part of BFD, the Binary File Descriptor library.
@ -37,16 +37,16 @@ reloc_howto_type * tic30_coff_reloc_type_lookup PARAMS ((bfd *, bfd_reloc_code_r
reloc_howto_type tic30_coff_howto_table[] =
{
HOWTO (R_TIC30_ABS16, 2, 1, 16, false, 0, 0, NULL,
"16", false, 0x0000FFFF, 0x0000FFFF, false),
HOWTO (R_TIC30_ABS24, 2, 2, 24, false, 8, complain_overflow_bitfield, NULL,
"24", false, 0xFFFFFF00, 0xFFFFFF00, false),
HOWTO (R_TIC30_LDP, 18, 0, 24, false, 0, complain_overflow_bitfield, NULL,
"LDP", false, 0x00FF0000, 0x000000FF, false),
HOWTO (R_TIC30_ABS32, 2, 2, 32, false, 0, complain_overflow_bitfield, NULL,
"32", false, 0xFFFFFFFF, 0xFFFFFFFF, false),
HOWTO (R_TIC30_PC16, 2, 1, 16, true, 0, complain_overflow_signed, NULL,
"PCREL", false, 0x0000FFFF, 0x0000FFFF, false),
HOWTO (R_TIC30_ABS16, 2, 1, 16, FALSE, 0, 0, NULL,
"16", FALSE, 0x0000FFFF, 0x0000FFFF, FALSE),
HOWTO (R_TIC30_ABS24, 2, 2, 24, FALSE, 8, complain_overflow_bitfield, NULL,
"24", FALSE, 0xFFFFFF00, 0xFFFFFF00, FALSE),
HOWTO (R_TIC30_LDP, 18, 0, 24, FALSE, 0, complain_overflow_bitfield, NULL,
"LDP", FALSE, 0x00FF0000, 0x000000FF, FALSE),
HOWTO (R_TIC30_ABS32, 2, 2, 32, FALSE, 0, complain_overflow_bitfield, NULL,
"32", FALSE, 0xFFFFFFFF, 0xFFFFFFFF, FALSE),
HOWTO (R_TIC30_PC16, 2, 1, 16, TRUE, 0, complain_overflow_signed, NULL,
"PCREL", FALSE, 0x0000FFFF, 0x0000FFFF, FALSE),
EMPTY_HOWTO (-1)
};

View File

@ -31,11 +31,11 @@
#undef F_LSYMS
#define F_LSYMS F_LSYMS_TICOFF
static boolean ticoff0_bad_format_hook
static bfd_boolean ticoff0_bad_format_hook
PARAMS ((bfd *, PTR ));
static boolean ticoff1_bad_format_hook
static bfd_boolean ticoff1_bad_format_hook
PARAMS ((bfd *, PTR ));
static boolean ticoff_bfd_is_local_label_name
static bfd_boolean ticoff_bfd_is_local_label_name
PARAMS ((bfd *, const char *));
static bfd_reloc_status_type tic4x_relocation
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char ** ));
@ -49,7 +49,7 @@ static void tic4x_reloc_processing
PARAMS ((arelent *, struct internal_reloc *, asymbol **, bfd *, asection * ));
static boolean
static bfd_boolean
ticoff0_bad_format_hook (abfd, filehdr)
bfd *abfd ATTRIBUTE_UNUSED;
PTR filehdr;
@ -57,12 +57,12 @@ ticoff0_bad_format_hook (abfd, filehdr)
struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
if (COFF0_BADMAG (*internal_f))
return false;
return FALSE;
return true;
return TRUE;
}
static boolean
static bfd_boolean
ticoff1_bad_format_hook (abfd, filehdr)
bfd *abfd ATTRIBUTE_UNUSED;
PTR filehdr;
@ -70,21 +70,21 @@ ticoff1_bad_format_hook (abfd, filehdr)
struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
if (COFF1_BADMAG (*internal_f))
return false;
return FALSE;
return true;
return TRUE;
}
/* Replace the stock _bfd_coff_is_local_label_name to recognize TI COFF local
labels. */
static boolean
static bfd_boolean
ticoff_bfd_is_local_label_name (abfd, name)
bfd *abfd ATTRIBUTE_UNUSED;
const char *name;
{
if (TICOFF_LOCAL_LABEL_P(name))
return true;
return false;
return TRUE;
return FALSE;
}
#define coff_bfd_is_local_label_name ticoff_bfd_is_local_label_name
@ -100,7 +100,7 @@ ticoff_bfd_is_local_label_name (abfd, name)
#include "coffcode.h"
static bfd_reloc_status_type
tic4x_relocation (abfd, reloc_entry, symbol, data, input_section,
tic4x_relocation (abfd, reloc_entry, symbol, data, input_section,
output_bfd, error_message)
bfd *abfd ATTRIBUTE_UNUSED;
arelent *reloc_entry;
@ -109,7 +109,7 @@ tic4x_relocation (abfd, reloc_entry, symbol, data, input_section,
asection *input_section;
bfd *output_bfd;
char **error_message ATTRIBUTE_UNUSED;
{
{
if (output_bfd != (bfd *) NULL)
{
/* This is a partial relocation, and we want to apply the
@ -121,22 +121,22 @@ tic4x_relocation (abfd, reloc_entry, symbol, data, input_section,
return bfd_reloc_continue;
}
reloc_howto_type tic4x_howto_table[] =
reloc_howto_type tic4x_howto_table[] =
{
HOWTO(R_RELWORD, 0, 2, 16, false, 0, complain_overflow_signed, tic4x_relocation, "RELWORD", true, 0x0000ffff, 0x0000ffff, false),
HOWTO(R_REL24, 0, 2, 24, false, 0, complain_overflow_bitfield, tic4x_relocation, "REL24", true, 0x00ffffff, 0x00ffffff, false),
HOWTO(R_RELLONG, 0, 2, 32, false, 0, complain_overflow_dont, tic4x_relocation, "RELLONG", true, 0xffffffff, 0xffffffff, false),
HOWTO(R_PCRWORD, 0, 2, 16, true, 0, complain_overflow_signed, tic4x_relocation, "PCRWORD", true, 0x0000ffff, 0x0000ffff, false),
HOWTO(R_PCR24, 0, 2, 24, true, 0, complain_overflow_signed, tic4x_relocation, "PCR24", true, 0x00ffffff, 0x00ffffff, false),
HOWTO(R_PARTLS16, 0, 2, 16, false, 0, complain_overflow_dont, tic4x_relocation, "PARTLS16", true, 0x0000ffff, 0x0000ffff, false),
HOWTO(R_PARTMS8, 16, 2, 16, false, 0, complain_overflow_dont, tic4x_relocation, "PARTMS8", true, 0x0000ffff, 0x0000ffff, false),
HOWTO(R_RELWORD, 0, 2, 16, false, 0, complain_overflow_signed, tic4x_relocation, "ARELWORD", true, 0x0000ffff, 0x0000ffff, false),
HOWTO(R_REL24, 0, 2, 24, false, 0, complain_overflow_signed, tic4x_relocation, "AREL24", true, 0x00ffffff, 0x00ffffff, false),
HOWTO(R_RELLONG, 0, 2, 32, false, 0, complain_overflow_signed, tic4x_relocation, "ARELLONG", true, 0xffffffff, 0xffffffff, false),
HOWTO(R_PCRWORD, 0, 2, 16, true, 0, complain_overflow_signed, tic4x_relocation, "APCRWORD", true, 0x0000ffff, 0x0000ffff, false),
HOWTO(R_PCR24, 0, 2, 24, true, 0, complain_overflow_signed, tic4x_relocation, "APCR24", true, 0x00ffffff, 0x00ffffff, false),
HOWTO(R_PARTLS16, 0, 2, 16, false, 0, complain_overflow_dont, tic4x_relocation, "APARTLS16", true, 0x0000ffff, 0x0000ffff, false),
HOWTO(R_PARTMS8, 16, 2, 16, false, 0, complain_overflow_dont, tic4x_relocation, "APARTMS8", true, 0x0000ffff, 0x0000ffff, false),
HOWTO(R_RELWORD, 0, 2, 16, FALSE, 0, complain_overflow_signed, tic4x_relocation, "RELWORD", TRUE, 0x0000ffff, 0x0000ffff, FALSE),
HOWTO(R_REL24, 0, 2, 24, FALSE, 0, complain_overflow_bitfield, tic4x_relocation, "REL24", TRUE, 0x00ffffff, 0x00ffffff, FALSE),
HOWTO(R_RELLONG, 0, 2, 32, FALSE, 0, complain_overflow_dont, tic4x_relocation, "RELLONG", TRUE, 0xffffffff, 0xffffffff, FALSE),
HOWTO(R_PCRWORD, 0, 2, 16, TRUE, 0, complain_overflow_signed, tic4x_relocation, "PCRWORD", TRUE, 0x0000ffff, 0x0000ffff, FALSE),
HOWTO(R_PCR24, 0, 2, 24, TRUE, 0, complain_overflow_signed, tic4x_relocation, "PCR24", TRUE, 0x00ffffff, 0x00ffffff, FALSE),
HOWTO(R_PARTLS16, 0, 2, 16, FALSE, 0, complain_overflow_dont, tic4x_relocation, "PARTLS16", TRUE, 0x0000ffff, 0x0000ffff, FALSE),
HOWTO(R_PARTMS8, 16, 2, 16, FALSE, 0, complain_overflow_dont, tic4x_relocation, "PARTMS8", TRUE, 0x0000ffff, 0x0000ffff, FALSE),
HOWTO(R_RELWORD, 0, 2, 16, FALSE, 0, complain_overflow_signed, tic4x_relocation, "ARELWORD", TRUE, 0x0000ffff, 0x0000ffff, FALSE),
HOWTO(R_REL24, 0, 2, 24, FALSE, 0, complain_overflow_signed, tic4x_relocation, "AREL24", TRUE, 0x00ffffff, 0x00ffffff, FALSE),
HOWTO(R_RELLONG, 0, 2, 32, FALSE, 0, complain_overflow_signed, tic4x_relocation, "ARELLONG", TRUE, 0xffffffff, 0xffffffff, FALSE),
HOWTO(R_PCRWORD, 0, 2, 16, TRUE, 0, complain_overflow_signed, tic4x_relocation, "APCRWORD", TRUE, 0x0000ffff, 0x0000ffff, FALSE),
HOWTO(R_PCR24, 0, 2, 24, TRUE, 0, complain_overflow_signed, tic4x_relocation, "APCR24", TRUE, 0x00ffffff, 0x00ffffff, FALSE),
HOWTO(R_PARTLS16, 0, 2, 16, FALSE, 0, complain_overflow_dont, tic4x_relocation, "APARTLS16", TRUE, 0x0000ffff, 0x0000ffff, FALSE),
HOWTO(R_PARTMS8, 16, 2, 16, FALSE, 0, complain_overflow_dont, tic4x_relocation, "APARTMS8", TRUE, 0x0000ffff, 0x0000ffff, FALSE),
};
#define HOWTO_SIZE (sizeof(tic4x_howto_table) / sizeof(tic4x_howto_table[0]))
@ -153,7 +153,7 @@ tic4x_coff_reloc_type_lookup (abfd, code)
{
unsigned int type;
unsigned int i;
switch (code)
{
case BFD_RELOC_32: type = R_RELLONG; break;
@ -166,7 +166,7 @@ tic4x_coff_reloc_type_lookup (abfd, code)
default:
return NULL;
}
for (i = 0; i < HOWTO_SIZE; i++)
{
if (tic4x_howto_table[i].type == type)
@ -238,7 +238,7 @@ tic4x_reloc_processing (relent, reloc, symbols, abfd, section)
asymbol *ptr;
relent->address = reloc->r_vaddr;
if (reloc->r_symndx != -1)
{
if (reloc->r_symndx < 0 || reloc->r_symndx >= obj_conv_table_size (abfd))
@ -261,26 +261,26 @@ tic4x_reloc_processing (relent, reloc, symbols, abfd, section)
relent->sym_ptr_ptr = section->symbol_ptr_ptr;
ptr = *(relent->sym_ptr_ptr);
}
/* The symbols definitions that we have read in have been relocated
as if their sections started at 0. But the offsets refering to
the symbols in the raw data have not been modified, so we have to
have a negative addend to compensate.
Note that symbols which used to be common must be left alone. */
/* Calculate any reloc addend by looking at the symbol. */
CALC_ADDEND (abfd, ptr, *reloc, relent);
relent->address -= section->vma;
/* !! relent->section = (asection *) NULL; */
/* Fill in the relent->howto field from reloc->r_type. */
tic4x_lookup_howto (relent, reloc);
}
static const bfd_coff_backend_data ticoff0_swap_table =
static const bfd_coff_backend_data ticoff0_swap_table =
{
coff_SWAP_aux_in, coff_SWAP_sym_in, coff_SWAP_lineno_in,
coff_SWAP_aux_out, coff_SWAP_sym_out,
@ -289,19 +289,19 @@ static const bfd_coff_backend_data ticoff0_swap_table =
coff_SWAP_scnhdr_out,
FILHSZ_V0, AOUTSZ, SCNHSZ_V01, SYMESZ, AUXESZ, RELSZ_V0, LINESZ, FILNMLEN,
#ifdef COFF_LONG_FILENAMES
true,
TRUE,
#else
false,
FALSE,
#endif
#ifdef COFF_LONG_SECTION_NAMES
true,
TRUE,
#else
false,
FALSE,
#endif
#ifdef COFF_FORCE_SYMBOLS_IN_STRINGS
true,
TRUE,
#else
false,
FALSE,
#endif
#ifdef COFF_DEBUG_STRING_WIDE_PREFIX
4,
@ -321,7 +321,7 @@ static const bfd_coff_backend_data ticoff0_swap_table =
};
/* COFF1 differs in section header size. */
static const bfd_coff_backend_data ticoff1_swap_table =
static const bfd_coff_backend_data ticoff1_swap_table =
{
coff_SWAP_aux_in, coff_SWAP_sym_in, coff_SWAP_lineno_in,
coff_SWAP_aux_out, coff_SWAP_sym_out,
@ -330,19 +330,19 @@ static const bfd_coff_backend_data ticoff1_swap_table =
coff_SWAP_scnhdr_out,
FILHSZ, AOUTSZ, SCNHSZ_V01, SYMESZ, AUXESZ, RELSZ, LINESZ, FILNMLEN,
#ifdef COFF_LONG_FILENAMES
true,
TRUE,
#else
false,
FALSE,
#endif
#ifdef COFF_LONG_SECTION_NAMES
true,
TRUE,
#else
false,
FALSE,
#endif
#ifdef COFF_FORCE_SYMBOLS_IN_STRINGS
true,
TRUE,
#else
false,
FALSE,
#endif
#ifdef COFF_DEBUG_STRING_WIDE_PREFIX
4,

View File

@ -1,5 +1,5 @@
/* BFD back-end for TMS320C54X coff binaries.
Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Contributed by Timothy Wall (twall@cygnus.com)
This file is part of BFD, the Binary File Descriptor library.
@ -30,19 +30,32 @@
#undef F_LSYMS
#define F_LSYMS F_LSYMS_TICOFF
static void tic54x_reloc_processing PARAMS ((arelent *, struct internal_reloc *, asymbol **, bfd *, asection *));
static bfd_reloc_status_type tic54x_relocation PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static boolean tic54x_set_section_contents PARAMS ((bfd *, sec_ptr, PTR, file_ptr, bfd_size_type));
static reloc_howto_type * coff_tic54x_rtype_to_howto PARAMS ((bfd *, asection *, struct internal_reloc *, struct coff_link_hash_entry *, struct internal_syment *, bfd_vma *));
static bfd_vma tic54x_getl32 PARAMS ((const bfd_byte *));
static void tic54x_putl32 PARAMS ((bfd_vma, bfd_byte *));
static bfd_signed_vma tic54x_getl_signed_32 PARAMS ((const bfd_byte *));
static boolean tic54x_set_arch_mach PARAMS ((bfd *, enum bfd_architecture, unsigned long));
static reloc_howto_type * tic54x_coff_reloc_type_lookup PARAMS ((bfd *, bfd_reloc_code_real_type));
static void tic54x_lookup_howto PARAMS ((arelent *, struct internal_reloc *));
static boolean ticoff0_bad_format_hook PARAMS ((bfd *, PTR));
static boolean ticoff1_bad_format_hook PARAMS ((bfd *, PTR));
static boolean ticoff_bfd_is_local_label_name PARAMS ((bfd *, const char *));
static void tic54x_reloc_processing
PARAMS ((arelent *, struct internal_reloc *, asymbol **, bfd *, asection *));
static bfd_reloc_status_type tic54x_relocation
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static bfd_boolean tic54x_set_section_contents
PARAMS ((bfd *, sec_ptr, PTR, file_ptr, bfd_size_type));
static reloc_howto_type *coff_tic54x_rtype_to_howto
PARAMS ((bfd *, asection *, struct internal_reloc *, struct coff_link_hash_entry *, struct internal_syment *, bfd_vma *));
static bfd_vma tic54x_getl32
PARAMS ((const bfd_byte *));
static void tic54x_putl32
PARAMS ((bfd_vma, bfd_byte *));
static bfd_signed_vma tic54x_getl_signed_32
PARAMS ((const bfd_byte *));
static bfd_boolean tic54x_set_arch_mach
PARAMS ((bfd *, enum bfd_architecture, unsigned long));
static reloc_howto_type * tic54x_coff_reloc_type_lookup
PARAMS ((bfd *, bfd_reloc_code_real_type));
static void tic54x_lookup_howto
PARAMS ((arelent *, struct internal_reloc *));
static bfd_boolean ticoff0_bad_format_hook
PARAMS ((bfd *, PTR));
static bfd_boolean ticoff1_bad_format_hook
PARAMS ((bfd *, PTR));
static bfd_boolean ticoff_bfd_is_local_label_name
PARAMS ((bfd *, const char *));
/* 32-bit operations
The octet order is screwy. words are LSB first (LS octet, actually), but
@ -125,7 +138,7 @@ bfd_ticoff_get_section_load_page (sect)
/* Set the architecture appropriately. Allow unkown architectures
(e.g. binary). */
static boolean
static bfd_boolean
tic54x_set_arch_mach (abfd, arch, machine)
bfd *abfd;
enum bfd_architecture arch;
@ -135,7 +148,7 @@ tic54x_set_arch_mach (abfd, arch, machine)
arch = bfd_arch_tic54x;
else if (arch != bfd_arch_tic54x)
return false;
return FALSE;
return bfd_default_set_arch_mach (abfd, arch, machine);
}
@ -170,59 +183,59 @@ reloc_howto_type tic54x_howto_table[] =
/* NORMAL BANK */
/* 16-bit direct reference to symbol's address. */
HOWTO (R_RELWORD,0,1,16,false,0,complain_overflow_dont,
tic54x_relocation,"REL16",false,0xFFFF,0xFFFF,false),
HOWTO (R_RELWORD,0,1,16,FALSE,0,complain_overflow_dont,
tic54x_relocation,"REL16",FALSE,0xFFFF,0xFFFF,FALSE),
/* 7 LSBs of an address */
HOWTO (R_PARTLS7,0,1,7,false,0,complain_overflow_dont,
tic54x_relocation,"LS7",false,0x007F,0x007F,false),
HOWTO (R_PARTLS7,0,1,7,FALSE,0,complain_overflow_dont,
tic54x_relocation,"LS7",FALSE,0x007F,0x007F,FALSE),
/* 9 MSBs of an address */
/* TI assembler doesn't shift its encoding, and is thus incompatible */
HOWTO (R_PARTMS9,7,1,9,false,0,complain_overflow_dont,
tic54x_relocation,"MS9",false,0x01FF,0x01FF,false),
HOWTO (R_PARTMS9,7,1,9,FALSE,0,complain_overflow_dont,
tic54x_relocation,"MS9",FALSE,0x01FF,0x01FF,FALSE),
/* 23-bit relocation */
HOWTO (R_EXTWORD,0,2,23,false,0,complain_overflow_dont,
tic54x_relocation,"RELEXT",false,0x7FFFFF,0x7FFFFF,false),
HOWTO (R_EXTWORD,0,2,23,FALSE,0,complain_overflow_dont,
tic54x_relocation,"RELEXT",FALSE,0x7FFFFF,0x7FFFFF,FALSE),
/* 16 bits of 23-bit extended address */
HOWTO (R_EXTWORD16,0,1,16,false,0,complain_overflow_dont,
tic54x_relocation,"RELEXT16",false,0x7FFFFF,0x7FFFFF,false),
HOWTO (R_EXTWORD16,0,1,16,FALSE,0,complain_overflow_dont,
tic54x_relocation,"RELEXT16",FALSE,0x7FFFFF,0x7FFFFF,FALSE),
/* upper 7 bits of 23-bit extended address */
HOWTO (R_EXTWORDMS7,16,1,7,false,0,complain_overflow_dont,
tic54x_relocation,"RELEXTMS7",false,0x7F,0x7F,false),
HOWTO (R_EXTWORDMS7,16,1,7,FALSE,0,complain_overflow_dont,
tic54x_relocation,"RELEXTMS7",FALSE,0x7F,0x7F,FALSE),
/* ABSOLUTE BANK */
/* 16-bit direct reference to symbol's address, absolute */
HOWTO (R_RELWORD,0,1,16,false,0,complain_overflow_dont,
tic54x_relocation,"AREL16",false,0xFFFF,0xFFFF,false),
HOWTO (R_RELWORD,0,1,16,FALSE,0,complain_overflow_dont,
tic54x_relocation,"AREL16",FALSE,0xFFFF,0xFFFF,FALSE),
/* 7 LSBs of an address, absolute */
HOWTO (R_PARTLS7,0,1,7,false,0,complain_overflow_dont,
tic54x_relocation,"ALS7",false,0x007F,0x007F,false),
HOWTO (R_PARTLS7,0,1,7,FALSE,0,complain_overflow_dont,
tic54x_relocation,"ALS7",FALSE,0x007F,0x007F,FALSE),
/* 9 MSBs of an address, absolute */
/* TI assembler doesn't shift its encoding, and is thus incompatible */
HOWTO (R_PARTMS9,7,1,9,false,0,complain_overflow_dont,
tic54x_relocation,"AMS9",false,0x01FF,0x01FF,false),
HOWTO (R_PARTMS9,7,1,9,FALSE,0,complain_overflow_dont,
tic54x_relocation,"AMS9",FALSE,0x01FF,0x01FF,FALSE),
/* 23-bit direct reference, absolute */
HOWTO (R_EXTWORD,0,2,23,false,0,complain_overflow_dont,
tic54x_relocation,"ARELEXT",false,0x7FFFFF,0x7FFFFF,false),
HOWTO (R_EXTWORD,0,2,23,FALSE,0,complain_overflow_dont,
tic54x_relocation,"ARELEXT",FALSE,0x7FFFFF,0x7FFFFF,FALSE),
/* 16 bits of 23-bit extended address, absolute */
HOWTO (R_EXTWORD16,0,1,16,false,0,complain_overflow_dont,
tic54x_relocation,"ARELEXT16",false,0x7FFFFF,0x7FFFFF,false),
HOWTO (R_EXTWORD16,0,1,16,FALSE,0,complain_overflow_dont,
tic54x_relocation,"ARELEXT16",FALSE,0x7FFFFF,0x7FFFFF,FALSE),
/* upper 7 bits of 23-bit extended address, absolute */
HOWTO (R_EXTWORDMS7,16,1,7,false,0,complain_overflow_dont,
tic54x_relocation,"ARELEXTMS7",false,0x7F,0x7F,false),
HOWTO (R_EXTWORDMS7,16,1,7,FALSE,0,complain_overflow_dont,
tic54x_relocation,"ARELEXTMS7",FALSE,0x7F,0x7F,FALSE),
/* 32-bit relocation exclusively for stabs */
HOWTO (R_RELLONG,0,2,32,false,0,complain_overflow_dont,
tic54x_relocation,"STAB",false,0xFFFFFFFF,0xFFFFFFFF,false),
HOWTO (R_RELLONG,0,2,32,FALSE,0,complain_overflow_dont,
tic54x_relocation,"STAB",FALSE,0xFFFFFFFF,0xFFFFFFFF,FALSE),
};
#define coff_bfd_reloc_type_lookup tic54x_coff_reloc_type_lookup
@ -310,7 +323,7 @@ coff_tic54x_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
return genrel.howto;
}
static boolean
static bfd_boolean
ticoff0_bad_format_hook (abfd, filehdr)
bfd * abfd ATTRIBUTE_UNUSED;
PTR filehdr;
@ -318,12 +331,12 @@ ticoff0_bad_format_hook (abfd, filehdr)
struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
if (COFF0_BADMAG (*internal_f))
return false;
return FALSE;
return true;
return TRUE;
}
static boolean
static bfd_boolean
ticoff1_bad_format_hook (abfd, filehdr)
bfd * abfd ATTRIBUTE_UNUSED;
PTR filehdr;
@ -331,22 +344,22 @@ ticoff1_bad_format_hook (abfd, filehdr)
struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
if (COFF1_BADMAG (*internal_f))
return false;
return FALSE;
return true;
return TRUE;
}
/* Replace the stock _bfd_coff_is_local_label_name to recognize TI COFF local
labels. */
static boolean
static bfd_boolean
ticoff_bfd_is_local_label_name (abfd, name)
bfd *abfd ATTRIBUTE_UNUSED;
const char *name;
{
if (TICOFF_LOCAL_LABEL_P(name))
return true;
return false;
return TRUE;
return FALSE;
}
#define coff_bfd_is_local_label_name ticoff_bfd_is_local_label_name
@ -358,7 +371,7 @@ ticoff_bfd_is_local_label_name (abfd, name)
#define BADMAG(x) COFF2_BADMAG(x)
#include "coffcode.h"
static boolean
static bfd_boolean
tic54x_set_section_contents (abfd, section, location, offset, bytes_to_do)
bfd *abfd;
sec_ptr section;
@ -432,19 +445,19 @@ static const bfd_coff_backend_data ticoff0_swap_table =
coff_SWAP_scnhdr_out,
FILHSZ_V0, AOUTSZ, SCNHSZ_V01, SYMESZ, AUXESZ, RELSZ_V0, LINESZ, FILNMLEN,
#ifdef COFF_LONG_FILENAMES
true,
TRUE,
#else
false,
FALSE,
#endif
#ifdef COFF_LONG_SECTION_NAMES
true,
TRUE,
#else
false,
FALSE,
#endif
#ifdef COFF_FORCE_SYMBOLS_IN_STRINGS
true,
TRUE,
#else
false,
FALSE,
#endif
#ifdef COFF_DEBUG_STRING_WIDE_PREFIX
4,
@ -473,20 +486,20 @@ static const bfd_coff_backend_data ticoff1_swap_table =
coff_SWAP_scnhdr_out,
FILHSZ, AOUTSZ, SCNHSZ_V01, SYMESZ, AUXESZ, RELSZ, LINESZ, FILNMLEN,
#ifdef COFF_LONG_FILENAMES
true,
TRUE,
#else
false,
FALSE,
#endif
#ifdef COFF_LONG_SECTION_NAMES
true,
TRUE,
#else
false,
FALSE,
#endif
COFF_DEFAULT_SECTION_ALIGNMENT_POWER,
#ifdef COFF_FORCE_SYMBOLS_IN_STRINGS
true,
TRUE,
#else
false,
FALSE,
#endif
#ifdef COFF_DEBUG_STRING_WIDE_PREFIX
4,

View File

@ -1,5 +1,5 @@
/* BFD back-end for Texas Instruments TMS320C80 Multimedia Video Processor (MVP).
Copyright 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
Copyright 1996, 1997, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Written by Fred Fish (fnf@cygnus.com)
@ -48,7 +48,7 @@ static bfd_reloc_status_type glob16_reloc
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static bfd_reloc_status_type local16_reloc
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static boolean coff_tic80_relocate_section
static bfd_boolean coff_tic80_relocate_section
PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
struct internal_reloc *, struct internal_syment *, asection **));
static reloc_howto_type * coff_tic80_rtype_to_howto
@ -63,295 +63,295 @@ static reloc_howto_type tic80_howto_table[] =
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
NULL, /* special_function */
"RELLONG", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
HOWTO (R_MPPCR, /* type */
2, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
true, /* pc_relative */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
NULL, /* special_function */
"MPPCR", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
true), /* pcrel_offset */
TRUE), /* pcrel_offset */
HOWTO (R_ABS, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
NULL, /* special_function */
"ABS", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
HOWTO (R_PPBASE, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
ppbase_reloc, /* special_function */
"PPBASE", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
HOWTO (R_PPLBASE, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
ppbase_reloc, /* special_function */
"PPLBASE", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
HOWTO (R_PP15, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
15, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
6, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
glob15_reloc, /* special_function */
"PP15", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0x1ffc0, /* src_mask */
0x1ffc0, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
HOWTO (R_PP15W, /* type */
2, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
15, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
6, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
glob15_reloc, /* special_function */
"PP15W", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0x1ffc0, /* src_mask */
0x1ffc0, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
HOWTO (R_PP15H, /* type */
1, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
15, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
6, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
glob15_reloc, /* special_function */
"PP15H", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0x1ffc0, /* src_mask */
0x1ffc0, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
HOWTO (R_PP16B, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
6, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
glob16_reloc, /* special_function */
"PP16B", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0x3ffc0, /* src_mask */
0x3ffc0, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
HOWTO (R_PPL15, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
15, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
NULL, /* special_function */
"PPL15", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0x7fff, /* src_mask */
0x7fff, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
HOWTO (R_PPL15W, /* type */
2, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
15, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
NULL, /* special_function */
"PPL15W", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0x7fff, /* src_mask */
0x7fff, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
HOWTO (R_PPL15H, /* type */
1, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
15, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
NULL, /* special_function */
"PPL15H", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0x7fff, /* src_mask */
0x7fff, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
HOWTO (R_PPL16B, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
local16_reloc, /* special_function */
"PPL16B", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
HOWTO (R_PPN15, /* type */
0, /* rightshift */
-2, /* size (0 = byte, 1 = short, 2 = long) */
15, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
6, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
glob15_reloc, /* special_function */
"PPN15", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0x1ffc0, /* src_mask */
0x1ffc0, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
HOWTO (R_PPN15W, /* type */
2, /* rightshift */
-2, /* size (0 = byte, 1 = short, 2 = long) */
15, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
6, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
glob15_reloc, /* special_function */
"PPN15W", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0x1ffc0, /* src_mask */
0x1ffc0, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
HOWTO (R_PPN15H, /* type */
1, /* rightshift */
-2, /* size (0 = byte, 1 = short, 2 = long) */
15, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
6, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
glob15_reloc, /* special_function */
"PPN15H", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0x1ffc0, /* src_mask */
0x1ffc0, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
HOWTO (R_PPN16B, /* type */
0, /* rightshift */
-2, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
6, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
glob16_reloc, /* special_function */
"PPN16B", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0x3ffc0, /* src_mask */
0x3ffc0, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
HOWTO (R_PPLN15, /* type */
0, /* rightshift */
-2, /* size (0 = byte, 1 = short, 2 = long) */
15, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
NULL, /* special_function */
"PPLN15", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0x7fff, /* src_mask */
0x7fff, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
HOWTO (R_PPLN15W, /* type */
2, /* rightshift */
-2, /* size (0 = byte, 1 = short, 2 = long) */
15, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
NULL, /* special_function */
"PPLN15W", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0x7fff, /* src_mask */
0x7fff, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
HOWTO (R_PPLN15H, /* type */
1, /* rightshift */
-2, /* size (0 = byte, 1 = short, 2 = long) */
15, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
NULL, /* special_function */
"PPLN15H", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0x7fff, /* src_mask */
0x7fff, /* dst_mask */
false), /* pcrel_offset */
FALSE), /* pcrel_offset */
HOWTO (R_PPLN16B, /* type */
0, /* rightshift */
-2, /* size (0 = byte, 1 = short, 2 = long) */
15, /* bitsize */
false, /* pc_relative */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
local16_reloc, /* special_function */
"PPLN16B", /* name */
true, /* partial_inplace */
TRUE, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
false) /* pcrel_offset */
FALSE) /* pcrel_offset */
};
/* Special relocation functions, used when the output file is not
@ -485,7 +485,7 @@ coff_tic80_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
/* We need a special relocation routine to handle the PP relocs. Most
of this is a copy of _bfd_coff_generic_relocate_section. */
static boolean
static bfd_boolean
coff_tic80_relocate_section (output_bfd, info, input_bfd,
input_section, contents, relocs, syms,
sections)
@ -540,7 +540,7 @@ coff_tic80_relocate_section (output_bfd, info, input_bfd,
howto = bfd_coff_rtype_to_howto (input_bfd, input_section, rel, h,
sym, &addend);
if (howto == NULL)
return false;
return FALSE;
val = 0;
@ -580,8 +580,8 @@ coff_tic80_relocate_section (output_bfd, info, input_bfd,
{
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd, input_section,
rel->r_vaddr - input_section->vma, true)))
return false;
rel->r_vaddr - input_section->vma, TRUE)))
return FALSE;
}
}
@ -687,7 +687,7 @@ coff_tic80_relocate_section (output_bfd, info, input_bfd,
bfd_archive_filename (input_bfd),
(unsigned long) rel->r_vaddr,
bfd_get_section_name (input_bfd, input_section));
return false;
return FALSE;
case bfd_reloc_overflow:
{
const char *name;
@ -701,17 +701,17 @@ coff_tic80_relocate_section (output_bfd, info, input_bfd,
{
name = _bfd_coff_internal_syment_name (input_bfd, sym, buf);
if (name == NULL)
return false;
return FALSE;
}
if (! ((*info->callbacks->reloc_overflow)
(info, name, howto->name, (bfd_vma) 0, input_bfd,
input_section, rel->r_vaddr - input_section->vma)))
return false;
return FALSE;
}
}
}
return true;
return TRUE;
}
#define TIC80COFF 1 /* Customize coffcode.h */

View File

@ -1,5 +1,6 @@
/* BFD back-end for WDC 65816 COFF binaries.
Copyright 1995, 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
Copyright 1995, 1996, 1997, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
Written by Steve Chamberlain, <sac@cygnus.com>.
This file is part of BFD, the Binary File Descriptor library.
@ -35,16 +36,16 @@ static void w65_reloc16_extra_cases PARAMS ((bfd *,struct bfd_link_info *, struc
#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (1)
static reloc_howto_type howto_table[] =
{
HOWTO (R_W65_ABS8, 0, 0, 8, false, 0, complain_overflow_bitfield, 0, "abs8", true, 0x000000ff, 0x000000ff, false),
HOWTO (R_W65_ABS16, 1, 0, 16, false, 0, complain_overflow_bitfield, 0, "abs16", true, 0x0000ffff, 0x0000ffff, false),
HOWTO (R_W65_ABS24, 0, 2, 32, false, 0, complain_overflow_bitfield, 0, "abs24", true, 0x00ffffff, 0x00ffffff, false),
HOWTO (R_W65_ABS8S8, 0, 0, 8, false, 0, complain_overflow_bitfield, 0, ">abs8", true, 0x000000ff, 0x000000ff, false),
HOWTO (R_W65_ABS8S16, 0, 0, 8, false, 0, complain_overflow_bitfield, 0, "^abs8", true, 0x000000ff, 0x000000ff, false),
HOWTO (R_W65_ABS16S8, 1, 0, 16, false, 0, complain_overflow_bitfield, 0, ">abs16", true, 0x0000ffff, 0x0000ffff, false),
HOWTO (R_W65_ABS16S16,1, 0, 16, false, 0, complain_overflow_bitfield, 0, "^abs16", true, 0x0000ffff, 0x0000ffff, false),
HOWTO (R_W65_PCR8, 0, 0, 8, false, 0, complain_overflow_bitfield, 0, "pcrel8", true, 0x000000ff, 0x000000ff, true),
HOWTO (R_W65_PCR16, 1, 0, 16, false, 0, complain_overflow_bitfield, 0, "pcrel16", true, 0x0000ffff, 0x0000ffff, true),
HOWTO (R_W65_DP, 0, 0, 8, false, 0, complain_overflow_bitfield, 0, "dp", true, 0x000000ff, 0x000000ff, false),
HOWTO (R_W65_ABS8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield, 0, "abs8", TRUE, 0x000000ff, 0x000000ff, FALSE),
HOWTO (R_W65_ABS16, 1, 0, 16, FALSE, 0, complain_overflow_bitfield, 0, "abs16", TRUE, 0x0000ffff, 0x0000ffff, FALSE),
HOWTO (R_W65_ABS24, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, 0, "abs24", TRUE, 0x00ffffff, 0x00ffffff, FALSE),
HOWTO (R_W65_ABS8S8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield, 0, ">abs8", TRUE, 0x000000ff, 0x000000ff, FALSE),
HOWTO (R_W65_ABS8S16, 0, 0, 8, FALSE, 0, complain_overflow_bitfield, 0, "^abs8", TRUE, 0x000000ff, 0x000000ff, FALSE),
HOWTO (R_W65_ABS16S8, 1, 0, 16, FALSE, 0, complain_overflow_bitfield, 0, ">abs16", TRUE, 0x0000ffff, 0x0000ffff, FALSE),
HOWTO (R_W65_ABS16S16,1, 0, 16, FALSE, 0, complain_overflow_bitfield, 0, "^abs16", TRUE, 0x0000ffff, 0x0000ffff, FALSE),
HOWTO (R_W65_PCR8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield, 0, "pcrel8", TRUE, 0x000000ff, 0x000000ff, TRUE),
HOWTO (R_W65_PCR16, 1, 0, 16, FALSE, 0, complain_overflow_bitfield, 0, "pcrel16", TRUE, 0x0000ffff, 0x0000ffff, TRUE),
HOWTO (R_W65_DP, 0, 0, 8, FALSE, 0, complain_overflow_bitfield, 0, "dp", TRUE, 0x000000ff, 0x000000ff, FALSE),
};
/* Turn a howto into a reloc number. */

View File

@ -1,5 +1,6 @@
/* BFD back-end for we32k COFF files.
Copyright 1992, 1993, 1994, 1999, 2000 Free Software Foundation, Inc.
Copyright 1992, 1993, 1994, 1999, 2000, 2002
Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@cs.widener.edu).
This file is part of BFD, the Binary File Descriptor library.
@ -35,7 +36,7 @@ static reloc_howto_type howto_table[] =
EMPTY_HOWTO (3),
EMPTY_HOWTO (4),
EMPTY_HOWTO (5),
HOWTO(R_DIR32, 0, 2, 32, false, 0,complain_overflow_bitfield, 0, "dir32", true, 0xffffffff,0xffffffff, false),
HOWTO(R_DIR32, 0, 2, 32, FALSE, 0,complain_overflow_bitfield, 0, "dir32", TRUE, 0xffffffff,0xffffffff, FALSE),
EMPTY_HOWTO (7),
EMPTY_HOWTO (010),
EMPTY_HOWTO (011),
@ -44,12 +45,12 @@ static reloc_howto_type howto_table[] =
EMPTY_HOWTO (014),
EMPTY_HOWTO (015),
EMPTY_HOWTO (016),
HOWTO(R_RELBYTE, 0, 0, 8, false, 0, complain_overflow_bitfield, 0, "8", true, 0x000000ff,0x000000ff, false),
HOWTO(R_RELWORD, 0, 1, 16, false, 0, complain_overflow_bitfield, 0, "16", true, 0x0000ffff,0x0000ffff, false),
HOWTO(R_RELLONG, 0, 2, 32, false, 0, complain_overflow_bitfield, 0, "32", true, 0xffffffff,0xffffffff, false),
HOWTO(R_PCRBYTE, 0, 0, 8, true, 0, complain_overflow_signed, 0, "DISP8", true, 0x000000ff,0x000000ff, false),
HOWTO(R_PCRWORD, 0, 1, 16, true, 0, complain_overflow_signed, 0, "DISP16", true, 0x0000ffff,0x0000ffff, false),
HOWTO(R_PCRLONG, 0, 2, 32, true, 0, complain_overflow_signed, 0, "DISP32", true, 0xffffffff,0xffffffff, false),
HOWTO(R_RELBYTE, 0, 0, 8, FALSE, 0, complain_overflow_bitfield, 0, "8", TRUE, 0x000000ff,0x000000ff, FALSE),
HOWTO(R_RELWORD, 0, 1, 16, FALSE, 0, complain_overflow_bitfield, 0, "16", TRUE, 0x0000ffff,0x0000ffff, FALSE),
HOWTO(R_RELLONG, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, 0, "32", TRUE, 0xffffffff,0xffffffff, FALSE),
HOWTO(R_PCRBYTE, 0, 0, 8, TRUE, 0, complain_overflow_signed, 0, "DISP8", TRUE, 0x000000ff,0x000000ff, FALSE),
HOWTO(R_PCRWORD, 0, 1, 16, TRUE, 0, complain_overflow_signed, 0, "DISP16", TRUE, 0x0000ffff,0x0000ffff, FALSE),
HOWTO(R_PCRLONG, 0, 2, 32, TRUE, 0, complain_overflow_signed, 0, "DISP32", TRUE, 0xffffffff,0xffffffff, FALSE),
};
/* Turn a howto into a reloc nunmber */

View File

@ -1,5 +1,5 @@
/* BFD back-end for Zilog Z800n COFF binaries.
Copyright 1992, 1993, 1994, 1995, 1997, 1999, 2000, 2001
Copyright 1992, 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
Contributed by Cygnus Support.
Written by Steve Chamberlain, <sac@cygnus.com>.
@ -36,40 +36,40 @@ static int coff_z8k_select_reloc PARAMS ((reloc_howto_type *));
#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (1)
static reloc_howto_type r_imm32 =
HOWTO (R_IMM32, 0, 2, 32, false, 0,
complain_overflow_bitfield, 0, "r_imm32", true, 0xffffffff,
0xffffffff, false);
HOWTO (R_IMM32, 0, 2, 32, FALSE, 0,
complain_overflow_bitfield, 0, "r_imm32", TRUE, 0xffffffff,
0xffffffff, FALSE);
static reloc_howto_type r_imm4l =
HOWTO (R_IMM4L, 0, 0, 4, false, 0,
complain_overflow_bitfield, 0, "r_imm4l", true, 0xf, 0xf, false);
HOWTO (R_IMM4L, 0, 0, 4, FALSE, 0,
complain_overflow_bitfield, 0, "r_imm4l", TRUE, 0xf, 0xf, FALSE);
static reloc_howto_type r_da =
HOWTO (R_IMM16, 0, 1, 16, false, 0,
complain_overflow_bitfield, 0, "r_da", true, 0x0000ffff, 0x0000ffff,
false);
HOWTO (R_IMM16, 0, 1, 16, FALSE, 0,
complain_overflow_bitfield, 0, "r_da", TRUE, 0x0000ffff, 0x0000ffff,
FALSE);
static reloc_howto_type r_imm8 =
HOWTO (R_IMM8, 0, 0, 8, false, 0,
complain_overflow_bitfield, 0, "r_imm8", true, 0x000000ff, 0x000000ff,
false);
HOWTO (R_IMM8, 0, 0, 8, FALSE, 0,
complain_overflow_bitfield, 0, "r_imm8", TRUE, 0x000000ff, 0x000000ff,
FALSE);
static reloc_howto_type r_rel16 =
HOWTO (R_REL16, 0, 1, 16, false, 0,
complain_overflow_bitfield, 0, "r_rel16", true, 0x0000ffff, 0x0000ffff,
true);
HOWTO (R_REL16, 0, 1, 16, FALSE, 0,
complain_overflow_bitfield, 0, "r_rel16", TRUE, 0x0000ffff, 0x0000ffff,
TRUE);
static reloc_howto_type r_jr =
HOWTO (R_JR, 0, 0, 8, true, 0, complain_overflow_signed, 0,
"r_jr", true, 0, 0, true);
HOWTO (R_JR, 0, 0, 8, TRUE, 0, complain_overflow_signed, 0,
"r_jr", TRUE, 0, 0, TRUE);
static reloc_howto_type r_disp7 =
HOWTO (R_DISP7, 0, 0, 7, true, 0, complain_overflow_bitfield, 0,
"r_disp7", true, 0, 0, true);
HOWTO (R_DISP7, 0, 0, 7, TRUE, 0, complain_overflow_bitfield, 0,
"r_disp7", TRUE, 0, 0, TRUE);
static reloc_howto_type r_callr =
HOWTO (R_CALLR, 0, 1, 12, true, 0, complain_overflow_signed, 0,
"r_callr", true, 0xfff, 0xfff, true);
HOWTO (R_CALLR, 0, 1, 12, TRUE, 0, complain_overflow_signed, 0,
"r_callr", TRUE, 0xfff, 0xfff, TRUE);
/* Turn a howto into a reloc number */

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -46,19 +46,19 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
static void coff_fix_symbol_name
PARAMS ((bfd *, asymbol *, combined_entry_type *, bfd_size_type *,
asection **, bfd_size_type *));
static boolean coff_write_symbol
static bfd_boolean coff_write_symbol
PARAMS ((bfd *, asymbol *, combined_entry_type *, bfd_vma *,
bfd_size_type *, asection **, bfd_size_type *));
static boolean coff_write_alien_symbol
static bfd_boolean coff_write_alien_symbol
PARAMS ((bfd *, asymbol *, bfd_vma *, bfd_size_type *,
asection **, bfd_size_type *));
static boolean coff_write_native_symbol
static bfd_boolean coff_write_native_symbol
PARAMS ((bfd *, coff_symbol_type *, bfd_vma *, bfd_size_type *,
asection **, bfd_size_type *));
static void coff_pointerize_aux
PARAMS ((bfd *, combined_entry_type *, combined_entry_type *,
unsigned int, combined_entry_type *));
static boolean make_a_section_from_file
static bfd_boolean make_a_section_from_file
PARAMS ((bfd *, struct internal_scnhdr *, unsigned int));
static const bfd_target *coff_real_object_p
PARAMS ((bfd *, unsigned, struct internal_filehdr *,
@ -74,7 +74,7 @@ static char *copy_name
/* Take a section header read from a coff file (in HOST byte order),
and make a BFD "section" out of it. This is used by ECOFF. */
static boolean
static bfd_boolean
make_a_section_from_file (abfd, hdr, target_index)
bfd *abfd;
struct internal_scnhdr *hdr;
@ -82,7 +82,7 @@ make_a_section_from_file (abfd, hdr, target_index)
{
asection *return_section;
char *name;
boolean result = true;
bfd_boolean result = TRUE;
flagword flags;
name = NULL;
@ -103,14 +103,14 @@ make_a_section_from_file (abfd, hdr, target_index)
{
strings = _bfd_coff_read_string_table (abfd);
if (strings == NULL)
return false;
return FALSE;
/* FIXME: For extra safety, we should make sure that
strindex does not run us past the end, but right now we
don't know the length of the string table. */
strings += strindex;
name = bfd_alloc (abfd, (bfd_size_type) strlen (strings) + 1);
if (name == NULL)
return false;
return FALSE;
strcpy (name, strings);
}
}
@ -120,14 +120,14 @@ make_a_section_from_file (abfd, hdr, target_index)
/* Assorted wastage to null-terminate the name, thanks AT&T! */
name = bfd_alloc (abfd, (bfd_size_type) sizeof (hdr->s_name) + 1);
if (name == NULL)
return false;
return FALSE;
strncpy (name, (char *) &hdr->s_name[0], sizeof (hdr->s_name));
name[sizeof (hdr->s_name)] = 0;
}
return_section = bfd_make_section_anyway (abfd, name);
if (return_section == NULL)
return false;
return FALSE;
return_section->vma = hdr->s_vaddr;
return_section->lma = hdr->s_paddr;
@ -147,7 +147,7 @@ make_a_section_from_file (abfd, hdr, target_index)
if (! bfd_coff_styp_to_sec_flags_hook (abfd, hdr, name, return_section,
& flags))
result = false;
result = FALSE;
return_section->flags = flags;
@ -423,12 +423,12 @@ _bfd_coff_internal_syment_name (abfd, sym, buf)
}
/* Read in and swap the relocs. This returns a buffer holding the
relocs for section SEC in file ABFD. If CACHE is true and
relocs for section SEC in file ABFD. If CACHE is TRUE and
INTERNAL_RELOCS is NULL, the relocs read in will be saved in case
the function is called again. If EXTERNAL_RELOCS is not NULL, it
is a buffer large enough to hold the unswapped relocs. If
INTERNAL_RELOCS is not NULL, it is a buffer large enough to hold
the swapped relocs. If REQUIRE_INTERNAL is true, then the return
the swapped relocs. If REQUIRE_INTERNAL is TRUE, then the return
value must be INTERNAL_RELOCS. The function returns NULL on error. */
struct internal_reloc *
@ -436,9 +436,9 @@ _bfd_coff_read_internal_relocs (abfd, sec, cache, external_relocs,
require_internal, internal_relocs)
bfd *abfd;
asection *sec;
boolean cache;
bfd_boolean cache;
bfd_byte *external_relocs;
boolean require_internal;
bfd_boolean require_internal;
struct internal_reloc *internal_relocs;
{
bfd_size_type relsz;
@ -565,7 +565,7 @@ coff_count_linenumbers (abfd)
do
{
asection * sec = q->symbol.section->output_section;
/* Do not try to update fields in read-only sections. */
if (! bfd_is_const_section (sec))
sec->lineno_count ++;
@ -656,7 +656,7 @@ fixup_symbol_value (abfd, coff_symbol_ptr, syment)
chain, and that the last one points to the first external symbol. We
do that here too. */
boolean
bfd_boolean
coff_renumber_symbols (bfd_ptr, first_undef)
bfd *bfd_ptr;
int *first_undef;
@ -685,7 +685,7 @@ coff_renumber_symbols (bfd_ptr, first_undef)
amt = sizeof (asymbol *) * ((bfd_size_type) symbol_count + 1);
newsyms = (asymbol **) bfd_alloc (bfd_ptr, amt);
if (!newsyms)
return false;
return FALSE;
bfd_ptr->outsymbols = newsyms;
for (i = 0; i < symbol_count; i++)
if ((symbol_ptr_ptr[i]->flags & BSF_NOT_AT_END) != 0
@ -748,7 +748,7 @@ coff_renumber_symbols (bfd_ptr, first_undef)
}
obj_conv_table_size (bfd_ptr) = native_index;
return true;
return TRUE;
}
/* Run thorough the symbol table again, and fix it so that all
@ -943,7 +943,7 @@ coff_fix_symbol_name (abfd, symbol, native, string_size_p,
/* Write a symbol out to a COFF file. */
static boolean
static bfd_boolean
coff_write_symbol (abfd, symbol, native, written, string_size_p,
debug_string_section_p, debug_string_size_p)
bfd *abfd;
@ -988,10 +988,10 @@ coff_write_symbol (abfd, symbol, native, written, string_size_p,
symesz = bfd_coff_symesz (abfd);
buf = bfd_alloc (abfd, symesz);
if (!buf)
return false;
return FALSE;
bfd_coff_swap_sym_out (abfd, &native->u.syment, buf);
if (bfd_bwrite (buf, symesz, abfd) != symesz)
return false;
return FALSE;
bfd_release (abfd, buf);
if (native->u.syment.n_numaux > 0)
@ -1002,7 +1002,7 @@ coff_write_symbol (abfd, symbol, native, written, string_size_p,
auxesz = bfd_coff_auxesz (abfd);
buf = bfd_alloc (abfd, auxesz);
if (!buf)
return false;
return FALSE;
for (j = 0; j < native->u.syment.n_numaux; j++)
{
bfd_coff_swap_aux_out (abfd,
@ -1013,7 +1013,7 @@ coff_write_symbol (abfd, symbol, native, written, string_size_p,
native->u.syment.n_numaux,
buf);
if (bfd_bwrite (buf, auxesz, abfd) != auxesz)
return false;
return FALSE;
}
bfd_release (abfd, buf);
}
@ -1022,14 +1022,14 @@ coff_write_symbol (abfd, symbol, native, written, string_size_p,
set_index (symbol, *written);
*written += numaux + 1;
return true;
return TRUE;
}
/* Write out a symbol to a COFF file that does not come from a COFF
file originally. This symbol may have been created by the linker,
or we may be linking a non COFF file to a COFF file. */
static boolean
static bfd_boolean
coff_write_alien_symbol (abfd, symbol, written, string_size_p,
debug_string_section_p, debug_string_size_p)
bfd *abfd;
@ -1062,7 +1062,7 @@ coff_write_alien_symbol (abfd, symbol, written, string_size_p,
format. So, we just ignore them. We must clobber the symbol
name to keep it from being put in the string table. */
symbol->name = "";
return true;
return TRUE;
}
else
{
@ -1097,7 +1097,7 @@ coff_write_alien_symbol (abfd, symbol, written, string_size_p,
/* Write a native symbol to a COFF file. */
static boolean
static bfd_boolean
coff_write_native_symbol (abfd, symbol, written, string_size_p,
debug_string_section_p, debug_string_size_p)
bfd *abfd;
@ -1153,7 +1153,7 @@ coff_write_native_symbol (abfd, symbol, written, string_size_p,
#endif
count++;
}
symbol->done_lineno = true;
symbol->done_lineno = TRUE;
if (! bfd_is_const_section (symbol->symbol.section->output_section))
symbol->symbol.section->output_section->moving_line_filepos +=
@ -1167,7 +1167,7 @@ coff_write_native_symbol (abfd, symbol, written, string_size_p,
/* Write out the COFF symbols. */
boolean
bfd_boolean
coff_write_symbols (abfd)
bfd *abfd;
{
@ -1203,7 +1203,7 @@ coff_write_symbols (abfd)
/* Seek to the right place */
if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0)
return false;
return FALSE;
/* Output all the symbols we have */
@ -1219,14 +1219,14 @@ coff_write_symbols (abfd)
if (!coff_write_alien_symbol (abfd, symbol, &written, &string_size,
&debug_string_section,
&debug_string_size))
return false;
return FALSE;
}
else
{
if (!coff_write_native_symbol (abfd, c_symbol, &written,
&string_size, &debug_string_section,
&debug_string_size))
return false;
return FALSE;
}
}
@ -1246,7 +1246,7 @@ coff_write_symbols (abfd)
#endif
if (bfd_bwrite ((PTR) buffer, (bfd_size_type) sizeof (buffer), abfd)
!= sizeof (buffer))
return false;
return FALSE;
/* Handle long section names. This code must handle section
names just as they are handled in coff_write_object_contents. */
@ -1263,7 +1263,7 @@ coff_write_symbols (abfd)
{
if (bfd_bwrite (o->name, (bfd_size_type) (len + 1), abfd)
!= len + 1)
return false;
return FALSE;
}
}
}
@ -1304,7 +1304,7 @@ coff_write_symbols (abfd)
if (bfd_coff_force_symnames_in_strings (abfd))
{
if (bfd_bwrite (".file", (bfd_size_type) 6, abfd) != 6)
return false;
return FALSE;
}
maxlen = bfd_coff_filnmlen (abfd);
}
@ -1315,7 +1315,7 @@ coff_write_symbols (abfd)
{
if (bfd_bwrite ((PTR) (q->name), (bfd_size_type) name_length + 1,
abfd) != name_length + 1)
return false;
return FALSE;
}
}
}
@ -1334,7 +1334,7 @@ coff_write_symbols (abfd)
#endif
if (bfd_bwrite ((PTR) buffer, (bfd_size_type) STRING_SIZE_SIZE, abfd)
!= STRING_SIZE_SIZE)
return false;
return FALSE;
}
/* Make sure the .debug section was created to be the correct size.
@ -1348,10 +1348,10 @@ coff_write_symbols (abfd)
1 << debug_string_section->alignment_power)
== bfd_section_size (abfd, debug_string_section))));
return true;
return TRUE;
}
boolean
bfd_boolean
coff_write_linenumbers (abfd)
bfd *abfd;
{
@ -1362,14 +1362,14 @@ coff_write_linenumbers (abfd)
linesz = bfd_coff_linesz (abfd);
buff = bfd_alloc (abfd, linesz);
if (!buff)
return false;
return FALSE;
for (s = abfd->sections; s != (asection *) NULL; s = s->next)
{
if (s->lineno_count)
{
asymbol **q = abfd->outsymbols;
if (bfd_seek (abfd, s->line_filepos, SEEK_SET) != 0)
return false;
return FALSE;
/* Find all the linenumbers in this section */
while (*q)
{
@ -1389,7 +1389,7 @@ coff_write_linenumbers (abfd)
bfd_coff_swap_lineno_out (abfd, &out, buff);
if (bfd_bwrite (buff, (bfd_size_type) linesz, abfd)
!= linesz)
return false;
return FALSE;
l++;
while (l->line_number)
{
@ -1398,7 +1398,7 @@ coff_write_linenumbers (abfd)
bfd_coff_swap_lineno_out (abfd, &out, buff);
if (bfd_bwrite (buff, (bfd_size_type) linesz, abfd)
!= linesz)
return false;
return FALSE;
l++;
}
}
@ -1408,7 +1408,7 @@ coff_write_linenumbers (abfd)
}
}
bfd_release (abfd, buff);
return true;
return TRUE;
}
alent *
@ -1585,7 +1585,7 @@ copy_name (abfd, name, maxlen)
/* Read in the external symbols. */
boolean
bfd_boolean
_bfd_coff_get_external_symbols (abfd)
bfd *abfd;
{
@ -1594,7 +1594,7 @@ _bfd_coff_get_external_symbols (abfd)
PTR syms;
if (obj_coff_external_syms (abfd) != NULL)
return true;
return TRUE;
symesz = bfd_coff_symesz (abfd);
@ -1602,19 +1602,19 @@ _bfd_coff_get_external_symbols (abfd)
syms = (PTR) bfd_malloc (size);
if (syms == NULL && size != 0)
return false;
return FALSE;
if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0
|| bfd_bread (syms, size, abfd) != size)
{
if (syms != NULL)
free (syms);
return false;
return FALSE;
}
obj_coff_external_syms (abfd) = syms;
return true;
return TRUE;
}
/* Read in the external strings. The strings are not loaded until
@ -1689,7 +1689,7 @@ _bfd_coff_read_string_table (abfd)
/* Free up the external symbols and strings read from a COFF file. */
boolean
bfd_boolean
_bfd_coff_free_symbols (abfd)
bfd *abfd;
{
@ -1705,7 +1705,7 @@ _bfd_coff_free_symbols (abfd)
free (obj_coff_strings (abfd));
obj_coff_strings (abfd) = NULL;
}
return true;
return TRUE;
}
/* Read a symbol table into freshly bfd_allocated memory, swap it, and
@ -1777,7 +1777,7 @@ coff_get_normalized_symtab (abfd)
}
/* Free the raw symbols, but not the strings (if we have them). */
obj_coff_keep_strings (abfd) = true;
obj_coff_keep_strings (abfd) = TRUE;
if (! _bfd_coff_free_symbols (abfd))
return NULL;
@ -1909,7 +1909,7 @@ coff_make_empty_symbol (abfd)
new->symbol.section = 0;
new->native = 0;
new->lineno = (alent *) NULL;
new->done_lineno = false;
new->done_lineno = FALSE;
new->symbol.the_bfd = abfd;
return &new->symbol;
}
@ -1935,7 +1935,7 @@ coff_bfd_make_debug_symbol (abfd, ptr, sz)
new->symbol.section = bfd_abs_section_ptr;
new->symbol.flags = BSF_DEBUGGING;
new->lineno = (alent *) NULL;
new->done_lineno = false;
new->done_lineno = FALSE;
new->symbol.the_bfd = abfd;
return &new->symbol;
}
@ -1957,7 +1957,7 @@ coff_get_symbol_info (abfd, symbol, ret)
/* Return the COFF syment for a symbol. */
boolean
bfd_boolean
bfd_coff_get_syment (abfd, symbol, psyment)
bfd *abfd;
asymbol *symbol;
@ -1969,7 +1969,7 @@ bfd_coff_get_syment (abfd, symbol, psyment)
if (csym == NULL || csym->native == NULL)
{
bfd_set_error (bfd_error_invalid_operation);
return false;
return FALSE;
}
*psyment = csym->native->u.syment;
@ -1980,12 +1980,12 @@ bfd_coff_get_syment (abfd, symbol, psyment)
/* FIXME: We should handle fix_line here. */
return true;
return TRUE;
}
/* Return the COFF auxent for a symbol. */
boolean
bfd_boolean
bfd_coff_get_auxent (abfd, symbol, indx, pauxent)
bfd *abfd;
asymbol *symbol;
@ -2002,7 +2002,7 @@ bfd_coff_get_auxent (abfd, symbol, indx, pauxent)
|| indx >= csym->native->u.syment.n_numaux)
{
bfd_set_error (bfd_error_invalid_operation);
return false;
return FALSE;
}
ent = csym->native + indx + 1;
@ -2024,7 +2024,7 @@ bfd_coff_get_auxent (abfd, symbol, indx, pauxent)
((combined_entry_type *) pauxent->x_csect.x_scnlen.p
- obj_raw_syments (abfd));
return true;
return TRUE;
}
/* Print out information about COFF symbol. */
@ -2191,19 +2191,19 @@ coff_print_symbol (abfd, filep, symbol, how)
function for the is_local_label_name entry point, but some may
override it. */
boolean
bfd_boolean
_bfd_coff_is_local_label_name (abfd, name)
bfd *abfd ATTRIBUTE_UNUSED;
const char *name;
{
return (boolean) (name[0] == '.' && name[1] == 'L');
return name[0] == '.' && name[1] == 'L';
}
/* Provided a BFD, a section and an offset (in bytes, not octets) into the
section, calculate and return the name of the source file and the line
nearest to the wanted location. */
boolean
bfd_boolean
coff_find_nearest_line (abfd, section, symbols, offset, filename_ptr,
functionname_ptr, line_ptr)
bfd *abfd;
@ -2214,7 +2214,7 @@ coff_find_nearest_line (abfd, section, symbols, offset, filename_ptr,
const char **functionname_ptr;
unsigned int *line_ptr;
{
boolean found;
bfd_boolean found;
unsigned int i;
unsigned int line_base;
coff_data_type *cof = coff_data (abfd);
@ -2231,17 +2231,17 @@ coff_find_nearest_line (abfd, section, symbols, offset, filename_ptr,
&found, filename_ptr,
functionname_ptr, line_ptr,
&coff_data(abfd)->line_info))
return false;
return FALSE;
if (found)
return true;
return TRUE;
/* Also try examining DWARF2 debugging information. */
if (_bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset,
filename_ptr, functionname_ptr,
line_ptr, 0,
&coff_data(abfd)->dwarf2_find_line_info))
return true;
return TRUE;
*filename_ptr = 0;
*functionname_ptr = 0;
@ -2249,15 +2249,15 @@ coff_find_nearest_line (abfd, section, symbols, offset, filename_ptr,
/* Don't try and find line numbers in a non coff file */
if (!bfd_family_coff (abfd))
return false;
return FALSE;
if (cof == NULL)
return false;
return FALSE;
/* Find the first C_FILE symbol. */
p = cof->raw_syments;
if (!p)
return false;
return FALSE;
pend = p + cof->raw_syment_count;
while (p < pend)
@ -2410,13 +2410,13 @@ coff_find_nearest_line (abfd, section, symbols, offset, filename_ptr,
sec_data->line_base = line_base;
}
return true;
return TRUE;
}
int
coff_sizeof_headers (abfd, reloc)
bfd *abfd;
boolean reloc;
bfd_boolean reloc;
{
size_t size;
@ -2434,7 +2434,7 @@ coff_sizeof_headers (abfd, reloc)
}
/* Change the class of a coff symbol held by BFD. */
boolean
bfd_boolean
bfd_coff_set_symbol_class (abfd, symbol, class)
bfd * abfd;
asymbol * symbol;
@ -2446,7 +2446,7 @@ bfd_coff_set_symbol_class (abfd, symbol, class)
if (csym == NULL)
{
bfd_set_error (bfd_error_invalid_operation);
return false;
return FALSE;
}
else if (csym->native == NULL)
{
@ -2460,7 +2460,7 @@ bfd_coff_set_symbol_class (abfd, symbol, class)
native = (combined_entry_type *) bfd_zalloc (abfd, amt);
if (native == NULL)
return false;
return FALSE;
native->u.syment.n_type = T_NULL;
native->u.syment.n_sclass = class;
@ -2496,5 +2496,5 @@ bfd_coff_set_symbol_class (abfd, symbol, class)
csym->native->u.syment.n_sclass = class;
}
return true;
return TRUE;
}

File diff suppressed because it is too large Load Diff

View File

@ -83,21 +83,21 @@ FUNCTION
core_file_matches_executable_p
SYNOPSIS
boolean core_file_matches_executable_p
bfd_boolean core_file_matches_executable_p
(bfd *core_bfd, bfd *exec_bfd);
DESCRIPTION
Return <<true>> if the core file attached to @var{core_bfd}
Return <<TRUE>> if the core file attached to @var{core_bfd}
was generated by a run of the executable file attached to
@var{exec_bfd}, <<false>> otherwise.
@var{exec_bfd}, <<FALSE>> otherwise.
*/
boolean
bfd_boolean
core_file_matches_executable_p (core_bfd, exec_bfd)
bfd *core_bfd, *exec_bfd;
{
if ((core_bfd->format != bfd_core) || (exec_bfd->format != bfd_object)) {
bfd_set_error (bfd_error_wrong_format);
return false;
return FALSE;
}
return BFD_SEND (core_bfd, _core_file_matches_executable_p,

View File

@ -1,5 +1,5 @@
/* BFD support for the AMD 29000 architecture.
Copyright 1992, 2000 Free Software Foundation, Inc.
Copyright 1992, 2000, 2002 Free Software Foundation, Inc.
Hacked by Steve Chamberlain of Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@ -32,7 +32,7 @@ const bfd_arch_info_type bfd_a29k_arch =
"a29k",
"a29k",
4,
true, /* the one and only */
TRUE, /* the one and only */
bfd_default_compatible,
bfd_default_scan ,
0,

View File

@ -1,5 +1,5 @@
/* BFD support for the Alpha architecture.
Copyright 1992, 1993, 1998, 2000 Free Software Foundation, Inc.
Copyright 1992, 1993, 1998, 2000, 2002 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@ -42,10 +42,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* These exist only so that we can resonably disassemble PALcode. */
static const bfd_arch_info_type arch_info_struct[] =
{
N (64, 64, bfd_mach_alpha_ev4, "alpha:ev4", false, NN(1)),
N (64, 64, bfd_mach_alpha_ev5, "alpha:ev5", false, NN(2)),
N (64, 64, bfd_mach_alpha_ev6, "alpha:ev6", false, 0),
N (64, 64, bfd_mach_alpha_ev4, "alpha:ev4", FALSE, NN(1)),
N (64, 64, bfd_mach_alpha_ev5, "alpha:ev5", FALSE, NN(2)),
N (64, 64, bfd_mach_alpha_ev6, "alpha:ev6", FALSE, 0),
};
const bfd_arch_info_type bfd_alpha_arch =
N (64, 64, 0, "alpha", true, NN(0));
N (64, 64, 0, "alpha", TRUE, NN(0));

View File

@ -1,5 +1,5 @@
/* BFD support for the ARC processor
Copyright 1994, 1995, 1997, 2001 Free Software Foundation, Inc.
Copyright 1994, 1995, 1997, 2001, 2002 Free Software Foundation, Inc.
Contributed by Doug Evans (dje@cygnus.com).
This file is part of BFD, the Binary File Descriptor library.
@ -40,15 +40,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
static const bfd_arch_info_type arch_info_struct[] =
{
ARC ( bfd_mach_arc_5, "arc5", false, &arch_info_struct[1] ),
ARC ( bfd_mach_arc_5, "base", false, &arch_info_struct[2] ),
ARC ( bfd_mach_arc_6, "arc6", false, &arch_info_struct[3] ),
ARC ( bfd_mach_arc_7, "arc7", false, &arch_info_struct[4] ),
ARC ( bfd_mach_arc_8, "arc8", false, NULL ),
ARC ( bfd_mach_arc_5, "arc5", FALSE, &arch_info_struct[1] ),
ARC ( bfd_mach_arc_5, "base", FALSE, &arch_info_struct[2] ),
ARC ( bfd_mach_arc_6, "arc6", FALSE, &arch_info_struct[3] ),
ARC ( bfd_mach_arc_7, "arc7", FALSE, &arch_info_struct[4] ),
ARC ( bfd_mach_arc_8, "arc8", FALSE, NULL ),
};
const bfd_arch_info_type bfd_arc_arch =
ARC ( bfd_mach_arc_6, "arc", true, &arch_info_struct[0] );
ARC ( bfd_mach_arc_6, "arc", TRUE, &arch_info_struct[0] );
/* Utility routines. */

View File

@ -24,7 +24,7 @@
static const bfd_arch_info_type * compatible
PARAMS ((const bfd_arch_info_type *, const bfd_arch_info_type *));
static boolean scan
static bfd_boolean scan
PARAMS ((const struct bfd_arch_info *, const char *));
/* This routine is provided two arch_infos and works out which ARM
@ -98,7 +98,7 @@ processors[] =
{ bfd_mach_arm_XScale, "xscale" }
};
static boolean
static bfd_boolean
scan (info, string)
const struct bfd_arch_info * info;
const char * string;
@ -107,7 +107,7 @@ scan (info, string)
/* First test for an exact match. */
if (strcasecmp (string, info->printable_name) == 0)
return true;
return TRUE;
/* Next check for a processor name instead of an Architecture name. */
for (i = sizeof (processors) / sizeof (processors[0]); i--;)
@ -117,13 +117,13 @@ scan (info, string)
}
if (i != -1 && info->mach == processors [i].mach)
return true;
return TRUE;
/* Finally check for the default architecture. */
if (strcasecmp (string, "arm") == 0)
return info->the_default;
return false;
return FALSE;
}
#define N(number, print, default, next) \
@ -131,17 +131,17 @@ scan (info, string)
static const bfd_arch_info_type arch_info_struct[] =
{
N (bfd_mach_arm_2, "armv2", false, & arch_info_struct[1]),
N (bfd_mach_arm_2a, "armv2a", false, & arch_info_struct[2]),
N (bfd_mach_arm_3, "armv3", false, & arch_info_struct[3]),
N (bfd_mach_arm_3M, "armv3m", false, & arch_info_struct[4]),
N (bfd_mach_arm_4, "armv4", false, & arch_info_struct[5]),
N (bfd_mach_arm_4T, "armv4t", false, & arch_info_struct[6]),
N (bfd_mach_arm_5, "armv5", false, & arch_info_struct[7]),
N (bfd_mach_arm_5T, "armv5t", false, & arch_info_struct[8]),
N (bfd_mach_arm_5TE, "armv5te", false, & arch_info_struct[9]),
N (bfd_mach_arm_XScale, "xscale", false, NULL)
N (bfd_mach_arm_2, "armv2", FALSE, & arch_info_struct[1]),
N (bfd_mach_arm_2a, "armv2a", FALSE, & arch_info_struct[2]),
N (bfd_mach_arm_3, "armv3", FALSE, & arch_info_struct[3]),
N (bfd_mach_arm_3M, "armv3m", FALSE, & arch_info_struct[4]),
N (bfd_mach_arm_4, "armv4", FALSE, & arch_info_struct[5]),
N (bfd_mach_arm_4T, "armv4t", FALSE, & arch_info_struct[6]),
N (bfd_mach_arm_5, "armv5", FALSE, & arch_info_struct[7]),
N (bfd_mach_arm_5T, "armv5t", FALSE, & arch_info_struct[8]),
N (bfd_mach_arm_5TE, "armv5te", FALSE, & arch_info_struct[9]),
N (bfd_mach_arm_XScale, "xscale", FALSE, NULL)
};
const bfd_arch_info_type bfd_arm_arch =
N (0, "arm", true, & arch_info_struct[0]);
N (0, "arm", TRUE, & arch_info_struct[0]);

View File

@ -1,5 +1,5 @@
/* BFD library support routines for the AVR architecture.
Copyright 1999, 2000 Free Software Foundation, Inc.
Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
Contributed by Denis Chertykov <denisc@overta.ru>
This file is part of BFD, the Binary File Descriptor library.
@ -44,23 +44,23 @@ static const bfd_arch_info_type *compatible
static const bfd_arch_info_type arch_info_struct[] =
{
/* AT90S1200, ATtiny1x, ATtiny28 */
N (16, bfd_mach_avr1, "avr:1", false, & arch_info_struct[1]),
N (16, bfd_mach_avr1, "avr:1", FALSE, & arch_info_struct[1]),
/* AT90S2xxx, AT90S4xxx, AT90S8xxx, ATtiny22 */
N (16, bfd_mach_avr2, "avr:2", false, & arch_info_struct[2]),
N (16, bfd_mach_avr2, "avr:2", FALSE, & arch_info_struct[2]),
/* ATmega103, ATmega603 */
N (22, bfd_mach_avr3, "avr:3", false, & arch_info_struct[3]),
N (22, bfd_mach_avr3, "avr:3", FALSE, & arch_info_struct[3]),
/* ATmega83, ATmega85 */
N (16, bfd_mach_avr4, "avr:4", false, & arch_info_struct[4]),
N (16, bfd_mach_avr4, "avr:4", FALSE, & arch_info_struct[4]),
/* ATmega161, ATmega163, ATmega32, AT94K */
N (22, bfd_mach_avr5, "avr:5", false, NULL)
N (22, bfd_mach_avr5, "avr:5", FALSE, NULL)
};
const bfd_arch_info_type bfd_avr_arch =
N (16, bfd_mach_avr2, "avr", true, & arch_info_struct[0]);
N (16, bfd_mach_avr2, "avr", TRUE, & arch_info_struct[0]);
/* This routine is provided two arch_infos and works out which AVR
machine which would be compatible with both and returns a pointer

View File

@ -1,5 +1,5 @@
/* BFD support for the Axis CRIS architecture.
Copyright 2000 Free Software Foundation, Inc.
Copyright 2000, 2002 Free Software Foundation, Inc.
Contributed by Axis Communications AB.
Written by Hans-Peter Nilsson.
@ -38,7 +38,7 @@ bfd_cris_arch =
"cris", /* The printable name is the same. */
1, /* Section alignment power; each section
is aligned to (only) 2^1 bytes. */
true, /* This is the default "machine", since
TRUE, /* This is the default "machine", since
there's only one. */
bfd_default_compatible, /* A default function for testing
"machine" compatibility of two

View File

@ -1,5 +1,5 @@
/* BFD support for the D10V processor
Copyright 1996, 1999, 2000 Free Software Foundation, Inc.
Copyright 1996, 1999, 2000, 2002 Free Software Foundation, Inc.
Contributed by Martin Hunt (hunt@cygnus.com).
This file is part of BFD, the Binary File Descriptor library.
@ -32,7 +32,7 @@ static const bfd_arch_info_type d10v_ts3_info =
"d10v",
"d10v:ts3",
4, /* section alignment power */
false,
FALSE,
bfd_default_compatible,
bfd_default_scan,
0,
@ -48,7 +48,7 @@ static const bfd_arch_info_type d10v_ts2_info =
"d10v",
"d10v:ts2",
4, /* section alignment power */
false,
FALSE,
bfd_default_compatible,
bfd_default_scan,
&d10v_ts3_info,
@ -64,7 +64,7 @@ const bfd_arch_info_type bfd_d10v_arch =
"d10v",
"d10v",
4, /* section alignment power */
true,
TRUE,
bfd_default_compatible,
bfd_default_scan,
&d10v_ts2_info,

View File

@ -1,5 +1,5 @@
/* BFD support for the Mitsubishi D30V processor
Copyright 1997 Free Software Foundation, Inc.
Copyright 1997, 2002 Free Software Foundation, Inc.
Contributed by Martin Hunt (hunt@cygnus.com).
This file is part of BFD, the Binary File Descriptor library.
@ -32,7 +32,7 @@ const bfd_arch_info_type bfd_d30v_arch =
"d30v",
"d30v",
4, /* section alignment power */
true,
TRUE,
bfd_default_compatible,
bfd_default_scan,
0,

View File

@ -32,7 +32,7 @@ const bfd_arch_info_type bfd_dlx_arch =
"dlx",
"dlx",
4,
true, /* The one and only. */
TRUE, /* The one and only. */
bfd_default_compatible,
bfd_default_scan ,
0,

View File

@ -1,5 +1,5 @@
/* BFD support for the FR30 processor.
Copyright 1998 Free Software Foundation, Inc.
Copyright 1998, 2002 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@ -31,7 +31,7 @@ const bfd_arch_info_type bfd_fr30_arch =
"fr30", /* architecture name */
"fr30", /* printable name */
4, /* section align power */
true, /* the default ? */
TRUE, /* the default ? */
bfd_default_compatible, /* architecture comparison fn */
bfd_default_scan, /* string to architecture convert fn */
NULL /* next in list */

View File

@ -1,5 +1,5 @@
/* BFD support for the FRV processor.
Copyright (C) 2002 Free Software Foundation, Inc.
Copyright 2002 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@ -45,20 +45,20 @@ enum {
}
static const bfd_arch_info_type arch_info_300
= FRV_ARCH (bfd_mach_fr300, "fr300", false, (bfd_arch_info_type *)0);
= FRV_ARCH (bfd_mach_fr300, "fr300", FALSE, (bfd_arch_info_type *)0);
static const bfd_arch_info_type arch_info_400
= FRV_ARCH (bfd_mach_fr400, "fr400", false, &arch_info_300);
= FRV_ARCH (bfd_mach_fr400, "fr400", FALSE, &arch_info_300);
static const bfd_arch_info_type arch_info_500
= FRV_ARCH (bfd_mach_fr500, "fr500", false, &arch_info_400);
= FRV_ARCH (bfd_mach_fr500, "fr500", FALSE, &arch_info_400);
static const bfd_arch_info_type arch_info_simple
= FRV_ARCH (bfd_mach_frvsimple, "simple", false, &arch_info_500);
= FRV_ARCH (bfd_mach_frvsimple, "simple", FALSE, &arch_info_500);
static const bfd_arch_info_type arch_info_tomcat
= FRV_ARCH (bfd_mach_frvtomcat, "tomcat", false, &arch_info_simple);
= FRV_ARCH (bfd_mach_frvtomcat, "tomcat", FALSE, &arch_info_simple);
const bfd_arch_info_type bfd_frv_arch
= FRV_ARCH (bfd_mach_frv, "frv", true, &arch_info_tomcat);
= FRV_ARCH (bfd_mach_frv, "frv", TRUE, &arch_info_tomcat);

View File

@ -23,35 +23,35 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "sysdep.h"
#include "libbfd.h"
static boolean h8300_scan
static bfd_boolean h8300_scan
PARAMS ((const struct bfd_arch_info *, const char *));
static const bfd_arch_info_type * compatible
PARAMS ((const bfd_arch_info_type *, const bfd_arch_info_type *));
static boolean
static bfd_boolean
h8300_scan (info, string)
const struct bfd_arch_info *info;
const char *string;
{
if (*string != 'h' && *string != 'H')
return false;
return FALSE;
string++;
if (*string != '8')
return false;
return FALSE;
string++;
if (*string == '/')
string++;
if (*string != '3')
return false;
return FALSE;
string++;
if (*string != '0')
return false;
return FALSE;
string++;
if (*string != '0')
return false;
return FALSE;
string++;
if (*string == '-')
string++;
@ -107,7 +107,7 @@ static const bfd_arch_info_type h8300s_info_struct =
"h8300s", /* arch_name */
"h8300s", /* printable name */
1,
false, /* the default machine */
FALSE, /* the default machine */
compatible,
h8300_scan,
0
@ -123,7 +123,7 @@ static const bfd_arch_info_type h8300h_info_struct =
"h8300h", /* arch_name */
"h8300h", /* printable name */
1,
false, /* the default machine */
FALSE, /* the default machine */
compatible,
h8300_scan,
&h8300s_info_struct
@ -139,7 +139,7 @@ const bfd_arch_info_type bfd_h8300_arch =
"h8300", /* arch_name */
"h8300", /* printable name */
1,
true, /* the default machine */
TRUE, /* the default machine */
compatible,
h8300_scan,
&h8300h_info_struct

View File

@ -1,5 +1,5 @@
/* BFD library support routines for the H8/500 architecture.
Copyright 1993, 1995, 2000, 2001 Free Software Foundation, Inc.
Copyright 1993, 1995, 2000, 2001, 2002 Free Software Foundation, Inc.
Hacked by Steve Chamberlain of Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@ -22,7 +22,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "sysdep.h"
#include "libbfd.h"
static boolean scan_mach PARAMS ((const struct bfd_arch_info *, const char *));
static bfd_boolean scan_mach
PARAMS ((const struct bfd_arch_info *, const char *));
#if 0
/*
@ -119,15 +120,15 @@ howto8_pcrel_callback (abfd, reloc_entry, symbol_in, data,
}
static reloc_howto_type howto_16
= NEWHOWTO(howto16_callback,"abs16",1,false,false);
= NEWHOWTO (howto16_callback, "abs16", 1, FALSE, FALSE);
static reloc_howto_type howto_8
= NEWHOWTO(howto8_callback,"abs8",0,false,false);
= NEWHOWTO (howto8_callback, "abs8", 0, FALSE, FALSE);
static reloc_howto_type howto_8_FFnn
= NEWHOWTO(howto8_FFnn_callback,"ff00+abs8",0,false,false);
= NEWHOWTO (howto8_FFnn_callback, "ff00+abs8", 0, FALSE, FALSE);
static reloc_howto_type howto_8_pcrel
= NEWHOWTO(howto8_pcrel_callback,"pcrel8",0,false,true);
= NEWHOWTO (howto8_pcrel_callback, "pcrel8", 0, FALSE, TRUE);
static reloc_howto_type *
local_bfd_reloc_type_lookup (arch, code)
@ -148,16 +149,20 @@ local_bfd_reloc_type_lookup (arch, code)
}
#endif
static boolean
static bfd_boolean
scan_mach (info, string)
const struct bfd_arch_info *info ATTRIBUTE_UNUSED;
const char *string;
{
if (strcmp(string,"h8/500") == 0) return true;
if (strcmp(string,"H8/500") == 0) return true;
if (strcmp(string,"h8500") == 0) return true;
if (strcmp(string,"H8500") == 0) return true;
return false;
if (strcmp (string,"h8/500") == 0)
return TRUE;
if (strcmp (string,"H8/500") == 0)
return TRUE;
if (strcmp (string,"h8500") == 0)
return TRUE;
if (strcmp (string,"H8500") == 0)
return TRUE;
return FALSE;
}
#if 0 /* not used currently */
@ -185,7 +190,7 @@ const bfd_arch_info_type bfd_h8500_arch =
"h8500", /* arch_name */
"h8500", /* printable name */
1,
true, /* the default machine */
TRUE, /* the default machine */
bfd_default_compatible,
scan_mach,
0,

View File

@ -1,5 +1,6 @@
/* BFD support for the HP Precision Architecture architecture.
Copyright 1992, 1995, 1998, 1999, 2000 Free Software Foundation, Inc.
Copyright 1992, 1995, 1998, 1999, 2000, 2002
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@ -31,7 +32,7 @@ static const bfd_arch_info_type bfd_hppa10_arch =
"hppa",
"hppa1.0",
3,
true, /* Unless we use 1.1 specific features */
TRUE, /* Unless we use 1.1 specific features */
bfd_default_compatible,
bfd_default_scan ,
0,
@ -48,7 +49,7 @@ static const bfd_arch_info_type bfd_hppa20_arch =
"hppa",
"hppa2.0",
3,
false, /* Unless we use 1.1 specific features */
FALSE, /* Unless we use 1.1 specific features */
bfd_default_compatible,
bfd_default_scan ,
&bfd_hppa10_arch,
@ -65,7 +66,7 @@ static const bfd_arch_info_type bfd_hppa20w_arch =
"hppa",
"hppa2.0w",
3,
false, /* Unless we use 1.1 specific features */
FALSE, /* Unless we use 1.1 specific features */
bfd_default_compatible,
bfd_default_scan ,
&bfd_hppa20_arch,
@ -81,7 +82,7 @@ const bfd_arch_info_type bfd_hppa_arch =
"hppa",
"hppa1.1",
3,
false, /* 1.1 specific features used */
FALSE, /* 1.1 specific features used */
bfd_default_compatible,
bfd_default_scan ,
&bfd_hppa20w_arch,

View File

@ -36,7 +36,7 @@ static const bfd_arch_info_type arch_info_struct[] =
"i370",
"i370:360",
3,
false, /* not the default */
FALSE, /* not the default */
bfd_default_compatible,
bfd_default_scan,
&arch_info_struct[1]
@ -50,7 +50,7 @@ static const bfd_arch_info_type arch_info_struct[] =
"i370",
"i370:370",
3,
false, /* not the default */
FALSE, /* not the default */
bfd_default_compatible,
bfd_default_scan,
0
@ -67,7 +67,7 @@ const bfd_arch_info_type bfd_i370_arch =
"i370",
"i370:common",
3,
true, /* the default */
TRUE, /* the default */
bfd_default_compatible,
bfd_default_scan,
&arch_info_struct[0]

View File

@ -32,7 +32,7 @@ const bfd_arch_info_type bfd_i386_arch_intel_syntax =
"i386:intel",
"i386:intel",
3,
true,
TRUE,
bfd_default_compatible,
bfd_default_scan ,
0,
@ -47,7 +47,7 @@ const bfd_arch_info_type bfd_x86_64_arch_intel_syntax =
"i386:intel",
"i386:x86-64:intel",
3,
true,
TRUE,
bfd_default_compatible,
bfd_default_scan ,
&bfd_i386_arch_intel_syntax,
@ -62,7 +62,7 @@ static const bfd_arch_info_type i8086_arch =
"i8086",
"i8086",
3,
false,
FALSE,
bfd_default_compatible,
bfd_default_scan ,
&bfd_x86_64_arch_intel_syntax,
@ -78,7 +78,7 @@ const bfd_arch_info_type bfd_x86_64_arch =
"i386",
"i386:x86-64",
3,
true,
TRUE,
bfd_default_compatible,
bfd_default_scan ,
&i8086_arch,
@ -94,7 +94,7 @@ const bfd_arch_info_type bfd_i386_arch =
"i386",
"i386",
3,
true,
TRUE,
bfd_default_compatible,
bfd_default_scan ,
&bfd_x86_64_arch

View File

@ -1,5 +1,5 @@
/* BFD support for the Intel 860 architecture.
Copyright 1992, 1995, 2000 Free Software Foundation, Inc.
Copyright 1992, 1995, 2000, 2002 Free Software Foundation, Inc.
Created mostly by substituting "860" for "386" in cpu-i386.c
Harry Dolan <dolan@ssd.intel.com>, October 1995
@ -33,7 +33,7 @@ const bfd_arch_info_type bfd_i860_arch =
"i860", /* Architecture name */
"i860", /* Printable name */
3, /* Section alignment exponent */
true, /* Is this the default architecture? */
TRUE, /* Is this the default architecture? */
bfd_default_compatible,
bfd_default_scan,
0, /* Next in list */

View File

@ -1,5 +1,5 @@
/* BFD library support routines for the i960 architecture.
Copyright 1990, 1991, 1993, 1994, 1996, 1999, 2000, 2001
Copyright 1990, 1991, 1993, 1994, 1996, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
Hacked by Steve Chamberlain of Cygnus Support.
@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "sysdep.h"
#include "libbfd.h"
static boolean scan_960_mach
static bfd_boolean scan_960_mach
PARAMS ((const bfd_arch_info_type *, const char *));
static const bfd_arch_info_type *compatible
PARAMS ((const bfd_arch_info_type *, const bfd_arch_info_type *));
@ -32,13 +32,13 @@ static const bfd_arch_info_type *compatible
could possibly refer to the i960 machine pointed at in the
info_struct pointer */
static boolean
static bfd_boolean
scan_960_mach (ap, string)
const bfd_arch_info_type *ap;
const char *string;
{
unsigned long machine;
int fail_because_not_80960 = false;
int fail_because_not_80960 = FALSE;
/* Look for the string i960 at the front of the string. */
if (strncasecmp ("i960", string, 4) == 0)
@ -51,7 +51,7 @@ scan_960_mach (ap, string)
/* "i960:*" is valid, anything else is not. */
if (* string != ':')
return false;
return FALSE;
string ++;
}
@ -61,16 +61,16 @@ scan_960_mach (ap, string)
{
string += 5;
/* Sett his to true here. If a correct matching postfix
is detected below it will be reset to false. */
fail_because_not_80960 = true;
/* Set this to TRUE here. If a correct matching postfix
is detected below it will be reset to FALSE. */
fail_because_not_80960 = TRUE;
}
/* No match, can't be us. */
else
return false;
return FALSE;
if (* string == '\0')
return false;
return FALSE;
if (string[0] == 'c' && string[1] == 'o' && string[2] == 'r' &&
string[3] == 'e' && string[4] == '\0')
@ -80,19 +80,19 @@ scan_960_mach (ap, string)
else if (strcasecmp (string, "kb_sb") == 0)
machine = bfd_mach_i960_kb_sb;
else if (string[1] == '\0' || string[2] != '\0') /* rest are 2-char. */
return false;
return FALSE;
else if (string[0] == 'k' && string[1] == 'b')
{ machine = bfd_mach_i960_kb_sb; fail_because_not_80960 = false; }
{ machine = bfd_mach_i960_kb_sb; fail_because_not_80960 = FALSE; }
else if (string[0] == 's' && string[1] == 'b')
machine = bfd_mach_i960_kb_sb;
else if (string[0] == 'm' && string[1] == 'c')
{ machine = bfd_mach_i960_mc; fail_because_not_80960 = false; }
{ machine = bfd_mach_i960_mc; fail_because_not_80960 = FALSE; }
else if (string[0] == 'x' && string[1] == 'a')
machine = bfd_mach_i960_xa;
else if (string[0] == 'c' && string[1] == 'a')
{ machine = bfd_mach_i960_ca; fail_because_not_80960 = false; }
{ machine = bfd_mach_i960_ca; fail_because_not_80960 = FALSE; }
else if (string[0] == 'k' && string[1] == 'a')
{ machine = bfd_mach_i960_ka_sa; fail_because_not_80960 = false; }
{ machine = bfd_mach_i960_ka_sa; fail_because_not_80960 = FALSE; }
else if (string[0] == 's' && string[1] == 'a')
machine = bfd_mach_i960_ka_sa;
else if (string[0] == 'j' && string[1] == 'x')
@ -100,15 +100,15 @@ scan_960_mach (ap, string)
else if (string[0] == 'h' && string[1] == 'x')
machine = bfd_mach_i960_hx;
else
return false;
return FALSE;
if (fail_because_not_80960)
return false;
return FALSE;
if (machine == ap->mach)
return true;
return TRUE;
return false;
return FALSE;
}
/* This routine is provided two arch_infos and works out the i960
@ -169,14 +169,14 @@ compatible (a,b)
static const bfd_arch_info_type arch_info_struct[] =
{
N(bfd_mach_i960_ka_sa,"i960:ka_sa",false, &arch_info_struct[1]),
N(bfd_mach_i960_kb_sb,"i960:kb_sb",false, &arch_info_struct[2]),
N(bfd_mach_i960_mc, "i960:mc", false, &arch_info_struct[3]),
N(bfd_mach_i960_xa, "i960:xa", false, &arch_info_struct[4]),
N(bfd_mach_i960_ca, "i960:ca", false, &arch_info_struct[5]),
N(bfd_mach_i960_jx, "i960:jx", false, &arch_info_struct[6]),
N(bfd_mach_i960_hx, "i960:hx", false, 0),
N(bfd_mach_i960_ka_sa,"i960:ka_sa",FALSE, &arch_info_struct[1]),
N(bfd_mach_i960_kb_sb,"i960:kb_sb",FALSE, &arch_info_struct[2]),
N(bfd_mach_i960_mc, "i960:mc", FALSE, &arch_info_struct[3]),
N(bfd_mach_i960_xa, "i960:xa", FALSE, &arch_info_struct[4]),
N(bfd_mach_i960_ca, "i960:ca", FALSE, &arch_info_struct[5]),
N(bfd_mach_i960_jx, "i960:jx", FALSE, &arch_info_struct[6]),
N(bfd_mach_i960_hx, "i960:hx", FALSE, 0),
};
const bfd_arch_info_type bfd_i960_arch =
N(bfd_mach_i960_core, "i960:core", true, &arch_info_struct[0]);
N(bfd_mach_i960_core, "i960:core", TRUE, &arch_info_struct[0]);

View File

@ -1,5 +1,5 @@
/* BFD support for the ia64 architecture.
Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
Copyright 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of BFD, the Binary File Descriptor library.
@ -32,7 +32,7 @@ const bfd_arch_info_type bfd_ia64_elf32_arch =
"ia64",
"ia64-elf32",
3, /* log2 of section alignment */
true, /* the one and only */
TRUE, /* the one and only */
bfd_default_compatible,
bfd_default_scan ,
0,
@ -48,7 +48,7 @@ const bfd_arch_info_type bfd_ia64_arch =
"ia64",
"ia64-elf64",
3, /* log2 of section alignment */
true, /* the one and only */
TRUE, /* the one and only */
bfd_default_compatible,
bfd_default_scan ,
&bfd_ia64_elf32_arch,

View File

@ -1,5 +1,5 @@
/* BFD support for the Scenix IP2xxx processor.
Copyright (C) 2000, 2002 Free Software Foundation, Inc.
Copyright 2000, 2002 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@ -31,7 +31,7 @@ const bfd_arch_info_type bfd_ip2k_nonext_arch =
"ip2k", /* Architecture name. */
"ip2022", /* Machine name. */
1, /* Section align power. */
false, /* The default ? */
FALSE, /* The default ? */
bfd_default_compatible, /* Architecture comparison fn. */
bfd_default_scan, /* String to architecture convert fn. */
NULL /* Next in list. */
@ -47,7 +47,7 @@ const bfd_arch_info_type bfd_ip2k_arch =
"ip2k", /* Architecture name. */
"ip2022ext", /* Machine name. */
1, /* Section align power. */
true, /* The default ? */
TRUE, /* The default ? */
bfd_default_compatible, /* Architecture comparison fn. */
bfd_default_scan, /* String to architecture convert fn. */
& bfd_ip2k_nonext_arch /* Next in list. */

View File

@ -1,5 +1,5 @@
/* BFD support for the Matsushita 10200 processor
Copyright 1996, 1997 Free Software Foundation, Inc.
Copyright 1996, 1997, 2002 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@ -31,7 +31,7 @@ const bfd_arch_info_type bfd_mn10200_arch =
"mn10200",
"mn10200",
2,
true, /* the one and only */
TRUE, /* the one and only */
bfd_default_compatible,
bfd_default_scan ,
0,

View File

@ -1,5 +1,5 @@
/* BFD support for the Matsushita 10300 processor
Copyright 1996, 1997, 1999 Free Software Foundation, Inc.
Copyright 1996, 1997, 1999, 2002 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@ -31,7 +31,7 @@ const bfd_arch_info_type bfd_am33_arch =
"am33",
"am33",
2,
false,
FALSE,
bfd_default_compatible,
bfd_default_scan,
0,
@ -47,7 +47,7 @@ const bfd_arch_info_type bfd_mn10300_arch =
"mn10300",
"mn10300",
2,
true, /* the one and only */
TRUE, /* the one and only */
bfd_default_compatible,
bfd_default_scan,
&bfd_am33_arch,

View File

@ -1,5 +1,5 @@
/* BFD support for the M32R processor.
Copyright 1996, 1999, 2000 Free Software Foundation, Inc.
Copyright 1996, 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@ -29,11 +29,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
static const bfd_arch_info_type arch_info_struct[] =
{
N (bfd_mach_m32rx, "m32rx", false, NULL)
N (bfd_mach_m32rx, "m32rx", FALSE, NULL)
};
#undef NEXT
#define NEXT &arch_info_struct[0]
const bfd_arch_info_type bfd_m32r_arch =
N (bfd_mach_m32r, "m32r", true, NEXT);
N (bfd_mach_m32r, "m32r", TRUE, NEXT);

View File

@ -1,5 +1,5 @@
/* BFD support for the Motorola 68HC11 processor
Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@ -31,7 +31,7 @@ const bfd_arch_info_type bfd_m68hc11_arch =
"m68hc11",
"m68hc11",
4, /* section alignment power */
true,
TRUE,
bfd_default_compatible,
bfd_default_scan,
0,

View File

@ -1,5 +1,5 @@
/* BFD support for the Motorola 68HC12 processor
Copyright 1999, 2000 Free Software Foundation, Inc.
Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@ -31,7 +31,7 @@ const bfd_arch_info_type bfd_m68hc12_arch =
"m68hc12",
"m68hc12",
4, /* section alignment power */
true,
TRUE,
bfd_default_compatible,
bfd_default_scan,
0,

View File

@ -1,5 +1,5 @@
/* BFD library support routines for architectures.
Copyright 1990, 1991, 1992, 1993, 1994, 1997, 1998, 2000, 2001
Copyright 1990, 1991, 1992, 1993, 1994, 1997, 1998, 2000, 2001, 2002
Free Software Foundation, Inc.
Hacked by Steve Chamberlain of Cygnus Support.
@ -28,19 +28,19 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
static const bfd_arch_info_type arch_info_struct[] =
{
N(bfd_mach_m68000, "m68k:68000", false, &arch_info_struct[1]),
N(bfd_mach_m68008, "m68k:68008", false, &arch_info_struct[2]),
N(bfd_mach_m68010, "m68k:68010", false, &arch_info_struct[3]),
N(bfd_mach_m68020, "m68k:68020", false, &arch_info_struct[4]),
N(bfd_mach_m68030, "m68k:68030", false, &arch_info_struct[5]),
N(bfd_mach_m68040, "m68k:68040", false, &arch_info_struct[6]),
N(bfd_mach_cpu32, "m68k:cpu32", false, &arch_info_struct[7]),
N(bfd_mach_mcf5200,"m68k:5200", false, &arch_info_struct[8]),
N(bfd_mach_mcf5206e,"m68k:5206e",false, &arch_info_struct[9]),
N(bfd_mach_mcf5307, "m68k:5307", false, &arch_info_struct[10]),
N(bfd_mach_mcf5407, "m68k:5407", false, &arch_info_struct[11]),
N(bfd_mach_m68060, "m68k:68060", false, 0),
N(bfd_mach_m68000, "m68k:68000", FALSE, &arch_info_struct[1]),
N(bfd_mach_m68008, "m68k:68008", FALSE, &arch_info_struct[2]),
N(bfd_mach_m68010, "m68k:68010", FALSE, &arch_info_struct[3]),
N(bfd_mach_m68020, "m68k:68020", FALSE, &arch_info_struct[4]),
N(bfd_mach_m68030, "m68k:68030", FALSE, &arch_info_struct[5]),
N(bfd_mach_m68040, "m68k:68040", FALSE, &arch_info_struct[6]),
N(bfd_mach_cpu32, "m68k:cpu32", FALSE, &arch_info_struct[7]),
N(bfd_mach_mcf5200,"m68k:5200", FALSE, &arch_info_struct[8]),
N(bfd_mach_mcf5206e,"m68k:5206e",FALSE, &arch_info_struct[9]),
N(bfd_mach_mcf5307, "m68k:5307", FALSE, &arch_info_struct[10]),
N(bfd_mach_mcf5407, "m68k:5407", FALSE, &arch_info_struct[11]),
N(bfd_mach_m68060, "m68k:68060", FALSE, 0),
};
const bfd_arch_info_type bfd_m68k_arch =
N(0, "m68k", true, &arch_info_struct[0]);
N(0, "m68k", TRUE, &arch_info_struct[0]);

View File

@ -1,5 +1,5 @@
/* bfd back-end for m88k support
Copyright 1990, 1991, 1994, 2000 Free Software Foundation, Inc.
Copyright 1990, 1991, 1994, 2000, 2002 Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@ -32,7 +32,7 @@ const bfd_arch_info_type bfd_m88k_arch =
"m88k",
"m88k:88100",
3,
true, /* the one and only */
TRUE, /* the one and only */
bfd_default_compatible,
bfd_default_scan ,
0,

View File

@ -1,5 +1,5 @@
/* BFD library support routines for Motorola's MCore architecture
Copyright 1993, 1999 Free Software Foundation, Inc.
Copyright 1993, 1999, 2002 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@ -31,7 +31,7 @@ const bfd_arch_info_type bfd_mcore_arch =
"MCore", /* Architecture name */
"MCore", /* Printable name */
3, /* Section align power */
true, /* Is this the default architecture ? */
TRUE, /* Is this the default architecture ? */
bfd_default_compatible, /* Architecture comparison function */
bfd_default_scan, /* String to architecture conversion */
NULL /* Next in list */

View File

@ -90,29 +90,29 @@ enum
static const bfd_arch_info_type arch_info_struct[] =
{
N (32, 32, bfd_mach_mips3000, "mips:3000", false, NN(I_mips3000)),
N (32, 32, bfd_mach_mips3900, "mips:3900", false, NN(I_mips3900)),
N (64, 64, bfd_mach_mips4000, "mips:4000", false, NN(I_mips4000)),
N (64, 64, bfd_mach_mips4010, "mips:4010", false, NN(I_mips4010)),
N (64, 64, bfd_mach_mips4100, "mips:4100", false, NN(I_mips4100)),
N (64, 64, bfd_mach_mips4111, "mips:4111", false, NN(I_mips4111)),
N (64, 64, bfd_mach_mips4120, "mips:4120", false, NN(I_mips4120)),
N (64, 64, bfd_mach_mips4300, "mips:4300", false, NN(I_mips4300)),
N (64, 64, bfd_mach_mips4400, "mips:4400", false, NN(I_mips4400)),
N (64, 64, bfd_mach_mips4600, "mips:4600", false, NN(I_mips4600)),
N (64, 64, bfd_mach_mips4650, "mips:4650", false, NN(I_mips4650)),
N (64, 64, bfd_mach_mips5000, "mips:5000", false, NN(I_mips5000)),
N (64, 64, bfd_mach_mips5400, "mips:5400", false, NN(I_mips5400)),
N (64, 64, bfd_mach_mips5500, "mips:5500", false, NN(I_mips5500)),
N (32, 32, bfd_mach_mips6000, "mips:6000", false, NN(I_mips6000)),
N (64, 64, bfd_mach_mips8000, "mips:8000", false, NN(I_mips8000)),
N (64, 64, bfd_mach_mips10000,"mips:10000", false, NN(I_mips10000)),
N (64, 64, bfd_mach_mips12000,"mips:12000", false, NN(I_mips12000)),
N (64, 64, bfd_mach_mips16, "mips:16", false, NN(I_mips16)),
N (64, 64, bfd_mach_mips5, "mips:mips5", false, NN(I_mips5)),
N (32, 32, bfd_mach_mipsisa32, "mips:isa32", false, NN(I_mipsisa32)),
N (64, 64, bfd_mach_mipsisa64, "mips:isa64", false, NN(I_mipsisa64)),
N (64, 64, bfd_mach_mips_sb1, "mips:sb1", false, 0),
N (32, 32, bfd_mach_mips3000, "mips:3000", FALSE, NN(I_mips3000)),
N (32, 32, bfd_mach_mips3900, "mips:3900", FALSE, NN(I_mips3900)),
N (64, 64, bfd_mach_mips4000, "mips:4000", FALSE, NN(I_mips4000)),
N (64, 64, bfd_mach_mips4010, "mips:4010", FALSE, NN(I_mips4010)),
N (64, 64, bfd_mach_mips4100, "mips:4100", FALSE, NN(I_mips4100)),
N (64, 64, bfd_mach_mips4111, "mips:4111", FALSE, NN(I_mips4111)),
N (64, 64, bfd_mach_mips4120, "mips:4120", FALSE, NN(I_mips4120)),
N (64, 64, bfd_mach_mips4300, "mips:4300", FALSE, NN(I_mips4300)),
N (64, 64, bfd_mach_mips4400, "mips:4400", FALSE, NN(I_mips4400)),
N (64, 64, bfd_mach_mips4600, "mips:4600", FALSE, NN(I_mips4600)),
N (64, 64, bfd_mach_mips4650, "mips:4650", FALSE, NN(I_mips4650)),
N (64, 64, bfd_mach_mips5000, "mips:5000", FALSE, NN(I_mips5000)),
N (64, 64, bfd_mach_mips5400, "mips:5400", FALSE, NN(I_mips5400)),
N (64, 64, bfd_mach_mips5500, "mips:5500", FALSE, NN(I_mips5500)),
N (32, 32, bfd_mach_mips6000, "mips:6000", FALSE, NN(I_mips6000)),
N (64, 64, bfd_mach_mips8000, "mips:8000", FALSE, NN(I_mips8000)),
N (64, 64, bfd_mach_mips10000,"mips:10000", FALSE, NN(I_mips10000)),
N (64, 64, bfd_mach_mips12000,"mips:12000", FALSE, NN(I_mips12000)),
N (64, 64, bfd_mach_mips16, "mips:16", FALSE, NN(I_mips16)),
N (64, 64, bfd_mach_mips5, "mips:mips5", FALSE, NN(I_mips5)),
N (32, 32, bfd_mach_mipsisa32, "mips:isa32", FALSE, NN(I_mipsisa32)),
N (64, 64, bfd_mach_mipsisa64, "mips:isa64", FALSE, NN(I_mipsisa64)),
N (64, 64, bfd_mach_mips_sb1, "mips:sb1", FALSE, 0),
};
/* The default architecture is mips:3000, but with a machine number of
@ -120,4 +120,4 @@ static const bfd_arch_info_type arch_info_struct[] =
of mips, and an explicit setting of mips:3000. */
const bfd_arch_info_type bfd_mips_arch =
N (32, 32, 0, "mips", true, &arch_info_struct[0]);
N (32, 32, 0, "mips", TRUE, &arch_info_struct[0]);

View File

@ -1,5 +1,5 @@
/* BFD library support routines for MMIX.
Copyright (C) 2001 Free Software Foundation, Inc.
Copyright 2001, 2002 Free Software Foundation, Inc.
Contributed by Hans-Peter Nilsson (hp@bitrange.com)
This file is part of BFD, the Binary File Descriptor library.
@ -34,7 +34,7 @@ bfd_mmix_arch =
"mmix", /* Architecture name. */
"mmix", /* Printable name. */
3, /* Section align power. */
true, /* This is the default architecture. */
TRUE, /* This is the default architecture. */
bfd_default_compatible, /* Architecture comparison function. */
bfd_default_scan, /* String to architecture conversion. */
NULL /* Next in list. */

View File

@ -30,11 +30,11 @@
static const bfd_arch_info_type arch_info_struct[] =
{
N(32532,"ns32k:32532",true, 0), /* The word ns32k will match this too. */
N(32532,"ns32k:32532",TRUE, 0), /* The word ns32k will match this too. */
};
const bfd_arch_info_type bfd_ns32k_arch =
N(32032,"ns32k:32032",false, &arch_info_struct[0]);
N(32032,"ns32k:32032",FALSE, &arch_info_struct[0]);
static bfd_reloc_status_type do_ns32k_reloc
PARAMS ((bfd *, arelent *, struct symbol_cache_entry *, PTR, asection *,
@ -232,16 +232,16 @@ do_ns32k_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
of the location within the section. Some targets arrange for
the addend to be the negative of the position of the location
within the section; for example, i386-aout does this. For
i386-aout, pcrel_offset is false. Some other targets do not
i386-aout, pcrel_offset is FALSE. Some other targets do not
include the position of the location; for example, m88kbcs,
or ELF. For those targets, pcrel_offset is true.
or ELF. For those targets, pcrel_offset is TRUE.
If we are producing relocateable output, then we must ensure
that this reloc will be correctly computed when the final
relocation is done. If pcrel_offset is false we want to wind
relocation is done. If pcrel_offset is FALSE we want to wind
up with the negative of the location within the section,
which means we must adjust the existing addend by the change
in the location within the section. If pcrel_offset is true
in the location within the section. If pcrel_offset is TRUE
we do not want to adjust the existing addend at all.
FIXME: This seems logical to me, but for the case of
@ -594,7 +594,7 @@ _bfd_do_ns32k_reloc_contents (howto, input_bfd, relocation, location,
{
int size;
bfd_vma x;
boolean overflow;
bfd_boolean overflow;
/* If the size is negative, negate RELOCATION. This isn't very
general. */
@ -622,7 +622,7 @@ _bfd_do_ns32k_reloc_contents (howto, input_bfd, relocation, location,
which we don't check for. We must either check at every single
operation, which would be tedious, or we must do the computations
in a type larger than bfd_vma, which would be inefficient. */
overflow = false;
overflow = FALSE;
if (howto->complain_on_overflow != complain_overflow_dont)
{
bfd_vma check;
@ -697,7 +697,7 @@ _bfd_do_ns32k_reloc_contents (howto, input_bfd, relocation, location,
if (signed_check > reloc_signed_max
|| signed_check < reloc_signed_min)
overflow = true;
overflow = TRUE;
}
break;
case complain_overflow_unsigned:
@ -709,7 +709,7 @@ _bfd_do_ns32k_reloc_contents (howto, input_bfd, relocation, location,
(((1 << (howto->bitsize - 1)) - 1) << 1) | 1;
if (check > reloc_unsigned_max)
overflow = true;
overflow = TRUE;
}
break;
case complain_overflow_bitfield:
@ -722,7 +722,7 @@ _bfd_do_ns32k_reloc_contents (howto, input_bfd, relocation, location,
if ((check & ~reloc_bits) != 0
&& (((bfd_vma) signed_check & ~reloc_bits)
!= (-(bfd_vma) 1 & ~reloc_bits)))
overflow = true;
overflow = TRUE;
}
break;
default:
@ -818,9 +818,9 @@ _bfd_ns32k_final_link_relocate (howto, input_bfd, input_section, contents,
location we are relocating. Some targets (e.g., i386-aout)
arrange for the contents of the section to be the negative of the
offset of the location within the section; for such targets
pcrel_offset is false. Other targets (e.g., m88kbcs or ELF)
pcrel_offset is FALSE. Other targets (e.g., m88kbcs or ELF)
simply leave the contents of the section as zero; for such
targets pcrel_offset is true. If pcrel_offset is false we do not
targets pcrel_offset is TRUE. If pcrel_offset is FALSE we do not
need to subtract out the offset of the location within the
section (which is just ADDRESS). */
if (howto->pc_relative)

View File

@ -1,5 +1,5 @@
/* BFD support for the OpenRISC architecture.
Copyright (C) 2001 Free Software Foundation, Inc.
Copyright 2001, 2002 Free Software Foundation, Inc.
Contributed by Johan Rydberg, jrydberg@opencores.org
This file is part of BFD, the Binary File Descriptor library.
@ -39,4 +39,4 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
}
const bfd_arch_info_type bfd_openrisc_arch =
N (32, 32, 0, "openrisc", true, 0);
N (32, 32, 0, "openrisc", TRUE, 0);

View File

@ -32,8 +32,8 @@ const bfd_arch_info_type bfd_or32_arch =
"or32",
"or32",
4,
true, /* The one and only. */
bfd_default_compatible,
TRUE, /* The one and only. */
bfd_default_compatible,
bfd_default_scan ,
0,
};

View File

@ -1,5 +1,5 @@
/* BFD back-end for PDP-11 support.
Copyright 2001 Free Software Foundation, Inc.
Copyright 2001, 2002 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@ -31,7 +31,7 @@ const bfd_arch_info_type bfd_pdp11_arch =
"pdp11",
"pdp11",
1, /* aligment = 16 bit */
true, /* the one and only */
TRUE, /* the one and only */
bfd_default_compatible,
bfd_default_scan ,
0,

View File

@ -1,5 +1,5 @@
/* BFD library support routines for the Pico Java architecture.
Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Hacked by Steve Chamberlain of Transmeta. sac@pobox.com
This file is part of BFD, the Binary File Descriptor library.
@ -32,7 +32,7 @@ const bfd_arch_info_type bfd_pj_arch =
"pj", /* arch_name */
"pj", /* printable name */
1,
true, /* the default machine */
TRUE, /* the default machine */
bfd_default_compatible,
bfd_default_scan,
0

View File

@ -61,7 +61,7 @@ const bfd_arch_info_type bfd_powerpc_archs[] =
"powerpc",
"powerpc:common64",
3,
true, /* default for 64 bit target */
TRUE, /* default for 64 bit target */
powerpc_compatible,
bfd_default_scan,
&bfd_powerpc_archs[1]
@ -77,7 +77,7 @@ const bfd_arch_info_type bfd_powerpc_archs[] =
"powerpc",
"powerpc:common",
3,
false,
FALSE,
powerpc_compatible,
bfd_default_scan,
&bfd_powerpc_archs[2],
@ -93,7 +93,7 @@ const bfd_arch_info_type bfd_powerpc_archs[] =
"powerpc",
"powerpc:common",
3,
true, /* default for 32 bit target */
TRUE, /* default for 32 bit target */
powerpc_compatible,
bfd_default_scan,
&bfd_powerpc_archs[1],
@ -109,7 +109,7 @@ const bfd_arch_info_type bfd_powerpc_archs[] =
"powerpc",
"powerpc:common64",
3,
false,
FALSE,
powerpc_compatible,
bfd_default_scan,
&bfd_powerpc_archs[2]
@ -124,7 +124,7 @@ const bfd_arch_info_type bfd_powerpc_archs[] =
"powerpc",
"powerpc:603",
3,
false, /* not the default */
FALSE, /* not the default */
powerpc_compatible,
bfd_default_scan,
&bfd_powerpc_archs[3]
@ -138,7 +138,7 @@ const bfd_arch_info_type bfd_powerpc_archs[] =
"powerpc",
"powerpc:EC603e",
3,
false, /* not the default */
FALSE, /* not the default */
powerpc_compatible,
bfd_default_scan,
&bfd_powerpc_archs[4]
@ -152,7 +152,7 @@ const bfd_arch_info_type bfd_powerpc_archs[] =
"powerpc",
"powerpc:604",
3,
false, /* not the default */
FALSE, /* not the default */
powerpc_compatible,
bfd_default_scan,
&bfd_powerpc_archs[5]
@ -166,7 +166,7 @@ const bfd_arch_info_type bfd_powerpc_archs[] =
"powerpc",
"powerpc:403",
3,
false, /* not the default */
FALSE, /* not the default */
powerpc_compatible,
bfd_default_scan,
&bfd_powerpc_archs[6]
@ -180,7 +180,7 @@ const bfd_arch_info_type bfd_powerpc_archs[] =
"powerpc",
"powerpc:601",
3,
false, /* not the default */
FALSE, /* not the default */
powerpc_compatible,
bfd_default_scan,
&bfd_powerpc_archs[7]
@ -194,7 +194,7 @@ const bfd_arch_info_type bfd_powerpc_archs[] =
"powerpc",
"powerpc:620",
3,
false, /* not the default */
FALSE, /* not the default */
powerpc_compatible,
bfd_default_scan,
&bfd_powerpc_archs[8]
@ -208,7 +208,7 @@ const bfd_arch_info_type bfd_powerpc_archs[] =
"powerpc",
"powerpc:630",
3,
false, /* not the default */
FALSE, /* not the default */
powerpc_compatible,
bfd_default_scan,
&bfd_powerpc_archs[9]
@ -222,7 +222,7 @@ const bfd_arch_info_type bfd_powerpc_archs[] =
"powerpc",
"powerpc:a35",
3,
false, /* not the default */
FALSE, /* not the default */
powerpc_compatible,
bfd_default_scan,
&bfd_powerpc_archs[10]
@ -236,7 +236,7 @@ const bfd_arch_info_type bfd_powerpc_archs[] =
"powerpc",
"powerpc:rs64ii",
3,
false, /* not the default */
FALSE, /* not the default */
powerpc_compatible,
bfd_default_scan,
&bfd_powerpc_archs[11]
@ -250,7 +250,7 @@ const bfd_arch_info_type bfd_powerpc_archs[] =
"powerpc",
"powerpc:rs64iii",
3,
false, /* not the default */
FALSE, /* not the default */
powerpc_compatible,
bfd_default_scan,
&bfd_powerpc_archs[12]
@ -264,7 +264,7 @@ const bfd_arch_info_type bfd_powerpc_archs[] =
"powerpc",
"powerpc:7400",
3,
false, /* not the default */
FALSE, /* not the default */
powerpc_compatible,
bfd_default_scan,
&bfd_powerpc_archs[13]
@ -278,7 +278,7 @@ const bfd_arch_info_type bfd_powerpc_archs[] =
"powerpc",
"powerpc:e500",
3,
false,
FALSE,
powerpc_compatible,
bfd_default_scan,
&bfd_powerpc_archs[14]
@ -292,7 +292,7 @@ const bfd_arch_info_type bfd_powerpc_archs[] =
"powerpc",
"powerpc:MPC8XX",
3,
false, /* not the default */
FALSE, /* not the default */
powerpc_compatible,
bfd_default_scan,
0

View File

@ -1,5 +1,6 @@
/* BFD back-end for rs6000 support
Copyright 1990, 1991, 1993, 1995, 2000 Free Software Foundation, Inc.
Copyright 1990, 1991, 1993, 1995, 2000, 2002
Free Software Foundation, Inc.
FIXME: Can someone provide a transliteration of this name into ASCII?
Using the following chars caused a compiler warning on HIUX (so I replaced
them with octal escapes), and isn't useful without an understanding of what
@ -64,7 +65,7 @@ static const bfd_arch_info_type arch_info_struct[] =
"rs6000",
"rs6000:rs1",
3,
false, /* not the default */
FALSE, /* not the default */
rs6000_compatible,
bfd_default_scan,
&arch_info_struct[1]
@ -78,7 +79,7 @@ static const bfd_arch_info_type arch_info_struct[] =
"rs6000",
"rs6000:rsc",
3,
false, /* not the default */
FALSE, /* not the default */
rs6000_compatible,
bfd_default_scan,
&arch_info_struct[2]
@ -92,7 +93,7 @@ static const bfd_arch_info_type arch_info_struct[] =
"rs6000",
"rs6000:rs2",
3,
false, /* not the default */
FALSE, /* not the default */
rs6000_compatible,
bfd_default_scan,
0
@ -109,7 +110,7 @@ const bfd_arch_info_type bfd_rs6000_arch =
"rs6000",
"rs6000:6000",
3,
true, /* the default */
TRUE, /* the default */
rs6000_compatible,
bfd_default_scan,
&arch_info_struct[0]

View File

@ -33,7 +33,7 @@ const bfd_arch_info_type bfd_s390_64_arch =
"s390",
"s390:64-bit",
3, /* section alignment power */
true, /* the default */
TRUE, /* the default */
bfd_default_compatible,
bfd_default_scan,
NULL
@ -49,7 +49,7 @@ const bfd_arch_info_type bfd_s390_arch =
"s390",
"s390:31-bit",
3, /* section alignment power */
true, /* the default */
TRUE, /* the default */
bfd_default_compatible,
bfd_default_scan,
&bfd_s390_64_arch

View File

@ -1,5 +1,5 @@
/* BFD library support routines for the Hitachi-SH architecture.
Copyright 1993, 1994, 1997, 1998, 2000, 2001
Copyright 1993, 1994, 1997, 1998, 2000, 2001, 2002
Free Software Foundation, Inc.
Hacked by Steve Chamberlain of Cygnus Support.
@ -60,7 +60,7 @@ static const bfd_arch_info_type arch_info_struct[] =
"sh", /* arch_name */
"sh2", /* printable name */
1,
false, /* not the default */
FALSE, /* not the default */
bfd_default_compatible,
bfd_default_scan,
SH2_NEXT
@ -74,7 +74,7 @@ static const bfd_arch_info_type arch_info_struct[] =
"sh", /* arch_name */
"sh-dsp", /* printable name */
1,
false, /* not the default */
FALSE, /* not the default */
bfd_default_compatible,
bfd_default_scan,
SH_DSP_NEXT
@ -88,7 +88,7 @@ static const bfd_arch_info_type arch_info_struct[] =
"sh", /* arch_name */
"sh3", /* printable name */
1,
false, /* not the default */
FALSE, /* not the default */
bfd_default_compatible,
bfd_default_scan,
SH3_NEXT
@ -102,7 +102,7 @@ static const bfd_arch_info_type arch_info_struct[] =
"sh", /* arch_name */
"sh3-dsp", /* printable name */
1,
false, /* not the default */
FALSE, /* not the default */
bfd_default_compatible,
bfd_default_scan,
SH3_DSP_NEXT
@ -116,7 +116,7 @@ static const bfd_arch_info_type arch_info_struct[] =
"sh", /* arch_name */
"sh3e", /* printable name */
1,
false, /* not the default */
FALSE, /* not the default */
bfd_default_compatible,
bfd_default_scan,
SH3E_NEXT
@ -130,7 +130,7 @@ static const bfd_arch_info_type arch_info_struct[] =
"sh", /* arch_name */
"sh4", /* printable name */
1,
false, /* not the default */
FALSE, /* not the default */
bfd_default_compatible,
bfd_default_scan,
SH4_NEXT
@ -144,7 +144,7 @@ static const bfd_arch_info_type arch_info_struct[] =
"sh", /* arch_name */
"sh5", /* printable name */
1,
false, /* not the default */
FALSE, /* not the default */
bfd_default_compatible,
bfd_default_scan,
SH64_NEXT
@ -161,7 +161,7 @@ const bfd_arch_info_type bfd_sh_arch =
"sh", /* arch_name */
"sh", /* printable name */
1,
true, /* the default machine */
TRUE, /* the default machine */
bfd_default_compatible,
bfd_default_scan,
SH_NEXT

View File

@ -33,7 +33,7 @@ static const bfd_arch_info_type arch_info_struct[] =
"sparc",
"sparc:sparclet",
3,
false,
FALSE,
bfd_default_compatible,
bfd_default_scan,
&arch_info_struct[1],
@ -47,7 +47,7 @@ static const bfd_arch_info_type arch_info_struct[] =
"sparc",
"sparc:sparclite",
3,
false,
FALSE,
bfd_default_compatible,
bfd_default_scan,
&arch_info_struct[2],
@ -61,7 +61,7 @@ static const bfd_arch_info_type arch_info_struct[] =
"sparc",
"sparc:v8plus",
3,
false,
FALSE,
bfd_default_compatible,
bfd_default_scan,
&arch_info_struct[3],
@ -75,7 +75,7 @@ static const bfd_arch_info_type arch_info_struct[] =
"sparc",
"sparc:v8plusa",
3,
false,
FALSE,
bfd_default_compatible,
bfd_default_scan,
&arch_info_struct[4],
@ -89,7 +89,7 @@ static const bfd_arch_info_type arch_info_struct[] =
"sparc",
"sparc:sparclite_le",
3,
false,
FALSE,
bfd_default_compatible,
bfd_default_scan,
&arch_info_struct[5],
@ -103,7 +103,7 @@ static const bfd_arch_info_type arch_info_struct[] =
"sparc",
"sparc:v9",
3,
false,
FALSE,
bfd_default_compatible,
bfd_default_scan,
&arch_info_struct[6],
@ -117,7 +117,7 @@ static const bfd_arch_info_type arch_info_struct[] =
"sparc",
"sparc:v9a",
3,
false,
FALSE,
bfd_default_compatible,
bfd_default_scan,
&arch_info_struct[7],
@ -131,7 +131,7 @@ static const bfd_arch_info_type arch_info_struct[] =
"sparc",
"sparc:v8plusb",
3,
false,
FALSE,
bfd_default_compatible,
bfd_default_scan,
&arch_info_struct[8],
@ -145,7 +145,7 @@ static const bfd_arch_info_type arch_info_struct[] =
"sparc",
"sparc:v9b",
3,
false,
FALSE,
bfd_default_compatible,
bfd_default_scan,
0,
@ -162,7 +162,7 @@ const bfd_arch_info_type bfd_sparc_arch =
"sparc",
"sparc",
3,
true, /* the default */
TRUE, /* the default */
bfd_default_compatible,
bfd_default_scan,
&arch_info_struct[0],

View File

@ -1,5 +1,5 @@
/* BFD support for the Texas Instruments TMS320C30 architecture.
Copyright 1998 Free Software Foundation, Inc.
Copyright 1998, 2002 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@ -32,7 +32,7 @@ const bfd_arch_info_type bfd_tic30_arch =
"tic30",
"tms320c30",
2,
true, /* the one and only */
TRUE, /* the one and only */
bfd_default_compatible,
bfd_default_scan,
0,

View File

@ -1,5 +1,5 @@
/* bfd back-end for TMS320C[34]x support
Copyright (C) 1996, 1997, 2002 Free Software Foundation, Inc.
Copyright 1996, 1997, 2002 Free Software Foundation, Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz)
@ -23,11 +23,11 @@
#include "sysdep.h"
#include "libbfd.h"
static boolean c4x_scan
static bfd_boolean c4x_scan
PARAMS ((const struct bfd_arch_info *, const char * ));
static boolean
static bfd_boolean
c4x_scan (info, string)
const struct bfd_arch_info *info;
const char *string;
@ -39,14 +39,14 @@ c4x_scan (info, string)
if (*string == 'C' || *string == 'c')
string++;
if (string[1] < '0' && string[1] > '9')
return false;
return FALSE;
if (*string == '3')
return (info->mach == bfd_mach_c3x);
else if (*string == '4')
return info->mach == bfd_mach_c4x;
return false;
return FALSE;
}
@ -60,8 +60,8 @@ const bfd_arch_info_type bfd_tic3x_arch =
"c3x", /* Architecture name. */
"tms320c3x", /* Printable name. */
0, /* Alignment power. */
false, /* Not the default architecture. */
bfd_default_compatible,
FALSE, /* Not the default architecture. */
bfd_default_compatible,
c4x_scan,
0
};
@ -76,8 +76,8 @@ const bfd_arch_info_type bfd_tic4x_arch =
"c4x", /* Architecture name. */
"tms320c4x", /* Printable name. */
0, /* Alignment power. */
true, /* The default architecture. */
bfd_default_compatible,
TRUE, /* The default architecture. */
bfd_default_compatible,
c4x_scan,
&bfd_tic3x_arch,
};

View File

@ -1,5 +1,5 @@
/* BFD support for the Texas Instruments TMS320C54X architecture.
Copyright 1999, 2000 Free Software Foundation, Inc.
Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@ -32,7 +32,7 @@ const bfd_arch_info_type bfd_tic54x_arch =
"tic54x",
"tms320c54x",
1,
true, /* the one and only */
TRUE, /* the one and only */
bfd_default_compatible,
bfd_default_scan,
0,

View File

@ -1,5 +1,5 @@
/* bfd back-end for TI TMS320C80 (MVP) support
Copyright 1996 Free Software Foundation, Inc.
Copyright 1996, 2002 Free Software Foundation, Inc.
Written by Fred Fish at Cygnus support (fnf@cygnus.com)
This file is part of BFD, the Binary File Descriptor library.
@ -32,7 +32,7 @@ const bfd_arch_info_type bfd_tic80_arch =
"tic80", /* architecture name */
"tic80", /* printable name */
2, /* section alignment power */
true, /* default machine for architecture */
TRUE, /* default machine for architecture */
bfd_default_compatible,
bfd_default_scan ,
NULL, /* Pointer to next in chain */

Some files were not shown because too many files have changed in this diff Show More