Subject: port-alpha/18114: unaligned access + segfault when using dlfcn(3) on alpha
To: None <>
From: None <>
List: netbsd-bugs
Date: 08/30/2002 00:10:06
>Number:         18114
>Category:       port-alpha
>Synopsis:       unaligned access + segfault when using dlfcn(3) on alpha
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-alpha-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Aug 30 00:11:00 PDT 2002
>Originator:     B. James Phillippe
>Release:        NetBSD 1.5.4_ALPHA
# bryan_at_darkforest_dot_org
# Software Engineer
System: NetBSD jupiter 1.5.4_ALPHA NetBSD 1.5.4_ALPHA (Jupiter 20020825) #5: Sun Aug 25 15:50:04 PDT 2002 bryan@jupiter:/usr/src/1.5/src/sys/arch/alpha/compile/jupiter alpha
Architecture: alpha
Machine: alpha
	Use of the run-time linker for shared objects seems to blow up on
/*** create the following shared object ***/
/* Compile with: gcc -shared -o */
int dynsym(void)
    return 1;

/*** create the following executable ***/
#include <stdio.h>
#include <dlfcn.h>

int main(int argc, char *argv[])
    void *handle;
    int (*fptr)(void);

    if (!(handle = dlopen("./", RTLD_LAZY))) {
        printf("dlopen() failed: %s\n", dlerror());

    if (!(fptr = dlsym(handle, "dynsym"))) {
        printf("failed to find dynsym: %s\n", dlerror());

    printf("Value of dynsym is %ld\n", fptr());


    return 0;
	Took a look, and this is beyond me.