Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 110493 - ld doesn't error on unresolved symbol.
ld doesn't error on unresolved symbol.
Product: Fedora
Classification: Fedora
Component: binutils (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Depends On:
  Show dependency treegraph
Reported: 2003-11-20 01:21 EST by Ralph Loader
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-10-10 18:00:09 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Ralph Loader 2003-11-20 01:21:51 EST
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):


How reproducible:

Every time.

Steps to Reproduce:

$ cat temp.c void bar();
void foo()

$ gcc -shared -o temp.so -Wl,-z,defs temp.c
/tmp/ccCHVPSU.o(.text+0x7): In function `foo':
: warning: undefined reference to `bar'

$ echo $?

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.
Comment 1 Jakub Jelinek 2004-10-10 18:00:09 EDT
Can't reproduce with either binutils- or binutils-

Note You need to log in before you can comment on or make changes to this bug.