* aoutx.h (NAME(aout,swap_ext_reloc_in)): Add symcount parameter,
and use it instead of bfd_get_symcount. Check r_index after setting r_extern based on whether this is a base relative reloc. (NAME(aout,swap_std_reloc_IN)): Add symcount parameter, and use it instead of bfd_get_symcount. (NAME(aout,slurp_reloc_table)): Pass bfd_get_symcount to reloc swap routines. * libaout.h (NAME(aout,swap_ext_reloc_in)): Add symcount parameter to declaration. (NAME(aout,swap_std_reloc_in)): Likewise. * sunos.c (sunos_canonicalize_dynamic_reloc): Pass info->dynsym_count to reloc swap routines. * aout-ns32k.c (MY_swap_std_reloc_in): Add symcount parameter. * hp300hpux.c (MY(swap_std_reloc_in)): Likewise. (MY(slurp_reloc_table)): Pass bfd_get_symcount to reloc swap routine. * i386lynx.c (NAME(lynx,swap_ext_reloc_in)): Add symcount parameter. (NAME(lynx,swap_std_reloc_in)): Likewise. (NAME(lynx,slurp_reloc_table)): Pass bfd_get_symcount to reloc swap routines.
This commit is contained in:
parent
d5fb1e2a71
commit
2f6754271f
2 changed files with 87 additions and 7 deletions
|
@ -1,3 +1,64 @@
|
|||
Thu Mar 9 15:06:25 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* aoutx.h (NAME(aout,swap_ext_reloc_in)): Add symcount parameter,
|
||||
and use it instead of bfd_get_symcount. Check r_index after
|
||||
setting r_extern based on whether this is a base relative reloc.
|
||||
(NAME(aout,swap_std_reloc_IN)): Add symcount parameter, and use it
|
||||
instead of bfd_get_symcount.
|
||||
(NAME(aout,slurp_reloc_table)): Pass bfd_get_symcount to reloc
|
||||
swap routines.
|
||||
* libaout.h (NAME(aout,swap_ext_reloc_in)): Add symcount parameter
|
||||
to declaration.
|
||||
(NAME(aout,swap_std_reloc_in)): Likewise.
|
||||
* sunos.c (sunos_canonicalize_dynamic_reloc): Pass
|
||||
info->dynsym_count to reloc swap routines.
|
||||
* aout-ns32k.c (MY_swap_std_reloc_in): Add symcount parameter.
|
||||
* hp300hpux.c (MY(swap_std_reloc_in)): Likewise.
|
||||
(MY(slurp_reloc_table)): Pass bfd_get_symcount to reloc swap
|
||||
routine.
|
||||
* i386lynx.c (NAME(lynx,swap_ext_reloc_in)): Add symcount
|
||||
parameter.
|
||||
(NAME(lynx,swap_std_reloc_in)): Likewise.
|
||||
(NAME(lynx,slurp_reloc_table)): Pass bfd_get_symcount to reloc
|
||||
swap routines.
|
||||
|
||||
Thu Mar 9 12:04:05 1995 Michael Meissner <meissner@tiktok.cygnus.com>
|
||||
|
||||
* bfd.c (bfd_merge_private_bfd_data): New function vector to be
|
||||
called by the linker to merge any private bfd data of the input
|
||||
files and the output file. Used by the PowerPC ELF support to
|
||||
check whether -mrelocatable is used for all modules.
|
||||
(bfd_set_private_flags): New function vector to be called by the
|
||||
assembler to set private flags. Used by the PowerPC ELF support
|
||||
to set that a particular object file was assembled with the
|
||||
-mrelocatable option.
|
||||
|
||||
* targets.c (BFD_JUMP_TABLE_COPY): Add intiialization of the
|
||||
bfd_merge_private_bfd_data and bfd_set_private_flags function
|
||||
vectors.
|
||||
|
||||
* bfd-in2.h, libbfd-in.h: Rebuild with bfd.c and targets.c
|
||||
changes.
|
||||
|
||||
* elf32-ppc.c (ppc_elf_set_private_flags): New function to set the
|
||||
ELF e_flags field.
|
||||
(ppc_elf_copy_private_bfd_data): Copy the e_flags field from the
|
||||
input file to the output file.
|
||||
(ppc_elf_merge_private_bfd_data): Check for a mismatch between the
|
||||
e_flags field of all of the linker input files.
|
||||
|
||||
* libelf.h (elf_obj_tdata): Add ppc_flags_init field so that the
|
||||
PowerPC support can check if compataible e_flags are present.
|
||||
|
||||
* aout-target.h: Add NOP for the bfd_merge_private_bfd_data
|
||||
and bfd_set_private_flags function vectors.
|
||||
* coffcode.h: Ditto.
|
||||
* elf32-target.h: Ditto.
|
||||
* elf64-target.h: Ditto.
|
||||
* libbfd.h: Ditto.
|
||||
* libecoff.h: Ditto.
|
||||
* som.c: Ditto.
|
||||
|
||||
Wed Mar 8 00:53:54 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* cpu-mips.c (arch_info_struct): Add mips:8000 entry.
|
||||
|
|
33
bfd/aoutx.h
33
bfd/aoutx.h
|
@ -2116,11 +2116,12 @@ NAME(aout,swap_ext_reloc_out) (abfd, g, natptr)
|
|||
} \
|
||||
|
||||
void
|
||||
NAME(aout,swap_ext_reloc_in) (abfd, bytes, cache_ptr, symbols)
|
||||
NAME(aout,swap_ext_reloc_in) (abfd, bytes, cache_ptr, symbols, symcount)
|
||||
bfd *abfd;
|
||||
struct reloc_ext_external *bytes;
|
||||
arelent *cache_ptr;
|
||||
asymbol **symbols;
|
||||
bfd_size_type symcount;
|
||||
{
|
||||
int r_index;
|
||||
int r_extern;
|
||||
|
@ -2146,7 +2147,17 @@ NAME(aout,swap_ext_reloc_in) (abfd, bytes, cache_ptr, symbols)
|
|||
>> RELOC_EXT_BITS_TYPE_SH_LITTLE;
|
||||
}
|
||||
|
||||
if (r_extern && r_index > bfd_get_symcount (abfd))
|
||||
cache_ptr->howto = howto_table_ext + r_type;
|
||||
|
||||
/* Base relative relocs are always against the symbol table,
|
||||
regardless of the setting of r_extern. r_extern just reflects
|
||||
whether the symbol the reloc is against is local or global. */
|
||||
if (r_type == RELOC_BASE10
|
||||
|| r_type == RELOC_BASE13
|
||||
|| r_type == RELOC_BASE22)
|
||||
r_extern = 1;
|
||||
|
||||
if (r_extern && r_index > symcount)
|
||||
{
|
||||
/* We could arrange to return an error, but it might be useful
|
||||
to see the file even if it is bad. */
|
||||
|
@ -2154,16 +2165,16 @@ NAME(aout,swap_ext_reloc_in) (abfd, bytes, cache_ptr, symbols)
|
|||
r_index = N_ABS;
|
||||
}
|
||||
|
||||
cache_ptr->howto = howto_table_ext + r_type;
|
||||
MOVE_ADDRESS(GET_SWORD(abfd, bytes->r_addend));
|
||||
}
|
||||
|
||||
void
|
||||
NAME(aout,swap_std_reloc_in) (abfd, bytes, cache_ptr, symbols)
|
||||
NAME(aout,swap_std_reloc_in) (abfd, bytes, cache_ptr, symbols, symcount)
|
||||
bfd *abfd;
|
||||
struct reloc_std_external *bytes;
|
||||
arelent *cache_ptr;
|
||||
asymbol **symbols;
|
||||
bfd_size_type symcount;
|
||||
{
|
||||
int r_index;
|
||||
int r_extern;
|
||||
|
@ -2206,7 +2217,13 @@ NAME(aout,swap_std_reloc_in) (abfd, bytes, cache_ptr, symbols)
|
|||
cache_ptr->howto = howto_table_std + howto_idx;
|
||||
BFD_ASSERT (cache_ptr->howto->type != -1);
|
||||
|
||||
if (r_extern && r_index > bfd_get_symcount (abfd))
|
||||
/* Base relative relocs are always against the symbol table,
|
||||
regardless of the setting of r_extern. r_extern just reflects
|
||||
whether the symbol the reloc is against is local or global. */
|
||||
if (r_baserel)
|
||||
r_extern = 1;
|
||||
|
||||
if (r_extern && r_index > symcount)
|
||||
{
|
||||
/* We could arrange to return an error, but it might be useful
|
||||
to see the file even if it is bad. */
|
||||
|
@ -2288,7 +2305,8 @@ NAME(aout,slurp_reloc_table) (abfd, asect, symbols)
|
|||
(struct reloc_ext_external *) relocs;
|
||||
|
||||
for (; counter < count; counter++, rptr++, cache_ptr++)
|
||||
NAME(aout,swap_ext_reloc_in) (abfd, rptr, cache_ptr, symbols);
|
||||
NAME(aout,swap_ext_reloc_in) (abfd, rptr, cache_ptr, symbols,
|
||||
bfd_get_symcount (abfd));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2296,7 +2314,8 @@ NAME(aout,slurp_reloc_table) (abfd, asect, symbols)
|
|||
(struct reloc_std_external *) relocs;
|
||||
|
||||
for (; counter < count; counter++, rptr++, cache_ptr++)
|
||||
MY_swap_std_reloc_in(abfd, rptr, cache_ptr, symbols);
|
||||
MY_swap_std_reloc_in (abfd, rptr, cache_ptr, symbols,
|
||||
bfd_get_symcount (abfd));
|
||||
}
|
||||
|
||||
free (relocs);
|
||||
|
|
Loading…
Reference in a new issue