projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gdb: add target_ops::supports_displaced_step
[deliverable/binutils-gdb.git]
/
bfd
/
i386lynx.c
diff --git
a/bfd/i386lynx.c
b/bfd/i386lynx.c
index 9c1b9f2b933f7cea5ecadf2d57bab3c5d850e7db..8cffd24235b70388d1690830a7cd3978fa004caa 100644
(file)
--- a/
bfd/i386lynx.c
+++ b/
bfd/i386lynx.c
@@
-1,5
+1,5
@@
/* BFD back-end for i386 a.out binaries under LynxOS.
/* BFD back-end for i386 a.out binaries under LynxOS.
- Copyright (C) 1990-20
14
Free Software Foundation, Inc.
+ Copyright (C) 1990-20
20
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
This file is part of BFD, the Binary File Descriptor library.
@@
-36,14
+36,12
@@
#ifndef WRITE_HEADERS
#define WRITE_HEADERS(abfd, execp) \
{ \
#ifndef WRITE_HEADERS
#define WRITE_HEADERS(abfd, execp) \
{ \
- bfd_size_type text_size; /* dummy vars */ \
- file_ptr text_end; \
if (adata(abfd).magic == undecided_magic) \
if (adata(abfd).magic == undecided_magic) \
- NAME(aout,adjust_sizes_and_vmas) (abfd
, &text_size, &text_end);
\
- \
+ NAME(aout,adjust_sizes_and_vmas) (abfd
);
\
+ \
execp->a_syms = bfd_get_symcount (abfd) * EXTERNAL_NLIST_SIZE; \
execp->a_entry = bfd_get_start_address (abfd); \
execp->a_syms = bfd_get_symcount (abfd) * EXTERNAL_NLIST_SIZE; \
execp->a_entry = bfd_get_start_address (abfd); \
- \
+ \
execp->a_trsize = ((obj_textsec (abfd)->reloc_count) * \
obj_reloc_entry_size (abfd)); \
execp->a_drsize = ((obj_datasec (abfd)->reloc_count) * \
execp->a_trsize = ((obj_textsec (abfd)->reloc_count) * \
obj_reloc_entry_size (abfd)); \
execp->a_drsize = ((obj_datasec (abfd)->reloc_count) * \
@@
-55,24
+53,24
@@
abfd) != EXEC_BYTES_SIZE) \
return FALSE; \
/* Now write out reloc info, followed by syms and strings */ \
abfd) != EXEC_BYTES_SIZE) \
return FALSE; \
/* Now write out reloc info, followed by syms and strings */ \
- \
- if (bfd_get_symcount (abfd) != 0) \
+ \
+ if (bfd_get_symcount (abfd) != 0) \
{ \
{ \
- if (bfd_seek (abfd, (file_ptr) (N_SYMOFF
(*
execp)), SEEK_SET) \
+ if (bfd_seek (abfd, (file_ptr) (N_SYMOFF
(
execp)), SEEK_SET) \
!= 0) \
!= 0) \
- return FALSE; \
+ return FALSE; \
\
if (! NAME(aout,write_syms) (abfd)) return FALSE; \
\
\
if (! NAME(aout,write_syms) (abfd)) return FALSE; \
\
- if (bfd_seek (abfd, (file_ptr) (N_TRELOFF
(*
execp)), SEEK_SET) \
+ if (bfd_seek (abfd, (file_ptr) (N_TRELOFF
(
execp)), SEEK_SET) \
!= 0) \
!= 0) \
- return FALSE; \
+ return FALSE; \
\
if (!NAME(lynx,squirt_out_relocs) (abfd, obj_textsec (abfd))) \
return FALSE; \
\
if (!NAME(lynx,squirt_out_relocs) (abfd, obj_textsec (abfd))) \
return FALSE; \
- if (bfd_seek (abfd, (file_ptr) (N_DRELOFF
(*
execp)), SEEK_SET) \
+ if (bfd_seek (abfd, (file_ptr) (N_DRELOFF
(
execp)), SEEK_SET) \
!= 0) \
!= 0) \
- return 0; \
+ return 0; \
\
if (!NAME(lynx,squirt_out_relocs) (abfd, obj_datasec (abfd))) \
return FALSE; \
\
if (!NAME(lynx,squirt_out_relocs) (abfd, obj_datasec (abfd))) \
return FALSE; \
@@
-281,7
+279,7
@@
NAME(lynx,swap_ext_reloc_out) (bfd *abfd,
to give the true offset from the section */
to give the true offset from the section */
-#define MOVE_ADDRESS(ad)
\
+#define MOVE_ADDRESS(ad) \
if (r_extern) \
{ \
/* undefined symbol */ \
if (r_extern) \
{ \
/* undefined symbol */ \
@@
-290,7
+288,7
@@
NAME(lynx,swap_ext_reloc_out) (bfd *abfd,
} \
else \
{ \
} \
else \
{ \
- /* defined, section relative. replace symbol with pointer to \
+ /* defined, section relative. replace symbol with pointer to \
symbol which points to section */ \
switch (r_index) { \
case N_TEXT: \
symbol which points to section */ \
switch (r_index) { \
case N_TEXT: \
@@
-315,7
+313,7
@@
NAME(lynx,swap_ext_reloc_out) (bfd *abfd,
cache_ptr->addend = ad; \
break; \
} \
cache_ptr->addend = ad; \
break; \
} \
- } \
+ } \
static void
NAME(lynx,swap_ext_reloc_in) (bfd *abfd,
static void
NAME(lynx,swap_ext_reloc_in) (bfd *abfd,
@@
-401,7
+399,7
@@
NAME(lynx,slurp_reloc_table) (bfd *abfd,
bfd_set_error (bfd_error_invalid_operation);
return FALSE;
bfd_set_error (bfd_error_invalid_operation);
return FALSE;
-doit:
+
doit:
if (bfd_seek (abfd, asect->rel_filepos, SEEK_SET) != 0)
return FALSE;
each_size = obj_reloc_entry_size (abfd);
if (bfd_seek (abfd, asect->rel_filepos, SEEK_SET) != 0)
return FALSE;
each_size = obj_reloc_entry_size (abfd);
@@
-413,20
+411,13
@@
doit:
if (!reloc_cache && count != 0)
return FALSE;
if (!reloc_cache && count != 0)
return FALSE;
- relocs =
bfd_alloc (abfd
, reloc_size);
+ relocs =
_bfd_alloc_and_read (abfd, reloc_size
, reloc_size);
if (!relocs && reloc_size != 0)
{
free (reloc_cache);
return FALSE;
}
if (!relocs && reloc_size != 0)
{
free (reloc_cache);
return FALSE;
}
- if (bfd_bread (relocs, reloc_size, abfd) != reloc_size)
- {
- bfd_release (abfd, relocs);
- free (reloc_cache);
- return FALSE;
- }
-
if (each_size == RELOC_EXT_SIZE)
{
struct reloc_ext_external *rptr = (struct reloc_ext_external *) relocs;
if (each_size == RELOC_EXT_SIZE)
{
struct reloc_ext_external *rptr = (struct reloc_ext_external *) relocs;
This page took
0.027683 seconds
and
4
git commands to generate.