mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-21 18:39:34 +08:00
* ecoff.c (_bfd_ecoff_find_nearest_line): Don't restrict line
numbers to the .text section. PR 8767.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
Tue Jan 9 12:00:36 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
|
||||||
|
* ecoff.c (_bfd_ecoff_find_nearest_line): Don't restrict line
|
||||||
|
numbers to the .text section.
|
||||||
|
|
||||||
Mon Jan 8 17:00:57 1996 Ian Lance Taylor <ian@cygnus.com>
|
Mon Jan 8 17:00:57 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
|
||||||
* ieee.c (ieee_write_debug_part): Change return type to boolean.
|
* ieee.c (ieee_write_debug_part): Change return type to boolean.
|
||||||
|
20
bfd/ecoff.c
20
bfd/ecoff.c
@ -1,5 +1,5 @@
|
|||||||
/* Generic ECOFF (Extended-COFF) routines.
|
/* Generic ECOFF (Extended-COFF) routines.
|
||||||
Copyright 1990, 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
|
Copyright 1990, 91, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
|
||||||
Original version by Per Bothner.
|
Original version by Per Bothner.
|
||||||
Full support added by Ian Lance Taylor, ian@cygnus.com.
|
Full support added by Ian Lance Taylor, ian@cygnus.com.
|
||||||
|
|
||||||
@ -262,7 +262,7 @@ ecoff_get_magic (abfd)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return abfd->xvec->byteorder_big_p ? big : little;
|
return bfd_big_endian (abfd) ? big : little;
|
||||||
|
|
||||||
case bfd_arch_alpha:
|
case bfd_arch_alpha:
|
||||||
return ALPHA_MAGIC;
|
return ALPHA_MAGIC;
|
||||||
@ -1813,12 +1813,6 @@ _bfd_ecoff_find_nearest_line (abfd, section, ignore_symbols, offset,
|
|||||||
struct ecoff_debug_info * const debug_info = &ecoff_data (abfd)->debug_info;
|
struct ecoff_debug_info * const debug_info = &ecoff_data (abfd)->debug_info;
|
||||||
struct ecoff_find_line *line_info;
|
struct ecoff_find_line *line_info;
|
||||||
|
|
||||||
/* If we're not in the .text section, we don't have any line
|
|
||||||
numbers. */
|
|
||||||
if (strcmp (section->name, _TEXT) != 0
|
|
||||||
|| offset >= bfd_section_size (abfd, section))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
/* Make sure we have the FDR's. */
|
/* Make sure we have the FDR's. */
|
||||||
if (! _bfd_ecoff_slurp_symbolic_info (abfd, (asection *) NULL, debug_info)
|
if (! _bfd_ecoff_slurp_symbolic_info (abfd, (asection *) NULL, debug_info)
|
||||||
|| bfd_get_symcount (abfd) == 0)
|
|| bfd_get_symcount (abfd) == 0)
|
||||||
@ -2619,7 +2613,7 @@ _bfd_ecoff_write_object_contents (abfd)
|
|||||||
if (abfd->flags & EXEC_P)
|
if (abfd->flags & EXEC_P)
|
||||||
internal_f.f_flags |= F_EXEC;
|
internal_f.f_flags |= F_EXEC;
|
||||||
|
|
||||||
if (! abfd->xvec->byteorder_big_p)
|
if (bfd_little_endian (abfd))
|
||||||
internal_f.f_flags |= F_AR32WR;
|
internal_f.f_flags |= F_AR32WR;
|
||||||
else
|
else
|
||||||
internal_f.f_flags |= F_AR32W;
|
internal_f.f_flags |= F_AR32W;
|
||||||
@ -2970,9 +2964,9 @@ _bfd_ecoff_slurp_armap (abfd)
|
|||||||
|
|
||||||
/* Make sure we have the right byte ordering. */
|
/* Make sure we have the right byte ordering. */
|
||||||
if (((nextname[ARMAP_HEADER_ENDIAN_INDEX] == ARMAP_BIG_ENDIAN)
|
if (((nextname[ARMAP_HEADER_ENDIAN_INDEX] == ARMAP_BIG_ENDIAN)
|
||||||
^ (abfd->xvec->header_byteorder_big_p != false))
|
^ (bfd_header_big_endian (abfd)))
|
||||||
|| ((nextname[ARMAP_OBJECT_ENDIAN_INDEX] == ARMAP_BIG_ENDIAN)
|
|| ((nextname[ARMAP_OBJECT_ENDIAN_INDEX] == ARMAP_BIG_ENDIAN)
|
||||||
^ (abfd->xvec->byteorder_big_p != false)))
|
^ (bfd_big_endian (abfd))))
|
||||||
{
|
{
|
||||||
bfd_set_error (bfd_error_wrong_format);
|
bfd_set_error (bfd_error_wrong_format);
|
||||||
return false;
|
return false;
|
||||||
@ -3129,12 +3123,12 @@ _bfd_ecoff_write_armap (abfd, elength, map, orl_count, stridx)
|
|||||||
strcpy (hdr.ar_name, ecoff_backend (abfd)->armap_start);
|
strcpy (hdr.ar_name, ecoff_backend (abfd)->armap_start);
|
||||||
hdr.ar_name[ARMAP_HEADER_MARKER_INDEX] = ARMAP_MARKER;
|
hdr.ar_name[ARMAP_HEADER_MARKER_INDEX] = ARMAP_MARKER;
|
||||||
hdr.ar_name[ARMAP_HEADER_ENDIAN_INDEX] =
|
hdr.ar_name[ARMAP_HEADER_ENDIAN_INDEX] =
|
||||||
(abfd->xvec->header_byteorder_big_p
|
(bfd_header_big_endian (abfd)
|
||||||
? ARMAP_BIG_ENDIAN
|
? ARMAP_BIG_ENDIAN
|
||||||
: ARMAP_LITTLE_ENDIAN);
|
: ARMAP_LITTLE_ENDIAN);
|
||||||
hdr.ar_name[ARMAP_OBJECT_MARKER_INDEX] = ARMAP_MARKER;
|
hdr.ar_name[ARMAP_OBJECT_MARKER_INDEX] = ARMAP_MARKER;
|
||||||
hdr.ar_name[ARMAP_OBJECT_ENDIAN_INDEX] =
|
hdr.ar_name[ARMAP_OBJECT_ENDIAN_INDEX] =
|
||||||
abfd->xvec->byteorder_big_p ? ARMAP_BIG_ENDIAN : ARMAP_LITTLE_ENDIAN;
|
bfd_big_endian (abfd) ? ARMAP_BIG_ENDIAN : ARMAP_LITTLE_ENDIAN;
|
||||||
memcpy (hdr.ar_name + ARMAP_END_INDEX, ARMAP_END, sizeof ARMAP_END - 1);
|
memcpy (hdr.ar_name + ARMAP_END_INDEX, ARMAP_END, sizeof ARMAP_END - 1);
|
||||||
|
|
||||||
/* Write the timestamp of the archive header to be just a little bit
|
/* Write the timestamp of the archive header to be just a little bit
|
||||||
|
Reference in New Issue
Block a user