有什么简单的方法可以确定编译器正在编译哪个 mmap?
gdb -q libc.so.6
Reading symbols from /tmp/build/libc.so.6...done.
(gdb) list mmap
76 #else
77
78 /* This is a "normal" system call stub: if there is an error,
79 it returns -1 and sets errno. */
80
81 T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
82 ret
83 T_PSEUDO_END (SYSCALL_SYMBOL)
84
85 #endif
(gdb) info source
Current source file is ../sysdeps/unix/syscall-template.S
Compilation directory is /glibc-git-rw/glibc/misc
Located in /glibc-git-rw/glibc/sysdeps/unix/syscall-template.S <<< You want this
Contains 87 lines.
Source language is asm.
Compiled with DWARF 2 debugging format.
Does not include preprocessor macro info.