This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
--defsym:1: unresolvable symbol `__ctype_b_loc' referenced in expression
- From: daniel at poradnik-webmastera dot com
- To: binutils at sourceware dot org
- Date: Tue, 08 Jul 2014 15:34:43 +0200
- Subject: --defsym:1: unresolvable symbol `__ctype_b_loc' referenced in expression
- Authentication-results: sourceware.org; auth=none
I am trying to build some old 32-bit application on Linux x64. It used
the same function name in two shared libraries, so I decided to link
one of them statically. Linking failed with error "undefined reference
to `__ctype_b'", so I added following options when linking: "
-Wl,--defsym=__ctype_b=__ctype_b_loc -lc". This worked for one module.
Unfortunately it failed for another one - ld reported error
"--defsym:1: unresolvable symbol `__ctype_b_loc' referenced in
expression". Am I doing something wrong, or is it a bug in ld?
gcc (GCC) 4.8.2
GNU ld (GNU Binutils) 2.23.2
Regards,
Daniel