[Bug ld/23309] New: ld.bfd -u option to force symbol discards symbol when used with LTO plugin and the symbol has hidden or internal visibility

2018-06-18 Thread zenith432 at users dot sourceforge.net
Version: 2.31 (HEAD) Status: UNCONFIRMED Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: zenith432 at users dot sourceforge.net Target Milestone: --- Test Case: test.c

[Bug binutils/23306] New: Please add feature to nm to display symbol visibility

2018-06-18 Thread zenith432 at users dot sourceforge.net
: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: zenith432 at users dot sourceforge.net Target Milestone: --- There are 3 utilities that dump the symbol table of object files objdump readelf nm Of these, objdump and readelf can display

[Bug binutils/23306] Please add feature to nm to display symbol visibility

2018-06-18 Thread zenith432 at users dot sourceforge.net
https://sourceware.org/bugzilla/show_bug.cgi?id=23306 --- Comment #2 from zenith432 at users dot sourceforge.net --- Created attachment 11079 --> https://sourceware.org/bugzilla/attachment.cgi?id=11079=edit apple_nm.c and llvm-nm.cpp -- You are receiving this mail because: You are on the

[Bug binutils/23306] Please add feature to nm to display symbol visibility

2018-06-18 Thread zenith432 at users dot sourceforge.net
https://sourceware.org/bugzilla/show_bug.cgi?id=23306 --- Comment #3 from zenith432 at users dot sourceforge.net --- I'm not sure whether it's based on a formal specification, but here are two source files apple_nm.c Taken from Apple's open source. The function print_mach_symbols does the -m

[Bug ld/23309] ld.bfd -u option to force symbol discards symbol when used with LTO plugin and the symbol has hidden or internal visibility

2018-06-19 Thread zenith432 at users dot sourceforge.net
https://sourceware.org/bugzilla/show_bug.cgi?id=23309 --- Comment #2 from zenith432 at users dot sourceforge.net --- So here's what's going... In ld/plugin.c (ld.bfd)... the following code in get_symbols_v2 = if (res == LDPR_PREVAILING_DEF_IRONLY) { /* We need to know

[Bug ld/23254] ld.bfd mishandles file pointers while scanning archive with LTO members, causing "malformed archive" errors for a well-formed archive

2018-06-04 Thread zenith432 at users dot sourceforge.net
https://sourceware.org/bugzilla/show_bug.cgi?id=23254 --- Comment #2 from zenith432 at users dot sourceforge.net --- Created attachment 11052 --> https://sourceware.org/bugzilla/attachment.cgi?id=11052=edit code to reproduce error -- You are receiving this mail because: You are on the CC l

[Bug ld/23254] New: ld.bfd mishandles file pointers while scanning archive with LTO members, causing "malformed archive" errors for a well-formed archive

2018-06-02 Thread zenith432 at users dot sourceforge.net
Product: binutils Version: 2.31 (HEAD) Status: UNCONFIRMED Severity: critical Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: zenith432 at users dot sourceforge.net Target Milestone: --- When

[Bug ld/23254] ld.bfd mishandles file pointers while scanning archive with LTO members, causing "malformed archive" errors for a well-formed archive

2018-06-02 Thread zenith432 at users dot sourceforge.net
https://sourceware.org/bugzilla/show_bug.cgi?id=23254 zenith432 at users dot sourceforge.net changed: What|Removed |Added CC||amodra

[Bug ld/23254] ld.bfd mishandles file pointers while scanning archive with LTO members, causing "malformed archive" errors for a well-formed archive

2018-06-05 Thread zenith432 at users dot sourceforge.net
https://sourceware.org/bugzilla/show_bug.cgi?id=23254 zenith432 at users dot sourceforge.net changed: What|Removed |Added Status|RESOLVED|VERIFIED

[Bug ld/23254] ld.bfd mishandles file pointers while scanning archive with LTO members, causing "malformed archive" errors for a well-formed archive

2018-06-04 Thread zenith432 at users dot sourceforge.net
https://sourceware.org/bugzilla/show_bug.cgi?id=23254 --- Comment #3 from zenith432 at users dot sourceforge.net --- - Your attached patch fixes the problem. - For the record, I did a workaround with the patch --- orig_plugin.c 2018-01-13 13:31:16.0 + +++ plugin.c

