inline uintptr_t demangle_ptr (uintptr_t x)
{
-# ifdef PTR_DEMANGLE
PTR_DEMANGLE (x);
-# endif
return x;
}
cd->__data[last_step].__outbufend = outbufend;
__gconv_fct fct = cd->__steps->__fct;
-#ifdef PTR_DEMANGLE
if (cd->__steps->__shlib_handle != NULL)
PTR_DEMANGLE (fct);
-#endif
if (inbuf == NULL || *inbuf == NULL)
{
/* Call the init function. */
__gconv_init_fct init_fct = result->__init_fct;
-#ifdef PTR_DEMANGLE
PTR_DEMANGLE (init_fct);
-#endif
if (init_fct != NULL)
{
status = DL_CALL_FCT (init_fct, (result));
-
-#ifdef PTR_MANGLE
PTR_MANGLE (result->__btowc_fct);
-#endif
}
}
&& deriv->steps[cnt].__shlib_handle != NULL)
{
__gconv_end_fct end_fct = deriv->steps[cnt].__end_fct;
-#ifdef PTR_DEMANGLE
PTR_DEMANGLE (end_fct);
-#endif
if (end_fct != NULL)
DL_CALL_FCT (end_fct, (&deriv->steps[cnt]));
}
{
/* Call the destructor. */
__gconv_end_fct end_fct = step->__end_fct;
-#ifdef PTR_DEMANGLE
PTR_DEMANGLE (end_fct);
-#endif
if (end_fct != NULL)
DL_CALL_FCT (end_fct, (step));
/* Call the init function. */
__gconv_init_fct init_fct = result[step_cnt].__init_fct;
-# ifdef PTR_DEMANGLE
PTR_DEMANGLE (init_fct);
-# endif
if (init_fct != NULL)
{
status = DL_CALL_FCT (init_fct, (&result[step_cnt]));
/* Do not call the end function because the init
function has failed. */
result[step_cnt].__end_fct = NULL;
-# ifdef PTR_MANGLE
PTR_MANGLE (result[step_cnt].__end_fct);
-# endif
/* Make sure we unload this module. */
--step_cnt;
break;
}
}
-# ifdef PTR_MANGLE
PTR_MANGLE (result[step_cnt].__btowc_fct);
-# endif
}
else
#endif
/* Call the init function. */
__gconv_init_fct init_fct = step->__init_fct;
-#ifdef PTR_DEMANGLE
PTR_DEMANGLE (init_fct);
-#endif
if (init_fct != NULL)
DL_CALL_FCT (init_fct, (step));
-
-#ifdef PTR_MANGLE
PTR_MANGLE (step->__btowc_fct);
-#endif
}
}
}
found->init_fct = __libc_dlsym (found->handle, "gconv_init");
found->end_fct = __libc_dlsym (found->handle, "gconv_end");
-#ifdef PTR_MANGLE
PTR_MANGLE (found->fct);
PTR_MANGLE (found->init_fct);
PTR_MANGLE (found->end_fct);
-#endif
/* We have succeeded in loading the shared object. */
found->counter = 1;
winbufend = (const uint32_t *) inbufend;
__gconv_fct fct = step->__fct;
-#ifdef PTR_DEMANGLE
if (step->__shlib_handle != NULL)
PTR_DEMANGLE (fct);
-#endif
/* If there is no transliteration information in the locale don't do
anything and return the error. */
if ((data->__flags & __GCONV_IS_LAST) == 0)
{
fct = next_step->__fct;
-#ifdef PTR_DEMANGLE
if (next_step->__shlib_handle != NULL)
PTR_DEMANGLE (fct);
-#endif
}
/* If the function is called with no input this means we have to reset
result->handle = handle;
result->lookup_ul = ptr_lookup_ul;
result->to_unicode_lzlz = ptr_to_unicode_lzlz;
-#ifdef PTR_MANGLE
PTR_MANGLE (result->lookup_ul);
PTR_MANGLE (result->to_unicode_lzlz);
-#endif
return result;
}
return EAI_IDN_ENCODE;
char *ptr = NULL;
__typeof__ (functions->lookup_ul) fptr = functions->lookup_ul;
-#ifdef PTR_DEMANGLE
PTR_DEMANGLE (fptr);
-#endif
int ret = fptr (name, &ptr, 0);
if (ret == 0)
{
return gai_strdup (name, result);
char *ptr = NULL;
__typeof__ (functions->to_unicode_lzlz) fptr = functions->to_unicode_lzlz;
-#ifdef PTR_DEMANGLE
PTR_DEMANGLE (fptr);
-#endif
int ret = fptr (name, &ptr, 0);
if (ret == 0)
{
{
struct _IO_cookie_file *cfile = (struct _IO_cookie_file *) fp;
cookie_read_function_t *read_cb = cfile->__io_functions.read;
-#ifdef PTR_DEMANGLE
PTR_DEMANGLE (read_cb);
-#endif
if (read_cb == NULL)
return -1;
{
struct _IO_cookie_file *cfile = (struct _IO_cookie_file *) fp;
cookie_write_function_t *write_cb = cfile->__io_functions.write;
-#ifdef PTR_DEMANGLE
PTR_DEMANGLE (write_cb);
-#endif
if (write_cb == NULL)
{
{
struct _IO_cookie_file *cfile = (struct _IO_cookie_file *) fp;
cookie_seek_function_t *seek_cb = cfile->__io_functions.seek;
-#ifdef PTR_DEMANGLE
PTR_DEMANGLE (seek_cb);
-#endif
return ((seek_cb == NULL
|| (seek_cb (cfile->__cookie, &offset, dir)
{
struct _IO_cookie_file *cfile = (struct _IO_cookie_file *) fp;
cookie_close_function_t *close_cb = cfile->__io_functions.close;
-#ifdef PTR_DEMANGLE
PTR_DEMANGLE (close_cb);
-#endif
if (close_cb == NULL)
return 0;
set_callbacks (cookie_io_functions_t *target,
cookie_io_functions_t source)
{
-#ifdef PTR_MANGLE
PTR_MANGLE (source.read);
PTR_MANGLE (source.write);
PTR_MANGLE (source.seek);
PTR_MANGLE (source.close);
-#endif
*target = source;
}
struct _IO_cookie_file *cfile = (struct _IO_cookie_file *) fp;
int (*seek_cb) (FILE *, off_t, int)
= (int (*) (FILE *, off_t, int)) cfile->__io_functions.seek;
-#ifdef PTR_DEMANGLE
PTR_DEMANGLE (seek_cb);
-#endif
if (seek_cb == NULL)
return _IO_pos_BAD;
codecvt->__cd_out.step_data.__statep = statep;
__gconv_fct fct = gs->__fct;
-#ifdef PTR_DEMANGLE
if (gs->__shlib_handle != NULL)
PTR_DEMANGLE (fct);
-#endif
status = DL_CALL_FCT (fct,
(gs, &codecvt->__cd_out.step_data, &from_start_copy,
codecvt->__cd_in.step_data.__statep = statep;
__gconv_fct fct = gs->__fct;
-#ifdef PTR_DEMANGLE
if (gs->__shlib_handle != NULL)
PTR_DEMANGLE (fct);
-#endif
status = DL_CALL_FCT (fct,
(gs, &codecvt->__cd_in.step_data, &from_start_copy,
codecvt->__cd_in.step_data.__statep = statep;
__gconv_fct fct = gs->__fct;
-#ifdef PTR_DEMANGLE
if (gs->__shlib_handle != NULL)
PTR_DEMANGLE (fct);
-#endif
DL_CALL_FCT (fct,
(gs, &codecvt->__cd_in.step_data, &cp,
static inline void
IO_set_accept_foreign_vtables (void (*flag) (void))
{
-#ifdef PTR_MANGLE
PTR_MANGLE (flag);
-#endif
atomic_store_relaxed (&IO_accept_foreign_vtables, flag);
}
#ifdef SHARED
/* Honor the compatibility flag. */
void (*flag) (void) = atomic_load_relaxed (&IO_accept_foreign_vtables);
-#ifdef PTR_DEMANGLE
PTR_DEMANGLE (flag);
-#endif
if (flag == &_IO_vtable_check)
return;
assert (local.ptr__Unwind_Resume != NULL);
assert (local.ptr_personality != NULL);
-#ifdef PTR_MANGLE
PTR_MANGLE (local.ptr__Unwind_Backtrace);
PTR_MANGLE (local.ptr__Unwind_ForcedUnwind);
PTR_MANGLE (local.ptr__Unwind_GetCFA);
-# if UNWIND_LINK_GETIP
+#if UNWIND_LINK_GETIP
PTR_MANGLE (local.ptr__Unwind_GetIP);
-# endif
+#endif
PTR_MANGLE (local.ptr__Unwind_Resume);
-# if UNWIND_LINK_FRAME_STATE_FOR
+#if UNWIND_LINK_FRAME_STATE_FOR
PTR_MANGLE (local.ptr___frame_state_for);
-# endif
- PTR_MANGLE (local.ptr_personality);
#endif
+ PTR_MANGLE (local.ptr_personality);
__libc_lock_lock (lock);
if (atomic_load_relaxed (&global_libgcc_handle) != NULL)
case nss_module_failed:
bind (module->functions.untyped);
-#ifdef PTR_MANGLE
for (int i = 0; i < nss_module_functions_count; ++i)
PTR_MANGLE (module->functions.untyped[i]);
-#endif
module->handle = NULL;
/* Synchronizes with unlocked __nss_module_load atomic_load_acquire. */
if (is_nscd)
{
void (*cb) (size_t, struct traced_file *) = nscd_init_cb;
-# ifdef PTR_DEMANGLE
PTR_DEMANGLE (cb);
-# endif
_nss_files_init (cb);
}
#endif
}
pointers[idx] = __libc_dlsym (handle, function_name);
free (function_name);
-#ifdef PTR_MANGLE
PTR_MANGLE (pointers[idx]);
-#endif
}
# ifdef USE_NSCD
if (ifct != NULL)
{
void (*cb) (size_t, struct traced_file *) = nscd_init_cb;
-# ifdef PTR_DEMANGLE
PTR_DEMANGLE (cb);
-# endif
ifct (cb);
}
}
assert (name_entry != NULL);
size_t idx = name_entry - nss_function_name_array;
void *fptr = module->functions.untyped[idx];
-#ifdef PTR_DEMANGLE
PTR_DEMANGLE (fptr);
-#endif
return fptr;
}
{
void (*cb1) (size_t, struct traced_file *);
cb1 = cb;
-# ifdef PTR_MANGLE
PTR_MANGLE (cb);
-# endif
nscd_init_cb = cb;
is_nscd = true;
return -1;
}
-#ifdef PTR_MANGLE
PTR_MANGLE (func);
-#endif
new->func.cxa.fn = (void (*) (void *, int)) func;
new->func.cxa.arg = arg;
new->func.cxa.dso_handle = d;
parallel. */
f->flavor = ef_free;
-#ifdef PTR_DEMANGLE
PTR_DEMANGLE (cxafn);
-#endif
+
/* Unlock the list while we call a foreign function. */
__libc_lock_unlock (__exit_funcs_lock);
cxafn (cxaarg, 0);
int
__cxa_thread_atexit_impl (dtor_func func, void *obj, void *dso_symbol)
{
-#ifdef PTR_MANGLE
PTR_MANGLE (func);
-#endif
/* Prepend. */
struct dtor_list *new = calloc (1, sizeof (struct dtor_list));
{
struct dtor_list *cur = tls_dtor_list;
dtor_func func = cur->func;
-#ifdef PTR_DEMANGLE
PTR_DEMANGLE (func);
-#endif
tls_dtor_list = tls_dtor_list->next;
func (cur->obj);
case ef_on:
onfct = f->func.on.fn;
arg = f->func.on.arg;
-#ifdef PTR_DEMANGLE
PTR_DEMANGLE (onfct);
-#endif
+
/* Unlock the list while we call a foreign function. */
__libc_lock_unlock (__exit_funcs_lock);
onfct (status, arg);
break;
case ef_at:
atfct = f->func.at;
-#ifdef PTR_DEMANGLE
PTR_DEMANGLE (atfct);
-#endif
+
/* Unlock the list while we call a foreign function. */
__libc_lock_unlock (__exit_funcs_lock);
atfct ();
f->flavor = ef_free;
cxafct = f->func.cxa.fn;
arg = f->func.cxa.arg;
-#ifdef PTR_DEMANGLE
PTR_DEMANGLE (cxafct);
-#endif
+
/* Unlock the list while we call a foreign function. */
__libc_lock_unlock (__exit_funcs_lock);
cxafct (arg, status);
return -1;
}
-#ifdef PTR_MANGLE
PTR_MANGLE (func);
-#endif
new->func.on.fn = func;
new->func.on.arg = arg;
new->flavor = ef_on;
_jmpbuf_sp (__jmp_buf jmpbuf)
{
uintptr_t sp = jmpbuf[JB_SP];
-#ifdef PTR_DEMANGLE
PTR_DEMANGLE (sp);
-#endif
return sp;
}
#endif
_jmpbuf_sp (__jmp_buf regs)
{
uintptr_t sp = regs[JB_SP];
-#ifdef PTR_DEMANGLE
PTR_DEMANGLE (sp);
-#endif
return sp;
}
_jmpbuf_sp (__jmp_buf jmpbuf)
{
uintptr_t sp = jmpbuf[JB_SP];
-#ifdef PTR_DEMANGLE
PTR_DEMANGLE (sp);
-#endif
return sp;
}
_jmpbuf_sp (__jmp_buf regs)
{
uintptr_t sp = regs[__JMP_BUF_SP];
-#ifdef PTR_DEMANGLE
PTR_DEMANGLE (sp);
-#endif
return sp;
}
_jmpbuf_sp (__jmp_buf regs)
{
uintptr_t sp = (uintptr_t) regs[0].__sp;
-#ifdef PTR_DEMANGLE
PTR_DEMANGLE (sp);
-#endif
return sp;
}
/* UNWIND_LINK_PTR returns the stored function pointer NAME from the
cached unwind link OBJ (which was previously returned by
__libc_unwind_link_get). */
-# ifdef PTR_DEMANGLE
-# define UNWIND_LINK_PTR(obj, name, ...) \
+# define UNWIND_LINK_PTR(obj, name, ...) \
({ \
__typeof ((obj)->ptr_##name) __unwind_fptr = (obj)->ptr_##name; \
PTR_DEMANGLE (__unwind_fptr); \
__unwind_fptr; \
})
-# else /* !PTR_DEMANGLE */
-# define UNWIND_LINK_PTR(obj, name, ...) ((obj)->ptr_##name)
-# endif
/* Called from fork, in the new subprocess. */
void __libc_unwind_link_after_fork (void);
_jmpbuf_sp (__jmp_buf regs)
{
uintptr_t sp = regs[JB_SP];
-#ifdef PTR_DEMANGLE
PTR_DEMANGLE (sp);
-#endif
return sp;
}
local.ptr__Unwind_GetGR \
= __libc_dlsym (local_libgcc_handle, "_Unwind_GetGR"); \
assert (local.ptr__Unwind_GetGR != NULL);
-#ifdef PTR_MANGLE
-# define UNWIND_LINK_EXTRA_INIT \
+#define UNWIND_LINK_EXTRA_INIT \
UNWIND_LINK_EXTRA_INIT_SHARED \
PTR_MANGLE (local.ptr__Unwind_GetGR);
-#else
-# define UNWIND_LINK_EXTRA_INIT UNWIND_LINK_EXTRA_INIT_SHARED
-#endif
#endif /* _ARCH_UNWIND_LINK_H */
static inline uintptr_t __attribute__ ((unused)) _jmpbuf_sp (__jmp_buf regs)
{
uintptr_t sp = regs[0].__sp;
-#ifdef PTR_DEMANGLE
PTR_DEMANGLE (sp);
-#endif
return sp;
}
_jmpbuf_sp (__jmp_buf regs)
{
uintptr_t sp = (uintptr_t) regs[0].__sp;
-#ifdef PTR_DEMANGLE
PTR_DEMANGLE (sp);
-#endif
return sp;
}
static inline uintptr_t
demangle_ptr (uintptr_t x)
{
-# ifdef PTR_DEMANGLE
PTR_DEMANGLE (x);
-# endif
return x;
}
_jmpbuf_sp (__jmp_buf regs)
{
void *sp = (void *) regs[0].__sp;
-#ifdef PTR_DEMANGLE
PTR_DEMANGLE (sp);
-#endif
return (uintptr_t) sp;
}
_jmpbuf_sp (__jmp_buf regs)
{
uintptr_t sp = (uintptr_t) regs[0].__sp;
-#ifdef PTR_DEMANGLE
PTR_DEMANGLE (sp);
-#endif
return sp;
}
_jmpbuf_sp (__jmp_buf jmpbuf)
{
uintptr_t sp = jmpbuf[JB_SP];
-#ifdef PTR_DEMANGLE
PTR_DEMANGLE (sp);
-#endif
return sp;
}
#endif
_jmpbuf_sp (__jmp_buf regs)
{
uintptr_t sp = regs[JB_GPR1];
-#ifdef PTR_DEMANGLE
PTR_DEMANGLE (sp);
-#endif
return sp;
}
_jmpbuf_sp (__jmp_buf regs)
{
uintptr_t sp = regs[0].__sp;
-#ifdef PTR_DEMANGLE
PTR_DEMANGLE (sp);
-#endif
return sp;
}
_jmpbuf_sp (__jmp_buf regs)
{
void *sp = (void *) (uintptr_t) regs[0].__gregs[__JB_GPR15];
-#ifdef PTR_DEMANGLE
PTR_DEMANGLE (sp);
-#endif
return (uintptr_t) sp;
}
#include <unistd.h>
#include <stap-probe.h>
+/* See sysdeps/unix/sysv/linux/s390/s390-32/pointer_guard.h. */
+#if IS_IN (rtld)
+# undef PTR_DEMANGLE
+#endif
+
/* Jump to the position specified by ENV, causing the
setjmp call there to return VAL, or 1 if VAL is 0. */
void
#include <unistd.h>
#include <stap-probe.h>
+/* See sysdeps/unix/sysv/linux/s390/s390-64/pointer_guard.h. */
+#if IS_IN (rtld)
+# undef PTR_DEMANGLE
+#endif
+
/* Jump to the position specified by ENV, causing the
setjmp call there to return VAL, or 1 if VAL is 0. */
void
_jmpbuf_sp (__jmp_buf regs)
{
void *sp = (void *) regs[0].__regs[7];
-#ifdef PTR_DEMANGLE
PTR_DEMANGLE (sp);
-#endif
return (uintptr_t) sp;
}
_jmpbuf_sp (__jmp_buf regs)
{
uintptr_t sp = regs[JB_SP];
-#ifdef PTR_DEMANGLE
PTR_DEMANGLE (sp);
-#endif
return sp;
}
_jmpbuf_sp (__jmp_buf regs)
{
uintptr_t sp = regs[JB_RSP];
-#ifdef PTR_DEMANGLE
PTR_DEMANGLE (sp);
-#endif
return sp;
}
/* Get the conversion functions. */
fcts = get_gconv_fcts (_NL_CURRENT_DATA (LC_CTYPE));
__gconv_btowc_fct btowc_fct = fcts->towc->__btowc_fct;
-#ifdef PTR_DEMANGLE
if (fcts->towc->__shlib_handle != NULL)
PTR_DEMANGLE (btowc_fct);
-#endif
if (__builtin_expect (fcts->towc_nsteps == 1, 1)
&& __builtin_expect (btowc_fct != NULL, 1))
inbuf[0] = c;
__gconv_fct fct = fcts->towc->__fct;
-#ifdef PTR_DEMANGLE
if (fcts->towc->__shlib_handle != NULL)
PTR_DEMANGLE (fct);
-#endif
status = DL_CALL_FCT (fct, (fcts->towc, &data, &inptr, inptr + 1,
NULL, &dummy, 0, 1));
goto ilseq;
}
__gconv_fct fct = fcts->towc->__fct;
-#ifdef PTR_DEMANGLE
if (fcts->towc->__shlib_handle != NULL)
PTR_DEMANGLE (fct);
-#endif
status = DL_CALL_FCT (fct, (fcts->towc, &data, &inbuf, endbuf,
NULL, &dummy, 0, 1));
goto ilseq;
}
__gconv_fct fct = fcts->towc->__fct;
-#ifdef PTR_DEMANGLE
if (fcts->towc->__shlib_handle != NULL)
PTR_DEMANGLE (fct);
-#endif
status = DL_CALL_FCT (fct, (fcts->towc, &data, &inbuf, endbuf,
NULL, &dummy, 0, 1));
/* Get the structure with the function pointers. */
towc = fcts->towc;
__gconv_fct fct = towc->__fct;
-#ifdef PTR_DEMANGLE
if (towc->__shlib_handle != NULL)
PTR_DEMANGLE (fct);
-#endif
/* We have to handle DST == NULL special. */
if (dst == NULL)
/* Get the structure with the function pointers. */
towc = fcts->towc;
__gconv_fct fct = towc->__fct;
-#ifdef PTR_DEMANGLE
if (towc->__shlib_handle != NULL)
PTR_DEMANGLE (fct);
-#endif
/* We have to handle DST == NULL special. */
if (dst == NULL)
/* Get the conversion functions. */
fcts = get_gconv_fcts (_NL_CURRENT_DATA (LC_CTYPE));
__gconv_fct fct = fcts->tomb->__fct;
-#ifdef PTR_DEMANGLE
if (fcts->tomb->__shlib_handle != NULL)
PTR_DEMANGLE (fct);
-#endif
/* If WC is the NUL character we write into the output buffer the byte
sequence necessary for PS to get into the initial state, followed
/* Get the structure with the function pointers. */
tomb = fcts->tomb;
__gconv_fct fct = tomb->__fct;
-#ifdef PTR_DEMANGLE
if (tomb->__shlib_handle != NULL)
PTR_DEMANGLE (fct);
-#endif
/* We have to handle DST == NULL special. */
if (dst == NULL)
/* Get the structure with the function pointers. */
tomb = fcts->tomb;
__gconv_fct fct = tomb->__fct;
-#ifdef PTR_DEMANGLE
if (tomb->__shlib_handle != NULL)
PTR_DEMANGLE (fct);
-#endif
/* We have to handle DST == NULL special. */
if (dst == NULL)
const unsigned char *argptr = (const unsigned char *) inptr;
__gconv_fct fct = fcts->tomb->__fct;
-#ifdef PTR_DEMANGLE
if (fcts->tomb->__shlib_handle != NULL)
PTR_DEMANGLE (fct);
-#endif
status = DL_CALL_FCT (fct,
(fcts->tomb, &data, &argptr,
argptr + sizeof (inbuf[0]), NULL, &dummy, 0, 1));