> Date: Sun, 22 Feb 2026 17:22:26 +0200 > From: Eli Zaretskii <[email protected]> > Cc: [email protected], [email protected], [email protected] > > > From: Bruno Haible <[email protected]> > > Cc: [email protected], [email protected], [email protected] > > Date: Sun, 22 Feb 2026 15:36:54 +0100 > > > > Suggestion 1: > > In which EXE or DLL is each located? The one in main surely is in > > ctexi2any.exe. > > Are you sure? When I step with GDB in the 'main' function, which is > in ctexi2any.exe, I see this: > > (gdb) info variables optarg > All variables matching regular expression "optarg": > > File getopt.c: > 89: char *rpl_optarg; > > Non-debugging symbols: > 0x00d64390 _imp__rpl_optarg > 0x00d64698 _nm__rpl_optarg > > Doesn't that mean rpl_optarg is in getopt.c? > > Also, rpl_getopt_long that is known to 'main' is described as residing > in the .exe: > > (gdb) info symbol rpl_getopt_internal > rpl_getopt_internal in section .text of > d:\gnu\texinfo-7.2.92-C\tta\C\.libs\ctexi2any.exe > > However, if I step into getopt_internal, when it is called by 'main', > I see something different: > > (gdb) info symbol rpl_getopt_internal > rpl_getopt_internal in section .text of > d:\gnu\texinfo-7.2.92-C\tta\C\.libs\libtexinfo-main-0.dll > > How can this be? The 'main' function calls rpl_getopt_internal, which > it thinks is in the .exe, but actually winds up in a DLL?
Here's what "nm -A" tells me: C/.libs/ctexi2any.exe:00409fca T _rpl_getopt C/.libs/ctexi2any.exe:00409f4d T _rpl_getopt_internal C/.libs/ctexi2any.exe:00408e08 T _rpl_getopt_long C/.libs/ctexi2any.exe:00408e00 T _rpl_malloc C/.libs/ctexi2any.exe:00409020 t _rpl_mkdir C/.libs/ctexi2any.exe:00401410 t _rpl_mkdir C/.libs/ctexi2any.exe:00413114 B _rpl_optarg C/.libs/ctexi2any.exe:0040d664 D _rpl_opterr C/.libs/ctexi2any.exe:0040d660 D _rpl_optind C/.libs/ctexi2any.exe:0040d668 D _rpl_optopt C/.libs/libtexinfo-main-0.dll:62dc56d4 t __getopt_initialize C/.libs/libtexinfo-main-0.dll:62dc577c T __getopt_internal_r C/.libs/libtexinfo-main-0.dll:62dc6050 T __getopt_long_only_r C/.libs/libtexinfo-main-0.dll:62dc5fcb T __getopt_long_r C/.libs/libtexinfo-main-0.dll:62e16af8 B _rpl_optarg C/.libs/libtexinfo-main-0.dll:62dd9008 D _rpl_opterr C/.libs/libtexinfo-main-0.dll:62dd9004 D _rpl_optind C/.libs/libtexinfo-main-0.dll:62dd900c D _rpl_optopt C/.libs/libtexinfo-main-0.dll:62dc5f4a T _rpl_getopt C/.libs/libtexinfo-main-0.dll:62dc5ecd T _rpl_getopt_internal C/.libs/libtexinfo-main-0.dll:62dc5f8c T _rpl_getopt_long C/.libs/libtexinfo-main-0.dll:62dc6011 T _rpl_getopt_long_only Does this mean there are actually two copies of getopt_long and its subroutines? If so, why did that happen?