[Bug ld/23324] Regression: R_X86_64_converted_reloc_bit left in linker output with -q

2018-06-26 Thread zenith432 at users dot sourceforge.net
https://sourceware.org/bugzilla/show_bug.cgi?id=23324 zenith432 at users dot sourceforge.net changed: What|Removed |Added CC||nickc

[Bug ld/23309] ld.bfd -u option to force symbol discards symbol when used with LTO plugin and the symbol has hidden or internal visibility

2018-06-20 Thread zenith432 at users dot sourceforge.net
https://sourceware.org/bugzilla/show_bug.cgi?id=23309 --- Comment #3 from zenith432 at users dot sourceforge.net --- Created attachment 11088 --> https://sourceware.org/bugzilla/attachment.cgi?id=11088=edit Proposed patch -- You are receiving this mail because: You are on the CC l

[Bug ld/23324] New: Regression: R_X86_64_converted_reloc_bit left in linker output with -q

2018-06-21 Thread zenith432 at users dot sourceforge.net
Severity: critical Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: zenith432 at users dot sourceforge.net CC: hjl.tools at gmail dot com Target Milestone: 2.31 == main.c #include int a = 5; int* f(void

[Bug ld/23324] Regression: R_X86_64_converted_reloc_bit left in linker output with -q

2018-06-21 Thread zenith432 at users dot sourceforge.net
https://sourceware.org/bugzilla/show_bug.cgi?id=23324 --- Comment #1 from zenith432 at users dot sourceforge.net --- It appears this issue has been around longer - since the commit that this bit was introduced http://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h

[Bug ld/23309] ld.bfd -u option to force symbol discards symbol when used with LTO plugin and the symbol has hidden or internal visibility

2018-06-19 Thread zenith432 at users dot sourceforge.net
https://sourceware.org/bugzilla/show_bug.cgi?id=23309 zenith432 at users dot sourceforge.net changed: What|Removed |Added CC||hjl.tools

[Bug binutils/23460] regression: ar can not create archive containing many (>1024) lto object files

2018-07-30 Thread zenith432 at users dot sourceforge.net
https://sourceware.org/bugzilla/show_bug.cgi?id=23460 --- Comment #4 from zenith432 at users dot sourceforge.net --- FYI I took a look at the code for GCC 8.2 plugin and LLVM 6.0.1 gold plugin. As best as I can tell - Neither plugins access the file through the descriptor passed

[Bug binutils/23460] regression: ar can not create archive containing many (>1024) lto object files

2018-07-30 Thread zenith432 at users dot sourceforge.net
https://sourceware.org/bugzilla/show_bug.cgi?id=23460 --- Comment #3 from zenith432 at users dot sourceforge.net --- This patch should fix it = Begin Patch diff --git a/bfd/plugin.c b/bfd/plugin.c index 7c5bba22..98c79c87 100644 --- a/bfd/plugin.c +++ b/bfd/plugin.c @@ -209,8 +209,7

[Bug binutils/23460] regression: ar can not create archive containing many (>1024) lto object files

2018-07-30 Thread zenith432 at users dot sourceforge.net
https://sourceware.org/bugzilla/show_bug.cgi?id=23460 --- Comment #5 from zenith432 at users dot sourceforge.net --- Correction: After another review, I noticed that the gcc plugin does NOT free the syms array passed to add_symbols() during cleanup_hook(). This array is freed during

[Bug binutils/23460] regression: ar can not create archive containing many (>1024) lto object files

2018-07-28 Thread zenith432 at users dot sourceforge.net
https://sourceware.org/bugzilla/show_bug.cgi?id=23460 zenith432 at users dot sourceforge.net changed: What|Removed |Added CC||amodra

[Bug binutils/23460] regression: ar can not create archive containing many (>1024) lto object files

2018-08-16 Thread zenith432 at users dot sourceforge.net
https://sourceware.org/bugzilla/show_bug.cgi?id=23460 --- Comment #15 from zenith432 at users dot sourceforge.net --- (In reply to Evangelos Foutras from comment #14) > I believe the above error is caused by a sequence of "dlopen -> dlclose -> > dlopen" on LLVMgold.so. (li

