1999-08-18 Donn Terry <donn@interix.com>

* cofflink.c: Move definitions of N_TMASK, et. al., out of
	_bfd_coff_link_input_bfd into top level.
This commit is contained in:
Ian Lance Taylor
1999-08-19 00:55:50 +00:00
parent 6e7d820549
commit b2d638c7ec
2 changed files with 24 additions and 9 deletions

View File

@ -1,5 +1,8 @@
1999-08-18 Donn Terry <donn@interix.com> 1999-08-18 Donn Terry <donn@interix.com>
* cofflink.c: Move definitions of N_TMASK, et. al., out of
_bfd_coff_link_input_bfd into top level.
* coff-i386.c (coff_i386_reloc): Handle R_IMAGEBASE. * coff-i386.c (coff_i386_reloc): Handle R_IMAGEBASE.
(RTYPE2HOWTO): Return NULL if reloc type is out of range. (RTYPE2HOWTO): Return NULL if reloc type is out of range.
(coff_i386_rtype_to_howto): Likewise. (coff_i386_rtype_to_howto): Likewise.

View File

@ -40,6 +40,16 @@ static int process_embedded_commands
PARAMS ((bfd *, struct bfd_link_info *, bfd *)); PARAMS ((bfd *, struct bfd_link_info *, bfd *));
static void mark_relocs PARAMS ((struct coff_final_link_info *, bfd *)); static void mark_relocs PARAMS ((struct coff_final_link_info *, bfd *));
/* Define macros so that the ISFCN, et. al., macros work correctly.
These macros are defined in include/coff/internal.h in terms of
N_TMASK, etc. These definitions require a user to define local
variables with the appropriate names, and with values from the
coff_data (abfd) structure. */
#define N_TMASK n_tmask
#define N_BTSHFT n_btshft
#define N_BTMASK n_btmask
/* Create an entry in a COFF linker hash table. */ /* Create an entry in a COFF linker hash table. */
struct bfd_hash_entry * struct bfd_hash_entry *
@ -285,6 +295,12 @@ coff_link_add_symbols (abfd, info)
bfd *abfd; bfd *abfd;
struct bfd_link_info *info; struct bfd_link_info *info;
{ {
#if 0
/* These aren't needed yet. */
unsigned int n_tmask = coff_data (abfd)->local_n_tmask;
unsigned int n_btshft = coff_data (abfd)->local_n_btshft;
unsigned int n_btmask = coff_data (abfd)->local_n_btmask;
#endif
boolean keep_syms; boolean keep_syms;
boolean default_copy; boolean default_copy;
bfd_size_type symcount; bfd_size_type symcount;
@ -1256,14 +1272,17 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
struct coff_final_link_info *finfo; struct coff_final_link_info *finfo;
bfd *input_bfd; bfd *input_bfd;
{ {
unsigned int n_tmask = coff_data (input_bfd)->local_n_tmask;
unsigned int n_btshft = coff_data (input_bfd)->local_n_btshft;
#if 0
unsigned int n_btmask = coff_data (input_bfd)->local_n_btmask;
#endif
boolean (*adjust_symndx) PARAMS ((bfd *, struct bfd_link_info *, bfd *, boolean (*adjust_symndx) PARAMS ((bfd *, struct bfd_link_info *, bfd *,
asection *, struct internal_reloc *, asection *, struct internal_reloc *,
boolean *)); boolean *));
bfd *output_bfd; bfd *output_bfd;
const char *strings; const char *strings;
bfd_size_type syment_base; bfd_size_type syment_base;
unsigned int n_tmask;
unsigned int n_btshft;
boolean copy, hash; boolean copy, hash;
bfd_size_type isymesz; bfd_size_type isymesz;
bfd_size_type osymesz; bfd_size_type osymesz;
@ -1288,13 +1307,6 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
linesz = bfd_coff_linesz (input_bfd); linesz = bfd_coff_linesz (input_bfd);
BFD_ASSERT (linesz == bfd_coff_linesz (output_bfd)); BFD_ASSERT (linesz == bfd_coff_linesz (output_bfd));
n_tmask = coff_data (input_bfd)->local_n_tmask;
n_btshft = coff_data (input_bfd)->local_n_btshft;
/* Define macros so that ISFCN, et. al., macros work correctly. */
#define N_TMASK n_tmask
#define N_BTSHFT n_btshft
copy = false; copy = false;
if (! finfo->info->keep_memory) if (! finfo->info->keep_memory)
copy = true; copy = true;