bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/19803] gc-sections breaks PE DLL variable export


From: martin.koegler at chello dot at
Subject: [Bug ld/19803] gc-sections breaks PE DLL variable export
Date: Fri, 25 Mar 2016 08:07:30 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=19803

--- Comment #20 from martin.koegler at chello dot at ---
(In reply to Nick Clifton from comment #19)
> > In my option, this change is not necessary, as it just would hides broken 
> > symbols in the export library.
> 
> Actually I think that it is needed in order to prevent garbage collected
> symbols from leaking into the export table.

Such symbols would still be exported in the DLL export table and ld can
directly against the DLL binary [and therefore such symbols].

The goal of our last patches was to avoid that any exported symbol gets garbage
collected - so a bug free ld shouldn't hit any such symbols.

The only benefit could be, that we generate a link error, if we hit a ld gc-bug
and link against the import library.

As any such symbol is a bug, we could change it to a "you found a gc-section
bug - please report it" error.

> > There is second case missing (symbol matching implemented by 
> > pe_fixup_stdcalls).
> 
> OK - this revised patch contains an attempt to fix this function as well. 
> Please could you give it a try and let me know the results.

It works for my simplified test cases. I found another issue with the entry
symbol - lang_end interprets an undefined symbols in other ways too:
      /* We couldn't find the entry symbol.  Try parsing it as a
         number.  */
     /* Can't find the entry symbol, and it's not a number.  Use
         the first address in the text section.  */

Try my sample of Comment #15 - the text section is still removed, although ld
uses the first address of the text section.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]