DWARF_GET_RELOCATION_INFO_COUNT(3)
π dwarf_get_relocation_info_count(3) π
okay so this page is from the Library Functions Manual, and the header is being extra with its truncated DWARF_GET_RELOCATION_INF(3) moment β but the NAME section spells the whole thing out, bestie. We're talking about dwarf_get_relocation_info_count(), and it's giving βtell me how many relocation arrays weβve gotβ energy. Periodt. β¨
π«Ά NAME π«Ά
dwarf_get_relocation_info_count β return the number of relocation arrays. No cap.
πΈ LIBRARY πΈ
DWARF Access Library (libdwarf, -ldwarf). Slay.
β¨ SYNOPSIS β¨
#include <libdwarf.h>
int
dwarf_get_relocation_info_count(Dwarf_P_Debug dbg,
Dwarf_Unsigned *reloc_cnt, int *drd_buffer_version,
Dwarf_Error *err);
π¦ DESCRIPTION π¦
So dwarf_get_relocation_info_count() retrieves the total number of relocation arrays that got generated by a prior call to dwarf_transform_to_disk_form(3). It's literally the βcount my relocation arraysβ function, and we're obsessed.
dbgβ this should reference a DWARF producer instance allocated usingdwarf_producer_init(3)ordwarf_producer_init_b(3). Also, theDW_DLC_SYMBOLIC_RELOCATIONSflag should have been set on the producer instance. Important vibe check, okay?reloc_cntβ this should point to a location which will be set to the total number of relocation arrays generated.drd_buffer_versionβ this should point to a location which will be set to the version number of the relocation structures returned. See the symbolDWARF_DRD_BUFFER_VERSION, defined in the header file<libdwarf.h>.errβ if argumenterris notNULL, it will be used to store error information in case of an error.
π RETURN VALUES π
- On success, function
dwarf_get_relocation_info_count()returnsDW_DLV_OK. Iconic. - It returns
DW_DLV_NO_ENTRYif theDW_DLC_SYMBOLIC_RELOCATIONSflag is not set on the producer instance. - In case of an error, function
dwarf_get_relocation_info_count()returnsDW_DLV_ERRORand sets the argumenterr. Sad but informative.
π ERRORS π
Function dwarf_get_relocation_info_count() can fail with:
[DW_DLE_ARGUMENT]β One of the argumentsdbg,reloc_cntordrd_buffer_versionwasNULL.[DW_DLE_NO_ENTRY]β TheDW_DLC_SYMBOLIC_RELOCATIONSflag was not set.
π SEE ALSO π
dwarf(3)dwarf_get_relocation_info(3)dwarf_producer_init(3)dwarf_producer_init_b(3)dwarf_transform_to_disk_form(3)
okay that's the whole page, bestie π«Ά shoutout to Debian and the September 3, 2β¦ date stamp in the footer β the last bit is literally getting cut off, no cap πππ
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: libdwarf 15.0.0
- Copyright (c) 2011 Kai Wang
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms