On 08/22/2017 05:11 PM, Michael Kerrisk (man-pages) wrote: > David, > > On 22 August 2017 at 04:53, David C. Rankin > <drankinatty@xxxxxxxxxxxxxxxxxx> wrote: >> All, >> >> The man 3 dlopen example needs updating to run on x86_64. It will run fine >> as a 32-bit compile (with -m32), but fails without it, e.g. >> >> $ gcc -Wall -Wextra -pedantic -Wshadow -std=gnu11 -Ofast -ldl -o >> bin/dlopen_man_ex dlopen_man_ex.c >> >> $ ./bin/dlopen_man_ex >> /usr/lib/libm.so: invalid ELF header This sounds like you're picking up the linker script, which is not an ELF file, but rather link-time instructions - you can't dlopen that. If the "magic" in /usr/include/gnu is working, you should be getting an soname line "libc.so.6" plugged in, not "libc.so". -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html