[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gold/16693] New: "exclude-libs" drops symbols that are exported thr
From: |
ostap73 at gmail dot com |
Subject: |
[Bug gold/16693] New: "exclude-libs" drops symbols that are exported through "dynamic-list" or "export-dynamic-symbol" |
Date: |
Tue, 11 Mar 2014 23:21:03 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=16693
Bug ID: 16693
Summary: "exclude-libs" drops symbols that are exported through
"dynamic-list" or "export-dynamic-symbol"
Product: binutils
Version: 2.25 (HEAD)
Status: NEW
Severity: normal
Priority: P2
Component: gold
Assignee: ian at airs dot com
Reporter: ostap73 at gmail dot com
CC: ccoutant at google dot com
If "--exclude-libs=ALL" is specified, all symbols from static libraries will
not be exported even if they are specified in "dynamic-list" or by
"export-dynamic-symbol" parameter.
By Cary Coutant:
"I think it's a bug. The ld manual says: "Specifies a list of archive
libraries from which symbols should not be automatically exported."
The keyword here is "automatically". If you put a symbol in
--dynamic-list, it should be exported regardless of that."
Patch solving this from Cary Coutant:
diff --git a/gold/symtab.cc b/gold/symtab.cc
index 1a69f5b..d77747e 100644
--- a/gold/symtab.cc
+++ b/gold/symtab.cc
@@ -1219,8 +1219,10 @@ Symbol_table::add_from_relobj(
// Fix up visibility if object has no-export set.
if (relobj->no_export()
- && (orig_st_shndx != elfcpp::SHN_UNDEF || !is_ordinary))
- {
+ && (orig_st_shndx != elfcpp::SHN_UNDEF || !is_ordinary)
+ && !(parameters->options().in_dynamic_list(name)
+ || parameters->options().is_export_dynamic_symbol(name)))
+ {
// We may have copied symbol already above.
if (psym != &sym2)
{
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug gold/16693] New: "exclude-libs" drops symbols that are exported through "dynamic-list" or "export-dynamic-symbol",
ostap73 at gmail dot com <=
- [Bug gold/16693] "exclude-libs" drops symbols that are exported through "dynamic-list" or "export-dynamic-symbol", hjl.tools at gmail dot com, 2014/03/11
- [Bug gold/16693] "exclude-libs" drops symbols that are exported through "dynamic-list" or "export-dynamic-symbol", hjl.tools at gmail dot com, 2014/03/11
- [Bug gold/16693] "exclude-libs" drops symbols that are exported through "dynamic-list" or "export-dynamic-symbol", ccoutant at google dot com, 2014/03/11
- [Bug gold/16693] "exclude-libs" drops symbols that are exported through "dynamic-list" or "export-dynamic-symbol", ostap73 at gmail dot com, 2014/03/11
- [Bug gold/16693] "exclude-libs" drops symbols that are exported through "dynamic-list" or "export-dynamic-symbol", hjl.tools at gmail dot com, 2014/03/12
- [Bug gold/16693] "exclude-libs" drops symbols that are exported through "dynamic-list" or "export-dynamic-symbol", ostap73 at gmail dot com, 2014/03/12
- [Bug gold/16693] "exclude-libs" drops symbols that are exported through "dynamic-list" or "export-dynamic-symbol", hjl.tools at gmail dot com, 2014/03/12
- [Bug gold/16693] "exclude-libs" drops symbols that are exported through "dynamic-list" or "export-dynamic-symbol", ostap73 at gmail dot com, 2014/03/12
- [Bug gold/16693] "exclude-libs" drops symbols that are exported through "dynamic-list" or "export-dynamic-symbol", ostap73 at gmail dot com, 2014/03/12
- [Bug gold/16693] "exclude-libs" drops symbols that are exported through "dynamic-list" or "export-dynamic-symbol", ccoutant at google dot com, 2014/03/12