1.\" $NetBSD: ctfmerge.1,v 1.5 2024/05/04 18:20:44 uwe Exp $ 2.\" 3.\" Copyright (c) 2010 The FreeBSD Foundation 4.\" All rights reserved. 5.\" 6.\" This software was developed by Rui Paulo under sponsorship from the 7.\" FreeBSD Foundation. 8.\" 9.\" Redistribution and use in source and binary forms, with or without 10.\" modification, are permitted provided that the following conditions 11.\" are met: 12.\" 1. Redistributions of source code must retain the above copyright 13.\" notice, this list of conditions and the following disclaimer. 14.\" 2. Redistributions in binary form must reproduce the above copyright 15.\" notice, this list of conditions and the following disclaimer in the 16.\" documentation and/or other materials provided with the distribution. 17.\" 18.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28.\" SUCH DAMAGE. 29.\" 30.\" $FreeBSD: head/cddl/usr.bin/ctfmerge/ctfmerge.1 239969 2012-09-01 06:23:13Z joel $ 31.\" 32.Dd May 4, 2024 33.Dt CTFMERGE 1 34.Os 35.Sh NAME 36.Nm ctfmerge 37.Nd merge several CTF data sections into one 38.Sh SYNOPSIS 39.Nm 40.Op Fl fgstv 41.Fl l Ar label 42.Fl L Ar labelenv 43.Fl o Ar outfile 44.Ar 45.Nm 46.Op Fl fgstv 47.Fl l Ar label 48.Fl L Ar labelenv 49.Fl o Ar outfile 50.Fl d Ar uniqfile 51.Op Fl g 52.Op Fl D Ar uniqlabel 53.Ar 54.Nm 55.Op Fl fgstv 56.Fl l Ar label 57.Fl L Ar labelenv 58.Fl o Ar outfile 59.Fl w Ar withfile 60.Ar 61.Nm 62.Op Fl g 63.Fl c Ar srcfile 64.Ar destfile 65.Sh DESCRIPTION 66The 67.Nm 68utility merges several CTF data sections from several files into one 69output file, unifying common data. 70.Pp 71The following options are available: 72.Bl -tag -width Fl 73.It Fl f 74Match global symbols to global CTF data. 75.It Fl g 76Don't delete the original debugging sections. 77.It Fl s 78Use the 79.Ql .dynsym 80ELF section instead of the 81.Ql .symtab 82ELF section. 83.It Fl t 84Make sure that all object files have a CTF section. 85.It Fl v 86Enable verbose mode. 87.It Fl l Ar label 88Sets the label as 89.Ar label . 90.It Fl L Ar labelenv 91Instructs 92.Nm 93to read the label from the environment variable 94.Ar labelenv . 95.It Fl o Ar outfile 96Use 97.Ar outfile 98to store the merged CTF data. 99.It Fl d Ar uniqfile 100Uniquify against 101.Ar uniqfile . 102.It Fl d Ar uniqlabel 103Uniquify against label 104.Ar uniqlabel 105.It Fl w Ar withfile 106Additive merge with 107.Ar withfile . 108.It Fl c Ar srcfile Ar destfile 109Copy CTF data from 110.Ar srcfile 111into 112.Ar destfile . 113.El 114.Sh ENVIRONMENT VARIABLES 115The following environment variables are used in 116.Nm : 117.Bl -tag -width Ev 118.It Ev CTFMERGE_TERMINATE_NO_UNLINK 119Don't remove temporary files on exit, so that they can be examined 120for debugging. 121.It Ev CTFMERGE_MAX_SLOTS 122Number of round-robin slots in the input queue that it is processed by 123worker threads. 124Each slot represents a file batch 125.Pq default 5 . 126.It Ev CTFMERGE_PHASE1_BATCH_SIZE 127Number of files in a slot that are needed before processing starts 128.Pq default 8 . 129.It Ev CTFMERGE_NUM_THREADS 130Set the number of worker threads. 131If the number of processors can be determined it defaults to 132.Fo min 133.Fa "processors\|*\|3\|/\|2" 134.Fa "nslots" 135.Fc 136if not it defaults to 2. 137.It Ev CTFMERGE_INPUT_THROTTLE 138Max queue size to queue 139.Pq defaults to 10 . 140.It Ev CTFMERGE_DEBUG_LEVEL 141Increase debugging verbosity 142.Pq maximum is 3 . 143.El 144.Sh EXIT STATUS 145.Ex -std 146.Sh SEE ALSO 147.Xr ctfconvert 1 , 148.Xr ctfdump 1 149.Sh HISTORY 150The 151.Nm 152utility first appeared in 153.Fx 7.0 . 154.Sh AUTHORS 155The CTF utilities came from OpenSolaris. 156