Next: , Previous: Performing the Final Link, Up: Performing the Final Link


2.17.3.1 Information provided by the linker

Before the linker calls the _bfd_final_link entry point, it sets up some data structures for the function to use.

The input_bfds field of the bfd_link_info structure will point to a list of all the input files included in the link. These files are linked through the link_next field of the bfd structure.

Each section in the output file will have a list of link_order structures attached to the map_head.link_order field (the link_order structure is defined in bfdlink.h). These structures describe how to create the contents of the output section in terms of the contents of various input sections, fill constants, and, eventually, other types of information. They also describe relocs that must be created by the BFD backend, but do not correspond to any input file; this is used to support -Ur, which builds constructors while generating a relocatable object file.