TNS/E Native Object Files
eld Manual—527255-009
A-25
How -alf Updates DWARF
contains one of the following two values, which match the values for relocation types
used elsewhere in object files:
#define R_IA_64_REL32MSB0x6c
#define R_IA_64_REL64MSB0x6e
If REL32MSB is present, that means it is a 32-bit address. If REL64MSB is present,
that means it is a 64-bit address.
The remaining 56 bits of the 64-bit entry tell the file offset of that address, from the
beginning of the object file.
The following macros show how to pull apart or put together the two parts of each 64-
bit entry:
#define ELF64_TANDEM_DW_TYPE (i) ((i) >> 56)
#define ELF64_TANDEM_DW_OFFSET (i)((Elf64_Xword)(i) & 0xffffffffffffff)
#define ELF64_TANDEM_DW_INFO (t, o)(((Elf64_Xword)(t) << 56) + o)
There are no rules concerning the ordering of the elements of the .debug_relocs
section.
Additional Notes About Relocation Types
Note 1:
It is possible for the compiler or assembler to use IP-relative addressing for items that it
puts into the same text section and can't be preempted, such as static procedures,
literals, jump tables, etc. Since the linker doesn't rearrange the contents within an
individual text section of a linkfile, the compiler or assembler knows the final IP-relative
offsets to use. These kinds of calculations do not require any relocation table entries.
Note 2:
When there is a relocation table entry of type R_IA_64_FPTRx or
R_IA_64_LTOFF_FPTR22, which are the ones that require the address of an official
function descriptor, and the target procedure exists in the same loadfile, the linker will
also allocate the official function descriptor for that procedure. The linker similarly
allocates such official function descriptors for all exported procedures, because
relocation table entries of these types might exist in other loadfiles, requiring the
address of such an official function descriptor.
Note 3:
Note that there are different relocation types to say that one wants the real address of
something, versus the address of the official function descriptor for a procedure.
However, there is a runtime procedure named dlsym, which can be asked for the
address of a symbol, given only the name of the symbol. After dlsym finds the
symbol's dynamic symbol table entry, it looks at that entry to see if the symbol is code
or data, and based on that it decides to either return the real address of the symbol (if it
is data) or the address of its official function descriptor (if it is a procedure).
Summary of Contents for eld
Page 4: ......
Page 8: ...Contents eld Manual 527255 009 iv ...
Page 12: ...What s New in This Manual eld Manual 527255 009 viii Changes to the 527255 005 Manual ...
Page 34: ...Introduction to eld eld Manual 527255 009 1 14 Example of Use ...
Page 54: ...eld Input and Output eld Manual 527255 009 2 20 Using Archives ...
Page 98: ...Other eld Processing eld Manual 527255 009 4 20 Merging Source RTDUs ...
Page 242: ...Output Listings and Error Handling eld Manual 527255 009 6 132 Glossary of Errors ...