diff options
author | Ian Lance Taylor <ian@airs.com> | 1994-03-22 00:27:05 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1994-03-22 00:27:05 +0000 |
commit | f1cca64780428243ea7d62192a2395a60cb90263 (patch) | |
tree | 3fb2922fd51faed0c4fe6e0e8555a593f7620c92 /bfd/libbfd.h | |
parent | 4fdbafb247bd7a1af8c22d6da0acc560aa16d05a (diff) | |
download | gdb-f1cca64780428243ea7d62192a2395a60cb90263.zip gdb-f1cca64780428243ea7d62192a2395a60cb90263.tar.gz gdb-f1cca64780428243ea7d62192a2395a60cb90263.tar.bz2 |
Support for link_order types which generate relocs in order to
support -Ur in the linker.
* linker.c (generic_link_add_symbol_list): Remove bitsize argument
from call to _bfd_generic_link_add_one_symbol.
(_bfd_generic_link_add_one_symbol): Remove bitsize argument.
Don't pass bitsize to constructor call back. Pass BFD_RELOC_CTOR
instead of bitsize to add_to_set call back.
(_bfd_generic_final_link): Account for link_order relocs when
allocating space for relocations. Handle them in link_order loop.
(_bfd_generic_reloc_link_order): New function.
(_bfd_default_link_order): If a reloc_link_order is seen here,
abort.
(_bfd_count_link_order_relocs): New function.
* libbfd-in.h (_bfd_generic_link_add_one_symbol): Remove bitsize
argument from declaration.
(_bfd_generic_reloc_link_order): Declare.
(_bfd_count_link_order_relocs): Declare.
* libbfd.h: Rebuilt.
* aoutx.h (aout_link_add_symbols): Remove bitsize argument from
call to _bfd_generic_link_add_one_symbol.
(NAME(aout,final_link)): Account for link_order relocs when
allocating space for relocations. Handle them after handling all
input BFDs.
(aout_link_reloc_link_order): New function.
* ecoff.c (ecoff_link_add_externals): Remove bitsize argument from
call to _bfd_generic_link_add_one_symbol.
(ecoff_bfd_final_link): Account for link_order relocs when
allocating space for relocations. Handle them in link_order loop.
(ecoff_link_write_external): Set the storage class of a defined
linker created symbol based on the section it is in. Correct
bfd_link_hash_weak case to use .sc rather than .st.
(ecoff_reloc_link_order): New function.
* coff-alpha.c (alpha_bfd_reloc_type_lookup): Handle
BFD_RELOC_CTOR.
* coff-mips.c (mips_bfd_reloc_type_lookup): Likewise.
Diffstat (limited to 'bfd/libbfd.h')
-rw-r--r-- | bfd/libbfd.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/bfd/libbfd.h b/bfd/libbfd.h index 59ccdf7..5a02d0f 100644 --- a/bfd/libbfd.h +++ b/bfd/libbfd.h @@ -153,6 +153,10 @@ boolean bfd_generic_set_section_contents PARAMS ((bfd *abfd, sec_ptr section, PTR location, file_ptr offset, bfd_size_type count)); +/* Generic routine to determine of the given symbol is a local + label. */ +extern boolean bfd_generic_is_local_label PARAMS ((bfd *, asymbol *)); + /* A routine to create entries for a bfd_link_hash_table. */ extern struct bfd_hash_entry *_bfd_link_hash_newfunc PARAMS ((struct bfd_hash_entry *entry, @@ -186,18 +190,26 @@ typedef struct bfd_link_hash_entry _bfd_link_hash_entry; extern boolean _bfd_generic_link_add_one_symbol PARAMS ((struct bfd_link_info *, bfd *, const char *name, flagword, asection *, bfd_vma, const char *, boolean copy, - boolean constructor, unsigned int bitsize, - struct bfd_link_hash_entry **)); + boolean constructor, struct bfd_link_hash_entry **)); /* Generic link routine. */ extern boolean _bfd_generic_final_link PARAMS ((bfd *, struct bfd_link_info *)); +/* Generic reloc_link_order processing routine. */ +extern boolean _bfd_generic_reloc_link_order + PARAMS ((bfd *, struct bfd_link_info *, asection *, + struct bfd_link_order *)); + /* Default link order processing routine. */ extern boolean _bfd_default_link_order PARAMS ((bfd *, struct bfd_link_info *, asection *, struct bfd_link_order *)); +/* Count the number of reloc entries in a link order list. */ +extern unsigned int _bfd_count_link_order_relocs + PARAMS ((struct bfd_link_order *)); + /* Final link relocation routine. */ extern bfd_reloc_status_type _bfd_final_link_relocate PARAMS ((const reloc_howto_type *, bfd *, asection *, bfd_byte *, |