2023-01-11
5 章の章末課題の途中までやった。
glibc, fopen/2 ソースコード読み
libio/iofopen.c の以下を順に呼び出し、
fopen
-> __new_fopen
-> _IO_new_fopen(const char *filename, const char *mode)
-> __fopen_internal(const char *filename, const char *mode, int is32)
libio/fileops.c に飛んで、
_IO_file_fopen()
-> _IO_new_file_fopen(FILE *fp, const char *filename, const char *mode, int is32not64)
を呼び出す。
today i learned
lib が実行できて出力できることを学んだ。
/lib/x86_64-linux-gnu/libc.so.6
GNU C Library (Ubuntu GLIBC 2.31-0ubuntu9.9) stable release version 2.31.
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 9.4.0.
libc ABIs: UNIQUE IFUNC ABSOLUTE
For bug reporting instructions, please see:
<https://bugs.launchpad.net/ubuntu/+source/glibc/+bugs>.