[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: A weird bug with luaL_Reg array
- From: Shmuel Zeigerman <shmuz@...>
- Date: Fri, 01 Jul 2022 14:23:04 +0300
On 01/07/2022 14:09, Luiz Henrique de Figueiredo wrote:
Multiple definitions of a global variable are undefined behavior in C.
I'm surprised that you don't get link errors. I do in macOS.
This is a small library "reader.so" containing just one C-file.
So I can hardly imagine how the linker can issue an error.
Here is what ldd shows for reader.so:
linux-vdso.so.1 (0x00007ffe6e71d000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f103188e000)
/lib64/ld-linux-x86-64.so.2 (0x00007f1031a9e000)
--
Shmuel