---
name: "elftc_reloc_type_str"
section: "3"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/elftc_reloc_type_str"
---

# elftc\_reloc\_type\_str(3)

return the type name for an ELF relocation

## NAME

**elftc\_reloc\_type\_str** – return the type name for an ELF relocation

## LIBRARY

library “libelftc”

## SYNOPSIS

**#include \<libelftc.h\>**

*const* *char* *\**\

**elftc\_reloc\_type\_str**(*unsigned int mach*, *unsigned int type*);

## DESCRIPTION

Function **elftc\_reloc\_type\_str**() returns the name for specified relocation type.

Argument *mach* specifies the machine (architecture) type. Argument *type* specifies the relocation value.

## RETURN VALUES

Function **elftc\_program\_version**() returns a pointer to a string constant, or to an internal character buffer if the relocation type is unknown.

## EXAMPLES

To print ARM relocation type 7, use:

```
#include <sys/types.h>
#include <libelftc.h>
#include <stdio.h>
(void) printf("%s\n", elftc_reloc_type_str(EM_ARM, 7));
```

## ERRORS

Function **elftc\_reloc\_type\_str**() always succeeds.
