man.bsd.lv manual page server

Manual Page Search Parameters

GETOBJFORMAT(3) Library Functions Manual GETOBJFORMAT(3)

getobjformatget preferred object file format

library “libc”

#include <objformat.h>

int
getobjformat(char *buf, size_t bufsize, int *argcp __unused, char **argv __unused);

The () function copies the name of the preferred object file format (“elf”) into a buffer provided by the caller. The function is currently provided only for backward compatibility.

buf points to a user-supplied buffer into which the name of the object file format is copied. bufsize gives the size of the buffer in bytes. The string placed in buf is always null-terminated. It is an error if the buffer is too small to hold the null-terminated name.

argv and argcp are unused and new applications should set them to NULL.

On success, getobjformat() returns the length of the object file format name, not counting the null terminator. If the supplied buffer is too small to hold the object file format and its null terminator, getobjformat() returns -1. In that case, the contents of the buffer and argument vector supplied by the caller are indeterminate.

objformat(1)

The getobjformat() function first appeared in FreeBSD 3.0.

May 23, 2009 DragonFly-5.6.1