dlfcn.h(7POSIX)

πŸ’– dlfcn.h β€” dynamic linking πŸ’–

okay bestie, welcome to the dlfcn.h page from the POSIX Programmer's Manual (yes, that's the manual name, she's fancy like that) ✨


🌸 PROLOG 🌸

real talk first, bestie: this manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ β€” so if you're on Linux, go consult the corresponding Linux manual page for the actual deets on Linux behavior. Or, plot twist, the interface might not even be implemented on Linux at all. πŸ’€


πŸ‘‘ NAME πŸ‘‘

dlfcn.h β€” dynamic linking. that's it, that's the whole vibe. dynamic linking. iconic.


✨ SYNOPSIS ✨

#include <dlfcn.h>

πŸ¦‹ DESCRIPTION πŸ¦‹

so the <dlfcn.h> header shall define at least the following symbolic constants, and they're all for building a dlopen() mode argument. yes, at least. she's generous. 🫢

  • RTLD_LAZY β€” relocations are performed at an implementation-defined time. aka: whenever the implementation feels like it, honestly. not our call.
  • RTLD_NOW β€” relocations are performed when the object is loaded. right then. immediately. no waiting. main character energy.
  • RTLD_GLOBAL β€” all symbols are available for relocation processing of other modules. sharing is caring.
  • RTLD_LOCAL β€” all symbols are not made available for relocation processing by other modules. keep it private, babe. boundaries.

and the following shall be declared as functions, and may also be defined as macros. function prototypes shall be provided:

int    dlclose(void *);
char  *dlerror(void);
void  *dlopen(const char *, int);
void  *dlsym(void *restrict, const char *restrict);
ngl the restrict keywords in there are doing a lot of heavy lifting and they deserve their moment. πŸ’…

The following sections are informative. so like, they're here, but they're not out here making rules.


πŸŽ€ APPLICATION USAGE πŸŽ€

None.

literally nothing. she said "no notes." obsessed.


🌈 RATIONALE 🌈

None.

also nothing. the reasoning is vibes. the vibes are sufficient.


⭐ FUTURE DIRECTIONS ⭐

None.

nothing's changing, bestie. she's stable. she's settled. she's at peace. πŸ§˜β€β™€οΈ


πŸ”₯ SEE ALSO πŸ”₯

The System Interfaces volume of POSIX.1‐2017, and honestly the whole squad:

  • dlclose()
  • dlerror()
  • dlopen()
  • dlsym()

iykyk πŸ’…


Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group.

important, no cap: in the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. so if they disagree, the original wins, periodt. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html .

Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .


and that's the whole page, bestie!! πŸŽ€ this came to you from IEEE/The Open Group, dated 2017, and she's been sitting pretty at dlfcn.h(7POSIX) this whole time. mwah. πŸ’‹πŸ«Ά