p Function .Fn dwarf_get_weaks retrieves descriptors for all the weak symbols associated with the DWARF debug context specified by argument .Fa dbg . The argument .Fa weaks should point to a location that will be set to a pointer to an array of .Vt Dwarf_Weak descriptors. The argument .Fa nweaks should point to a location that will be set to the number of descriptors returned.
p Function .Fn dwarf_weak_cu_offset returns the offset, relative to the .Dq ".debug_info" section, of the compilation unit that contains the debugging information entry associated with the argument .Fa weak . Argument .Fa cu_offset should point to a location that will hold the returned offset.
p Function .Fn dwarf_weak_die_offset retrieves the offset, relative to the .Dq ".debug_info" section, of the debugging information entry associated with the argument .Fa weak , and stores it into the location pointed to by the argument .Fa die_offset .
p Function .Fn dwarf_weak_name_offsets retrieves the name and offsets for the debugging information entry for argument .Fa weak . Argument .Fa name should point to a location which will be set to a pointer to a NUL-terminated string containing the name of the associated debugging information entry. Argument .Fa die_offset should point to a location which will be set to the offset, relative to the .Dq ".debug_info" section, of the associated debugging information entry. Argument .Fa cu_die_offset should point to a location which will be set to the offset, relative to the .Dq ".debug_info" section, of the first debugging information entry in the compilation unit associated with argument .Fa weak .
p Function .Fn dwarf_weakname sets the location pointed to by argument .Fa name to a pointer to a NUL-terminated string holding the name of the debugging information entry associated with the argument .Fa weak . .Ss Memory Management The memory area used for the array of .Vt Dwarf_Weak descriptors returned in argument .Fa weaks by function .Fn dwarf_get_weaks is owned by the .Lb libdwarf . Application code should not attempt to directly free this pointer. Portable code should instead use the function .Xr dwarf_weaks_dealloc 3 to indicate that the memory area may be freed.
p The memory area used for the string returned in the .Fa name argument to functions .Fn dwarf_weak_name_offsets and .Fn dwarf_weakname is owned by the .Lb libdwarf . Portable code should indicate that the memory area can be freed using the .Xr dwarf_dealloc 3 function. .Ss Error Returns If argument .Fa err is not .Dv NULL , these functions will use it to store error information, in case of an error. .Sh RETURN VALUES On success, these functions returns .Dv DW_DLV_OK . In case of an error, they return .Dv DW_DLV_ERROR and set the argument .Fa err . .Sh ERRORS These functions may fail with the following errors: l -tag -width ".Bq Er DW_DLE_ARGUMENT" t Bq Er DW_DLE_ARGUMENT One of the arguments .Va cu_die_offset , .Va cu_offset , .Va dbg , .Va die_offset , .Va weak , .Va weaks , .Va name , or .Va nweaks was .Dv NULL . t Bq Er DW_DLE_NO_ENTRY The DWARF debugging context referenced by argument .Fa dbg did not contain information about weak symbols. .El .Sh SEE ALSO .Xr dwarf 3 , .Xr dwarf_get_cu_die_offset_given_cu_header_offset 3 , .Xr dwarf_weaks_dealloc 3