1.\" Copyright (c) 2016 The FreeBSD Foundation. All rights reserved. 2.\" 3.\" This documentation was written by Ed Maste under sponsorship of 4.\" the FreeBSD Foundation. 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$ 28.\" 29.Dd February 19, 2016 30.Dt ELFTC_RELOC_TYPE_STR 3 31.Os 32.Sh NAME 33.Nm elftc_reloc_type_str 34.Nd return the type name for an ELF relocation 35.Sh LIBRARY 36.Lb libelftc 37.Sh SYNOPSIS 38.In libelftc.h 39.Ft const char * 40.Fo elftc_reloc_type_str 41.Fa "unsigned int mach" 42.Fa "unsigned int type" 43.Fc 44.Sh DESCRIPTION 45Function 46.Fn elftc_reloc_type_str 47returns the name for specified relocation type. 48.Pp 49Argument 50.Ar mach 51specifies the machine (architecture) type. 52Argument 53.Ar type 54specifies the relocation value. 55.Sh RETURN VALUES 56Function 57.Fn elftc_program_version 58returns a pointer to a string constant, or to an internal character buffer 59if the relocation type is unknown. 60.Sh EXAMPLES 61To print ARM relocation type 7, use: 62.Bd -literal -offset indent 63#include <sys/types.h> 64#include <libelftc.h> 65#include <stdio.h> 66 67(void) printf("%s\en", elftc_reloc_type_str(EM_ARM, 7)); 68.Ed 69.Sh ERRORS 70Function 71.Fn elftc_reloc_type_str 72always succeeds. 73