FreeBSD/libexec/rtld-elf/rtld.c
/*
 * Function for the debugger to set a breakpoint on to gain control.
 *
 * The two parameters allow the debugger to easily find and determine
 * what the runtime loader is doing and to whom it is doing it.
 *
 * When the loadhook trap is hit (r_debug_state, set at program
 * initialization), the arguments can be found on the stack:
 *
 *  +8   struct link_map *m
 *  +4   struct r_debug  *rd
 *  +0   RetAddr
 */
Function for the debugger to set a breakpoint on to gain control.
The two parameters allow the debugger to easily find and determine
what the runtime loader is doing and to whom it is doing it.

When the loadhook trap is hit (r_debug_state, set at program
initialization), the arguments can be found on the stack.

+8   struct link_map *m
+4   struct r_debug  *rd
+0   RetAddr
Function for the debugger to set a breakpoint on to gain control . The two parameters allow the debugger to easily find and determine what the runtime loader is doing and to whom it is doing it . When the loadhook trap is hit ( r_debug_state set at program initialization ) the arguments can be found on the stack . + 8 struct link_map * m + 4 struct r_debug * rd + 0 RetAddr
void
r_debug_state(struct r_debug* rd, struct link_map *m)
{
    __compiler_membar();
}
void r_debug_state ( struct r_debug * rd , struct link_map * m ) { __compiler_membar ( ) ; }
Function for the debugger to set a breakpoint on to gain control.
Function for the debugger to set a breakpoint on to gain control .
/*
     * The following is a hack to force the compiler to emit calls to
     * this function, even when optimizing.  If the function is empty,
     * the compiler is not obliged to emit any code for calls to it,
     * even when marked __noinline.  However, gdb depends on those
     * calls being made.
     */