Re: dlopen man page example fails for x86_64 (release 4.12), OK for 32-bit target

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

 



On 08/23/2017 08:11 AM, Mats Wichmann wrote:
> 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".

of course, libm rather than libc.  sigh.

--
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



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux