* aoutx.h (translate_from_native_sym_flags): Don't try to stuff
pointers into value field for warning and indirect symbols; just leave the value field alone. * linker.c (generic_link_add_symbol_list): Use next symbol for warning and indirect symbols, rather than looking in symbol value. * ecoff.c (ecoff_set_symbol_info): Remove indirect_ptr_ptr parameter. Change all callers. Remove support for indirect symbols; it didn't work anyhow. (_bfd_ecoff_slurp_symbol_table): Remove indirect_ptr variable. * syms.c: Change comments about BSF_WARNING and BSF_INDIRECT. * bfd-in2.h: Rebuild.
This commit is contained in:
parent
7a7fbffb25
commit
fcf490c05f
4 changed files with 24 additions and 63 deletions
|
@ -1,3 +1,17 @@
|
|||
Tue Sep 26 12:48:05 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* aoutx.h (translate_from_native_sym_flags): Don't try to stuff
|
||||
pointers into value field for warning and indirect symbols; just
|
||||
leave the value field alone.
|
||||
* linker.c (generic_link_add_symbol_list): Use next symbol for
|
||||
warning and indirect symbols, rather than looking in symbol value.
|
||||
* ecoff.c (ecoff_set_symbol_info): Remove indirect_ptr_ptr
|
||||
parameter. Change all callers. Remove support for indirect
|
||||
symbols; it didn't work anyhow.
|
||||
(_bfd_ecoff_slurp_symbol_table): Remove indirect_ptr variable.
|
||||
* syms.c: Change comments about BSF_WARNING and BSF_INDIRECT.
|
||||
* bfd-in2.h: Rebuild.
|
||||
|
||||
Mon Sep 25 16:04:09 1995 Michael Meissner <meissner@tiktok.cygnus.com>
|
||||
|
||||
* elf32-ppc.c (ppc_elf_howto_raw): For all 14-bit branch relocs,
|
||||
|
|
18
bfd/aoutx.h
18
bfd/aoutx.h
|
@ -1481,16 +1481,7 @@ translate_from_native_sym_flags (abfd, cache_ptr)
|
|||
symbol is the symbol to associate the warning with. If a
|
||||
reference is made to that symbol, a warning is issued. */
|
||||
cache_ptr->symbol.flags = BSF_DEBUGGING | BSF_WARNING;
|
||||
|
||||
/* @@ Stuffing pointers into integers is a no-no. We can
|
||||
usually get away with it if the integer is large enough
|
||||
though. */
|
||||
if (sizeof (cache_ptr + 1) > sizeof (bfd_vma))
|
||||
abort ();
|
||||
cache_ptr->symbol.value = (bfd_vma) (cache_ptr + 1);
|
||||
|
||||
cache_ptr->symbol.section = bfd_abs_section_ptr;
|
||||
|
||||
break;
|
||||
|
||||
case N_INDR: case N_INDR | N_EXT:
|
||||
|
@ -1499,16 +1490,7 @@ translate_from_native_sym_flags (abfd, cache_ptr)
|
|||
symbol is the name of the target. A reference to the first
|
||||
symbol becomes a reference to the second. */
|
||||
cache_ptr->symbol.flags = BSF_DEBUGGING | BSF_INDIRECT | visible;
|
||||
|
||||
/* @@ Stuffing pointers into integers is a no-no. We can
|
||||
usually get away with it if the integer is large enough
|
||||
though. */
|
||||
if (sizeof (cache_ptr + 1) > sizeof (bfd_vma))
|
||||
abort ();
|
||||
cache_ptr->symbol.value = (bfd_vma) (cache_ptr + 1);
|
||||
|
||||
cache_ptr->symbol.section = bfd_ind_section_ptr;
|
||||
|
||||
break;
|
||||
|
||||
case N_WEAKU:
|
||||
|
|
|
@ -1682,15 +1682,14 @@ typedef struct symbol_cache_entry
|
|||
/* Signal that the symbol is the label of constructor section. */
|
||||
#define BSF_CONSTRUCTOR 0x800
|
||||
|
||||
/* Signal that the symbol is a warning symbol. If the symbol
|
||||
is a warning symbol, then the value field (I know this is
|
||||
tacky) will point to the asymbol which when referenced will
|
||||
cause the warning. */
|
||||
/* Signal that the symbol is a warning symbol. The name is a
|
||||
warning. The name of the next symbol is the one to warn about;
|
||||
if a reference is made to a symbol with the same name as the next
|
||||
symbol, a warning is issued by the linker. */
|
||||
#define BSF_WARNING 0x1000
|
||||
|
||||
/* Signal that the symbol is indirect. The value of the symbol
|
||||
is a pointer to an undefined asymbol which contains the
|
||||
name to use instead. */
|
||||
/* Signal that the symbol is indirect. This symbol is an indirect
|
||||
pointer to the symbol with the same name as the next symbol. */
|
||||
#define BSF_INDIRECT 0x2000
|
||||
|
||||
/* BSF_FILE marks symbols that contain a file name. This is used
|
||||
|
|
42
bfd/ecoff.c
42
bfd/ecoff.c
|
@ -50,8 +50,7 @@ static long ecoff_sec_to_styp_flags PARAMS ((const char *name,
|
|||
flagword flags));
|
||||
static boolean ecoff_slurp_symbolic_header PARAMS ((bfd *abfd));
|
||||
static boolean ecoff_set_symbol_info PARAMS ((bfd *abfd, SYMR *ecoff_sym,
|
||||
asymbol *asym, int ext,
|
||||
asymbol **indirect_ptr_ptr));
|
||||
asymbol *asym, int ext));
|
||||
static void ecoff_emit_aggregate PARAMS ((bfd *abfd, FDR *fdr,
|
||||
char *string,
|
||||
RNDXR *rndx, long isym,
|
||||
|
@ -658,46 +657,17 @@ _bfd_ecoff_make_empty_symbol (abfd)
|
|||
/* Set the BFD flags and section for an ECOFF symbol. */
|
||||
|
||||
static boolean
|
||||
ecoff_set_symbol_info (abfd, ecoff_sym, asym, ext, indirect_ptr_ptr)
|
||||
ecoff_set_symbol_info (abfd, ecoff_sym, asym, ext)
|
||||
bfd *abfd;
|
||||
SYMR *ecoff_sym;
|
||||
asymbol *asym;
|
||||
int ext;
|
||||
asymbol **indirect_ptr_ptr;
|
||||
{
|
||||
asym->the_bfd = abfd;
|
||||
asym->value = ecoff_sym->value;
|
||||
asym->section = &bfd_debug_section;
|
||||
asym->udata.i = 0;
|
||||
|
||||
/* An indirect symbol requires two consecutive stabs symbols. */
|
||||
if (*indirect_ptr_ptr != (asymbol *) NULL)
|
||||
{
|
||||
BFD_ASSERT (ECOFF_IS_STAB (ecoff_sym));
|
||||
|
||||
/* @@ Stuffing pointers into integers is a no-no.
|
||||
We can usually get away with it if the integer is
|
||||
large enough though. */
|
||||
if (sizeof (asym) > sizeof (bfd_vma))
|
||||
abort ();
|
||||
(*indirect_ptr_ptr)->value = (bfd_vma) asym;
|
||||
|
||||
asym->flags = BSF_DEBUGGING;
|
||||
asym->section = bfd_und_section_ptr;
|
||||
*indirect_ptr_ptr = NULL;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (ECOFF_IS_STAB (ecoff_sym)
|
||||
&& (ECOFF_UNMARK_STAB (ecoff_sym->index) | N_EXT) == (N_INDR | N_EXT))
|
||||
{
|
||||
asym->flags = BSF_DEBUGGING | BSF_INDIRECT;
|
||||
asym->section = bfd_ind_section_ptr;
|
||||
/* Pass this symbol on to the next call to this function. */
|
||||
*indirect_ptr_ptr = asym;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Most symbol types are just for debugging. */
|
||||
switch (ecoff_sym->st)
|
||||
{
|
||||
|
@ -948,7 +918,6 @@ _bfd_ecoff_slurp_symbol_table (abfd)
|
|||
bfd_size_type internal_size;
|
||||
ecoff_symbol_type *internal;
|
||||
ecoff_symbol_type *internal_ptr;
|
||||
asymbol *indirect_ptr;
|
||||
char *eraw_src;
|
||||
char *eraw_end;
|
||||
FDR *fdr_ptr;
|
||||
|
@ -974,7 +943,6 @@ _bfd_ecoff_slurp_symbol_table (abfd)
|
|||
}
|
||||
|
||||
internal_ptr = internal;
|
||||
indirect_ptr = NULL;
|
||||
eraw_src = (char *) ecoff_data (abfd)->debug_info.external_ext;
|
||||
eraw_end = (eraw_src
|
||||
+ (ecoff_data (abfd)->debug_info.symbolic_header.iextMax
|
||||
|
@ -987,7 +955,7 @@ _bfd_ecoff_slurp_symbol_table (abfd)
|
|||
internal_ptr->symbol.name = (ecoff_data (abfd)->debug_info.ssext
|
||||
+ internal_esym.asym.iss);
|
||||
if (!ecoff_set_symbol_info (abfd, &internal_esym.asym,
|
||||
&internal_ptr->symbol, 1, &indirect_ptr))
|
||||
&internal_ptr->symbol, 1))
|
||||
return false;
|
||||
/* The alpha uses a negative ifd field for section symbols. */
|
||||
if (internal_esym.ifd >= 0)
|
||||
|
@ -998,7 +966,6 @@ _bfd_ecoff_slurp_symbol_table (abfd)
|
|||
internal_ptr->local = false;
|
||||
internal_ptr->native = (PTR) eraw_src;
|
||||
}
|
||||
BFD_ASSERT (indirect_ptr == (asymbol *) NULL);
|
||||
|
||||
/* The local symbols must be accessed via the fdr's, because the
|
||||
string and aux indices are relative to the fdr information. */
|
||||
|
@ -1023,14 +990,13 @@ _bfd_ecoff_slurp_symbol_table (abfd)
|
|||
+ fdr_ptr->issBase
|
||||
+ internal_sym.iss);
|
||||
if (!ecoff_set_symbol_info (abfd, &internal_sym,
|
||||
&internal_ptr->symbol, 0, &indirect_ptr))
|
||||
&internal_ptr->symbol, 0))
|
||||
return false;
|
||||
internal_ptr->fdr = fdr_ptr;
|
||||
internal_ptr->local = true;
|
||||
internal_ptr->native = (PTR) lraw_src;
|
||||
}
|
||||
}
|
||||
BFD_ASSERT (indirect_ptr == (asymbol *) NULL);
|
||||
|
||||
ecoff_data (abfd)->canonical_symbols = internal;
|
||||
|
||||
|
|
Loading…
Reference in a new issue