dwarf_set_reloc_application(3)

dwarf_set_reloc_application3

Set a library-wide relocation flag

Usage

#include <libdwarf.h>

int

dwarf_set_reloc_application(int apply);

Library

library “libdwarf”

Overview

Function dwarf_set_reloc_application() allows applications to specify how relocation information is to be handled by the DWARF(3) library.

If the argument apply holds a non-zero value, the library will process all the relevant “.rel” and “.rela” relocation sections and will apply the relocation records found to their corresponding DWARF sections.

If the argument apply is zero, the library will not attempt to apply any relocations.

The default behaviour of the library is to process relocation records.

Notes

Function dwarf_set_reloc_application() should be called before initialising a dwarf debugging context, i.e, it should be called by the application before calling either of the functions dwarf_init(3) or dwarf_elf_init(3).

Return values

Function dwarf_set_reloc_application() returns the previous value of the library-wide relocation application flag.

Errors

Function dwarf_set_reloc_application() does not return an error.

Releases

25 releases since FreeBSD 11.0-RELEASE; the text changed 1 time.

  1. 11.0–12.0
  2. 12.1–16.0

From base 16.0-CURRENT-20261027-61c70dc16a79 in FreeBSD 16.0-CURRENT (2026-10-27). Parsed by carta from the page's mdoc source.