Differing file formats




Differing file formats - Untitled















Next: Adding symbols from an object file,
Previous: Adding Symbols to the Hash Table,
Up: Adding Symbols to the Hash Table



2.17.2.1 Differing file formats

Normally all the files involved in a link will be of the same
format, but it is also possible to link together different
format object files, and the back end must support that. The
_bfd_link_add_symbols entry point is called via the target
vector of the file to be added. This has an important
consequence: the function may not assume that the hash table
is the type created by the corresponding
_bfd_link_hash_table_create vector. All the
_bfd_link_add_symbols function can assume about the hash
table is that it is derived from struct
bfd_link_hash_table.

Sometimes the _bfd_link_add_symbols function must store
some information in the hash table entry to be used by the
_bfd_final_link function. In such a case the output bfd
xvec must be checked to make sure that the hash table was
created by an object file of the same format.

The _bfd_final_link routine must be prepared to handle a
hash entry without any extra information added by the
_bfd_link_add_symbols function. A hash entry without
extra information will also occur when the linker script
directs the linker to create a symbol. Note that, regardless
of how a hash table entry is added, all the fields will be
initialized to some sort of null value by the hash table entry
initialization function.

See ecoff_link_add_externals for an example of how to
check the output bfd before saving information (in this
case, the ECOFF external symbol debugging information) in a
hash table entry.





Wyszukiwarka

Podobne podstrony:
File Formats And Extensions
WRITE HEX File Format
READ HEX File Format
def file format
File Format
file formats recovered by photorec
db tech file format
Auxiliary File Format
POS File Format
file8885
Fadal Format 2 (AC) B807 12
file D Download Polki Wirtualna Polska8
Fadal Format 2 [MM] MW60 89
Fadal Format 2 [PEP] M116 89 1
SGH Flasher Dumper v 07 dif format
file8872

więcej podobnych podstron