Description of problem: Linking a shared library with -z defs or -no-undefined is only giving a warning on undefined symbols, not an error. Even explicitly adding --error-unresolved-symbols doesn't help either. Version-Release number of selected component (if applicable): binutils-2.14.90.0.6-3 How reproducible: Every time. Steps to Reproduce: $ cat temp.c void bar(); void foo() { bar(); } $ gcc -shared -o temp.so -Wl,-z,defs temp.c /tmp/ccCHVPSU.o(.text+0x7): In function `foo': : warning: undefined reference to `bar' $ echo $? 0 Actual results: The return code from the linker was 0. Expected results: The return code should be non-zero. Additional info: This wasn't broken in RedHat 9.
Can't reproduce with either binutils-2.15.91.0.2-8 or binutils-2.15.90.0.3-5.