* Konstantin A. Lepikhov [070922 14:13]: > echo 'int main(int argc, char **argv) { gzdopen(0, "rb"); return 0; }' | \ > gcc -Wall -include zlib.h -x c -o a.out -lz - gcc -Wall -include zlib.h -x c -o a.out - -lz > PS Если уши растут из as-needed, просьба дать детальное и > документированное объяснение почему эта ass ломает такие простые примеры. info ld: `--as-needed' `--no-as-needed' This option affects ELF DT_NEEDED tags for dynamic libraries mentioned on the command line after the `--as-needed' option. Normally, the linker will add a DT_NEEDED tag for each dynamic library mentioned on the command line, regardless of whether the library is actually needed. `--as-needed' causes DT_NEEDED tags to only be emitted for libraries that satisfy some symbol reference from regular objects which is undefined at the point that the library was linked. `--no-as-needed' restores the default behaviour. Собсно, в первом случае в момент линковки libz нет ссылок на символы оттуда, во втором они появляются. Это уже неоднократно здесь обсуждалось. -- Regards, Sir Raorn.