Fix get_program_var_addr() when type of the resolved symbol is functional.

Use make_function_pointer then, otherwise ia64 is broken.

Reported and tested by:	marcel
This commit is contained in:
Konstantin Belousov 2011-01-25 21:04:55 +00:00
parent cff1d84937
commit 4503c8f7bd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=217849

View File

@ -2800,7 +2800,12 @@ get_program_var_addr(const char *name, RtldLockState *lockstate)
donelist_init(&donelist);
if (symlook_global(&req, &donelist) != 0)
return (NULL);
return ((const void **)(req.defobj_out->relocbase + req.sym_out->st_value));
if (ELF_ST_TYPE(req.sym_out->st_info) == STT_FUNC)
return ((const void **)make_function_pointer(req.sym_out,
req.defobj_out));
else
return ((const void **)(req.defobj_out->relocbase +
req.sym_out->st_value));
}
/*