xref: /netbsd-src/external/bsd/elftoolchain/dist/libdwarf/dwarf_set_reloc_application.3 (revision 5ac3bc719ce6e70593039505b491894133237d12)
1.\"	$NetBSD: dwarf_set_reloc_application.3,v 1.6 2024/03/03 17:37:32 christos Exp $
2.\"
3.\" Copyright (c) 2011 Kai Wang
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25.\" SUCH DAMAGE.
26.\"
27.\" Id: dwarf_set_reloc_application.3 3963 2022-03-12 16:07:32Z jkoshy
28.\"
29.Dd February 11, 2015
30.Dt DWARF_SET_RELOC_APPLICATION 3
31.Os
32.Sh NAME
33.Nm dwarf_set_reloc_application
34.Nd set a library-wide relocation flag
35.Sh LIBRARY
36.Lb libdwarf
37.Sh SYNOPSIS
38.In libdwarf.h
39.Ft int
40.Fo dwarf_set_reloc_application
41.Fa "int apply"
42.Fc
43.Sh DESCRIPTION
44Function
45.Fn dwarf_set_reloc_application
46allows applications to specify how relocation information is to be
47handled by the DWARF(3) library.
48.Pp
49If the argument
50.Fa apply
51holds a non-zero value, the library will process all the relevant
52.Dq ".rel"
53and
54.Dq ".rela"
55relocation sections and will apply the relocation records found to
56their corresponding DWARF sections.
57.Pp
58If the argument
59.Fa apply
60is zero, the library will not attempt to apply any relocations.
61.Pp
62The default behaviour of the library is to process relocation records.
63.Sh NOTES
64Function
65.Fn dwarf_set_reloc_application
66should be called before initialising a dwarf debugging context, i.e,
67it should be called by the application before calling either of the
68functions
69.Xr dwarf_init 3
70or
71.Xr dwarf_elf_init 3 .
72.Sh RETURN VALUES
73Function
74.Fn dwarf_set_reloc_application
75returns the previous value of the library-wide relocation application
76flag.
77.Sh ERRORS
78Function
79.Fn dwarf_set_reloc_application
80does not return an error.
81.Sh SEE ALSO
82.Xr dwarf 3 ,
83.Xr dwarf_elf_init 3 ,
84.Xr dwarf_init 3
85