This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH gold/6858] Patch to correctly handle undefined symbols in shlibs when linking -shared
- From: Kris Van Hees <kris dot van dot hees at oracle dot com>
- To: binutils at sourceware dot org
- Cc: Ian Lance Taylor <iant at google dot com>
- Date: Tue, 26 Aug 2008 10:01:38 -0400
- Subject: [PATCH gold/6858] Patch to correctly handle undefined symbols in shlibs when linking -shared
- References: <20080529205212.GQ13586@oracle.com>
Oracle has a full copyright assignment in place with the FSF.
This patch provides the fix for PR 6858 'Linking with -shared should imply
-allow-shlib-undefined'. The problem is a compatibility issue with the old
linker, which would enable allow-shlib-undefined behaviour if -shared is
passed unless the behaviour is explicitly disallowed
The patch below corrects this problem. It was generated against cvs HEAD.
Testsuite execution has been verified to be identical between the unpatched and
the patched version. No regressions were found.
Cheers,
Kris
ChangeLog entry:
================
2008-08-26 Kris Van Hees <kris.van.hees@oracle.com>
PR 6858
* options.cc (General_options::finalize): Allow undefined symbols
in shlibs if linking -shared.
Patch:
======
Index: gold/options.cc
===================================================================
RCS file: /cvs/src/src/gold/options.cc,v
retrieving revision 1.75
diff -r1.75 options.cc
766a767,769
> if (this->shared() && !this->user_set_allow_shlib_undefined())
> this->set_allow_shlib_undefined(true);
>