[Bug binutils/23460] regression: ar can not create archive containing many (>1024) lto object files

2018-08-17 Thread zenith432 at users dot sourceforge.net
https://sourceware.org/bugzilla/show_bug.cgi?id=23460 --- Comment #20 from zenith432 at users dot sourceforge.net --- It's not just repetitive calls to dlopen() on the same plugin. It is also repetitive calls to onload() on the same plugin. This isn't supported by the plugin API. Today

[Bug binutils/23460] regression: ar can not create archive containing many (>1024) lto object files

2018-08-21 Thread zenith432 at users dot sourceforge.net
https://sourceware.org/bugzilla/show_bug.cgi?id=23460 --- Comment #23 from zenith432 at users dot sourceforge.net --- (In reply to Nick Clifton from comment #22) > I am confused by this part of the patch: > > for (plugin_list_iter = plugin_list; >plugin_list_

[Bug gold/23411] Different behavior when linking common symbol statically or to shared object

2018-07-17 Thread zenith432 at users dot sourceforge.net
https://sourceware.org/bugzilla/show_bug.cgi?id=23411 zenith432 at users dot sourceforge.net changed: What|Removed |Added CC|zenith432 at users dot sourceforge

[Bug gold/23411] Different behavior when linking common symbol statically or to shared object

2018-07-17 Thread zenith432 at users dot sourceforge.net
https://sourceware.org/bugzilla/show_bug.cgi?id=23411 zenith432 at users dot sourceforge.net changed: What|Removed |Added CC||zenith432

[Bug gold/23424] gold doesn't build on Darwin

2018-07-24 Thread zenith432 at users dot sourceforge.net
https://sourceware.org/bugzilla/show_bug.cgi?id=23424 --- Comment #5 from zenith432 at users dot sourceforge.net --- This can be silenced with CXXFLAGS="-std=c++11 -Wno-c++11-narrowing", but should probably be reported separately as a bug. The enum in namespace elfcpp ends up h

[Bug gold/23411] Different behavior when linking common symbol statically or to shared object

2018-07-14 Thread zenith432 at users dot sourceforge.net
https://sourceware.org/bugzilla/show_bug.cgi?id=23411 --- Comment #4 from zenith432 at users dot sourceforge.net --- There's an ambiguity in ANSI C about this. From C11 Section 6.9.2 External object definitions 1 If the declaration of an identifier for an object has file scope

[Bug gold/23411] Different behavior when linking common symbol statically or to shared object

2018-07-14 Thread zenith432 at users dot sourceforge.net
https://sourceware.org/bugzilla/show_bug.cgi?id=23411 zenith432 at users dot sourceforge.net changed: What|Removed |Added CC|zenith432 at users dot sourceforge

[Bug gold/23411] Different behavior when linking common symbol statically or to shared object

2018-07-14 Thread zenith432 at users dot sourceforge.net
https://sourceware.org/bugzilla/show_bug.cgi?id=23411 zenith432 at users dot sourceforge.net changed: What|Removed |Added CC||zenith432

[Bug ld/23350] multiple prevailing defs for unused variable in lto mode

2018-07-09 Thread zenith432 at users dot sourceforge.net
https://sourceware.org/bugzilla/show_bug.cgi?id=23350 --- Comment #4 from zenith432 at users dot sourceforge.net --- What difference does it make? This is undefined behavior. It doesn't link -fno-lto either. gcc -c main.i && gcc -c lib.i && ar rusc lib.a lib.o gcc main.o lib.a

[Bug ld/23324] Regression: R_X86_64_converted_reloc_bit left in linker output with -q

2018-07-04 Thread zenith432 at users dot sourceforge.net
https://sourceware.org/bugzilla/show_bug.cgi?id=23324 zenith432 at users dot sourceforge.net changed: What|Removed |Added Status|RESOLVED|VERIFIED

[Bug ld/23309] ld.bfd -u option to force symbol discards symbol when used with LTO plugin and the symbol has hidden or internal visibility

2018-07-04 Thread zenith432 at users dot sourceforge.net
https://sourceware.org/bugzilla/show_bug.cgi?id=23309 zenith432 at users dot sourceforge.net changed: What|Removed |Added Status|RESOLVED|VERIFIED