bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ld -lgen -ladm causes assert failure in gnu ld 2.12.1 and 2.13 under


From: Andrew Koenig
Subject: Re: ld -lgen -ladm causes assert failure in gnu ld 2.12.1 and 2.13 under Solaris 2.7 or 2.8
Date: Thu, 19 Sep 2002 15:23:29 -0400 (EDT)

ark> The patch fixes the symptom that I had reproduced.

nickc> Hooray.

ark> Well, the preliminary answer seems to be that it still dumps core 
ark> while installing Python.  I guess I'll have to try tracking down
ark> what's going on.

What's going on is that there is a second, presumably unrelated,
problem, the existence of which I had forgotten.  Following is a
shell script that reproduces the problem.  When I execute it under
binutils 2.13, with or without the patch, it dumps core;
under binutils 2.12, it doesn't.

I wonder ... can you reproduce it on your end?


                                  Regards,


                                  Andrew Koenig





----------------------------------------------------------------------------

#! /bin/sh

mkdir /tmp/t.$$  || exit 3
cd /tmp/t.$$     || exit 3

cat >main.c <<'EOF'
#include <stdio.h>
#include <dlfcn.h>

int main(void)
{
    void *handle, *sym;
    char *error;

    puts("calling dlopen");
    handle = dlopen("./dyn.so", RTLD_NOW);
    if (!handle) {
        printf("%s\n", dlerror());
        return 1;
    }

    puts("calling dlsym");
    sym = dlsym(handle, "sym");
    if ((error = dlerror()) != 0) {
        printf("%s\n", error);
        return 1;
    }
    puts("calling sym");
    ((void (*)(void))sym)();
    puts("done");
    return 0;
}
EOF

cat >dyn.c <<'EOF'
#include <stdio.h>
void sym(void)
{
    puts("in sym");
}
EOF

[ -n "$SHFLAGS" ] || SHFLAGS="-fPIC -shared"
[ -n "$CC" ]  || CC=gcc

set -x

$CC $CFLAGS $SHFLAGS dyn.c -o dyn.so
$CC $CFLAGS main.c -o main -ldl

./main || exit $?

cd /tmp
rm -rf t.$$





reply via email to

[Prev in Thread] Current Thread [Next in Thread]