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: Sun, 03 Apr 2016 11:12:47 +0000

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

--- Comment #21 from martin.koegler at chello dot at ---
(In reply to Nick Clifton from comment #19)
> 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.

Please apply that patch - works for a larger real world testcase (including gcc
rebuild).

There are a few corner cases:
* If the startup symbol is not found, gc-section produces different binaries,
because it does not protect the startup location (see my last comment). This
affects ELF too:

t.c
====
int test()
{
return 0;
}
====
gcc -c t.c
ld -o t t.o /usr/lib/gcc/x86_64-linux-gnu/4.9.2/crtbegin.o
/usr/lib/gcc/x86_64-linux-gnu/4.9.2/crtend.o  --gc-sections --print-gc-sections
ld -o t1 t.o /usr/lib/gcc/x86_64-linux-gnu/4.9.2/crtbegin.o
/usr/lib/gcc/x86_64-linux-gnu/4.9.2/crtend.o  --print-gc-sections

t and t1 will start at the same location, which contains a different function

* SEH inhibit the removal of functions. This does not break anything.

-- 
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]