2000-12-19 Kazu Hirata <kazu@hxi.com>
* sco5-core.c: Fix formatting. * section.c: Likewise. * sparclinux.c: Likewise. * sparclynx.c: Likewise. * sparcnetbsd.c: Likewise. * srec.c: Likewise. * stabs.c: Likewise. * stab-syms.c: Likewise. * sunos.c: Likewise. * syms.c: Likewise. * sysdep.h: Likewise.
This commit is contained in:
parent
e30839fee3
commit
7b82c249fa
12 changed files with 100 additions and 110 deletions
|
@ -1,3 +1,17 @@
|
||||||
|
2000-12-19 Kazu Hirata <kazu@hxi.com>
|
||||||
|
|
||||||
|
* sco5-core.c: Fix formatting.
|
||||||
|
* section.c: Likewise.
|
||||||
|
* sparclinux.c: Likewise.
|
||||||
|
* sparclynx.c: Likewise.
|
||||||
|
* sparcnetbsd.c: Likewise.
|
||||||
|
* srec.c: Likewise.
|
||||||
|
* stabs.c: Likewise.
|
||||||
|
* stab-syms.c: Likewise.
|
||||||
|
* sunos.c: Likewise.
|
||||||
|
* syms.c: Likewise.
|
||||||
|
* sysdep.h: Likewise.
|
||||||
|
|
||||||
2000-12-18 Nick Clifton <nickc@redhat.com>
|
2000-12-18 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
* coff-arm.c (EXTRA_S_FLAGS): Only define if not already
|
* coff-arm.c (EXTRA_S_FLAGS): Only define if not already
|
||||||
|
|
|
@ -84,7 +84,7 @@ sco5_core_make_empty_symbol (abfd)
|
||||||
new->the_bfd = abfd;
|
new->the_bfd = abfd;
|
||||||
return new;
|
return new;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct user *
|
static struct user *
|
||||||
read_uarea(abfd, filepos)
|
read_uarea(abfd, filepos)
|
||||||
bfd *abfd;
|
bfd *abfd;
|
||||||
|
@ -109,7 +109,7 @@ read_uarea(abfd, filepos)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Sanity check perhaps??? */
|
/* Sanity check perhaps??? */
|
||||||
if (rawptr->u.u_dsize > 0x1000000) /* Remember, it's in pages... */
|
if (rawptr->u.u_dsize > 0x1000000) /* Remember, it's in pages... */
|
||||||
{
|
{
|
||||||
bfd_set_error (bfd_error_wrong_format);
|
bfd_set_error (bfd_error_wrong_format);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -154,7 +154,7 @@ sco5_core_file_p (abfd)
|
||||||
|| (bfd_read ((void *)&coffset_siz, 1, sizeof coffset_siz, abfd)
|
|| (bfd_read ((void *)&coffset_siz, 1, sizeof coffset_siz, abfd)
|
||||||
!= sizeof coffset_siz) )
|
!= sizeof coffset_siz) )
|
||||||
{
|
{
|
||||||
bfd_set_error (bfd_error_wrong_format);
|
bfd_set_error (bfd_error_wrong_format);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,50 +165,49 @@ sco5_core_file_p (abfd)
|
||||||
!= sizeof coffsets)
|
!= sizeof coffsets)
|
||||||
|| ((coffsets.u_info != 1) && (coffsets.u_info != C_VERSION)))
|
|| ((coffsets.u_info != 1) && (coffsets.u_info != C_VERSION)))
|
||||||
{
|
{
|
||||||
bfd_set_error (bfd_error_wrong_format);
|
bfd_set_error (bfd_error_wrong_format);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (coffsets.u_info == 1)
|
||||||
if (coffsets.u_info == 1)
|
{
|
||||||
{
|
|
||||||
/* Old version, no section heads, read info from user struct */
|
/* Old version, no section heads, read info from user struct */
|
||||||
|
|
||||||
u = read_uarea(abfd, coffsets.u_user);
|
u = read_uarea(abfd, coffsets.u_user);
|
||||||
if (! u)
|
if (! u)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (!make_bfd_asection (abfd, ".reg", SEC_HAS_CONTENTS,
|
if (!make_bfd_asection (abfd, ".reg", SEC_HAS_CONTENTS,
|
||||||
(bfd_size_type) coffsets.u_usize,
|
(bfd_size_type) coffsets.u_usize,
|
||||||
0 - (bfd_vma) u->u_ar0,
|
0 - (bfd_vma) u->u_ar0,
|
||||||
(file_ptr) coffsets.u_user))
|
(file_ptr) coffsets.u_user))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (!make_bfd_asection (abfd, ".data",
|
if (!make_bfd_asection (abfd, ".data",
|
||||||
SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS,
|
SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS,
|
||||||
((bfd_size_type) u->u_exdata.ux_dsize
|
((bfd_size_type) u->u_exdata.ux_dsize
|
||||||
+ u->u_exdata.ux_bsize),
|
+ u->u_exdata.ux_bsize),
|
||||||
(bfd_vma) u->u_exdata.ux_datorg,
|
(bfd_vma) u->u_exdata.ux_datorg,
|
||||||
(file_ptr) coffsets.u_data))
|
(file_ptr) coffsets.u_data))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (!make_bfd_asection (abfd, ".stack",
|
if (!make_bfd_asection (abfd, ".stack",
|
||||||
SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS,
|
SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS,
|
||||||
(bfd_size_type) u->u_ssize * NBPC,
|
(bfd_size_type) u->u_ssize * NBPC,
|
||||||
(bfd_vma) u->u_sub,
|
(bfd_vma) u->u_sub,
|
||||||
(file_ptr) coffsets.u_stack))
|
(file_ptr) coffsets.u_stack))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
return abfd->xvec; /* Done for version 1 */
|
return abfd->xvec; /* Done for version 1 */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Immediately before coreoffsets region is a long with offset in core
|
/* Immediately before coreoffsets region is a long with offset in core
|
||||||
to first coresecthead (CORES_OFFSETS), the long before this is the
|
to first coresecthead (CORES_OFFSETS), the long before this is the
|
||||||
number of section heads in the list. Read both longs and read the
|
number of section heads in the list. Read both longs and read the
|
||||||
coresecthead and check its validity */
|
coresecthead and check its validity */
|
||||||
|
|
||||||
if ((bfd_seek (abfd,
|
if ((bfd_seek (abfd,
|
||||||
coresize - coffset_siz - 2 * sizeof coffset_siz,
|
coresize - coffset_siz - 2 * sizeof coffset_siz,
|
||||||
SEEK_SET) != 0)
|
SEEK_SET) != 0)
|
||||||
|| (bfd_read ((void *)&nsecs, 1, sizeof nsecs, abfd) != sizeof nsecs)
|
|| (bfd_read ((void *)&nsecs, 1, sizeof nsecs, abfd) != sizeof nsecs)
|
||||||
|| (bfd_read ((void *)&cheadoffs, 1, sizeof cheadoffs, abfd)
|
|| (bfd_read ((void *)&cheadoffs, 1, sizeof cheadoffs, abfd)
|
||||||
|
@ -226,16 +225,16 @@ sco5_core_file_p (abfd)
|
||||||
|
|
||||||
/* Now loop over all regions and map them */
|
/* Now loop over all regions and map them */
|
||||||
nsecs--; /* We've seen CORES_OFFSETS already */
|
nsecs--; /* We've seen CORES_OFFSETS already */
|
||||||
for (; nsecs; nsecs--)
|
for (; nsecs; nsecs--)
|
||||||
{
|
{
|
||||||
if ((bfd_seek (abfd, chead.cs_hseek, SEEK_SET) != 0)
|
if ((bfd_seek (abfd, chead.cs_hseek, SEEK_SET) != 0)
|
||||||
|| bfd_read ((void *)&chead, 1, sizeof chead, abfd) != sizeof chead)
|
|| bfd_read ((void *)&chead, 1, sizeof chead, abfd) != sizeof chead)
|
||||||
{
|
{
|
||||||
bfd_set_error (bfd_error_wrong_format);
|
bfd_set_error (bfd_error_wrong_format);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (chead.cs_stype)
|
switch (chead.cs_stype)
|
||||||
{
|
{
|
||||||
case CORES_MAGIC: /* Core header, check magic */
|
case CORES_MAGIC: /* Core header, check magic */
|
||||||
if (chead.cs_x.csx_magic != COREMAGIC_NUMBER)
|
if (chead.cs_x.csx_magic != COREMAGIC_NUMBER)
|
||||||
|
@ -259,7 +258,7 @@ sco5_core_file_p (abfd)
|
||||||
*u_ar0. The other is that u_ar0 is sometimes an absolute
|
*u_ar0. The other is that u_ar0 is sometimes an absolute
|
||||||
address in kernel memory, and on other systems it is an
|
address in kernel memory, and on other systems it is an
|
||||||
offset from the beginning of the `struct user'.
|
offset from the beginning of the `struct user'.
|
||||||
|
|
||||||
As a practical matter, we don't know where the registers
|
As a practical matter, we don't know where the registers
|
||||||
actually are, so we have to pass the whole area to GDB.
|
actually are, so we have to pass the whole area to GDB.
|
||||||
We encode the value of u_ar0 by setting the .regs section
|
We encode the value of u_ar0 by setting the .regs section
|
||||||
|
@ -267,11 +266,10 @@ sco5_core_file_p (abfd)
|
||||||
pointed to by u_ar0 (by setting the vma of the start of
|
pointed to by u_ar0 (by setting the vma of the start of
|
||||||
the section to -u_ar0). GDB uses this info to locate the
|
the section to -u_ar0). GDB uses this info to locate the
|
||||||
regs, using minor trickery to get around the
|
regs, using minor trickery to get around the
|
||||||
offset-or-absolute-addr problem. */
|
offset-or-absolute-addr problem. */
|
||||||
|
|
||||||
chead.cs_vaddr = 0 - (bfd_vma) u->u_ar0;
|
chead.cs_vaddr = 0 - (bfd_vma) u->u_ar0;
|
||||||
|
|
||||||
|
|
||||||
secname = ".reg";
|
secname = ".reg";
|
||||||
flags = SEC_HAS_CONTENTS;
|
flags = SEC_HAS_CONTENTS;
|
||||||
|
|
||||||
|
@ -345,8 +343,8 @@ int
|
||||||
sco5_core_file_failing_signal (ignore_abfd)
|
sco5_core_file_failing_signal (ignore_abfd)
|
||||||
bfd *ignore_abfd;
|
bfd *ignore_abfd;
|
||||||
{
|
{
|
||||||
return ((ignore_abfd->tdata.sco5_core_data->u.u_sysabort != 0)
|
return ((ignore_abfd->tdata.sco5_core_data->u.u_sysabort != 0)
|
||||||
? ignore_abfd->tdata.sco5_core_data->u.u_sysabort
|
? ignore_abfd->tdata.sco5_core_data->u.u_sysabort
|
||||||
: -1);
|
: -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -371,9 +369,9 @@ sco5_core_file_matches_executable_p (core_bfd, exec_bfd)
|
||||||
|
|
||||||
/* If somebody calls any byte-swapping routines, shoot them. */
|
/* If somebody calls any byte-swapping routines, shoot them. */
|
||||||
static void
|
static void
|
||||||
swap_abort()
|
swap_abort ()
|
||||||
{
|
{
|
||||||
abort(); /* This way doesn't require any declaration for ANSI to fuck up */
|
abort (); /* This way doesn't require any declaration for ANSI to fuck up */
|
||||||
}
|
}
|
||||||
#define NO_GET ((bfd_vma (*) PARAMS (( const bfd_byte *))) swap_abort )
|
#define NO_GET ((bfd_vma (*) PARAMS (( const bfd_byte *))) swap_abort )
|
||||||
#define NO_PUT ((void (*) PARAMS ((bfd_vma, bfd_byte *))) swap_abort )
|
#define NO_PUT ((void (*) PARAMS ((bfd_vma, bfd_byte *))) swap_abort )
|
||||||
|
@ -426,6 +424,6 @@ const bfd_target sco5_core_vec =
|
||||||
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
|
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
|
||||||
|
|
||||||
NULL,
|
NULL,
|
||||||
|
|
||||||
(PTR) 0 /* backend_data */
|
(PTR) 0 /* backend_data */
|
||||||
};
|
};
|
||||||
|
|
|
@ -111,7 +111,6 @@ SUBSECTION
|
||||||
| size 0x103 |
|
| size 0x103 |
|
||||||
| output_section --------|
|
| output_section --------|
|
||||||
|
|
||||||
|
|
||||||
SUBSECTION
|
SUBSECTION
|
||||||
Link orders
|
Link orders
|
||||||
|
|
||||||
|
@ -133,7 +132,6 @@ SUBSECTION
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "bfd.h"
|
#include "bfd.h"
|
||||||
#include "sysdep.h"
|
#include "sysdep.h"
|
||||||
#include "libbfd.h"
|
#include "libbfd.h"
|
||||||
|
@ -642,7 +640,6 @@ bfd_get_section_by_name (abfd, name)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
FUNCTION
|
FUNCTION
|
||||||
bfd_get_unique_section_name
|
bfd_get_unique_section_name
|
||||||
|
@ -693,7 +690,6 @@ bfd_get_unique_section_name (abfd, templat, count)
|
||||||
return sname;
|
return sname;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
FUNCTION
|
FUNCTION
|
||||||
bfd_make_section_old_way
|
bfd_make_section_old_way
|
||||||
|
@ -719,7 +715,6 @@ DESCRIPTION
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
asection *
|
asection *
|
||||||
bfd_make_section_old_way (abfd, name)
|
bfd_make_section_old_way (abfd, name)
|
||||||
bfd *abfd;
|
bfd *abfd;
|
||||||
|
@ -867,7 +862,6 @@ bfd_make_section (abfd, name)
|
||||||
return bfd_make_section_anyway (abfd, name);
|
return bfd_make_section_anyway (abfd, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
FUNCTION
|
FUNCTION
|
||||||
bfd_set_section_flags
|
bfd_set_section_flags
|
||||||
|
@ -911,14 +905,13 @@ bfd_set_section_flags (abfd, section, flags)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
FUNCTION
|
FUNCTION
|
||||||
bfd_map_over_sections
|
bfd_map_over_sections
|
||||||
|
|
||||||
SYNOPSIS
|
SYNOPSIS
|
||||||
void bfd_map_over_sections(bfd *abfd,
|
void bfd_map_over_sections(bfd *abfd,
|
||||||
void (*func)(bfd *abfd,
|
void (*func) (bfd *abfd,
|
||||||
asection *sect,
|
asection *sect,
|
||||||
PTR obj),
|
PTR obj),
|
||||||
PTR obj);
|
PTR obj);
|
||||||
|
@ -937,7 +930,6 @@ DESCRIPTION
|
||||||
| for (p = abfd->sections; p != NULL; p = p->next)
|
| for (p = abfd->sections; p != NULL; p = p->next)
|
||||||
| func(abfd, p, ...)
|
| func(abfd, p, ...)
|
||||||
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*VARARGS2*/
|
/*VARARGS2*/
|
||||||
|
@ -957,7 +949,6 @@ bfd_map_over_sections (abfd, operation, user_storage)
|
||||||
abort ();
|
abort ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
FUNCTION
|
FUNCTION
|
||||||
bfd_set_section_size
|
bfd_set_section_size
|
||||||
|
@ -982,7 +973,7 @@ bfd_set_section_size (abfd, ptr, val)
|
||||||
bfd_size_type val;
|
bfd_size_type val;
|
||||||
{
|
{
|
||||||
/* Once you've started writing to any section you cannot create or change
|
/* Once you've started writing to any section you cannot create or change
|
||||||
the size of any others. */
|
the size of any others. */
|
||||||
|
|
||||||
if (abfd->output_has_begun)
|
if (abfd->output_has_begun)
|
||||||
{
|
{
|
||||||
|
@ -1008,15 +999,12 @@ SYNOPSIS
|
||||||
file_ptr offset,
|
file_ptr offset,
|
||||||
bfd_size_type count);
|
bfd_size_type count);
|
||||||
|
|
||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
Sets the contents of the section @var{section} in BFD
|
Sets the contents of the section @var{section} in BFD
|
||||||
@var{abfd} to the data starting in memory at @var{data}. The
|
@var{abfd} to the data starting in memory at @var{data}. The
|
||||||
data is written to the output section starting at offset
|
data is written to the output section starting at offset
|
||||||
@var{offset} for @var{count} octets.
|
@var{offset} for @var{count} octets.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Normally <<true>> is returned, else <<false>>. Possible error
|
Normally <<true>> is returned, else <<false>>. Possible error
|
||||||
returns are:
|
returns are:
|
||||||
o <<bfd_error_no_contents>> -
|
o <<bfd_error_no_contents>> -
|
||||||
|
@ -1027,7 +1015,6 @@ DESCRIPTION
|
||||||
This routine is front end to the back end function
|
This routine is front end to the back end function
|
||||||
<<_bfd_set_section_contents>>.
|
<<_bfd_set_section_contents>>.
|
||||||
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define bfd_get_section_size_now(abfd,sec) \
|
#define bfd_get_section_size_now(abfd,sec) \
|
||||||
|
@ -1117,8 +1104,6 @@ DESCRIPTION
|
||||||
with zeroes. If no errors occur, <<true>> is returned, else
|
with zeroes. If no errors occur, <<true>> is returned, else
|
||||||
<<false>>.
|
<<false>>.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
boolean
|
boolean
|
||||||
bfd_get_section_contents (abfd, section, location, offset, count)
|
bfd_get_section_contents (abfd, section, location, offset, count)
|
||||||
|
|
|
@ -95,7 +95,7 @@ sparclinux_write_object_contents (abfd)
|
||||||
#define IS_GOT_SYM(name) \
|
#define IS_GOT_SYM(name) \
|
||||||
(strncmp (name, GOT_REF_PREFIX, sizeof GOT_REF_PREFIX - 1) == 0)
|
(strncmp (name, GOT_REF_PREFIX, sizeof GOT_REF_PREFIX - 1) == 0)
|
||||||
|
|
||||||
/* See if a symbol name is a reference to the procedure linkage table. */
|
/* See if a symbol name is a reference to the procedure linkage table. */
|
||||||
|
|
||||||
#ifndef PLT_REF_PREFIX
|
#ifndef PLT_REF_PREFIX
|
||||||
#define PLT_REF_PREFIX "__PLT_"
|
#define PLT_REF_PREFIX "__PLT_"
|
||||||
|
@ -478,7 +478,7 @@ linux_tally_symbols (h, data)
|
||||||
(h->root.root.root.string
|
(h->root.root.root.string
|
||||||
+ sizeof PLT_REF_PREFIX - 1),
|
+ sizeof PLT_REF_PREFIX - 1),
|
||||||
false, false, true);
|
false, false, true);
|
||||||
/* h2 does not follow indirect symbols. */
|
/* h2 does not follow indirect symbols. */
|
||||||
h2 = linux_link_hash_lookup (linux_hash_table (info),
|
h2 = linux_link_hash_lookup (linux_hash_table (info),
|
||||||
(h->root.root.root.string
|
(h->root.root.root.string
|
||||||
+ sizeof PLT_REF_PREFIX - 1),
|
+ sizeof PLT_REF_PREFIX - 1),
|
||||||
|
@ -535,7 +535,7 @@ linux_tally_symbols (h, data)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Quick and dirty way of stripping these symbols from the
|
/* Quick and dirty way of stripping these symbols from the
|
||||||
symtab. */
|
symtab. */
|
||||||
if (bfd_is_abs_section (h->root.root.u.def.section))
|
if (bfd_is_abs_section (h->root.root.u.def.section))
|
||||||
h->root.written = true;
|
h->root.written = true;
|
||||||
}
|
}
|
||||||
|
@ -560,7 +560,7 @@ bfd_sparclinux_size_dynamic_sections (output_bfd, info)
|
||||||
if (output_bfd->xvec != &MY(vec))
|
if (output_bfd->xvec != &MY(vec))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
/* First find the fixups... */
|
/* First find the fixups... */
|
||||||
linux_link_hash_traverse (linux_hash_table (info),
|
linux_link_hash_traverse (linux_hash_table (info),
|
||||||
linux_tally_symbols,
|
linux_tally_symbols,
|
||||||
(PTR) info);
|
(PTR) info);
|
||||||
|
|
|
@ -46,7 +46,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||||
/* This is needed to reject a NewsOS file, e.g. in
|
/* This is needed to reject a NewsOS file, e.g. in
|
||||||
gdb/testsuite/gdb.t10/crossload.exp. <kingdon@cygnus.com>
|
gdb/testsuite/gdb.t10/crossload.exp. <kingdon@cygnus.com>
|
||||||
I needed to add M_UNKNOWN to recognize a 68000 object, so this will
|
I needed to add M_UNKNOWN to recognize a 68000 object, so this will
|
||||||
probably no longer reject a NewsOS object. <ian@cygnus.com>. */
|
probably no longer reject a NewsOS object. <ian@cygnus.com>. */
|
||||||
#define MACHTYPE_OK(mtype) ((mtype) == M_UNKNOWN \
|
#define MACHTYPE_OK(mtype) ((mtype) == M_UNKNOWN \
|
||||||
|| (mtype) == M_68010 \
|
|| (mtype) == M_68010 \
|
||||||
|| (mtype) == M_68020 \
|
|| (mtype) == M_68020 \
|
||||||
|
@ -90,7 +90,7 @@ NAME(lynx,set_arch_mach) (abfd, machtype)
|
||||||
|
|
||||||
case M_UNKNOWN:
|
case M_UNKNOWN:
|
||||||
/* Some Sun3s make magic numbers without cpu types in them, so
|
/* Some Sun3s make magic numbers without cpu types in them, so
|
||||||
we'll default to the 68000. */
|
we'll default to the 68000. */
|
||||||
arch = bfd_arch_m68k;
|
arch = bfd_arch_m68k;
|
||||||
machine = bfd_mach_m68000;
|
machine = bfd_mach_m68000;
|
||||||
break;
|
break;
|
||||||
|
@ -137,7 +137,7 @@ NAME(lynx,set_arch_mach) (abfd, machtype)
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SET_ARCH_MACH(ABFD, EXEC) \
|
#define SET_ARCH_MACH(ABFD, EXEC) \
|
||||||
NAME(lynx,set_arch_mach)(ABFD, N_MACHTYPE (EXEC)); \
|
NAME(lynx,set_arch_mach) (ABFD, N_MACHTYPE (EXEC)); \
|
||||||
choose_reloc_size(ABFD);
|
choose_reloc_size(ABFD);
|
||||||
|
|
||||||
/* Determine the size of a relocation entry, based on the architecture */
|
/* Determine the size of a relocation entry, based on the architecture */
|
||||||
|
|
|
@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||||
#define TARGET_IS_BIG_ENDIAN_P
|
#define TARGET_IS_BIG_ENDIAN_P
|
||||||
|
|
||||||
/* SPARC chips use either 4K or 8K pages, but object files always
|
/* SPARC chips use either 4K or 8K pages, but object files always
|
||||||
assume 8K page alignment so they will work on either one. */
|
assume 8K page alignment so they will work on either one. */
|
||||||
#define TARGET_PAGE_SIZE 0x2000
|
#define TARGET_PAGE_SIZE 0x2000
|
||||||
|
|
||||||
#define DEFAULT_ARCH bfd_arch_sparc
|
#define DEFAULT_ARCH bfd_arch_sparc
|
||||||
|
|
13
bfd/srec.c
13
bfd/srec.c
|
@ -24,7 +24,7 @@ SUBSECTION
|
||||||
S-Record handling
|
S-Record handling
|
||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
|
|
||||||
Ordinary S-Records cannot hold anything but addresses and
|
Ordinary S-Records cannot hold anything but addresses and
|
||||||
data, so that's all that we implement.
|
data, so that's all that we implement.
|
||||||
|
|
||||||
|
@ -42,10 +42,10 @@ DESCRIPTION
|
||||||
up and output them when it's time to close the bfd.
|
up and output them when it's time to close the bfd.
|
||||||
|
|
||||||
An s record looks like:
|
An s record looks like:
|
||||||
|
|
||||||
EXAMPLE
|
EXAMPLE
|
||||||
S<type><length><address><data><checksum>
|
S<type><length><address><data><checksum>
|
||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
Where
|
Where
|
||||||
o length
|
o length
|
||||||
|
@ -61,7 +61,7 @@ DESCRIPTION
|
||||||
7) four byte address termination record
|
7) four byte address termination record
|
||||||
8) three byte address termination record
|
8) three byte address termination record
|
||||||
9) two byte address termination record
|
9) two byte address termination record
|
||||||
|
|
||||||
o address
|
o address
|
||||||
is the start address of the data following, or in the case of
|
is the start address of the data following, or in the case of
|
||||||
a termination record, the start address of the image
|
a termination record, the start address of the image
|
||||||
|
@ -71,7 +71,6 @@ DESCRIPTION
|
||||||
is the sum of all the raw byte data in the record, from the length
|
is the sum of all the raw byte data in the record, from the length
|
||||||
upwards, modulo 256 and subtracted from 255.
|
upwards, modulo 256 and subtracted from 255.
|
||||||
|
|
||||||
|
|
||||||
SUBSECTION
|
SUBSECTION
|
||||||
Symbol S-Record handling
|
Symbol S-Record handling
|
||||||
|
|
||||||
|
@ -101,7 +100,7 @@ EXAMPLE
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
We allow symbols to be anywhere in the data stream - the module names
|
We allow symbols to be anywhere in the data stream - the module names
|
||||||
are always ignored.
|
are always ignored.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "bfd.h"
|
#include "bfd.h"
|
||||||
|
@ -882,7 +881,7 @@ srec_set_section_contents (abfd, section, location, offset, bytes_to_do)
|
||||||
regardless of the siez of the addresses. */
|
regardless of the siez of the addresses. */
|
||||||
if (S3Forced)
|
if (S3Forced)
|
||||||
tdata->type = 3;
|
tdata->type = 3;
|
||||||
else if ((section->lma + offset + bytes_to_do - 1) <= 0xffff)
|
else if ((section->lma + offset + bytes_to_do - 1) <= 0xffff)
|
||||||
; /* The default, S1, is OK. */
|
; /* The default, S1, is OK. */
|
||||||
else if ((section->lma + offset + bytes_to_do - 1) <= 0xffffff
|
else if ((section->lma + offset + bytes_to_do - 1) <= 0xffffff
|
||||||
&& tdata->type <= 2)
|
&& tdata->type <= 2)
|
||||||
|
|
|
@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
#include "bfd.h"
|
#include "bfd.h"
|
||||||
|
|
||||||
#define ARCH_SIZE 32 /* Value doesn't matter. */
|
#define ARCH_SIZE 32 /* Value doesn't matter. */
|
||||||
#include "libaout.h"
|
#include "libaout.h"
|
||||||
#include "aout/aout64.h"
|
#include "aout/aout64.h"
|
||||||
|
|
||||||
|
@ -32,13 +32,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||||
/* These are not really stab symbols, but it is
|
/* These are not really stab symbols, but it is
|
||||||
convenient to have them here for the sake of nm.
|
convenient to have them here for the sake of nm.
|
||||||
For completeness, we could also add N_TEXT etc, but those
|
For completeness, we could also add N_TEXT etc, but those
|
||||||
are never needed, since nm treats those specially. */
|
are never needed, since nm treats those specially. */
|
||||||
#define EXTRA_SYMBOLS \
|
#define EXTRA_SYMBOLS \
|
||||||
__define_name (N_SETA, "SETA")/* Absolute set element symbol */ \
|
__define_name (N_SETA, "SETA")/* Absolute set element symbol */ \
|
||||||
__define_name (N_SETT, "SETT")/* Text set element symbol */ \
|
__define_name (N_SETT, "SETT")/* Text set element symbol */ \
|
||||||
__define_name (N_SETD, "SETD")/* Data set element symbol */ \
|
__define_name (N_SETD, "SETD")/* Data set element symbol */ \
|
||||||
__define_name (N_SETB, "SETB")/* Bss set element symbol */ \
|
__define_name (N_SETB, "SETB")/* Bss set element symbol */ \
|
||||||
__define_name (N_SETV, "SETV")/* Pointer to set vector in data area. */ \
|
__define_name (N_SETV, "SETV")/* Pointer to set vector in data area. */ \
|
||||||
__define_name (N_INDR, "INDR") \
|
__define_name (N_INDR, "INDR") \
|
||||||
__define_name (N_WARNING, "WARNING")
|
__define_name (N_WARNING, "WARNING")
|
||||||
|
|
||||||
|
|
|
@ -108,7 +108,7 @@ struct stab_section_info
|
||||||
as the input offsets, because no stabs have been deleted from
|
as the input offsets, because no stabs have been deleted from
|
||||||
this section. Otherwise the i'th entry is the number of
|
this section. Otherwise the i'th entry is the number of
|
||||||
bytes of stabs that have been deleted prior to the i'th
|
bytes of stabs that have been deleted prior to the i'th
|
||||||
stab. */
|
stab. */
|
||||||
bfd_size_type *cumulative_skips;
|
bfd_size_type *cumulative_skips;
|
||||||
|
|
||||||
/* This is an array of string indices. For each stab symbol, we
|
/* This is an array of string indices. For each stab symbol, we
|
||||||
|
@ -464,7 +464,7 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo)
|
||||||
sinfo->stabstr->_cooked_size = _bfd_stringtab_size (sinfo->strings);
|
sinfo->stabstr->_cooked_size = _bfd_stringtab_size (sinfo->strings);
|
||||||
|
|
||||||
/* Calculate the `cumulative_skips' array now that stabs have been
|
/* Calculate the `cumulative_skips' array now that stabs have been
|
||||||
deleted for this section. */
|
deleted for this section. */
|
||||||
|
|
||||||
if (skip != 0)
|
if (skip != 0)
|
||||||
{
|
{
|
||||||
|
|
56
bfd/sunos.c
56
bfd/sunos.c
|
@ -508,7 +508,7 @@ sunos_canonicalize_dynamic_reloc (abfd, storage, syms)
|
||||||
* sizeof (arelent))));
|
* sizeof (arelent))));
|
||||||
if (info->canonical_dynrel == NULL && info->dynrel_count != 0)
|
if (info->canonical_dynrel == NULL && info->dynrel_count != 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
to = info->canonical_dynrel;
|
to = info->canonical_dynrel;
|
||||||
|
|
||||||
if (obj_reloc_entry_size (abfd) == RELOC_EXT_SIZE)
|
if (obj_reloc_entry_size (abfd) == RELOC_EXT_SIZE)
|
||||||
|
@ -1421,7 +1421,7 @@ bfd_sunos_size_dynamic_sections (output_bfd, info, sdynptr, sneedptr,
|
||||||
s->contents = (bfd_byte *) bfd_alloc (output_bfd, s->_raw_size);
|
s->contents = (bfd_byte *) bfd_alloc (output_bfd, s->_raw_size);
|
||||||
if (s->contents == NULL && s->_raw_size != 0)
|
if (s->contents == NULL && s->_raw_size != 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/* The number of buckets is just the number of symbols divided
|
/* The number of buckets is just the number of symbols divided
|
||||||
by four. To compute the final size of the hash table, we
|
by four. To compute the final size of the hash table, we
|
||||||
must actually compute the hash table. Normally we need
|
must actually compute the hash table. Normally we need
|
||||||
|
@ -2274,16 +2274,16 @@ sunos_write_dynamic_symbol (output_bfd, info, harg)
|
||||||
PUT_WORD (output_bfd, r_address, srel->r_address);
|
PUT_WORD (output_bfd, r_address, srel->r_address);
|
||||||
if (bfd_header_big_endian (output_bfd))
|
if (bfd_header_big_endian (output_bfd))
|
||||||
{
|
{
|
||||||
srel->r_index[0] = (bfd_byte)(h->dynindx >> 16);
|
srel->r_index[0] = (bfd_byte) (h->dynindx >> 16);
|
||||||
srel->r_index[1] = (bfd_byte)(h->dynindx >> 8);
|
srel->r_index[1] = (bfd_byte) (h->dynindx >> 8);
|
||||||
srel->r_index[2] = (bfd_byte)(h->dynindx);
|
srel->r_index[2] = (bfd_byte) (h->dynindx);
|
||||||
srel->r_type[0] = (RELOC_STD_BITS_EXTERN_BIG
|
srel->r_type[0] = (RELOC_STD_BITS_EXTERN_BIG
|
||||||
| RELOC_STD_BITS_JMPTABLE_BIG);
|
| RELOC_STD_BITS_JMPTABLE_BIG);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
srel->r_index[2] = (bfd_byte)(h->dynindx >> 16);
|
srel->r_index[2] = (bfd_byte) (h->dynindx >> 16);
|
||||||
srel->r_index[1] = (bfd_byte)(h->dynindx >> 8);
|
srel->r_index[1] = (bfd_byte) (h->dynindx >> 8);
|
||||||
srel->r_index[0] = (bfd_byte)h->dynindx;
|
srel->r_index[0] = (bfd_byte)h->dynindx;
|
||||||
srel->r_type[0] = (RELOC_STD_BITS_EXTERN_LITTLE
|
srel->r_type[0] = (RELOC_STD_BITS_EXTERN_LITTLE
|
||||||
| RELOC_STD_BITS_JMPTABLE_LITTLE);
|
| RELOC_STD_BITS_JMPTABLE_LITTLE);
|
||||||
|
@ -2297,8 +2297,8 @@ sunos_write_dynamic_symbol (output_bfd, info, harg)
|
||||||
PUT_WORD (output_bfd, r_address, erel->r_address);
|
PUT_WORD (output_bfd, r_address, erel->r_address);
|
||||||
if (bfd_header_big_endian (output_bfd))
|
if (bfd_header_big_endian (output_bfd))
|
||||||
{
|
{
|
||||||
erel->r_index[0] = (bfd_byte)(h->dynindx >> 16);
|
erel->r_index[0] = (bfd_byte) (h->dynindx >> 16);
|
||||||
erel->r_index[1] = (bfd_byte)(h->dynindx >> 8);
|
erel->r_index[1] = (bfd_byte) (h->dynindx >> 8);
|
||||||
erel->r_index[2] = (bfd_byte)h->dynindx;
|
erel->r_index[2] = (bfd_byte)h->dynindx;
|
||||||
erel->r_type[0] =
|
erel->r_type[0] =
|
||||||
(RELOC_EXT_BITS_EXTERN_BIG
|
(RELOC_EXT_BITS_EXTERN_BIG
|
||||||
|
@ -2306,8 +2306,8 @@ sunos_write_dynamic_symbol (output_bfd, info, harg)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
erel->r_index[2] = (bfd_byte)(h->dynindx >> 16);
|
erel->r_index[2] = (bfd_byte) (h->dynindx >> 16);
|
||||||
erel->r_index[1] = (bfd_byte)(h->dynindx >> 8);
|
erel->r_index[1] = (bfd_byte) (h->dynindx >> 8);
|
||||||
erel->r_index[0] = (bfd_byte)h->dynindx;
|
erel->r_index[0] = (bfd_byte)h->dynindx;
|
||||||
erel->r_type[0] =
|
erel->r_type[0] =
|
||||||
(RELOC_EXT_BITS_EXTERN_LITTLE
|
(RELOC_EXT_BITS_EXTERN_LITTLE
|
||||||
|
@ -2594,8 +2594,8 @@ sunos_check_dynamic_reloc (info, input_bfd, input_section, harg, reloc,
|
||||||
srel->r_address);
|
srel->r_address);
|
||||||
if (bfd_header_big_endian (dynobj))
|
if (bfd_header_big_endian (dynobj))
|
||||||
{
|
{
|
||||||
srel->r_index[0] = (bfd_byte)(indx >> 16);
|
srel->r_index[0] = (bfd_byte) (indx >> 16);
|
||||||
srel->r_index[1] = (bfd_byte)(indx >> 8);
|
srel->r_index[1] = (bfd_byte) (indx >> 8);
|
||||||
srel->r_index[2] = (bfd_byte)indx;
|
srel->r_index[2] = (bfd_byte)indx;
|
||||||
if (h == NULL)
|
if (h == NULL)
|
||||||
srel->r_type[0] = 2 << RELOC_STD_BITS_LENGTH_SH_BIG;
|
srel->r_type[0] = 2 << RELOC_STD_BITS_LENGTH_SH_BIG;
|
||||||
|
@ -2608,8 +2608,8 @@ sunos_check_dynamic_reloc (info, input_bfd, input_section, harg, reloc,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
srel->r_index[2] = (bfd_byte)(indx >> 16);
|
srel->r_index[2] = (bfd_byte) (indx >> 16);
|
||||||
srel->r_index[1] = (bfd_byte)(indx >> 8);
|
srel->r_index[1] = (bfd_byte) (indx >> 8);
|
||||||
srel->r_index[0] = (bfd_byte)indx;
|
srel->r_index[0] = (bfd_byte)indx;
|
||||||
if (h == NULL)
|
if (h == NULL)
|
||||||
srel->r_type[0] = 2 << RELOC_STD_BITS_LENGTH_SH_LITTLE;
|
srel->r_type[0] = 2 << RELOC_STD_BITS_LENGTH_SH_LITTLE;
|
||||||
|
@ -2633,8 +2633,8 @@ sunos_check_dynamic_reloc (info, input_bfd, input_section, harg, reloc,
|
||||||
erel->r_address);
|
erel->r_address);
|
||||||
if (bfd_header_big_endian (dynobj))
|
if (bfd_header_big_endian (dynobj))
|
||||||
{
|
{
|
||||||
erel->r_index[0] = (bfd_byte)(indx >> 16);
|
erel->r_index[0] = (bfd_byte) (indx >> 16);
|
||||||
erel->r_index[1] = (bfd_byte)(indx >> 8);
|
erel->r_index[1] = (bfd_byte) (indx >> 8);
|
||||||
erel->r_index[2] = (bfd_byte)indx;
|
erel->r_index[2] = (bfd_byte)indx;
|
||||||
if (h == NULL)
|
if (h == NULL)
|
||||||
erel->r_type[0] =
|
erel->r_type[0] =
|
||||||
|
@ -2646,8 +2646,8 @@ sunos_check_dynamic_reloc (info, input_bfd, input_section, harg, reloc,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
erel->r_index[2] = (bfd_byte)(indx >> 16);
|
erel->r_index[2] = (bfd_byte) (indx >> 16);
|
||||||
erel->r_index[1] = (bfd_byte)(indx >> 8);
|
erel->r_index[1] = (bfd_byte) (indx >> 8);
|
||||||
erel->r_index[0] = (bfd_byte)indx;
|
erel->r_index[0] = (bfd_byte)indx;
|
||||||
if (h == NULL)
|
if (h == NULL)
|
||||||
erel->r_type[0] =
|
erel->r_type[0] =
|
||||||
|
@ -2726,14 +2726,14 @@ sunos_check_dynamic_reloc (info, input_bfd, input_section, harg, reloc,
|
||||||
srel->r_address);
|
srel->r_address);
|
||||||
if (bfd_header_big_endian (dynobj))
|
if (bfd_header_big_endian (dynobj))
|
||||||
{
|
{
|
||||||
srel->r_index[0] = (bfd_byte)(indx >> 16);
|
srel->r_index[0] = (bfd_byte) (indx >> 16);
|
||||||
srel->r_index[1] = (bfd_byte)(indx >> 8);
|
srel->r_index[1] = (bfd_byte) (indx >> 8);
|
||||||
srel->r_index[2] = (bfd_byte)indx;
|
srel->r_index[2] = (bfd_byte)indx;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
srel->r_index[2] = (bfd_byte)(indx >> 16);
|
srel->r_index[2] = (bfd_byte) (indx >> 16);
|
||||||
srel->r_index[1] = (bfd_byte)(indx >> 8);
|
srel->r_index[1] = (bfd_byte) (indx >> 8);
|
||||||
srel->r_index[0] = (bfd_byte)indx;
|
srel->r_index[0] = (bfd_byte)indx;
|
||||||
}
|
}
|
||||||
/* FIXME: We may have to change the addend for a PC relative
|
/* FIXME: We may have to change the addend for a PC relative
|
||||||
|
@ -2751,14 +2751,14 @@ sunos_check_dynamic_reloc (info, input_bfd, input_section, harg, reloc,
|
||||||
erel->r_address);
|
erel->r_address);
|
||||||
if (bfd_header_big_endian (dynobj))
|
if (bfd_header_big_endian (dynobj))
|
||||||
{
|
{
|
||||||
erel->r_index[0] = (bfd_byte)(indx >> 16);
|
erel->r_index[0] = (bfd_byte) (indx >> 16);
|
||||||
erel->r_index[1] = (bfd_byte)(indx >> 8);
|
erel->r_index[1] = (bfd_byte) (indx >> 8);
|
||||||
erel->r_index[2] = (bfd_byte)indx;
|
erel->r_index[2] = (bfd_byte)indx;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
erel->r_index[2] = (bfd_byte)(indx >> 16);
|
erel->r_index[2] = (bfd_byte) (indx >> 16);
|
||||||
erel->r_index[1] = (bfd_byte)(indx >> 8);
|
erel->r_index[1] = (bfd_byte) (indx >> 8);
|
||||||
erel->r_index[0] = (bfd_byte)indx;
|
erel->r_index[0] = (bfd_byte)indx;
|
||||||
}
|
}
|
||||||
if (pcrel && h != NULL)
|
if (pcrel && h != NULL)
|
||||||
|
@ -2933,7 +2933,7 @@ sunos_finish_dynamic_link (abfd, info)
|
||||||
PUT_WORD (dynobj,
|
PUT_WORD (dynobj,
|
||||||
BFD_ALIGN (obj_textsec (abfd)->_raw_size, 0x2000),
|
BFD_ALIGN (obj_textsec (abfd)->_raw_size, 0x2000),
|
||||||
esdl.ld_text);
|
esdl.ld_text);
|
||||||
|
|
||||||
if (! bfd_set_section_contents (abfd, sdyn->output_section, &esdl,
|
if (! bfd_set_section_contents (abfd, sdyn->output_section, &esdl,
|
||||||
(sdyn->output_offset
|
(sdyn->output_offset
|
||||||
+ sizeof esd
|
+ sizeof esd
|
||||||
|
|
26
bfd/syms.c
26
bfd/syms.c
|
@ -91,7 +91,6 @@ SUBSECTION
|
||||||
All storage for the symbols themselves is in an objalloc
|
All storage for the symbols themselves is in an objalloc
|
||||||
connected to the BFD; it is freed when the BFD is closed.
|
connected to the BFD; it is freed when the BFD is closed.
|
||||||
|
|
||||||
|
|
||||||
INODE
|
INODE
|
||||||
Writing Symbols, Mini Symbols, Reading Symbols, Symbols
|
Writing Symbols, Mini Symbols, Reading Symbols, Symbols
|
||||||
SUBSECTION
|
SUBSECTION
|
||||||
|
@ -163,8 +162,6 @@ SUBSECTION
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
DOCDD
|
DOCDD
|
||||||
INODE
|
INODE
|
||||||
|
@ -390,14 +387,12 @@ DESCRIPTION
|
||||||
Return the actual number of symbol pointers, not
|
Return the actual number of symbol pointers, not
|
||||||
including the NULL.
|
including the NULL.
|
||||||
|
|
||||||
|
|
||||||
.#define bfd_canonicalize_symtab(abfd, location) \
|
.#define bfd_canonicalize_symtab(abfd, location) \
|
||||||
. BFD_SEND (abfd, _bfd_canonicalize_symtab,\
|
. BFD_SEND (abfd, _bfd_canonicalize_symtab,\
|
||||||
. (abfd, location))
|
. (abfd, location))
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
FUNCTION
|
FUNCTION
|
||||||
bfd_set_symtab
|
bfd_set_symtab
|
||||||
|
@ -474,7 +469,6 @@ bfd_print_symbol_vandf (arg, symbol)
|
||||||
: ((type & BSF_OBJECT) ? 'O' : ' '))));
|
: ((type & BSF_OBJECT) ? 'O' : ' '))));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
FUNCTION
|
FUNCTION
|
||||||
bfd_make_empty_symbol
|
bfd_make_empty_symbol
|
||||||
|
@ -537,7 +531,7 @@ static CONST struct section_to_type stt[] =
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Return the single-character symbol type corresponding to
|
/* Return the single-character symbol type corresponding to
|
||||||
section S, or '?' for an unknown COFF section.
|
section S, or '?' for an unknown COFF section.
|
||||||
|
|
||||||
Check for any leading string which matches, so .text5 returns
|
Check for any leading string which matches, so .text5 returns
|
||||||
't' as well as .text */
|
't' as well as .text */
|
||||||
|
@ -548,7 +542,7 @@ coff_section_type (s)
|
||||||
{
|
{
|
||||||
CONST struct section_to_type *t;
|
CONST struct section_to_type *t;
|
||||||
|
|
||||||
for (t = &stt[0]; t->section; t++)
|
for (t = &stt[0]; t->section; t++)
|
||||||
if (!strncmp (s, t->section, strlen (t->section)))
|
if (!strncmp (s, t->section, strlen (t->section)))
|
||||||
return t->type;
|
return t->type;
|
||||||
|
|
||||||
|
@ -631,7 +625,7 @@ bfd_decode_symclass (symbol)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
FUNCTION
|
FUNCTION
|
||||||
bfd_is_undefined_symclass
|
bfd_is_undefined_symclass
|
||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
Returns non-zero if the class symbol returned by
|
Returns non-zero if the class symbol returned by
|
||||||
|
@ -668,12 +662,12 @@ bfd_symbol_info (symbol, ret)
|
||||||
symbol_info *ret;
|
symbol_info *ret;
|
||||||
{
|
{
|
||||||
ret->type = bfd_decode_symclass (symbol);
|
ret->type = bfd_decode_symclass (symbol);
|
||||||
|
|
||||||
if (bfd_is_undefined_symclass (ret->type))
|
if (bfd_is_undefined_symclass (ret->type))
|
||||||
ret->value = 0;
|
ret->value = 0;
|
||||||
else
|
else
|
||||||
ret->value = symbol->value + symbol->section->vma;
|
ret->value = symbol->value + symbol->section->vma;
|
||||||
|
|
||||||
ret->name = symbol->name;
|
ret->name = symbol->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1005,7 +999,7 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
|
||||||
if (bfd_get_32 (abfd, stab + STRDXOFF) == 0)
|
if (bfd_get_32 (abfd, stab + STRDXOFF) == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* if we did not see a function def, leave space for one. */
|
/* if we did not see a function def, leave space for one. */
|
||||||
if (saw_fun == 0)
|
if (saw_fun == 0)
|
||||||
++info->indextablesize;
|
++info->indextablesize;
|
||||||
|
|
||||||
|
@ -1027,7 +1021,7 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
|
||||||
|
|
||||||
if (saw_fun == 0)
|
if (saw_fun == 0)
|
||||||
++info->indextablesize;
|
++info->indextablesize;
|
||||||
|
|
||||||
if (info->indextablesize == 0)
|
if (info->indextablesize == 0)
|
||||||
return true;
|
return true;
|
||||||
++info->indextablesize;
|
++info->indextablesize;
|
||||||
|
@ -1063,8 +1057,8 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
|
||||||
/* The following code creates a new indextable entry with
|
/* The following code creates a new indextable entry with
|
||||||
a NULL function name if there were no N_FUNs in a file.
|
a NULL function name if there were no N_FUNs in a file.
|
||||||
Note that a N_SO without a file name is an EOF and
|
Note that a N_SO without a file name is an EOF and
|
||||||
there could be 2 N_SO following it with the new filename
|
there could be 2 N_SO following it with the new filename
|
||||||
and directory. */
|
and directory. */
|
||||||
if (saw_fun == 0)
|
if (saw_fun == 0)
|
||||||
{
|
{
|
||||||
info->indextable[i].val = bfd_get_32 (abfd, last_stab + VALOFF);
|
info->indextable[i].val = bfd_get_32 (abfd, last_stab + VALOFF);
|
||||||
|
@ -1076,7 +1070,7 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
saw_fun = 0;
|
saw_fun = 0;
|
||||||
|
|
||||||
file_name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF);
|
file_name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF);
|
||||||
if (*file_name == '\0')
|
if (*file_name == '\0')
|
||||||
{
|
{
|
||||||
|
|
|
@ -127,7 +127,7 @@ extern char *getenv ();
|
||||||
#ifdef ENABLE_NLS
|
#ifdef ENABLE_NLS
|
||||||
#include <libintl.h>
|
#include <libintl.h>
|
||||||
/* Note the use of dgetext() and PACKAGE here, rather than gettext().
|
/* Note the use of dgetext() and PACKAGE here, rather than gettext().
|
||||||
|
|
||||||
This is because the code in this directory is used to build a library which
|
This is because the code in this directory is used to build a library which
|
||||||
will be linked with code in other directories to form programs. We want to
|
will be linked with code in other directories to form programs. We want to
|
||||||
maintain a seperate translation file for this directory however, rather
|
maintain a seperate translation file for this directory however, rather
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue